Merge pull request #73 from TheBlueMatt/main
[ldk-java] / ts / bindings.mts
1
2 const imports: any = {};
3 imports.env = {};
4
5 imports.env.tableBase = 0;
6 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
7
8 imports.env["abort"] = function () {
9         console.error("ABORT");
10 };
11 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) {
12         console.log('function called from wasm:', fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
13 };
14 imports.env["js_free_function_ptr"] = function(fn: number) {
15         console.log("function ptr free'd from wasm:", fn);
16 };
17
18 imports.wasi_snapshot_preview1 = {
19         "fd_write" : () => {
20                 console.log("ABORT");
21         },
22         "random_get" : () => {
23                 console.log("RAND GET");
24         },
25         "environ_sizes_get" : () => {
26                 console.log("wasi_snapshot_preview1:environ_sizes_get");
27         },
28         "proc_exit" : () => {
29                 console.log("wasi_snapshot_preview1:proc_exit");
30         },
31         "environ_get" : () => {
32                 console.log("wasi_snapshot_preview1:environ_get");
33         },
34 };
35
36 var wasm = null;
37 let isWasmInitialized: boolean = false;
38
39 export async function initializeWasm(uri) {
40         const stream = fetch(uri);
41         const { instance: wasmInstance } = await WebAssembly.instantiateStreaming(stream, imports);
42         wasm = wasmInstance.exports;
43         isWasmInitialized = true;
44 };
45
46
47
48
49 // WASM CODEC
50
51 const nextMultipleOfFour = (value: number) => {
52         return Math.ceil(value / 4) * 4;
53 }
54
55 const encodeUint8Array = (inputArray) => {
56         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
57         const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
58         arrayLengthView[0] = inputArray.length;
59         const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
60         arrayMemoryView.set(inputArray);
61         return cArrayPointer;
62 }
63
64 const encodeUint32Array = (inputArray) => {
65         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
66         const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer, inputArray.length);
67         arrayMemoryView.set(inputArray, 1);
68         arrayMemoryView[0] = inputArray.length;
69         return cArrayPointer;
70 }
71
72 const getArrayLength = (arrayPointer) => {
73         const arraySizeViewer = new Uint32Array(
74                 wasm.memory.buffer, // value
75                 arrayPointer, // offset
76                 1 // one int
77         );
78         return arraySizeViewer[0];
79 }
80 const decodeUint8Array = (arrayPointer, free = true) => {
81         const arraySize = getArrayLength(arrayPointer);
82         const actualArrayViewer = new Uint8Array(
83                 wasm.memory.buffer, // value
84                 arrayPointer + 4, // offset (ignoring length bytes)
85                 arraySize // uint8 count
86         );
87         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
88         // will free the underlying memory when it becomes unreachable instead of copying here.
89         const actualArray = actualArrayViewer.slice(0, arraySize);
90         if (free) {
91                 wasm.TS_free(arrayPointer);
92         }
93         return actualArray;
94 }
95 const decodeUint32Array = (arrayPointer, free = true) => {
96         const arraySize = getArrayLength(arrayPointer);
97         const actualArrayViewer = new Uint32Array(
98                 wasm.memory.buffer, // value
99                 arrayPointer + 4, // offset (ignoring length bytes)
100                 arraySize // uint32 count
101         );
102         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
103         // will free the underlying memory when it becomes unreachable instead of copying here.
104         const actualArray = actualArrayViewer.slice(0, arraySize);
105         if (free) {
106                 wasm.TS_free(arrayPointer);
107         }
108         return actualArray;
109 }
110
111 const encodeString = (string) => {
112         // make malloc count divisible by 4
113         const memoryNeed = nextMultipleOfFour(string.length + 1);
114         const stringPointer = wasm.TS_malloc(memoryNeed);
115         const stringMemoryView = new Uint8Array(
116                 wasm.memory.buffer, // value
117                 stringPointer, // offset
118                 string.length + 1 // length
119         );
120         for (let i = 0; i < string.length; i++) {
121                 stringMemoryView[i] = string.charCodeAt(i);
122         }
123         stringMemoryView[string.length] = 0;
124         return stringPointer;
125 }
126
127 const decodeString = (stringPointer, free = true) => {
128         const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer);
129         let cursor = 0;
130         let result = '';
131
132         while (memoryView[cursor] !== 0) {
133                 result += String.fromCharCode(memoryView[cursor]);
134                 cursor++;
135         }
136
137         if (free) {
138                 wasm.wasm_free(stringPointer);
139         }
140
141         return result;
142 };
143
144 export class VecOrSliceDef {
145     public dataptr: number;
146     public datalen: number;
147     public stride: number;
148     public constructor(dataptr: number, datalen: number, stride: number) {
149         this.dataptr = dataptr;
150         this.datalen = datalen;
151         this.stride = stride;
152     }
153 }
154
155 /*
156 TODO: load WASM file
157 static {
158     System.loadLibrary("lightningjni");
159     init(java.lang.Enum.class, VecOrSliceDef.class);
160     init_class_cache();
161 }
162
163 static native void init(java.lang.Class c, java.lang.Class slicedef);
164 static native void init_class_cache();
165
166 public static native boolean deref_bool(long ptr);
167 public static native long deref_long(long ptr);
168 public static native void free_heap_ptr(long ptr);
169 public static native byte[] read_bytes(long ptr, long len);
170 public static native byte[] get_u8_slice_bytes(long slice_ptr);
171 public static native long bytes_to_u8_vec(byte[] bytes);
172 public static native long new_txpointer_copy_data(byte[] txdata);
173 public static native void txpointer_free(long ptr);
174 public static native byte[] txpointer_get_buffer(long ptr);
175 public static native long vec_slice_len(long vec);
176 public static native long new_empty_slice_vec();
177 */
178
179
180             export enum AccessError {
181                 /**
182  * The requested chain is unknown.
183  */
184 LDKAccessError_UnknownChain,
185                                 /**
186  * The requested transaction doesn't exist or hasn't confirmed.
187  */
188 LDKAccessError_UnknownTx,
189                                 
190             }
191
192             export enum COption_NoneZ {
193                 /**
194  * When we're in this state, this COption_NoneZ contains a
195  */
196 LDKCOption_NoneZ_Some,
197                                 /**
198  * When we're in this state, this COption_NoneZ contains nothing
199  */
200 LDKCOption_NoneZ_None,
201                                 
202             }
203
204             export enum ChannelMonitorUpdateErr {
205                 /**
206  * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
207 our state failed, but is expected to succeed at some point in the future).
208
209 Such a failure will \"freeze\" a channel, preventing us from revoking old states or
210 submitting new commitment transactions to the counterparty. Once the update(s) that failed
211 have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
212 via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
213 operational state.
214
215 Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
216 you return a TemporaryFailure you must ensure that it is written to disk safely before
217 writing out the latest ChannelManager state.
218
219 Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
220 (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
221 to claim it on this channel) and those updates must be applied wherever they can be. At
222 least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
223 be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
224 the channel which would invalidate previous ChannelMonitors are not made when a channel has
225 been \"frozen\".
226
227 Note that even if updates made after TemporaryFailure succeed you must still provide a
228 [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
229 normal channel operation. Note that this is normally generated through a call to
230 [`ChainMonitor::channel_monitor_updated`].
231
232 Note that the update being processed here will not be replayed for you when you return a
233 [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
234 you must store the update itself on your own local disk prior to returning a
235 TemporaryFailure. You may, of course, employ a journaling approach, storing only the
236 ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
237 reload-time.
238
239 For deployments where a copy of ChannelMonitors and other local state are backed up in a
240 remote location (with local copies persisted immediately), it is anticipated that all
241 updates will return TemporaryFailure until the remote copies could be updated.
242
243 [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
244  */
245 LDKChannelMonitorUpdateErr_TemporaryFailure,
246                                 /**
247  * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
248 different watchtower and cannot update with all watchtowers that were previously informed
249 of this channel).
250
251 At reception of this error, ChannelManager will force-close the channel and return at
252 least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
253 least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
254 update must be rejected.
255
256 This failure may also signal a failure to update the local persisted copy of one of
257 the channel monitor instance.
258
259 Note that even when you fail a holder commitment transaction update, you must store the
260 update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
261 broadcasts it (e.g distributed channel-monitor deployment)
262
263 In case of distributed watchtowers deployment, the new version must be written to disk, as
264 state may have been stored but rejected due to a block forcing a commitment broadcast. This
265 storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
266 lagging behind on block processing.
267  */
268 LDKChannelMonitorUpdateErr_PermanentFailure,
269                                 
270             }
271
272             export enum ConfirmationTarget {
273                 /**
274  * We are happy with this transaction confirming slowly when feerate drops some.
275  */
276 LDKConfirmationTarget_Background,
277                                 /**
278  * We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
279  */
280 LDKConfirmationTarget_Normal,
281                                 /**
282  * We'd like this transaction to confirm in the next few blocks.
283  */
284 LDKConfirmationTarget_HighPriority,
285                                 
286             }
287
288             export enum Level {
289                 /**
290  * Designates extremely verbose information, including gossip-induced messages
291  */
292 LDKLevel_Gossip,
293                                 /**
294  * Designates very low priority, often extremely verbose, information
295  */
296 LDKLevel_Trace,
297                                 /**
298  * Designates lower priority information
299  */
300 LDKLevel_Debug,
301                                 /**
302  * Designates useful information
303  */
304 LDKLevel_Info,
305                                 /**
306  * Designates hazardous situations
307  */
308 LDKLevel_Warn,
309                                 /**
310  * Designates very serious errors
311  */
312 LDKLevel_Error,
313                                 
314             }
315
316             export enum Network {
317                 /**
318  * The main Bitcoin blockchain.
319  */
320 LDKNetwork_Bitcoin,
321                                 /**
322  * The testnet3 blockchain.
323  */
324 LDKNetwork_Testnet,
325                                 /**
326  * A local test blockchain.
327  */
328 LDKNetwork_Regtest,
329                                 /**
330  * A blockchain on which blocks are signed instead of mined.
331  */
332 LDKNetwork_Signet,
333                                 
334             }
335
336             export enum Secp256k1Error {
337                 /**
338  * Signature failed verification
339  */
340 LDKSecp256k1Error_IncorrectSignature,
341                                 /**
342  * Badly sized message ("messages" are actually fixed-sized digests; see the MESSAGE_SIZE constant)
343  */
344 LDKSecp256k1Error_InvalidMessage,
345                                 /**
346  * Bad public key
347  */
348 LDKSecp256k1Error_InvalidPublicKey,
349                                 /**
350  * Bad signature
351  */
352 LDKSecp256k1Error_InvalidSignature,
353                                 /**
354  * Bad secret key
355  */
356 LDKSecp256k1Error_InvalidSecretKey,
357                                 /**
358  * Bad recovery id
359  */
360 LDKSecp256k1Error_InvalidRecoveryId,
361                                 /**
362  * Invalid tweak for add_assign or mul_assign
363  */
364 LDKSecp256k1Error_InvalidTweak,
365                                 /**
366  * tweak_add_check failed on an xonly public key
367  */
368 LDKSecp256k1Error_TweakCheckFailed,
369                                 /**
370  * Didn't pass enough memory to context creation with preallocated memory
371  */
372 LDKSecp256k1Error_NotEnoughMemory,
373                                 
374             }
375         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
376         export function TxOut_get_script_pubkey(thing: number): Uint8Array {
377                 if(!isWasmInitialized) {
378                         throw new Error("initializeWasm() must be awaited first!");
379                 }
380                 const nativeResponseValue = wasm.TS_TxOut_get_script_pubkey(thing);
381                 return decodeUint8Array(nativeResponseValue);
382         }
383         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
384         export function TxOut_get_value(thing: number): number {
385                 if(!isWasmInitialized) {
386                         throw new Error("initializeWasm() must be awaited first!");
387                 }
388                 const nativeResponseValue = wasm.TS_TxOut_get_value(thing);
389                 return nativeResponseValue;
390         }
391         // struct LDKChannelConfig CResult_ChannelConfigDecodeErrorZ_get_ok(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
392         export function CResult_ChannelConfigDecodeErrorZ_get_ok(owner: number): number {
393                 if(!isWasmInitialized) {
394                         throw new Error("initializeWasm() must be awaited first!");
395                 }
396                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_ok(owner);
397                 return nativeResponseValue;
398         }
399         // struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
400         export function CResult_ChannelConfigDecodeErrorZ_get_err(owner: number): number {
401                 if(!isWasmInitialized) {
402                         throw new Error("initializeWasm() must be awaited first!");
403                 }
404                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_err(owner);
405                 return nativeResponseValue;
406         }
407         // struct LDKOutPoint CResult_OutPointDecodeErrorZ_get_ok(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
408         export function CResult_OutPointDecodeErrorZ_get_ok(owner: number): number {
409                 if(!isWasmInitialized) {
410                         throw new Error("initializeWasm() must be awaited first!");
411                 }
412                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_ok(owner);
413                 return nativeResponseValue;
414         }
415         // struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
416         export function CResult_OutPointDecodeErrorZ_get_err(owner: number): number {
417                 if(!isWasmInitialized) {
418                         throw new Error("initializeWasm() must be awaited first!");
419                 }
420                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_err(owner);
421                 return nativeResponseValue;
422         }
423         // struct LDKSecretKey CResult_SecretKeyErrorZ_get_ok(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
424         export function CResult_SecretKeyErrorZ_get_ok(owner: number): Uint8Array {
425                 if(!isWasmInitialized) {
426                         throw new Error("initializeWasm() must be awaited first!");
427                 }
428                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_ok(owner);
429                 return decodeUint8Array(nativeResponseValue);
430         }
431         // enum LDKSecp256k1Error CResult_SecretKeyErrorZ_get_err(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
432         export function CResult_SecretKeyErrorZ_get_err(owner: number): Secp256k1Error {
433                 if(!isWasmInitialized) {
434                         throw new Error("initializeWasm() must be awaited first!");
435                 }
436                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_err(owner);
437                 return nativeResponseValue;
438         }
439         // struct LDKPublicKey CResult_PublicKeyErrorZ_get_ok(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
440         export function CResult_PublicKeyErrorZ_get_ok(owner: number): Uint8Array {
441                 if(!isWasmInitialized) {
442                         throw new Error("initializeWasm() must be awaited first!");
443                 }
444                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_ok(owner);
445                 return decodeUint8Array(nativeResponseValue);
446         }
447         // enum LDKSecp256k1Error CResult_PublicKeyErrorZ_get_err(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
448         export function CResult_PublicKeyErrorZ_get_err(owner: number): Secp256k1Error {
449                 if(!isWasmInitialized) {
450                         throw new Error("initializeWasm() must be awaited first!");
451                 }
452                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_err(owner);
453                 return nativeResponseValue;
454         }
455         // struct LDKTxCreationKeys CResult_TxCreationKeysDecodeErrorZ_get_ok(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
456         export function CResult_TxCreationKeysDecodeErrorZ_get_ok(owner: number): number {
457                 if(!isWasmInitialized) {
458                         throw new Error("initializeWasm() must be awaited first!");
459                 }
460                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_ok(owner);
461                 return nativeResponseValue;
462         }
463         // struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
464         export function CResult_TxCreationKeysDecodeErrorZ_get_err(owner: number): number {
465                 if(!isWasmInitialized) {
466                         throw new Error("initializeWasm() must be awaited first!");
467                 }
468                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_err(owner);
469                 return nativeResponseValue;
470         }
471         // struct LDKChannelPublicKeys CResult_ChannelPublicKeysDecodeErrorZ_get_ok(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
472         export function CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner: number): number {
473                 if(!isWasmInitialized) {
474                         throw new Error("initializeWasm() must be awaited first!");
475                 }
476                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner);
477                 return nativeResponseValue;
478         }
479         // struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
480         export function CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner: number): number {
481                 if(!isWasmInitialized) {
482                         throw new Error("initializeWasm() must be awaited first!");
483                 }
484                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner);
485                 return nativeResponseValue;
486         }
487         // struct LDKTxCreationKeys CResult_TxCreationKeysErrorZ_get_ok(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
488         export function CResult_TxCreationKeysErrorZ_get_ok(owner: number): number {
489                 if(!isWasmInitialized) {
490                         throw new Error("initializeWasm() must be awaited first!");
491                 }
492                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_ok(owner);
493                 return nativeResponseValue;
494         }
495         // enum LDKSecp256k1Error CResult_TxCreationKeysErrorZ_get_err(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
496         export function CResult_TxCreationKeysErrorZ_get_err(owner: number): Secp256k1Error {
497                 if(!isWasmInitialized) {
498                         throw new Error("initializeWasm() must be awaited first!");
499                 }
500                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_err(owner);
501                 return nativeResponseValue;
502         }
503         export class LDKCOption_u32Z {
504                 protected constructor() {}
505         }
506         export class LDKCOption_u32Z_Some extends LDKCOption_u32Z {
507                 constructor(public some: number) { super(); }
508         }
509         export class LDKCOption_u32Z_None extends LDKCOption_u32Z {
510                 constructor() { super(); }
511         }
512         export function LDKCOption_u32Z_ref_from_ptr(ptr: number): number {
513                 if(!isWasmInitialized) {
514                         throw new Error("initializeWasm() must be awaited first!");
515                 }
516                 const nativeResponseValue = wasm.TS_LDKCOption_u32Z_ref_from_ptr(ptr);
517                 return nativeResponseValue;
518         }
519         // struct LDKHTLCOutputInCommitment CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
520         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner: number): number {
521                 if(!isWasmInitialized) {
522                         throw new Error("initializeWasm() must be awaited first!");
523                 }
524                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner);
525                 return nativeResponseValue;
526         }
527         // struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
528         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner: number): number {
529                 if(!isWasmInitialized) {
530                         throw new Error("initializeWasm() must be awaited first!");
531                 }
532                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner);
533                 return nativeResponseValue;
534         }
535         // struct LDKCounterpartyChannelTransactionParameters CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
536         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
537                 if(!isWasmInitialized) {
538                         throw new Error("initializeWasm() must be awaited first!");
539                 }
540                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner);
541                 return nativeResponseValue;
542         }
543         // struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
544         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
545                 if(!isWasmInitialized) {
546                         throw new Error("initializeWasm() must be awaited first!");
547                 }
548                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner);
549                 return nativeResponseValue;
550         }
551         // struct LDKChannelTransactionParameters CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
552         export function CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
553                 if(!isWasmInitialized) {
554                         throw new Error("initializeWasm() must be awaited first!");
555                 }
556                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner);
557                 return nativeResponseValue;
558         }
559         // struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
560         export function CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
561                 if(!isWasmInitialized) {
562                         throw new Error("initializeWasm() must be awaited first!");
563                 }
564                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner);
565                 return nativeResponseValue;
566         }
567         // struct LDKHolderCommitmentTransaction CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
568         export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
569                 if(!isWasmInitialized) {
570                         throw new Error("initializeWasm() must be awaited first!");
571                 }
572                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner);
573                 return nativeResponseValue;
574         }
575         // struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
576         export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
577                 if(!isWasmInitialized) {
578                         throw new Error("initializeWasm() must be awaited first!");
579                 }
580                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner);
581                 return nativeResponseValue;
582         }
583         // struct LDKBuiltCommitmentTransaction CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
584         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
585                 if(!isWasmInitialized) {
586                         throw new Error("initializeWasm() must be awaited first!");
587                 }
588                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner);
589                 return nativeResponseValue;
590         }
591         // struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
592         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
593                 if(!isWasmInitialized) {
594                         throw new Error("initializeWasm() must be awaited first!");
595                 }
596                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner);
597                 return nativeResponseValue;
598         }
599         // struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
600         export function CResult_TrustedClosingTransactionNoneZ_get_ok(owner: number): number {
601                 if(!isWasmInitialized) {
602                         throw new Error("initializeWasm() must be awaited first!");
603                 }
604                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_ok(owner);
605                 return nativeResponseValue;
606         }
607         // void CResult_TrustedClosingTransactionNoneZ_get_err(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
608         export function CResult_TrustedClosingTransactionNoneZ_get_err(owner: number): void {
609                 if(!isWasmInitialized) {
610                         throw new Error("initializeWasm() must be awaited first!");
611                 }
612                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_err(owner);
613                 // debug statements here
614         }
615         // struct LDKCommitmentTransaction CResult_CommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
616         export function CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
617                 if(!isWasmInitialized) {
618                         throw new Error("initializeWasm() must be awaited first!");
619                 }
620                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner);
621                 return nativeResponseValue;
622         }
623         // struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
624         export function CResult_CommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
625                 if(!isWasmInitialized) {
626                         throw new Error("initializeWasm() must be awaited first!");
627                 }
628                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(owner);
629                 return nativeResponseValue;
630         }
631         // struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
632         export function CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner: number): number {
633                 if(!isWasmInitialized) {
634                         throw new Error("initializeWasm() must be awaited first!");
635                 }
636                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner);
637                 return nativeResponseValue;
638         }
639         // void CResult_TrustedCommitmentTransactionNoneZ_get_err(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
640         export function CResult_TrustedCommitmentTransactionNoneZ_get_err(owner: number): void {
641                 if(!isWasmInitialized) {
642                         throw new Error("initializeWasm() must be awaited first!");
643                 }
644                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_err(owner);
645                 // debug statements here
646         }
647         // struct LDKCVec_SignatureZ CResult_CVec_SignatureZNoneZ_get_ok(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
648         export function CResult_CVec_SignatureZNoneZ_get_ok(owner: number): Uint8Array[] {
649                 if(!isWasmInitialized) {
650                         throw new Error("initializeWasm() must be awaited first!");
651                 }
652                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_ok(owner);
653                 return nativeResponseValue;
654         }
655         // void CResult_CVec_SignatureZNoneZ_get_err(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
656         export function CResult_CVec_SignatureZNoneZ_get_err(owner: number): void {
657                 if(!isWasmInitialized) {
658                         throw new Error("initializeWasm() must be awaited first!");
659                 }
660                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_err(owner);
661                 // debug statements here
662         }
663         // struct LDKShutdownScript CResult_ShutdownScriptDecodeErrorZ_get_ok(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
664         export function CResult_ShutdownScriptDecodeErrorZ_get_ok(owner: number): number {
665                 if(!isWasmInitialized) {
666                         throw new Error("initializeWasm() must be awaited first!");
667                 }
668                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_ok(owner);
669                 return nativeResponseValue;
670         }
671         // struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
672         export function CResult_ShutdownScriptDecodeErrorZ_get_err(owner: number): number {
673                 if(!isWasmInitialized) {
674                         throw new Error("initializeWasm() must be awaited first!");
675                 }
676                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_err(owner);
677                 return nativeResponseValue;
678         }
679         // struct LDKShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
680         export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner: number): number {
681                 if(!isWasmInitialized) {
682                         throw new Error("initializeWasm() must be awaited first!");
683                 }
684                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner);
685                 return nativeResponseValue;
686         }
687         // struct LDKInvalidShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
688         export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner: number): number {
689                 if(!isWasmInitialized) {
690                         throw new Error("initializeWasm() must be awaited first!");
691                 }
692                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner);
693                 return nativeResponseValue;
694         }
695
696
697
698 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
699
700                 export interface LDKType {
701                         type_id (): number;
702                         debug_str (): String;
703                         write (): Uint8Array;
704                 }
705
706                 export function LDKType_new(impl: LDKType): number {
707                         throw new Error('unimplemented'); // TODO: bind to WASM
708                 }
709
710 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
711
712
713         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
714         export function Type_type_id(this_arg: number): number {
715                 if(!isWasmInitialized) {
716                         throw new Error("initializeWasm() must be awaited first!");
717                 }
718                 const nativeResponseValue = wasm.TS_Type_type_id(this_arg);
719                 return nativeResponseValue;
720         }
721         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
722         export function Type_debug_str(this_arg: number): String {
723                 if(!isWasmInitialized) {
724                         throw new Error("initializeWasm() must be awaited first!");
725                 }
726                 const nativeResponseValue = wasm.TS_Type_debug_str(this_arg);
727                 return nativeResponseValue;
728         }
729         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
730         export function Type_write(this_arg: number): Uint8Array {
731                 if(!isWasmInitialized) {
732                         throw new Error("initializeWasm() must be awaited first!");
733                 }
734                 const nativeResponseValue = wasm.TS_Type_write(this_arg);
735                 return decodeUint8Array(nativeResponseValue);
736         }
737         export class LDKCOption_TypeZ {
738                 protected constructor() {}
739         }
740         export class LDKCOption_TypeZ_Some extends LDKCOption_TypeZ {
741                 constructor(public some: number) { super(); }
742         }
743         export class LDKCOption_TypeZ_None extends LDKCOption_TypeZ {
744                 constructor() { super(); }
745         }
746         export function LDKCOption_TypeZ_ref_from_ptr(ptr: number): number {
747                 if(!isWasmInitialized) {
748                         throw new Error("initializeWasm() must be awaited first!");
749                 }
750                 const nativeResponseValue = wasm.TS_LDKCOption_TypeZ_ref_from_ptr(ptr);
751                 return nativeResponseValue;
752         }
753         // struct LDKCOption_TypeZ CResult_COption_TypeZDecodeErrorZ_get_ok(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
754         export function CResult_COption_TypeZDecodeErrorZ_get_ok(owner: number): number {
755                 if(!isWasmInitialized) {
756                         throw new Error("initializeWasm() must be awaited first!");
757                 }
758                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_ok(owner);
759                 return nativeResponseValue;
760         }
761         // struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
762         export function CResult_COption_TypeZDecodeErrorZ_get_err(owner: number): number {
763                 if(!isWasmInitialized) {
764                         throw new Error("initializeWasm() must be awaited first!");
765                 }
766                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_err(owner);
767                 return nativeResponseValue;
768         }
769         // struct LDKStr CResult_StringErrorZ_get_ok(LDKCResult_StringErrorZ *NONNULL_PTR owner);
770         export function CResult_StringErrorZ_get_ok(owner: number): String {
771                 if(!isWasmInitialized) {
772                         throw new Error("initializeWasm() must be awaited first!");
773                 }
774                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_ok(owner);
775                 return nativeResponseValue;
776         }
777         // enum LDKSecp256k1Error CResult_StringErrorZ_get_err(LDKCResult_StringErrorZ *NONNULL_PTR owner);
778         export function CResult_StringErrorZ_get_err(owner: number): Secp256k1Error {
779                 if(!isWasmInitialized) {
780                         throw new Error("initializeWasm() must be awaited first!");
781                 }
782                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_err(owner);
783                 return nativeResponseValue;
784         }
785         // struct LDKChannelMonitorUpdate CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
786         export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner: number): number {
787                 if(!isWasmInitialized) {
788                         throw new Error("initializeWasm() must be awaited first!");
789                 }
790                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner);
791                 return nativeResponseValue;
792         }
793         // struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
794         export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner: number): number {
795                 if(!isWasmInitialized) {
796                         throw new Error("initializeWasm() must be awaited first!");
797                 }
798                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner);
799                 return nativeResponseValue;
800         }
801         export class LDKMonitorEvent {
802                 protected constructor() {}
803         }
804         export class LDKMonitorEvent_HTLCEvent extends LDKMonitorEvent {
805                 constructor(public htlc_event: number) { super(); }
806         }
807         export class LDKMonitorEvent_CommitmentTxConfirmed extends LDKMonitorEvent {
808                 constructor(public commitment_tx_confirmed: number) { super(); }
809         }
810         export class LDKMonitorEvent_UpdateCompleted extends LDKMonitorEvent {
811                 constructor(public funding_txo: number, public monitor_update_id: number) { super(); }
812         }
813         export class LDKMonitorEvent_UpdateFailed extends LDKMonitorEvent {
814                 constructor(public update_failed: number) { super(); }
815         }
816         export function LDKMonitorEvent_ref_from_ptr(ptr: number): number {
817                 if(!isWasmInitialized) {
818                         throw new Error("initializeWasm() must be awaited first!");
819                 }
820                 const nativeResponseValue = wasm.TS_LDKMonitorEvent_ref_from_ptr(ptr);
821                 return nativeResponseValue;
822         }
823         export class LDKCOption_MonitorEventZ {
824                 protected constructor() {}
825         }
826         export class LDKCOption_MonitorEventZ_Some extends LDKCOption_MonitorEventZ {
827                 constructor(public some: number) { super(); }
828         }
829         export class LDKCOption_MonitorEventZ_None extends LDKCOption_MonitorEventZ {
830                 constructor() { super(); }
831         }
832         export function LDKCOption_MonitorEventZ_ref_from_ptr(ptr: number): number {
833                 if(!isWasmInitialized) {
834                         throw new Error("initializeWasm() must be awaited first!");
835                 }
836                 const nativeResponseValue = wasm.TS_LDKCOption_MonitorEventZ_ref_from_ptr(ptr);
837                 return nativeResponseValue;
838         }
839         // struct LDKCOption_MonitorEventZ CResult_COption_MonitorEventZDecodeErrorZ_get_ok(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
840         export function CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner: number): number {
841                 if(!isWasmInitialized) {
842                         throw new Error("initializeWasm() must be awaited first!");
843                 }
844                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner);
845                 return nativeResponseValue;
846         }
847         // struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
848         export function CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner: number): number {
849                 if(!isWasmInitialized) {
850                         throw new Error("initializeWasm() must be awaited first!");
851                 }
852                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner);
853                 return nativeResponseValue;
854         }
855         // struct LDKHTLCUpdate CResult_HTLCUpdateDecodeErrorZ_get_ok(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
856         export function CResult_HTLCUpdateDecodeErrorZ_get_ok(owner: number): number {
857                 if(!isWasmInitialized) {
858                         throw new Error("initializeWasm() must be awaited first!");
859                 }
860                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_ok(owner);
861                 return nativeResponseValue;
862         }
863         // struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
864         export function CResult_HTLCUpdateDecodeErrorZ_get_err(owner: number): number {
865                 if(!isWasmInitialized) {
866                         throw new Error("initializeWasm() must be awaited first!");
867                 }
868                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_err(owner);
869                 return nativeResponseValue;
870         }
871         // void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
872         export function CResult_NoneNoneZ_get_ok(owner: number): void {
873                 if(!isWasmInitialized) {
874                         throw new Error("initializeWasm() must be awaited first!");
875                 }
876                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_ok(owner);
877                 // debug statements here
878         }
879         // void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
880         export function CResult_NoneNoneZ_get_err(owner: number): void {
881                 if(!isWasmInitialized) {
882                         throw new Error("initializeWasm() must be awaited first!");
883                 }
884                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_err(owner);
885                 // debug statements here
886         }
887         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
888         export function C2Tuple_OutPointScriptZ_get_a(owner: number): number {
889                 if(!isWasmInitialized) {
890                         throw new Error("initializeWasm() must be awaited first!");
891                 }
892                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_a(owner);
893                 return nativeResponseValue;
894         }
895         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
896         export function C2Tuple_OutPointScriptZ_get_b(owner: number): Uint8Array {
897                 if(!isWasmInitialized) {
898                         throw new Error("initializeWasm() must be awaited first!");
899                 }
900                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_b(owner);
901                 return decodeUint8Array(nativeResponseValue);
902         }
903         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
904         export function C2Tuple_u32ScriptZ_get_a(owner: number): number {
905                 if(!isWasmInitialized) {
906                         throw new Error("initializeWasm() must be awaited first!");
907                 }
908                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_a(owner);
909                 return nativeResponseValue;
910         }
911         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
912         export function C2Tuple_u32ScriptZ_get_b(owner: number): Uint8Array {
913                 if(!isWasmInitialized) {
914                         throw new Error("initializeWasm() must be awaited first!");
915                 }
916                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_b(owner);
917                 return decodeUint8Array(nativeResponseValue);
918         }
919         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
920         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner: number): Uint8Array {
921                 if(!isWasmInitialized) {
922                         throw new Error("initializeWasm() must be awaited first!");
923                 }
924                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner);
925                 return decodeUint8Array(nativeResponseValue);
926         }
927         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
928         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner: number): number[] {
929                 if(!isWasmInitialized) {
930                         throw new Error("initializeWasm() must be awaited first!");
931                 }
932                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner);
933                 return nativeResponseValue;
934         }
935         export class LDKPaymentPurpose {
936                 protected constructor() {}
937         }
938         export class LDKPaymentPurpose_InvoicePayment extends LDKPaymentPurpose {
939                 constructor(public payment_preimage: Uint8Array, public payment_secret: Uint8Array) { super(); }
940         }
941         export class LDKPaymentPurpose_SpontaneousPayment extends LDKPaymentPurpose {
942                 constructor(public spontaneous_payment: Uint8Array) { super(); }
943         }
944         export function LDKPaymentPurpose_ref_from_ptr(ptr: number): number {
945                 if(!isWasmInitialized) {
946                         throw new Error("initializeWasm() must be awaited first!");
947                 }
948                 const nativeResponseValue = wasm.TS_LDKPaymentPurpose_ref_from_ptr(ptr);
949                 return nativeResponseValue;
950         }
951         export class LDKCOption_u64Z {
952                 protected constructor() {}
953         }
954         export class LDKCOption_u64Z_Some extends LDKCOption_u64Z {
955                 constructor(public some: number) { super(); }
956         }
957         export class LDKCOption_u64Z_None extends LDKCOption_u64Z {
958                 constructor() { super(); }
959         }
960         export function LDKCOption_u64Z_ref_from_ptr(ptr: number): number {
961                 if(!isWasmInitialized) {
962                         throw new Error("initializeWasm() must be awaited first!");
963                 }
964                 const nativeResponseValue = wasm.TS_LDKCOption_u64Z_ref_from_ptr(ptr);
965                 return nativeResponseValue;
966         }
967         export class LDKNetworkUpdate {
968                 protected constructor() {}
969         }
970         export class LDKNetworkUpdate_ChannelUpdateMessage extends LDKNetworkUpdate {
971                 constructor(public msg: number) { super(); }
972         }
973         export class LDKNetworkUpdate_ChannelClosed extends LDKNetworkUpdate {
974                 constructor(public short_channel_id: number, public is_permanent: boolean) { super(); }
975         }
976         export class LDKNetworkUpdate_NodeFailure extends LDKNetworkUpdate {
977                 constructor(public node_id: Uint8Array, public is_permanent: boolean) { super(); }
978         }
979         export function LDKNetworkUpdate_ref_from_ptr(ptr: number): number {
980                 if(!isWasmInitialized) {
981                         throw new Error("initializeWasm() must be awaited first!");
982                 }
983                 const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ref_from_ptr(ptr);
984                 return nativeResponseValue;
985         }
986         export class LDKCOption_NetworkUpdateZ {
987                 protected constructor() {}
988         }
989         export class LDKCOption_NetworkUpdateZ_Some extends LDKCOption_NetworkUpdateZ {
990                 constructor(public some: number) { super(); }
991         }
992         export class LDKCOption_NetworkUpdateZ_None extends LDKCOption_NetworkUpdateZ {
993                 constructor() { super(); }
994         }
995         export function LDKCOption_NetworkUpdateZ_ref_from_ptr(ptr: number): number {
996                 if(!isWasmInitialized) {
997                         throw new Error("initializeWasm() must be awaited first!");
998                 }
999                 const nativeResponseValue = wasm.TS_LDKCOption_NetworkUpdateZ_ref_from_ptr(ptr);
1000                 return nativeResponseValue;
1001         }
1002         export class LDKSpendableOutputDescriptor {
1003                 protected constructor() {}
1004         }
1005         export class LDKSpendableOutputDescriptor_StaticOutput extends LDKSpendableOutputDescriptor {
1006                 constructor(public outpoint: number, public output: number) { super(); }
1007         }
1008         export class LDKSpendableOutputDescriptor_DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
1009                 constructor(public delayed_payment_output: number) { super(); }
1010         }
1011         export class LDKSpendableOutputDescriptor_StaticPaymentOutput extends LDKSpendableOutputDescriptor {
1012                 constructor(public static_payment_output: number) { super(); }
1013         }
1014         export function LDKSpendableOutputDescriptor_ref_from_ptr(ptr: number): number {
1015                 if(!isWasmInitialized) {
1016                         throw new Error("initializeWasm() must be awaited first!");
1017                 }
1018                 const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_ref_from_ptr(ptr);
1019                 return nativeResponseValue;
1020         }
1021         export class LDKClosureReason {
1022                 protected constructor() {}
1023         }
1024         export class LDKClosureReason_CounterpartyForceClosed extends LDKClosureReason {
1025                 constructor(public peer_msg: String) { super(); }
1026         }
1027         export class LDKClosureReason_HolderForceClosed extends LDKClosureReason {
1028                 constructor() { super(); }
1029         }
1030         export class LDKClosureReason_CooperativeClosure extends LDKClosureReason {
1031                 constructor() { super(); }
1032         }
1033         export class LDKClosureReason_CommitmentTxConfirmed extends LDKClosureReason {
1034                 constructor() { super(); }
1035         }
1036         export class LDKClosureReason_FundingTimedOut extends LDKClosureReason {
1037                 constructor() { super(); }
1038         }
1039         export class LDKClosureReason_ProcessingError extends LDKClosureReason {
1040                 constructor(public err: String) { super(); }
1041         }
1042         export class LDKClosureReason_DisconnectedPeer extends LDKClosureReason {
1043                 constructor() { super(); }
1044         }
1045         export class LDKClosureReason_OutdatedChannelManager extends LDKClosureReason {
1046                 constructor() { super(); }
1047         }
1048         export function LDKClosureReason_ref_from_ptr(ptr: number): number {
1049                 if(!isWasmInitialized) {
1050                         throw new Error("initializeWasm() must be awaited first!");
1051                 }
1052                 const nativeResponseValue = wasm.TS_LDKClosureReason_ref_from_ptr(ptr);
1053                 return nativeResponseValue;
1054         }
1055         export class LDKEvent {
1056                 protected constructor() {}
1057         }
1058         export class LDKEvent_FundingGenerationReady extends LDKEvent {
1059                 constructor(public temporary_channel_id: Uint8Array, public channel_value_satoshis: number, public output_script: Uint8Array, public user_channel_id: number) { super(); }
1060         }
1061         export class LDKEvent_PaymentReceived extends LDKEvent {
1062                 constructor(public payment_hash: Uint8Array, public amt: number, public purpose: number) { super(); }
1063         }
1064         export class LDKEvent_PaymentSent extends LDKEvent {
1065                 constructor(public payment_id: Uint8Array, public payment_preimage: Uint8Array, public payment_hash: Uint8Array, public fee_paid_msat: number) { super(); }
1066         }
1067         export class LDKEvent_PaymentPathFailed extends LDKEvent {
1068                 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(); }
1069         }
1070         export class LDKEvent_PaymentFailed extends LDKEvent {
1071                 constructor(public payment_id: Uint8Array, public payment_hash: Uint8Array) { super(); }
1072         }
1073         export class LDKEvent_PendingHTLCsForwardable extends LDKEvent {
1074                 constructor(public time_forwardable: number) { super(); }
1075         }
1076         export class LDKEvent_SpendableOutputs extends LDKEvent {
1077                 constructor(public outputs: number[]) { super(); }
1078         }
1079         export class LDKEvent_PaymentForwarded extends LDKEvent {
1080                 constructor(public fee_earned_msat: number, public claim_from_onchain_tx: boolean) { super(); }
1081         }
1082         export class LDKEvent_ChannelClosed extends LDKEvent {
1083                 constructor(public channel_id: Uint8Array, public user_channel_id: number, public reason: number) { super(); }
1084         }
1085         export class LDKEvent_DiscardFunding extends LDKEvent {
1086                 constructor(public channel_id: Uint8Array, public transaction: Uint8Array) { super(); }
1087         }
1088         export class LDKEvent_PaymentPathSuccessful extends LDKEvent {
1089                 constructor(public payment_id: Uint8Array, public payment_hash: Uint8Array, public path: number[]) { super(); }
1090         }
1091         export function LDKEvent_ref_from_ptr(ptr: number): number {
1092                 if(!isWasmInitialized) {
1093                         throw new Error("initializeWasm() must be awaited first!");
1094                 }
1095                 const nativeResponseValue = wasm.TS_LDKEvent_ref_from_ptr(ptr);
1096                 return nativeResponseValue;
1097         }
1098         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1099         export function C2Tuple_usizeTransactionZ_get_a(owner: number): number {
1100                 if(!isWasmInitialized) {
1101                         throw new Error("initializeWasm() must be awaited first!");
1102                 }
1103                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_a(owner);
1104                 return nativeResponseValue;
1105         }
1106         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1107         export function C2Tuple_usizeTransactionZ_get_b(owner: number): Uint8Array {
1108                 if(!isWasmInitialized) {
1109                         throw new Error("initializeWasm() must be awaited first!");
1110                 }
1111                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_b(owner);
1112                 return decodeUint8Array(nativeResponseValue);
1113         }
1114         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1115         export function C2Tuple_u32TxOutZ_get_a(owner: number): number {
1116                 if(!isWasmInitialized) {
1117                         throw new Error("initializeWasm() must be awaited first!");
1118                 }
1119                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_a(owner);
1120                 return nativeResponseValue;
1121         }
1122         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1123         export function C2Tuple_u32TxOutZ_get_b(owner: number): number {
1124                 if(!isWasmInitialized) {
1125                         throw new Error("initializeWasm() must be awaited first!");
1126                 }
1127                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_b(owner);
1128                 return nativeResponseValue;
1129         }
1130         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1131         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner: number): Uint8Array {
1132                 if(!isWasmInitialized) {
1133                         throw new Error("initializeWasm() must be awaited first!");
1134                 }
1135                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner);
1136                 return decodeUint8Array(nativeResponseValue);
1137         }
1138         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1139         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner: number): number[] {
1140                 if(!isWasmInitialized) {
1141                         throw new Error("initializeWasm() must be awaited first!");
1142                 }
1143                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner);
1144                 return nativeResponseValue;
1145         }
1146         export class LDKBalance {
1147                 protected constructor() {}
1148         }
1149         export class LDKBalance_ClaimableOnChannelClose extends LDKBalance {
1150                 constructor(public claimable_amount_satoshis: number) { super(); }
1151         }
1152         export class LDKBalance_ClaimableAwaitingConfirmations extends LDKBalance {
1153                 constructor(public claimable_amount_satoshis: number, public confirmation_height: number) { super(); }
1154         }
1155         export class LDKBalance_ContentiousClaimable extends LDKBalance {
1156                 constructor(public claimable_amount_satoshis: number, public timeout_height: number) { super(); }
1157         }
1158         export class LDKBalance_MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1159                 constructor(public claimable_amount_satoshis: number, public claimable_height: number) { super(); }
1160         }
1161         export function LDKBalance_ref_from_ptr(ptr: number): number {
1162                 if(!isWasmInitialized) {
1163                         throw new Error("initializeWasm() must be awaited first!");
1164                 }
1165                 const nativeResponseValue = wasm.TS_LDKBalance_ref_from_ptr(ptr);
1166                 return nativeResponseValue;
1167         }
1168         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1169         export function C2Tuple_SignatureCVec_SignatureZZ_get_a(owner: number): Uint8Array {
1170                 if(!isWasmInitialized) {
1171                         throw new Error("initializeWasm() must be awaited first!");
1172                 }
1173                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(owner);
1174                 return decodeUint8Array(nativeResponseValue);
1175         }
1176         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1177         export function C2Tuple_SignatureCVec_SignatureZZ_get_b(owner: number): Uint8Array[] {
1178                 if(!isWasmInitialized) {
1179                         throw new Error("initializeWasm() must be awaited first!");
1180                 }
1181                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(owner);
1182                 return nativeResponseValue;
1183         }
1184         // struct LDKC2Tuple_SignatureCVec_SignatureZZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1185         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner: number): number {
1186                 if(!isWasmInitialized) {
1187                         throw new Error("initializeWasm() must be awaited first!");
1188                 }
1189                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner);
1190                 return nativeResponseValue;
1191         }
1192         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1193         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner: number): void {
1194                 if(!isWasmInitialized) {
1195                         throw new Error("initializeWasm() must be awaited first!");
1196                 }
1197                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner);
1198                 // debug statements here
1199         }
1200         // struct LDKSignature CResult_SignatureNoneZ_get_ok(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1201         export function CResult_SignatureNoneZ_get_ok(owner: number): Uint8Array {
1202                 if(!isWasmInitialized) {
1203                         throw new Error("initializeWasm() must be awaited first!");
1204                 }
1205                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_ok(owner);
1206                 return decodeUint8Array(nativeResponseValue);
1207         }
1208         // void CResult_SignatureNoneZ_get_err(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1209         export function CResult_SignatureNoneZ_get_err(owner: number): void {
1210                 if(!isWasmInitialized) {
1211                         throw new Error("initializeWasm() must be awaited first!");
1212                 }
1213                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_err(owner);
1214                 // debug statements here
1215         }
1216
1217
1218
1219 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1220
1221                 export interface LDKBaseSign {
1222                         get_per_commitment_point (idx: number): Uint8Array;
1223                         release_commitment_secret (idx: number): Uint8Array;
1224                         validate_holder_commitment (holder_tx: number): number;
1225                         channel_keys_id (): Uint8Array;
1226                         sign_counterparty_commitment (commitment_tx: number): number;
1227                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
1228                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
1229                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
1230                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
1231                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
1232                         sign_closing_transaction (closing_tx: number): number;
1233                         sign_channel_announcement (msg: number): number;
1234                         ready_channel (channel_parameters: number): void;
1235                 }
1236
1237                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
1238                         throw new Error('unimplemented'); // TODO: bind to WASM
1239                 }
1240
1241 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1242
1243
1244         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1245         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
1246                 if(!isWasmInitialized) {
1247                         throw new Error("initializeWasm() must be awaited first!");
1248                 }
1249                 const nativeResponseValue = wasm.TS_BaseSign_get_per_commitment_point(this_arg, idx);
1250                 return decodeUint8Array(nativeResponseValue);
1251         }
1252         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1253         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
1254                 if(!isWasmInitialized) {
1255                         throw new Error("initializeWasm() must be awaited first!");
1256                 }
1257                 const nativeResponseValue = wasm.TS_BaseSign_release_commitment_secret(this_arg, idx);
1258                 return decodeUint8Array(nativeResponseValue);
1259         }
1260         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
1261         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
1262                 if(!isWasmInitialized) {
1263                         throw new Error("initializeWasm() must be awaited first!");
1264                 }
1265                 const nativeResponseValue = wasm.TS_BaseSign_validate_holder_commitment(this_arg, holder_tx);
1266                 return nativeResponseValue;
1267         }
1268         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
1269         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
1270                 if(!isWasmInitialized) {
1271                         throw new Error("initializeWasm() must be awaited first!");
1272                 }
1273                 const nativeResponseValue = wasm.TS_BaseSign_channel_keys_id(this_arg);
1274                 return decodeUint8Array(nativeResponseValue);
1275         }
1276         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
1277         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
1278                 if(!isWasmInitialized) {
1279                         throw new Error("initializeWasm() must be awaited first!");
1280                 }
1281                 const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
1282                 return nativeResponseValue;
1283         }
1284         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
1285         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
1286                 if(!isWasmInitialized) {
1287                         throw new Error("initializeWasm() must be awaited first!");
1288                 }
1289                 const nativeResponseValue = wasm.TS_BaseSign_validate_counterparty_revocation(this_arg, idx, encodeUint8Array(secret));
1290                 return nativeResponseValue;
1291         }
1292         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
1293         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
1294                 if(!isWasmInitialized) {
1295                         throw new Error("initializeWasm() must be awaited first!");
1296                 }
1297                 const nativeResponseValue = wasm.TS_BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
1298                 return nativeResponseValue;
1299         }
1300         // 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]
1301         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
1302                 if(!isWasmInitialized) {
1303                         throw new Error("initializeWasm() must be awaited first!");
1304                 }
1305                 const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_output(this_arg, encodeUint8Array(justice_tx), input, amount, encodeUint8Array(per_commitment_key));
1306                 return nativeResponseValue;
1307         }
1308         // 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
1309         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
1310                 if(!isWasmInitialized) {
1311                         throw new Error("initializeWasm() must be awaited first!");
1312                 }
1313                 const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_htlc(this_arg, encodeUint8Array(justice_tx), input, amount, encodeUint8Array(per_commitment_key), htlc);
1314                 return nativeResponseValue;
1315         }
1316         // 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
1317         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
1318                 if(!isWasmInitialized) {
1319                         throw new Error("initializeWasm() must be awaited first!");
1320                 }
1321                 const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeUint8Array(htlc_tx), input, amount, encodeUint8Array(per_commitment_point), htlc);
1322                 return nativeResponseValue;
1323         }
1324         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
1325         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
1326                 if(!isWasmInitialized) {
1327                         throw new Error("initializeWasm() must be awaited first!");
1328                 }
1329                 const nativeResponseValue = wasm.TS_BaseSign_sign_closing_transaction(this_arg, closing_tx);
1330                 return nativeResponseValue;
1331         }
1332         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
1333         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
1334                 if(!isWasmInitialized) {
1335                         throw new Error("initializeWasm() must be awaited first!");
1336                 }
1337                 const nativeResponseValue = wasm.TS_BaseSign_sign_channel_announcement(this_arg, msg);
1338                 return nativeResponseValue;
1339         }
1340         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
1341         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
1342                 if(!isWasmInitialized) {
1343                         throw new Error("initializeWasm() must be awaited first!");
1344                 }
1345                 const nativeResponseValue = wasm.TS_BaseSign_ready_channel(this_arg, channel_parameters);
1346                 // debug statements here
1347         }
1348         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
1349         export function BaseSign_get_pubkeys(this_arg: number): number {
1350                 if(!isWasmInitialized) {
1351                         throw new Error("initializeWasm() must be awaited first!");
1352                 }
1353                 const nativeResponseValue = wasm.TS_BaseSign_get_pubkeys(this_arg);
1354                 return nativeResponseValue;
1355         }
1356
1357
1358
1359 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1360
1361                 export interface LDKSign {
1362                         write (): Uint8Array;
1363                 }
1364
1365                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
1366                         throw new Error('unimplemented'); // TODO: bind to WASM
1367                 }
1368
1369 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1370
1371
1372         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
1373         export function Sign_write(this_arg: number): Uint8Array {
1374                 if(!isWasmInitialized) {
1375                         throw new Error("initializeWasm() must be awaited first!");
1376                 }
1377                 const nativeResponseValue = wasm.TS_Sign_write(this_arg);
1378                 return decodeUint8Array(nativeResponseValue);
1379         }
1380         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1381         export function C2Tuple_BlockHashChannelMonitorZ_get_a(owner: number): Uint8Array {
1382                 if(!isWasmInitialized) {
1383                         throw new Error("initializeWasm() must be awaited first!");
1384                 }
1385                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_a(owner);
1386                 return decodeUint8Array(nativeResponseValue);
1387         }
1388         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1389         export function C2Tuple_BlockHashChannelMonitorZ_get_b(owner: number): number {
1390                 if(!isWasmInitialized) {
1391                         throw new Error("initializeWasm() must be awaited first!");
1392                 }
1393                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_b(owner);
1394                 return nativeResponseValue;
1395         }
1396         // struct LDKC2Tuple_BlockHashChannelMonitorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1397         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner: number): number {
1398                 if(!isWasmInitialized) {
1399                         throw new Error("initializeWasm() must be awaited first!");
1400                 }
1401                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner);
1402                 return nativeResponseValue;
1403         }
1404         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1405         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner: number): number {
1406                 if(!isWasmInitialized) {
1407                         throw new Error("initializeWasm() must be awaited first!");
1408                 }
1409                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner);
1410                 return nativeResponseValue;
1411         }
1412         // struct LDKRouteHop CResult_RouteHopDecodeErrorZ_get_ok(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1413         export function CResult_RouteHopDecodeErrorZ_get_ok(owner: number): number {
1414                 if(!isWasmInitialized) {
1415                         throw new Error("initializeWasm() must be awaited first!");
1416                 }
1417                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_ok(owner);
1418                 return nativeResponseValue;
1419         }
1420         // struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1421         export function CResult_RouteHopDecodeErrorZ_get_err(owner: number): number {
1422                 if(!isWasmInitialized) {
1423                         throw new Error("initializeWasm() must be awaited first!");
1424                 }
1425                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_err(owner);
1426                 return nativeResponseValue;
1427         }
1428         // struct LDKRoute CResult_RouteDecodeErrorZ_get_ok(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1429         export function CResult_RouteDecodeErrorZ_get_ok(owner: number): number {
1430                 if(!isWasmInitialized) {
1431                         throw new Error("initializeWasm() must be awaited first!");
1432                 }
1433                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_ok(owner);
1434                 return nativeResponseValue;
1435         }
1436         // struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1437         export function CResult_RouteDecodeErrorZ_get_err(owner: number): number {
1438                 if(!isWasmInitialized) {
1439                         throw new Error("initializeWasm() must be awaited first!");
1440                 }
1441                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_err(owner);
1442                 return nativeResponseValue;
1443         }
1444         // struct LDKRouteParameters CResult_RouteParametersDecodeErrorZ_get_ok(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1445         export function CResult_RouteParametersDecodeErrorZ_get_ok(owner: number): number {
1446                 if(!isWasmInitialized) {
1447                         throw new Error("initializeWasm() must be awaited first!");
1448                 }
1449                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_ok(owner);
1450                 return nativeResponseValue;
1451         }
1452         // struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1453         export function CResult_RouteParametersDecodeErrorZ_get_err(owner: number): number {
1454                 if(!isWasmInitialized) {
1455                         throw new Error("initializeWasm() must be awaited first!");
1456                 }
1457                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_err(owner);
1458                 return nativeResponseValue;
1459         }
1460         // struct LDKPayee CResult_PayeeDecodeErrorZ_get_ok(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1461         export function CResult_PayeeDecodeErrorZ_get_ok(owner: number): number {
1462                 if(!isWasmInitialized) {
1463                         throw new Error("initializeWasm() must be awaited first!");
1464                 }
1465                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_ok(owner);
1466                 return nativeResponseValue;
1467         }
1468         // struct LDKDecodeError CResult_PayeeDecodeErrorZ_get_err(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1469         export function CResult_PayeeDecodeErrorZ_get_err(owner: number): number {
1470                 if(!isWasmInitialized) {
1471                         throw new Error("initializeWasm() must be awaited first!");
1472                 }
1473                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_err(owner);
1474                 return nativeResponseValue;
1475         }
1476         // struct LDKRouteHint CResult_RouteHintDecodeErrorZ_get_ok(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1477         export function CResult_RouteHintDecodeErrorZ_get_ok(owner: number): number {
1478                 if(!isWasmInitialized) {
1479                         throw new Error("initializeWasm() must be awaited first!");
1480                 }
1481                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_ok(owner);
1482                 return nativeResponseValue;
1483         }
1484         // struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1485         export function CResult_RouteHintDecodeErrorZ_get_err(owner: number): number {
1486                 if(!isWasmInitialized) {
1487                         throw new Error("initializeWasm() must be awaited first!");
1488                 }
1489                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_err(owner);
1490                 return nativeResponseValue;
1491         }
1492         // struct LDKRouteHintHop CResult_RouteHintHopDecodeErrorZ_get_ok(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
1493         export function CResult_RouteHintHopDecodeErrorZ_get_ok(owner: number): number {
1494                 if(!isWasmInitialized) {
1495                         throw new Error("initializeWasm() must be awaited first!");
1496                 }
1497                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_ok(owner);
1498                 return nativeResponseValue;
1499         }
1500         // struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
1501         export function CResult_RouteHintHopDecodeErrorZ_get_err(owner: number): number {
1502                 if(!isWasmInitialized) {
1503                         throw new Error("initializeWasm() must be awaited first!");
1504                 }
1505                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_err(owner);
1506                 return nativeResponseValue;
1507         }
1508         // struct LDKRoute CResult_RouteLightningErrorZ_get_ok(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
1509         export function CResult_RouteLightningErrorZ_get_ok(owner: number): number {
1510                 if(!isWasmInitialized) {
1511                         throw new Error("initializeWasm() must be awaited first!");
1512                 }
1513                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_ok(owner);
1514                 return nativeResponseValue;
1515         }
1516         // struct LDKLightningError CResult_RouteLightningErrorZ_get_err(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
1517         export function CResult_RouteLightningErrorZ_get_err(owner: number): number {
1518                 if(!isWasmInitialized) {
1519                         throw new Error("initializeWasm() must be awaited first!");
1520                 }
1521                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_err(owner);
1522                 return nativeResponseValue;
1523         }
1524         // void CResult_NoneLightningErrorZ_get_ok(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1525         export function CResult_NoneLightningErrorZ_get_ok(owner: number): void {
1526                 if(!isWasmInitialized) {
1527                         throw new Error("initializeWasm() must be awaited first!");
1528                 }
1529                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_ok(owner);
1530                 // debug statements here
1531         }
1532         // struct LDKLightningError CResult_NoneLightningErrorZ_get_err(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1533         export function CResult_NoneLightningErrorZ_get_err(owner: number): number {
1534                 if(!isWasmInitialized) {
1535                         throw new Error("initializeWasm() must be awaited first!");
1536                 }
1537                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_err(owner);
1538                 return nativeResponseValue;
1539         }
1540         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1541         export function C2Tuple_PublicKeyTypeZ_get_a(owner: number): Uint8Array {
1542                 if(!isWasmInitialized) {
1543                         throw new Error("initializeWasm() must be awaited first!");
1544                 }
1545                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_a(owner);
1546                 return decodeUint8Array(nativeResponseValue);
1547         }
1548         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1549         export function C2Tuple_PublicKeyTypeZ_get_b(owner: number): number {
1550                 if(!isWasmInitialized) {
1551                         throw new Error("initializeWasm() must be awaited first!");
1552                 }
1553                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_b(owner);
1554                 return nativeResponseValue;
1555         }
1556         export class LDKErrorAction {
1557                 protected constructor() {}
1558         }
1559         export class LDKErrorAction_DisconnectPeer extends LDKErrorAction {
1560                 constructor(public msg: number) { super(); }
1561         }
1562         export class LDKErrorAction_IgnoreError extends LDKErrorAction {
1563                 constructor() { super(); }
1564         }
1565         export class LDKErrorAction_IgnoreAndLog extends LDKErrorAction {
1566                 constructor(public ignore_and_log: Level) { super(); }
1567         }
1568         export class LDKErrorAction_IgnoreDuplicateGossip extends LDKErrorAction {
1569                 constructor() { super(); }
1570         }
1571         export class LDKErrorAction_SendErrorMessage extends LDKErrorAction {
1572                 constructor(public msg: number) { super(); }
1573         }
1574         export function LDKErrorAction_ref_from_ptr(ptr: number): number {
1575                 if(!isWasmInitialized) {
1576                         throw new Error("initializeWasm() must be awaited first!");
1577                 }
1578                 const nativeResponseValue = wasm.TS_LDKErrorAction_ref_from_ptr(ptr);
1579                 return nativeResponseValue;
1580         }
1581         export class LDKMessageSendEvent {
1582                 protected constructor() {}
1583         }
1584         export class LDKMessageSendEvent_SendAcceptChannel extends LDKMessageSendEvent {
1585                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1586         }
1587         export class LDKMessageSendEvent_SendOpenChannel extends LDKMessageSendEvent {
1588                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1589         }
1590         export class LDKMessageSendEvent_SendFundingCreated extends LDKMessageSendEvent {
1591                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1592         }
1593         export class LDKMessageSendEvent_SendFundingSigned extends LDKMessageSendEvent {
1594                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1595         }
1596         export class LDKMessageSendEvent_SendFundingLocked extends LDKMessageSendEvent {
1597                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1598         }
1599         export class LDKMessageSendEvent_SendAnnouncementSignatures extends LDKMessageSendEvent {
1600                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1601         }
1602         export class LDKMessageSendEvent_UpdateHTLCs extends LDKMessageSendEvent {
1603                 constructor(public node_id: Uint8Array, public updates: number) { super(); }
1604         }
1605         export class LDKMessageSendEvent_SendRevokeAndACK extends LDKMessageSendEvent {
1606                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1607         }
1608         export class LDKMessageSendEvent_SendClosingSigned extends LDKMessageSendEvent {
1609                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1610         }
1611         export class LDKMessageSendEvent_SendShutdown extends LDKMessageSendEvent {
1612                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1613         }
1614         export class LDKMessageSendEvent_SendChannelReestablish extends LDKMessageSendEvent {
1615                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1616         }
1617         export class LDKMessageSendEvent_BroadcastChannelAnnouncement extends LDKMessageSendEvent {
1618                 constructor(public msg: number, public update_msg: number) { super(); }
1619         }
1620         export class LDKMessageSendEvent_BroadcastNodeAnnouncement extends LDKMessageSendEvent {
1621                 constructor(public msg: number) { super(); }
1622         }
1623         export class LDKMessageSendEvent_BroadcastChannelUpdate extends LDKMessageSendEvent {
1624                 constructor(public msg: number) { super(); }
1625         }
1626         export class LDKMessageSendEvent_SendChannelUpdate extends LDKMessageSendEvent {
1627                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1628         }
1629         export class LDKMessageSendEvent_HandleError extends LDKMessageSendEvent {
1630                 constructor(public node_id: Uint8Array, public action: number) { super(); }
1631         }
1632         export class LDKMessageSendEvent_SendChannelRangeQuery extends LDKMessageSendEvent {
1633                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1634         }
1635         export class LDKMessageSendEvent_SendShortIdsQuery extends LDKMessageSendEvent {
1636                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1637         }
1638         export class LDKMessageSendEvent_SendReplyChannelRange extends LDKMessageSendEvent {
1639                 constructor(public node_id: Uint8Array, public msg: number) { super(); }
1640         }
1641         export function LDKMessageSendEvent_ref_from_ptr(ptr: number): number {
1642                 if(!isWasmInitialized) {
1643                         throw new Error("initializeWasm() must be awaited first!");
1644                 }
1645                 const nativeResponseValue = wasm.TS_LDKMessageSendEvent_ref_from_ptr(ptr);
1646                 return nativeResponseValue;
1647         }
1648         // bool CResult_boolLightningErrorZ_get_ok(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
1649         export function CResult_boolLightningErrorZ_get_ok(owner: number): boolean {
1650                 if(!isWasmInitialized) {
1651                         throw new Error("initializeWasm() must be awaited first!");
1652                 }
1653                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_ok(owner);
1654                 return nativeResponseValue;
1655         }
1656         // struct LDKLightningError CResult_boolLightningErrorZ_get_err(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
1657         export function CResult_boolLightningErrorZ_get_err(owner: number): number {
1658                 if(!isWasmInitialized) {
1659                         throw new Error("initializeWasm() must be awaited first!");
1660                 }
1661                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_err(owner);
1662                 return nativeResponseValue;
1663         }
1664         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1665         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner: number): number {
1666                 if(!isWasmInitialized) {
1667                         throw new Error("initializeWasm() must be awaited first!");
1668                 }
1669                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner);
1670                 return nativeResponseValue;
1671         }
1672         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1673         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner: number): number {
1674                 if(!isWasmInitialized) {
1675                         throw new Error("initializeWasm() must be awaited first!");
1676                 }
1677                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner);
1678                 return nativeResponseValue;
1679         }
1680         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1681         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner: number): number {
1682                 if(!isWasmInitialized) {
1683                         throw new Error("initializeWasm() must be awaited first!");
1684                 }
1685                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner);
1686                 return nativeResponseValue;
1687         }
1688         // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
1689         export function CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner: number): Uint8Array {
1690                 if(!isWasmInitialized) {
1691                         throw new Error("initializeWasm() must be awaited first!");
1692                 }
1693                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner);
1694                 return decodeUint8Array(nativeResponseValue);
1695         }
1696         // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
1697         export function CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner: number): number {
1698                 if(!isWasmInitialized) {
1699                         throw new Error("initializeWasm() must be awaited first!");
1700                 }
1701                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner);
1702                 return nativeResponseValue;
1703         }
1704         // void CResult_NonePeerHandleErrorZ_get_ok(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
1705         export function CResult_NonePeerHandleErrorZ_get_ok(owner: number): void {
1706                 if(!isWasmInitialized) {
1707                         throw new Error("initializeWasm() must be awaited first!");
1708                 }
1709                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_ok(owner);
1710                 // debug statements here
1711         }
1712         // struct LDKPeerHandleError CResult_NonePeerHandleErrorZ_get_err(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
1713         export function CResult_NonePeerHandleErrorZ_get_err(owner: number): number {
1714                 if(!isWasmInitialized) {
1715                         throw new Error("initializeWasm() must be awaited first!");
1716                 }
1717                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_err(owner);
1718                 return nativeResponseValue;
1719         }
1720         // bool CResult_boolPeerHandleErrorZ_get_ok(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
1721         export function CResult_boolPeerHandleErrorZ_get_ok(owner: number): boolean {
1722                 if(!isWasmInitialized) {
1723                         throw new Error("initializeWasm() must be awaited first!");
1724                 }
1725                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_ok(owner);
1726                 return nativeResponseValue;
1727         }
1728         // struct LDKPeerHandleError CResult_boolPeerHandleErrorZ_get_err(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
1729         export function CResult_boolPeerHandleErrorZ_get_err(owner: number): number {
1730                 if(!isWasmInitialized) {
1731                         throw new Error("initializeWasm() must be awaited first!");
1732                 }
1733                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_err(owner);
1734                 return nativeResponseValue;
1735         }
1736         // struct LDKTxOut CResult_TxOutAccessErrorZ_get_ok(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
1737         export function CResult_TxOutAccessErrorZ_get_ok(owner: number): number {
1738                 if(!isWasmInitialized) {
1739                         throw new Error("initializeWasm() must be awaited first!");
1740                 }
1741                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_ok(owner);
1742                 return nativeResponseValue;
1743         }
1744         // enum LDKAccessError CResult_TxOutAccessErrorZ_get_err(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
1745         export function CResult_TxOutAccessErrorZ_get_err(owner: number): AccessError {
1746                 if(!isWasmInitialized) {
1747                         throw new Error("initializeWasm() must be awaited first!");
1748                 }
1749                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_err(owner);
1750                 return nativeResponseValue;
1751         }
1752         // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
1753         export function CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner: number): void {
1754                 if(!isWasmInitialized) {
1755                         throw new Error("initializeWasm() must be awaited first!");
1756                 }
1757                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner);
1758                 // debug statements here
1759         }
1760         // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
1761         export function CResult_NoneChannelMonitorUpdateErrZ_get_err(owner: number): ChannelMonitorUpdateErr {
1762                 if(!isWasmInitialized) {
1763                         throw new Error("initializeWasm() must be awaited first!");
1764                 }
1765                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(owner);
1766                 return nativeResponseValue;
1767         }
1768         export class LDKCOption_C2Tuple_usizeTransactionZZ {
1769                 protected constructor() {}
1770         }
1771         export class LDKCOption_C2Tuple_usizeTransactionZZ_Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
1772                 constructor(public some: number) { super(); }
1773         }
1774         export class LDKCOption_C2Tuple_usizeTransactionZZ_None extends LDKCOption_C2Tuple_usizeTransactionZZ {
1775                 constructor() { super(); }
1776         }
1777         export function LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr: number): number {
1778                 if(!isWasmInitialized) {
1779                         throw new Error("initializeWasm() must be awaited first!");
1780                 }
1781                 const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(ptr);
1782                 return nativeResponseValue;
1783         }
1784         export class LDKCOption_ClosureReasonZ {
1785                 protected constructor() {}
1786         }
1787         export class LDKCOption_ClosureReasonZ_Some extends LDKCOption_ClosureReasonZ {
1788                 constructor(public some: number) { super(); }
1789         }
1790         export class LDKCOption_ClosureReasonZ_None extends LDKCOption_ClosureReasonZ {
1791                 constructor() { super(); }
1792         }
1793         export function LDKCOption_ClosureReasonZ_ref_from_ptr(ptr: number): number {
1794                 if(!isWasmInitialized) {
1795                         throw new Error("initializeWasm() must be awaited first!");
1796                 }
1797                 const nativeResponseValue = wasm.TS_LDKCOption_ClosureReasonZ_ref_from_ptr(ptr);
1798                 return nativeResponseValue;
1799         }
1800         // struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
1801         export function CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner: number): number {
1802                 if(!isWasmInitialized) {
1803                         throw new Error("initializeWasm() must be awaited first!");
1804                 }
1805                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner);
1806                 return nativeResponseValue;
1807         }
1808         // struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
1809         export function CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner: number): number {
1810                 if(!isWasmInitialized) {
1811                         throw new Error("initializeWasm() must be awaited first!");
1812                 }
1813                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner);
1814                 return nativeResponseValue;
1815         }
1816         export class LDKCOption_EventZ {
1817                 protected constructor() {}
1818         }
1819         export class LDKCOption_EventZ_Some extends LDKCOption_EventZ {
1820                 constructor(public some: number) { super(); }
1821         }
1822         export class LDKCOption_EventZ_None extends LDKCOption_EventZ {
1823                 constructor() { super(); }
1824         }
1825         export function LDKCOption_EventZ_ref_from_ptr(ptr: number): number {
1826                 if(!isWasmInitialized) {
1827                         throw new Error("initializeWasm() must be awaited first!");
1828                 }
1829                 const nativeResponseValue = wasm.TS_LDKCOption_EventZ_ref_from_ptr(ptr);
1830                 return nativeResponseValue;
1831         }
1832         // struct LDKCOption_EventZ CResult_COption_EventZDecodeErrorZ_get_ok(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
1833         export function CResult_COption_EventZDecodeErrorZ_get_ok(owner: number): number {
1834                 if(!isWasmInitialized) {
1835                         throw new Error("initializeWasm() must be awaited first!");
1836                 }
1837                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_ok(owner);
1838                 return nativeResponseValue;
1839         }
1840         // struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
1841         export function CResult_COption_EventZDecodeErrorZ_get_err(owner: number): number {
1842                 if(!isWasmInitialized) {
1843                         throw new Error("initializeWasm() must be awaited first!");
1844                 }
1845                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_err(owner);
1846                 return nativeResponseValue;
1847         }
1848         // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
1849         export function CResult_NodeIdDecodeErrorZ_get_ok(owner: number): number {
1850                 if(!isWasmInitialized) {
1851                         throw new Error("initializeWasm() must be awaited first!");
1852                 }
1853                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_ok(owner);
1854                 return nativeResponseValue;
1855         }
1856         // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
1857         export function CResult_NodeIdDecodeErrorZ_get_err(owner: number): number {
1858                 if(!isWasmInitialized) {
1859                         throw new Error("initializeWasm() must be awaited first!");
1860                 }
1861                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_err(owner);
1862                 return nativeResponseValue;
1863         }
1864         // struct LDKCOption_NetworkUpdateZ CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
1865         export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner: number): number {
1866                 if(!isWasmInitialized) {
1867                         throw new Error("initializeWasm() must be awaited first!");
1868                 }
1869                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner);
1870                 return nativeResponseValue;
1871         }
1872         // struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
1873         export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner: number): number {
1874                 if(!isWasmInitialized) {
1875                         throw new Error("initializeWasm() must be awaited first!");
1876                 }
1877                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner);
1878                 return nativeResponseValue;
1879         }
1880
1881
1882
1883 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1884
1885                 export interface LDKAccess {
1886                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1887                 }
1888
1889                 export function LDKAccess_new(impl: LDKAccess): number {
1890                         throw new Error('unimplemented'); // TODO: bind to WASM
1891                 }
1892
1893 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1894
1895
1896         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1897         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1898                 if(!isWasmInitialized) {
1899                         throw new Error("initializeWasm() must be awaited first!");
1900                 }
1901                 const nativeResponseValue = wasm.TS_Access_get_utxo(this_arg, encodeUint8Array(genesis_hash), short_channel_id);
1902                 return nativeResponseValue;
1903         }
1904         export class LDKCOption_AccessZ {
1905                 protected constructor() {}
1906         }
1907         export class LDKCOption_AccessZ_Some extends LDKCOption_AccessZ {
1908                 constructor(public some: number) { super(); }
1909         }
1910         export class LDKCOption_AccessZ_None extends LDKCOption_AccessZ {
1911                 constructor() { super(); }
1912         }
1913         export function LDKCOption_AccessZ_ref_from_ptr(ptr: number): number {
1914                 if(!isWasmInitialized) {
1915                         throw new Error("initializeWasm() must be awaited first!");
1916                 }
1917                 const nativeResponseValue = wasm.TS_LDKCOption_AccessZ_ref_from_ptr(ptr);
1918                 return nativeResponseValue;
1919         }
1920         // struct LDKDirectionalChannelInfo CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1921         export function CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner: number): number {
1922                 if(!isWasmInitialized) {
1923                         throw new Error("initializeWasm() must be awaited first!");
1924                 }
1925                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner);
1926                 return nativeResponseValue;
1927         }
1928         // struct LDKDecodeError CResult_DirectionalChannelInfoDecodeErrorZ_get_err(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1929         export function CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner: number): number {
1930                 if(!isWasmInitialized) {
1931                         throw new Error("initializeWasm() must be awaited first!");
1932                 }
1933                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner);
1934                 return nativeResponseValue;
1935         }
1936         // struct LDKChannelInfo CResult_ChannelInfoDecodeErrorZ_get_ok(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1937         export function CResult_ChannelInfoDecodeErrorZ_get_ok(owner: number): number {
1938                 if(!isWasmInitialized) {
1939                         throw new Error("initializeWasm() must be awaited first!");
1940                 }
1941                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_ok(owner);
1942                 return nativeResponseValue;
1943         }
1944         // struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1945         export function CResult_ChannelInfoDecodeErrorZ_get_err(owner: number): number {
1946                 if(!isWasmInitialized) {
1947                         throw new Error("initializeWasm() must be awaited first!");
1948                 }
1949                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_err(owner);
1950                 return nativeResponseValue;
1951         }
1952         // struct LDKRoutingFees CResult_RoutingFeesDecodeErrorZ_get_ok(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
1953         export function CResult_RoutingFeesDecodeErrorZ_get_ok(owner: number): number {
1954                 if(!isWasmInitialized) {
1955                         throw new Error("initializeWasm() must be awaited first!");
1956                 }
1957                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_ok(owner);
1958                 return nativeResponseValue;
1959         }
1960         // struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
1961         export function CResult_RoutingFeesDecodeErrorZ_get_err(owner: number): number {
1962                 if(!isWasmInitialized) {
1963                         throw new Error("initializeWasm() must be awaited first!");
1964                 }
1965                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_err(owner);
1966                 return nativeResponseValue;
1967         }
1968         export class LDKNetAddress {
1969                 protected constructor() {}
1970         }
1971         export class LDKNetAddress_IPv4 extends LDKNetAddress {
1972                 constructor(public addr: Uint8Array, public port: number) { super(); }
1973         }
1974         export class LDKNetAddress_IPv6 extends LDKNetAddress {
1975                 constructor(public addr: Uint8Array, public port: number) { super(); }
1976         }
1977         export class LDKNetAddress_OnionV2 extends LDKNetAddress {
1978                 constructor(public onion_v2: Uint8Array) { super(); }
1979         }
1980         export class LDKNetAddress_OnionV3 extends LDKNetAddress {
1981                 constructor(public ed25519_pubkey: Uint8Array, public checksum: number, public version: number, public port: number) { super(); }
1982         }
1983         export function LDKNetAddress_ref_from_ptr(ptr: number): number {
1984                 if(!isWasmInitialized) {
1985                         throw new Error("initializeWasm() must be awaited first!");
1986                 }
1987                 const nativeResponseValue = wasm.TS_LDKNetAddress_ref_from_ptr(ptr);
1988                 return nativeResponseValue;
1989         }
1990         // struct LDKNodeAnnouncementInfo CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
1991         export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner: number): number {
1992                 if(!isWasmInitialized) {
1993                         throw new Error("initializeWasm() must be awaited first!");
1994                 }
1995                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner);
1996                 return nativeResponseValue;
1997         }
1998         // struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
1999         export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner: number): number {
2000                 if(!isWasmInitialized) {
2001                         throw new Error("initializeWasm() must be awaited first!");
2002                 }
2003                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner);
2004                 return nativeResponseValue;
2005         }
2006         // struct LDKNodeInfo CResult_NodeInfoDecodeErrorZ_get_ok(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2007         export function CResult_NodeInfoDecodeErrorZ_get_ok(owner: number): number {
2008                 if(!isWasmInitialized) {
2009                         throw new Error("initializeWasm() must be awaited first!");
2010                 }
2011                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_ok(owner);
2012                 return nativeResponseValue;
2013         }
2014         // struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2015         export function CResult_NodeInfoDecodeErrorZ_get_err(owner: number): number {
2016                 if(!isWasmInitialized) {
2017                         throw new Error("initializeWasm() must be awaited first!");
2018                 }
2019                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_err(owner);
2020                 return nativeResponseValue;
2021         }
2022         // struct LDKNetworkGraph CResult_NetworkGraphDecodeErrorZ_get_ok(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2023         export function CResult_NetworkGraphDecodeErrorZ_get_ok(owner: number): number {
2024                 if(!isWasmInitialized) {
2025                         throw new Error("initializeWasm() must be awaited first!");
2026                 }
2027                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_ok(owner);
2028                 return nativeResponseValue;
2029         }
2030         // struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2031         export function CResult_NetworkGraphDecodeErrorZ_get_err(owner: number): number {
2032                 if(!isWasmInitialized) {
2033                         throw new Error("initializeWasm() must be awaited first!");
2034                 }
2035                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_err(owner);
2036                 return nativeResponseValue;
2037         }
2038         export class LDKCOption_CVec_NetAddressZZ {
2039                 protected constructor() {}
2040         }
2041         export class LDKCOption_CVec_NetAddressZZ_Some extends LDKCOption_CVec_NetAddressZZ {
2042                 constructor(public some: number[]) { super(); }
2043         }
2044         export class LDKCOption_CVec_NetAddressZZ_None extends LDKCOption_CVec_NetAddressZZ {
2045                 constructor() { super(); }
2046         }
2047         export function LDKCOption_CVec_NetAddressZZ_ref_from_ptr(ptr: number): number {
2048                 if(!isWasmInitialized) {
2049                         throw new Error("initializeWasm() must be awaited first!");
2050                 }
2051                 const nativeResponseValue = wasm.TS_LDKCOption_CVec_NetAddressZZ_ref_from_ptr(ptr);
2052                 return nativeResponseValue;
2053         }
2054         // struct LDKScoringParameters *CResult_ScoringParametersDecodeErrorZ_get_ok(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2055         export function CResult_ScoringParametersDecodeErrorZ_get_ok(owner: number): number {
2056                 if(!isWasmInitialized) {
2057                         throw new Error("initializeWasm() must be awaited first!");
2058                 }
2059                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_ok(owner);
2060                 return nativeResponseValue;
2061         }
2062         // struct LDKDecodeError CResult_ScoringParametersDecodeErrorZ_get_err(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2063         export function CResult_ScoringParametersDecodeErrorZ_get_err(owner: number): number {
2064                 if(!isWasmInitialized) {
2065                         throw new Error("initializeWasm() must be awaited first!");
2066                 }
2067                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_err(owner);
2068                 return nativeResponseValue;
2069         }
2070         // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2071         export function CResult_InitFeaturesDecodeErrorZ_get_ok(owner: number): number {
2072                 if(!isWasmInitialized) {
2073                         throw new Error("initializeWasm() must be awaited first!");
2074                 }
2075                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_ok(owner);
2076                 return nativeResponseValue;
2077         }
2078         // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2079         export function CResult_InitFeaturesDecodeErrorZ_get_err(owner: number): number {
2080                 if(!isWasmInitialized) {
2081                         throw new Error("initializeWasm() must be awaited first!");
2082                 }
2083                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_err(owner);
2084                 return nativeResponseValue;
2085         }
2086         // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2087         export function CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner: number): number {
2088                 if(!isWasmInitialized) {
2089                         throw new Error("initializeWasm() must be awaited first!");
2090                 }
2091                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner);
2092                 return nativeResponseValue;
2093         }
2094         // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2095         export function CResult_ChannelFeaturesDecodeErrorZ_get_err(owner: number): number {
2096                 if(!isWasmInitialized) {
2097                         throw new Error("initializeWasm() must be awaited first!");
2098                 }
2099                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(owner);
2100                 return nativeResponseValue;
2101         }
2102         // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2103         export function CResult_NodeFeaturesDecodeErrorZ_get_ok(owner: number): number {
2104                 if(!isWasmInitialized) {
2105                         throw new Error("initializeWasm() must be awaited first!");
2106                 }
2107                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_ok(owner);
2108                 return nativeResponseValue;
2109         }
2110         // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2111         export function CResult_NodeFeaturesDecodeErrorZ_get_err(owner: number): number {
2112                 if(!isWasmInitialized) {
2113                         throw new Error("initializeWasm() must be awaited first!");
2114                 }
2115                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_err(owner);
2116                 return nativeResponseValue;
2117         }
2118         // struct LDKInvoiceFeatures CResult_InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
2119         export function CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner: number): number {
2120                 if(!isWasmInitialized) {
2121                         throw new Error("initializeWasm() must be awaited first!");
2122                 }
2123                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner);
2124                 return nativeResponseValue;
2125         }
2126         // struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
2127         export function CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner: number): number {
2128                 if(!isWasmInitialized) {
2129                         throw new Error("initializeWasm() must be awaited first!");
2130                 }
2131                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner);
2132                 return nativeResponseValue;
2133         }
2134         // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2135         export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner: number): number {
2136                 if(!isWasmInitialized) {
2137                         throw new Error("initializeWasm() must be awaited first!");
2138                 }
2139                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner);
2140                 return nativeResponseValue;
2141         }
2142         // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2143         export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner: number): number {
2144                 if(!isWasmInitialized) {
2145                         throw new Error("initializeWasm() must be awaited first!");
2146                 }
2147                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner);
2148                 return nativeResponseValue;
2149         }
2150         // struct LDKNetAddress CResult_NetAddressDecodeErrorZ_get_ok(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
2151         export function CResult_NetAddressDecodeErrorZ_get_ok(owner: number): number {
2152                 if(!isWasmInitialized) {
2153                         throw new Error("initializeWasm() must be awaited first!");
2154                 }
2155                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_ok(owner);
2156                 return nativeResponseValue;
2157         }
2158         // struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
2159         export function CResult_NetAddressDecodeErrorZ_get_err(owner: number): number {
2160                 if(!isWasmInitialized) {
2161                         throw new Error("initializeWasm() must be awaited first!");
2162                 }
2163                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_err(owner);
2164                 return nativeResponseValue;
2165         }
2166         // struct LDKAcceptChannel CResult_AcceptChannelDecodeErrorZ_get_ok(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
2167         export function CResult_AcceptChannelDecodeErrorZ_get_ok(owner: number): number {
2168                 if(!isWasmInitialized) {
2169                         throw new Error("initializeWasm() must be awaited first!");
2170                 }
2171                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_ok(owner);
2172                 return nativeResponseValue;
2173         }
2174         // struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
2175         export function CResult_AcceptChannelDecodeErrorZ_get_err(owner: number): number {
2176                 if(!isWasmInitialized) {
2177                         throw new Error("initializeWasm() must be awaited first!");
2178                 }
2179                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_err(owner);
2180                 return nativeResponseValue;
2181         }
2182         // struct LDKAnnouncementSignatures CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
2183         export function CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner: number): number {
2184                 if(!isWasmInitialized) {
2185                         throw new Error("initializeWasm() must be awaited first!");
2186                 }
2187                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner);
2188                 return nativeResponseValue;
2189         }
2190         // struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
2191         export function CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner: number): number {
2192                 if(!isWasmInitialized) {
2193                         throw new Error("initializeWasm() must be awaited first!");
2194                 }
2195                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner);
2196                 return nativeResponseValue;
2197         }
2198         // struct LDKChannelReestablish CResult_ChannelReestablishDecodeErrorZ_get_ok(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
2199         export function CResult_ChannelReestablishDecodeErrorZ_get_ok(owner: number): number {
2200                 if(!isWasmInitialized) {
2201                         throw new Error("initializeWasm() must be awaited first!");
2202                 }
2203                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_ok(owner);
2204                 return nativeResponseValue;
2205         }
2206         // struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
2207         export function CResult_ChannelReestablishDecodeErrorZ_get_err(owner: number): number {
2208                 if(!isWasmInitialized) {
2209                         throw new Error("initializeWasm() must be awaited first!");
2210                 }
2211                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_err(owner);
2212                 return nativeResponseValue;
2213         }
2214         // struct LDKClosingSigned CResult_ClosingSignedDecodeErrorZ_get_ok(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
2215         export function CResult_ClosingSignedDecodeErrorZ_get_ok(owner: number): number {
2216                 if(!isWasmInitialized) {
2217                         throw new Error("initializeWasm() must be awaited first!");
2218                 }
2219                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_ok(owner);
2220                 return nativeResponseValue;
2221         }
2222         // struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
2223         export function CResult_ClosingSignedDecodeErrorZ_get_err(owner: number): number {
2224                 if(!isWasmInitialized) {
2225                         throw new Error("initializeWasm() must be awaited first!");
2226                 }
2227                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_err(owner);
2228                 return nativeResponseValue;
2229         }
2230         // struct LDKClosingSignedFeeRange CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
2231         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner: number): number {
2232                 if(!isWasmInitialized) {
2233                         throw new Error("initializeWasm() must be awaited first!");
2234                 }
2235                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner);
2236                 return nativeResponseValue;
2237         }
2238         // struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
2239         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner: number): number {
2240                 if(!isWasmInitialized) {
2241                         throw new Error("initializeWasm() must be awaited first!");
2242                 }
2243                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner);
2244                 return nativeResponseValue;
2245         }
2246         // struct LDKCommitmentSigned CResult_CommitmentSignedDecodeErrorZ_get_ok(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
2247         export function CResult_CommitmentSignedDecodeErrorZ_get_ok(owner: number): number {
2248                 if(!isWasmInitialized) {
2249                         throw new Error("initializeWasm() must be awaited first!");
2250                 }
2251                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_ok(owner);
2252                 return nativeResponseValue;
2253         }
2254         // struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
2255         export function CResult_CommitmentSignedDecodeErrorZ_get_err(owner: number): number {
2256                 if(!isWasmInitialized) {
2257                         throw new Error("initializeWasm() must be awaited first!");
2258                 }
2259                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_err(owner);
2260                 return nativeResponseValue;
2261         }
2262         // struct LDKFundingCreated CResult_FundingCreatedDecodeErrorZ_get_ok(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
2263         export function CResult_FundingCreatedDecodeErrorZ_get_ok(owner: number): number {
2264                 if(!isWasmInitialized) {
2265                         throw new Error("initializeWasm() must be awaited first!");
2266                 }
2267                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_ok(owner);
2268                 return nativeResponseValue;
2269         }
2270         // struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
2271         export function CResult_FundingCreatedDecodeErrorZ_get_err(owner: number): number {
2272                 if(!isWasmInitialized) {
2273                         throw new Error("initializeWasm() must be awaited first!");
2274                 }
2275                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_err(owner);
2276                 return nativeResponseValue;
2277         }
2278         // struct LDKFundingSigned CResult_FundingSignedDecodeErrorZ_get_ok(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
2279         export function CResult_FundingSignedDecodeErrorZ_get_ok(owner: number): number {
2280                 if(!isWasmInitialized) {
2281                         throw new Error("initializeWasm() must be awaited first!");
2282                 }
2283                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_ok(owner);
2284                 return nativeResponseValue;
2285         }
2286         // struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
2287         export function CResult_FundingSignedDecodeErrorZ_get_err(owner: number): number {
2288                 if(!isWasmInitialized) {
2289                         throw new Error("initializeWasm() must be awaited first!");
2290                 }
2291                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_err(owner);
2292                 return nativeResponseValue;
2293         }
2294         // struct LDKFundingLocked CResult_FundingLockedDecodeErrorZ_get_ok(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
2295         export function CResult_FundingLockedDecodeErrorZ_get_ok(owner: number): number {
2296                 if(!isWasmInitialized) {
2297                         throw new Error("initializeWasm() must be awaited first!");
2298                 }
2299                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_ok(owner);
2300                 return nativeResponseValue;
2301         }
2302         // struct LDKDecodeError CResult_FundingLockedDecodeErrorZ_get_err(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
2303         export function CResult_FundingLockedDecodeErrorZ_get_err(owner: number): number {
2304                 if(!isWasmInitialized) {
2305                         throw new Error("initializeWasm() must be awaited first!");
2306                 }
2307                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_err(owner);
2308                 return nativeResponseValue;
2309         }
2310         // struct LDKInit CResult_InitDecodeErrorZ_get_ok(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
2311         export function CResult_InitDecodeErrorZ_get_ok(owner: number): number {
2312                 if(!isWasmInitialized) {
2313                         throw new Error("initializeWasm() must be awaited first!");
2314                 }
2315                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_ok(owner);
2316                 return nativeResponseValue;
2317         }
2318         // struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
2319         export function CResult_InitDecodeErrorZ_get_err(owner: number): number {
2320                 if(!isWasmInitialized) {
2321                         throw new Error("initializeWasm() must be awaited first!");
2322                 }
2323                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_err(owner);
2324                 return nativeResponseValue;
2325         }
2326         // struct LDKOpenChannel CResult_OpenChannelDecodeErrorZ_get_ok(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
2327         export function CResult_OpenChannelDecodeErrorZ_get_ok(owner: number): number {
2328                 if(!isWasmInitialized) {
2329                         throw new Error("initializeWasm() must be awaited first!");
2330                 }
2331                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_ok(owner);
2332                 return nativeResponseValue;
2333         }
2334         // struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
2335         export function CResult_OpenChannelDecodeErrorZ_get_err(owner: number): number {
2336                 if(!isWasmInitialized) {
2337                         throw new Error("initializeWasm() must be awaited first!");
2338                 }
2339                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_err(owner);
2340                 return nativeResponseValue;
2341         }
2342         // struct LDKRevokeAndACK CResult_RevokeAndACKDecodeErrorZ_get_ok(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
2343         export function CResult_RevokeAndACKDecodeErrorZ_get_ok(owner: number): number {
2344                 if(!isWasmInitialized) {
2345                         throw new Error("initializeWasm() must be awaited first!");
2346                 }
2347                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_ok(owner);
2348                 return nativeResponseValue;
2349         }
2350         // struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
2351         export function CResult_RevokeAndACKDecodeErrorZ_get_err(owner: number): number {
2352                 if(!isWasmInitialized) {
2353                         throw new Error("initializeWasm() must be awaited first!");
2354                 }
2355                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_err(owner);
2356                 return nativeResponseValue;
2357         }
2358         // struct LDKShutdown CResult_ShutdownDecodeErrorZ_get_ok(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
2359         export function CResult_ShutdownDecodeErrorZ_get_ok(owner: number): number {
2360                 if(!isWasmInitialized) {
2361                         throw new Error("initializeWasm() must be awaited first!");
2362                 }
2363                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_ok(owner);
2364                 return nativeResponseValue;
2365         }
2366         // struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
2367         export function CResult_ShutdownDecodeErrorZ_get_err(owner: number): number {
2368                 if(!isWasmInitialized) {
2369                         throw new Error("initializeWasm() must be awaited first!");
2370                 }
2371                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_err(owner);
2372                 return nativeResponseValue;
2373         }
2374         // struct LDKUpdateFailHTLC CResult_UpdateFailHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
2375         export function CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner: number): number {
2376                 if(!isWasmInitialized) {
2377                         throw new Error("initializeWasm() must be awaited first!");
2378                 }
2379                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner);
2380                 return nativeResponseValue;
2381         }
2382         // struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
2383         export function CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner: number): number {
2384                 if(!isWasmInitialized) {
2385                         throw new Error("initializeWasm() must be awaited first!");
2386                 }
2387                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner);
2388                 return nativeResponseValue;
2389         }
2390         // struct LDKUpdateFailMalformedHTLC CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
2391         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner: number): number {
2392                 if(!isWasmInitialized) {
2393                         throw new Error("initializeWasm() must be awaited first!");
2394                 }
2395                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner);
2396                 return nativeResponseValue;
2397         }
2398         // struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
2399         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner: number): number {
2400                 if(!isWasmInitialized) {
2401                         throw new Error("initializeWasm() must be awaited first!");
2402                 }
2403                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner);
2404                 return nativeResponseValue;
2405         }
2406         // struct LDKUpdateFee CResult_UpdateFeeDecodeErrorZ_get_ok(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
2407         export function CResult_UpdateFeeDecodeErrorZ_get_ok(owner: number): number {
2408                 if(!isWasmInitialized) {
2409                         throw new Error("initializeWasm() must be awaited first!");
2410                 }
2411                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_ok(owner);
2412                 return nativeResponseValue;
2413         }
2414         // struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
2415         export function CResult_UpdateFeeDecodeErrorZ_get_err(owner: number): number {
2416                 if(!isWasmInitialized) {
2417                         throw new Error("initializeWasm() must be awaited first!");
2418                 }
2419                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_err(owner);
2420                 return nativeResponseValue;
2421         }
2422         // struct LDKUpdateFulfillHTLC CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
2423         export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner: number): number {
2424                 if(!isWasmInitialized) {
2425                         throw new Error("initializeWasm() must be awaited first!");
2426                 }
2427                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner);
2428                 return nativeResponseValue;
2429         }
2430         // struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
2431         export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner: number): number {
2432                 if(!isWasmInitialized) {
2433                         throw new Error("initializeWasm() must be awaited first!");
2434                 }
2435                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner);
2436                 return nativeResponseValue;
2437         }
2438         // struct LDKUpdateAddHTLC CResult_UpdateAddHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
2439         export function CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner: number): number {
2440                 if(!isWasmInitialized) {
2441                         throw new Error("initializeWasm() must be awaited first!");
2442                 }
2443                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner);
2444                 return nativeResponseValue;
2445         }
2446         // struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
2447         export function CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner: number): number {
2448                 if(!isWasmInitialized) {
2449                         throw new Error("initializeWasm() must be awaited first!");
2450                 }
2451                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner);
2452                 return nativeResponseValue;
2453         }
2454         // struct LDKPing CResult_PingDecodeErrorZ_get_ok(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
2455         export function CResult_PingDecodeErrorZ_get_ok(owner: number): number {
2456                 if(!isWasmInitialized) {
2457                         throw new Error("initializeWasm() must be awaited first!");
2458                 }
2459                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_ok(owner);
2460                 return nativeResponseValue;
2461         }
2462         // struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
2463         export function CResult_PingDecodeErrorZ_get_err(owner: number): number {
2464                 if(!isWasmInitialized) {
2465                         throw new Error("initializeWasm() must be awaited first!");
2466                 }
2467                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_err(owner);
2468                 return nativeResponseValue;
2469         }
2470         // struct LDKPong CResult_PongDecodeErrorZ_get_ok(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
2471         export function CResult_PongDecodeErrorZ_get_ok(owner: number): number {
2472                 if(!isWasmInitialized) {
2473                         throw new Error("initializeWasm() must be awaited first!");
2474                 }
2475                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_ok(owner);
2476                 return nativeResponseValue;
2477         }
2478         // struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
2479         export function CResult_PongDecodeErrorZ_get_err(owner: number): number {
2480                 if(!isWasmInitialized) {
2481                         throw new Error("initializeWasm() must be awaited first!");
2482                 }
2483                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_err(owner);
2484                 return nativeResponseValue;
2485         }
2486         // struct LDKUnsignedChannelAnnouncement CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2487         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2488                 if(!isWasmInitialized) {
2489                         throw new Error("initializeWasm() must be awaited first!");
2490                 }
2491                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner);
2492                 return nativeResponseValue;
2493         }
2494         // struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2495         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
2496                 if(!isWasmInitialized) {
2497                         throw new Error("initializeWasm() must be awaited first!");
2498                 }
2499                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner);
2500                 return nativeResponseValue;
2501         }
2502         // struct LDKChannelAnnouncement CResult_ChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2503         export function CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2504                 if(!isWasmInitialized) {
2505                         throw new Error("initializeWasm() must be awaited first!");
2506                 }
2507                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner);
2508                 return nativeResponseValue;
2509         }
2510         // struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2511         export function CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
2512                 if(!isWasmInitialized) {
2513                         throw new Error("initializeWasm() must be awaited first!");
2514                 }
2515                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner);
2516                 return nativeResponseValue;
2517         }
2518         // struct LDKUnsignedChannelUpdate CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2519         export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
2520                 if(!isWasmInitialized) {
2521                         throw new Error("initializeWasm() must be awaited first!");
2522                 }
2523                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner);
2524                 return nativeResponseValue;
2525         }
2526         // struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2527         export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner: number): number {
2528                 if(!isWasmInitialized) {
2529                         throw new Error("initializeWasm() must be awaited first!");
2530                 }
2531                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner);
2532                 return nativeResponseValue;
2533         }
2534         // struct LDKChannelUpdate CResult_ChannelUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2535         export function CResult_ChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
2536                 if(!isWasmInitialized) {
2537                         throw new Error("initializeWasm() must be awaited first!");
2538                 }
2539                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_ok(owner);
2540                 return nativeResponseValue;
2541         }
2542         // struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
2543         export function CResult_ChannelUpdateDecodeErrorZ_get_err(owner: number): number {
2544                 if(!isWasmInitialized) {
2545                         throw new Error("initializeWasm() must be awaited first!");
2546                 }
2547                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_err(owner);
2548                 return nativeResponseValue;
2549         }
2550         // struct LDKErrorMessage CResult_ErrorMessageDecodeErrorZ_get_ok(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
2551         export function CResult_ErrorMessageDecodeErrorZ_get_ok(owner: number): number {
2552                 if(!isWasmInitialized) {
2553                         throw new Error("initializeWasm() must be awaited first!");
2554                 }
2555                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_ok(owner);
2556                 return nativeResponseValue;
2557         }
2558         // struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
2559         export function CResult_ErrorMessageDecodeErrorZ_get_err(owner: number): number {
2560                 if(!isWasmInitialized) {
2561                         throw new Error("initializeWasm() must be awaited first!");
2562                 }
2563                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_err(owner);
2564                 return nativeResponseValue;
2565         }
2566         // struct LDKUnsignedNodeAnnouncement CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2567         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2568                 if(!isWasmInitialized) {
2569                         throw new Error("initializeWasm() must be awaited first!");
2570                 }
2571                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner);
2572                 return nativeResponseValue;
2573         }
2574         // struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2575         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
2576                 if(!isWasmInitialized) {
2577                         throw new Error("initializeWasm() must be awaited first!");
2578                 }
2579                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner);
2580                 return nativeResponseValue;
2581         }
2582         // struct LDKNodeAnnouncement CResult_NodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2583         export function CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
2584                 if(!isWasmInitialized) {
2585                         throw new Error("initializeWasm() must be awaited first!");
2586                 }
2587                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner);
2588                 return nativeResponseValue;
2589         }
2590         // struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
2591         export function CResult_NodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
2592                 if(!isWasmInitialized) {
2593                         throw new Error("initializeWasm() must be awaited first!");
2594                 }
2595                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(owner);
2596                 return nativeResponseValue;
2597         }
2598         // struct LDKQueryShortChannelIds CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
2599         export function CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner: number): number {
2600                 if(!isWasmInitialized) {
2601                         throw new Error("initializeWasm() must be awaited first!");
2602                 }
2603                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner);
2604                 return nativeResponseValue;
2605         }
2606         // struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
2607         export function CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner: number): number {
2608                 if(!isWasmInitialized) {
2609                         throw new Error("initializeWasm() must be awaited first!");
2610                 }
2611                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner);
2612                 return nativeResponseValue;
2613         }
2614         // struct LDKReplyShortChannelIdsEnd CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
2615         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner: number): number {
2616                 if(!isWasmInitialized) {
2617                         throw new Error("initializeWasm() must be awaited first!");
2618                 }
2619                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner);
2620                 return nativeResponseValue;
2621         }
2622         // struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
2623         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner: number): number {
2624                 if(!isWasmInitialized) {
2625                         throw new Error("initializeWasm() must be awaited first!");
2626                 }
2627                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner);
2628                 return nativeResponseValue;
2629         }
2630         // struct LDKQueryChannelRange CResult_QueryChannelRangeDecodeErrorZ_get_ok(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2631         export function CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner: number): number {
2632                 if(!isWasmInitialized) {
2633                         throw new Error("initializeWasm() must be awaited first!");
2634                 }
2635                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner);
2636                 return nativeResponseValue;
2637         }
2638         // struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2639         export function CResult_QueryChannelRangeDecodeErrorZ_get_err(owner: number): number {
2640                 if(!isWasmInitialized) {
2641                         throw new Error("initializeWasm() must be awaited first!");
2642                 }
2643                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(owner);
2644                 return nativeResponseValue;
2645         }
2646         // struct LDKReplyChannelRange CResult_ReplyChannelRangeDecodeErrorZ_get_ok(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2647         export function CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner: number): number {
2648                 if(!isWasmInitialized) {
2649                         throw new Error("initializeWasm() must be awaited first!");
2650                 }
2651                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner);
2652                 return nativeResponseValue;
2653         }
2654         // struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
2655         export function CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner: number): number {
2656                 if(!isWasmInitialized) {
2657                         throw new Error("initializeWasm() must be awaited first!");
2658                 }
2659                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner);
2660                 return nativeResponseValue;
2661         }
2662         // struct LDKGossipTimestampFilter CResult_GossipTimestampFilterDecodeErrorZ_get_ok(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
2663         export function CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner: number): number {
2664                 if(!isWasmInitialized) {
2665                         throw new Error("initializeWasm() must be awaited first!");
2666                 }
2667                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner);
2668                 return nativeResponseValue;
2669         }
2670         // struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
2671         export function CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner: number): number {
2672                 if(!isWasmInitialized) {
2673                         throw new Error("initializeWasm() must be awaited first!");
2674                 }
2675                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner);
2676                 return nativeResponseValue;
2677         }
2678         // struct LDKDelayedPaymentOutputDescriptor CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2679         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
2680                 if(!isWasmInitialized) {
2681                         throw new Error("initializeWasm() must be awaited first!");
2682                 }
2683                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
2684                 return nativeResponseValue;
2685         }
2686         // struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2687         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
2688                 if(!isWasmInitialized) {
2689                         throw new Error("initializeWasm() must be awaited first!");
2690                 }
2691                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
2692                 return nativeResponseValue;
2693         }
2694         // struct LDKStaticPaymentOutputDescriptor CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2695         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
2696                 if(!isWasmInitialized) {
2697                         throw new Error("initializeWasm() must be awaited first!");
2698                 }
2699                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
2700                 return nativeResponseValue;
2701         }
2702         // struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2703         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
2704                 if(!isWasmInitialized) {
2705                         throw new Error("initializeWasm() must be awaited first!");
2706                 }
2707                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
2708                 return nativeResponseValue;
2709         }
2710         // struct LDKSpendableOutputDescriptor CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2711         export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
2712                 if(!isWasmInitialized) {
2713                         throw new Error("initializeWasm() must be awaited first!");
2714                 }
2715                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner);
2716                 return nativeResponseValue;
2717         }
2718         // struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
2719         export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
2720                 if(!isWasmInitialized) {
2721                         throw new Error("initializeWasm() must be awaited first!");
2722                 }
2723                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner);
2724                 return nativeResponseValue;
2725         }
2726         // struct LDKSign CResult_SignDecodeErrorZ_get_ok(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
2727         export function CResult_SignDecodeErrorZ_get_ok(owner: number): number {
2728                 if(!isWasmInitialized) {
2729                         throw new Error("initializeWasm() must be awaited first!");
2730                 }
2731                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_ok(owner);
2732                 return nativeResponseValue;
2733         }
2734         // struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
2735         export function CResult_SignDecodeErrorZ_get_err(owner: number): number {
2736                 if(!isWasmInitialized) {
2737                         throw new Error("initializeWasm() must be awaited first!");
2738                 }
2739                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_err(owner);
2740                 return nativeResponseValue;
2741         }
2742         // struct LDKRecoverableSignature CResult_RecoverableSignatureNoneZ_get_ok(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
2743         export function CResult_RecoverableSignatureNoneZ_get_ok(owner: number): Uint8Array {
2744                 if(!isWasmInitialized) {
2745                         throw new Error("initializeWasm() must be awaited first!");
2746                 }
2747                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_ok(owner);
2748                 return decodeUint8Array(nativeResponseValue);
2749         }
2750         // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
2751         export function CResult_RecoverableSignatureNoneZ_get_err(owner: number): void {
2752                 if(!isWasmInitialized) {
2753                         throw new Error("initializeWasm() must be awaited first!");
2754                 }
2755                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_err(owner);
2756                 // debug statements here
2757         }
2758         // struct LDKCVec_CVec_u8ZZ CResult_CVec_CVec_u8ZZNoneZ_get_ok(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
2759         export function CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner: number): Uint8Array[] {
2760                 if(!isWasmInitialized) {
2761                         throw new Error("initializeWasm() must be awaited first!");
2762                 }
2763                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner);
2764                 return nativeResponseValue;
2765         }
2766         // void CResult_CVec_CVec_u8ZZNoneZ_get_err(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
2767         export function CResult_CVec_CVec_u8ZZNoneZ_get_err(owner: number): void {
2768                 if(!isWasmInitialized) {
2769                         throw new Error("initializeWasm() must be awaited first!");
2770                 }
2771                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_err(owner);
2772                 // debug statements here
2773         }
2774         // struct LDKInMemorySigner CResult_InMemorySignerDecodeErrorZ_get_ok(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
2775         export function CResult_InMemorySignerDecodeErrorZ_get_ok(owner: number): number {
2776                 if(!isWasmInitialized) {
2777                         throw new Error("initializeWasm() must be awaited first!");
2778                 }
2779                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_ok(owner);
2780                 return nativeResponseValue;
2781         }
2782         // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
2783         export function CResult_InMemorySignerDecodeErrorZ_get_err(owner: number): number {
2784                 if(!isWasmInitialized) {
2785                         throw new Error("initializeWasm() must be awaited first!");
2786                 }
2787                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_err(owner);
2788                 return nativeResponseValue;
2789         }
2790         // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
2791         export function CResult_TransactionNoneZ_get_ok(owner: number): Uint8Array {
2792                 if(!isWasmInitialized) {
2793                         throw new Error("initializeWasm() must be awaited first!");
2794                 }
2795                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_ok(owner);
2796                 return decodeUint8Array(nativeResponseValue);
2797         }
2798         // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
2799         export function CResult_TransactionNoneZ_get_err(owner: number): void {
2800                 if(!isWasmInitialized) {
2801                         throw new Error("initializeWasm() must be awaited first!");
2802                 }
2803                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_err(owner);
2804                 // debug statements here
2805         }
2806
2807
2808
2809 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2810
2811                 export interface LDKFilter {
2812                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
2813                         register_output (output: number): number;
2814                 }
2815
2816                 export function LDKFilter_new(impl: LDKFilter): number {
2817                         throw new Error('unimplemented'); // TODO: bind to WASM
2818                 }
2819
2820 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2821
2822
2823         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
2824         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
2825                 if(!isWasmInitialized) {
2826                         throw new Error("initializeWasm() must be awaited first!");
2827                 }
2828                 const nativeResponseValue = wasm.TS_Filter_register_tx(this_arg, encodeUint8Array(txid), encodeUint8Array(script_pubkey));
2829                 // debug statements here
2830         }
2831         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
2832         export function Filter_register_output(this_arg: number, output: number): number {
2833                 if(!isWasmInitialized) {
2834                         throw new Error("initializeWasm() must be awaited first!");
2835                 }
2836                 const nativeResponseValue = wasm.TS_Filter_register_output(this_arg, output);
2837                 return nativeResponseValue;
2838         }
2839         export class LDKCOption_FilterZ {
2840                 protected constructor() {}
2841         }
2842         export class LDKCOption_FilterZ_Some extends LDKCOption_FilterZ {
2843                 constructor(public some: number) { super(); }
2844         }
2845         export class LDKCOption_FilterZ_None extends LDKCOption_FilterZ {
2846                 constructor() { super(); }
2847         }
2848         export function LDKCOption_FilterZ_ref_from_ptr(ptr: number): number {
2849                 if(!isWasmInitialized) {
2850                         throw new Error("initializeWasm() must be awaited first!");
2851                 }
2852                 const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_ref_from_ptr(ptr);
2853                 return nativeResponseValue;
2854         }
2855         // struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
2856         export function CResult_LockedChannelMonitorNoneZ_get_ok(owner: number): number {
2857                 if(!isWasmInitialized) {
2858                         throw new Error("initializeWasm() must be awaited first!");
2859                 }
2860                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_ok(owner);
2861                 return nativeResponseValue;
2862         }
2863         // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
2864         export function CResult_LockedChannelMonitorNoneZ_get_err(owner: number): void {
2865                 if(!isWasmInitialized) {
2866                         throw new Error("initializeWasm() must be awaited first!");
2867                 }
2868                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_err(owner);
2869                 // debug statements here
2870         }
2871         export class LDKAPIError {
2872                 protected constructor() {}
2873         }
2874         export class LDKAPIError_APIMisuseError extends LDKAPIError {
2875                 constructor(public err: String) { super(); }
2876         }
2877         export class LDKAPIError_FeeRateTooHigh extends LDKAPIError {
2878                 constructor(public err: String, public feerate: number) { super(); }
2879         }
2880         export class LDKAPIError_RouteError extends LDKAPIError {
2881                 constructor(public err: String) { super(); }
2882         }
2883         export class LDKAPIError_ChannelUnavailable extends LDKAPIError {
2884                 constructor(public err: String) { super(); }
2885         }
2886         export class LDKAPIError_MonitorUpdateFailed extends LDKAPIError {
2887                 constructor() { super(); }
2888         }
2889         export class LDKAPIError_IncompatibleShutdownScript extends LDKAPIError {
2890                 constructor(public script: number) { super(); }
2891         }
2892         export function LDKAPIError_ref_from_ptr(ptr: number): number {
2893                 if(!isWasmInitialized) {
2894                         throw new Error("initializeWasm() must be awaited first!");
2895                 }
2896                 const nativeResponseValue = wasm.TS_LDKAPIError_ref_from_ptr(ptr);
2897                 return nativeResponseValue;
2898         }
2899         // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
2900         export function CResult_NoneAPIErrorZ_get_ok(owner: number): void {
2901                 if(!isWasmInitialized) {
2902                         throw new Error("initializeWasm() must be awaited first!");
2903                 }
2904                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_ok(owner);
2905                 // debug statements here
2906         }
2907         // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
2908         export function CResult_NoneAPIErrorZ_get_err(owner: number): number {
2909                 if(!isWasmInitialized) {
2910                         throw new Error("initializeWasm() must be awaited first!");
2911                 }
2912                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_err(owner);
2913                 return nativeResponseValue;
2914         }
2915         export class LDKCOption_u16Z {
2916                 protected constructor() {}
2917         }
2918         export class LDKCOption_u16Z_Some extends LDKCOption_u16Z {
2919                 constructor(public some: number) { super(); }
2920         }
2921         export class LDKCOption_u16Z_None extends LDKCOption_u16Z {
2922                 constructor() { super(); }
2923         }
2924         export function LDKCOption_u16Z_ref_from_ptr(ptr: number): number {
2925                 if(!isWasmInitialized) {
2926                         throw new Error("initializeWasm() must be awaited first!");
2927                 }
2928                 const nativeResponseValue = wasm.TS_LDKCOption_u16Z_ref_from_ptr(ptr);
2929                 return nativeResponseValue;
2930         }
2931         // struct LDKThirtyTwoBytes CResult__u832APIErrorZ_get_ok(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
2932         export function CResult__u832APIErrorZ_get_ok(owner: number): Uint8Array {
2933                 if(!isWasmInitialized) {
2934                         throw new Error("initializeWasm() must be awaited first!");
2935                 }
2936                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_ok(owner);
2937                 return decodeUint8Array(nativeResponseValue);
2938         }
2939         // struct LDKAPIError CResult__u832APIErrorZ_get_err(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
2940         export function CResult__u832APIErrorZ_get_err(owner: number): number {
2941                 if(!isWasmInitialized) {
2942                         throw new Error("initializeWasm() must be awaited first!");
2943                 }
2944                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_err(owner);
2945                 return nativeResponseValue;
2946         }
2947         export class LDKPaymentSendFailure {
2948                 protected constructor() {}
2949         }
2950         export class LDKPaymentSendFailure_ParameterError extends LDKPaymentSendFailure {
2951                 constructor(public parameter_error: number) { super(); }
2952         }
2953         export class LDKPaymentSendFailure_PathParameterError extends LDKPaymentSendFailure {
2954                 constructor(public path_parameter_error: number[]) { super(); }
2955         }
2956         export class LDKPaymentSendFailure_AllFailedRetrySafe extends LDKPaymentSendFailure {
2957                 constructor(public all_failed_retry_safe: number[]) { super(); }
2958         }
2959         export class LDKPaymentSendFailure_PartialFailure extends LDKPaymentSendFailure {
2960                 constructor(public results: number[], public failed_paths_retry: number, public payment_id: Uint8Array) { super(); }
2961         }
2962         export function LDKPaymentSendFailure_ref_from_ptr(ptr: number): number {
2963                 if(!isWasmInitialized) {
2964                         throw new Error("initializeWasm() must be awaited first!");
2965                 }
2966                 const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_ref_from_ptr(ptr);
2967                 return nativeResponseValue;
2968         }
2969         // struct LDKThirtyTwoBytes CResult_PaymentIdPaymentSendFailureZ_get_ok(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
2970         export function CResult_PaymentIdPaymentSendFailureZ_get_ok(owner: number): Uint8Array {
2971                 if(!isWasmInitialized) {
2972                         throw new Error("initializeWasm() must be awaited first!");
2973                 }
2974                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_ok(owner);
2975                 return decodeUint8Array(nativeResponseValue);
2976         }
2977         // struct LDKPaymentSendFailure CResult_PaymentIdPaymentSendFailureZ_get_err(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
2978         export function CResult_PaymentIdPaymentSendFailureZ_get_err(owner: number): number {
2979                 if(!isWasmInitialized) {
2980                         throw new Error("initializeWasm() must be awaited first!");
2981                 }
2982                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_err(owner);
2983                 return nativeResponseValue;
2984         }
2985         // void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
2986         export function CResult_NonePaymentSendFailureZ_get_ok(owner: number): void {
2987                 if(!isWasmInitialized) {
2988                         throw new Error("initializeWasm() must be awaited first!");
2989                 }
2990                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_ok(owner);
2991                 // debug statements here
2992         }
2993         // struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
2994         export function CResult_NonePaymentSendFailureZ_get_err(owner: number): number {
2995                 if(!isWasmInitialized) {
2996                         throw new Error("initializeWasm() must be awaited first!");
2997                 }
2998                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_err(owner);
2999                 return nativeResponseValue;
3000         }
3001         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
3002         export function C2Tuple_PaymentHashPaymentIdZ_get_a(owner: number): Uint8Array {
3003                 if(!isWasmInitialized) {
3004                         throw new Error("initializeWasm() must be awaited first!");
3005                 }
3006                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_a(owner);
3007                 return decodeUint8Array(nativeResponseValue);
3008         }
3009         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
3010         export function C2Tuple_PaymentHashPaymentIdZ_get_b(owner: number): Uint8Array {
3011                 if(!isWasmInitialized) {
3012                         throw new Error("initializeWasm() must be awaited first!");
3013                 }
3014                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_b(owner);
3015                 return decodeUint8Array(nativeResponseValue);
3016         }
3017         // struct LDKC2Tuple_PaymentHashPaymentIdZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
3018         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner: number): number {
3019                 if(!isWasmInitialized) {
3020                         throw new Error("initializeWasm() must be awaited first!");
3021                 }
3022                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner);
3023                 return nativeResponseValue;
3024         }
3025         // struct LDKPaymentSendFailure CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
3026         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner: number): number {
3027                 if(!isWasmInitialized) {
3028                         throw new Error("initializeWasm() must be awaited first!");
3029                 }
3030                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner);
3031                 return nativeResponseValue;
3032         }
3033         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
3034         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(owner: number): Uint8Array {
3035                 if(!isWasmInitialized) {
3036                         throw new Error("initializeWasm() must be awaited first!");
3037                 }
3038                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(owner);
3039                 return decodeUint8Array(nativeResponseValue);
3040         }
3041         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
3042         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(owner: number): Uint8Array {
3043                 if(!isWasmInitialized) {
3044                         throw new Error("initializeWasm() must be awaited first!");
3045                 }
3046                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(owner);
3047                 return decodeUint8Array(nativeResponseValue);
3048         }
3049         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
3050         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner: number): number {
3051                 if(!isWasmInitialized) {
3052                         throw new Error("initializeWasm() must be awaited first!");
3053                 }
3054                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner);
3055                 return nativeResponseValue;
3056         }
3057         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
3058         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner: number): void {
3059                 if(!isWasmInitialized) {
3060                         throw new Error("initializeWasm() must be awaited first!");
3061                 }
3062                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner);
3063                 // debug statements here
3064         }
3065         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
3066         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner: number): number {
3067                 if(!isWasmInitialized) {
3068                         throw new Error("initializeWasm() must be awaited first!");
3069                 }
3070                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner);
3071                 return nativeResponseValue;
3072         }
3073         // struct LDKAPIError CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
3074         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner: number): number {
3075                 if(!isWasmInitialized) {
3076                         throw new Error("initializeWasm() must be awaited first!");
3077                 }
3078                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner);
3079                 return nativeResponseValue;
3080         }
3081         // struct LDKThirtyTwoBytes CResult_PaymentSecretNoneZ_get_ok(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
3082         export function CResult_PaymentSecretNoneZ_get_ok(owner: number): Uint8Array {
3083                 if(!isWasmInitialized) {
3084                         throw new Error("initializeWasm() must be awaited first!");
3085                 }
3086                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_ok(owner);
3087                 return decodeUint8Array(nativeResponseValue);
3088         }
3089         // void CResult_PaymentSecretNoneZ_get_err(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
3090         export function CResult_PaymentSecretNoneZ_get_err(owner: number): void {
3091                 if(!isWasmInitialized) {
3092                         throw new Error("initializeWasm() must be awaited first!");
3093                 }
3094                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_err(owner);
3095                 // debug statements here
3096         }
3097         // struct LDKThirtyTwoBytes CResult_PaymentSecretAPIErrorZ_get_ok(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
3098         export function CResult_PaymentSecretAPIErrorZ_get_ok(owner: number): Uint8Array {
3099                 if(!isWasmInitialized) {
3100                         throw new Error("initializeWasm() must be awaited first!");
3101                 }
3102                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_ok(owner);
3103                 return decodeUint8Array(nativeResponseValue);
3104         }
3105         // struct LDKAPIError CResult_PaymentSecretAPIErrorZ_get_err(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
3106         export function CResult_PaymentSecretAPIErrorZ_get_err(owner: number): number {
3107                 if(!isWasmInitialized) {
3108                         throw new Error("initializeWasm() must be awaited first!");
3109                 }
3110                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_err(owner);
3111                 return nativeResponseValue;
3112         }
3113         // struct LDKThirtyTwoBytes CResult_PaymentPreimageAPIErrorZ_get_ok(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
3114         export function CResult_PaymentPreimageAPIErrorZ_get_ok(owner: number): Uint8Array {
3115                 if(!isWasmInitialized) {
3116                         throw new Error("initializeWasm() must be awaited first!");
3117                 }
3118                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_ok(owner);
3119                 return decodeUint8Array(nativeResponseValue);
3120         }
3121         // struct LDKAPIError CResult_PaymentPreimageAPIErrorZ_get_err(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
3122         export function CResult_PaymentPreimageAPIErrorZ_get_err(owner: number): number {
3123                 if(!isWasmInitialized) {
3124                         throw new Error("initializeWasm() must be awaited first!");
3125                 }
3126                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_err(owner);
3127                 return nativeResponseValue;
3128         }
3129
3130
3131
3132 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3133
3134                 export interface LDKWatch {
3135                         watch_channel (funding_txo: number, monitor: number): number;
3136                         update_channel (funding_txo: number, update: number): number;
3137                         release_pending_monitor_events (): number[];
3138                 }
3139
3140                 export function LDKWatch_new(impl: LDKWatch): number {
3141                         throw new Error('unimplemented'); // TODO: bind to WASM
3142                 }
3143
3144 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3145
3146
3147         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
3148         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
3149                 if(!isWasmInitialized) {
3150                         throw new Error("initializeWasm() must be awaited first!");
3151                 }
3152                 const nativeResponseValue = wasm.TS_Watch_watch_channel(this_arg, funding_txo, monitor);
3153                 return nativeResponseValue;
3154         }
3155         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
3156         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
3157                 if(!isWasmInitialized) {
3158                         throw new Error("initializeWasm() must be awaited first!");
3159                 }
3160                 const nativeResponseValue = wasm.TS_Watch_update_channel(this_arg, funding_txo, update);
3161                 return nativeResponseValue;
3162         }
3163         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
3164         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
3165                 if(!isWasmInitialized) {
3166                         throw new Error("initializeWasm() must be awaited first!");
3167                 }
3168                 const nativeResponseValue = wasm.TS_Watch_release_pending_monitor_events(this_arg);
3169                 return nativeResponseValue;
3170         }
3171
3172
3173
3174 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3175
3176                 export interface LDKBroadcasterInterface {
3177                         broadcast_transaction (tx: Uint8Array): void;
3178                 }
3179
3180                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
3181                         throw new Error('unimplemented'); // TODO: bind to WASM
3182                 }
3183
3184 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3185
3186
3187         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
3188         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
3189                 if(!isWasmInitialized) {
3190                         throw new Error("initializeWasm() must be awaited first!");
3191                 }
3192                 const nativeResponseValue = wasm.TS_BroadcasterInterface_broadcast_transaction(this_arg, encodeUint8Array(tx));
3193                 // debug statements here
3194         }
3195
3196
3197
3198 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3199
3200                 export interface LDKKeysInterface {
3201                         get_node_secret (): Uint8Array;
3202                         get_destination_script (): Uint8Array;
3203                         get_shutdown_scriptpubkey (): number;
3204                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
3205                         get_secure_random_bytes (): Uint8Array;
3206                         read_chan_signer (reader: Uint8Array): number;
3207                         sign_invoice (invoice_preimage: Uint8Array): number;
3208                         get_inbound_payment_key_material (): Uint8Array;
3209                 }
3210
3211                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
3212                         throw new Error('unimplemented'); // TODO: bind to WASM
3213                 }
3214
3215 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3216
3217
3218         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
3219         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
3220                 if(!isWasmInitialized) {
3221                         throw new Error("initializeWasm() must be awaited first!");
3222                 }
3223                 const nativeResponseValue = wasm.TS_KeysInterface_get_node_secret(this_arg);
3224                 return decodeUint8Array(nativeResponseValue);
3225         }
3226         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
3227         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
3228                 if(!isWasmInitialized) {
3229                         throw new Error("initializeWasm() must be awaited first!");
3230                 }
3231                 const nativeResponseValue = wasm.TS_KeysInterface_get_destination_script(this_arg);
3232                 return decodeUint8Array(nativeResponseValue);
3233         }
3234         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
3235         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
3236                 if(!isWasmInitialized) {
3237                         throw new Error("initializeWasm() must be awaited first!");
3238                 }
3239                 const nativeResponseValue = wasm.TS_KeysInterface_get_shutdown_scriptpubkey(this_arg);
3240                 return nativeResponseValue;
3241         }
3242         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
3243         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
3244                 if(!isWasmInitialized) {
3245                         throw new Error("initializeWasm() must be awaited first!");
3246                 }
3247                 const nativeResponseValue = wasm.TS_KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
3248                 return nativeResponseValue;
3249         }
3250         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
3251         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
3252                 if(!isWasmInitialized) {
3253                         throw new Error("initializeWasm() must be awaited first!");
3254                 }
3255                 const nativeResponseValue = wasm.TS_KeysInterface_get_secure_random_bytes(this_arg);
3256                 return decodeUint8Array(nativeResponseValue);
3257         }
3258         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
3259         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
3260                 if(!isWasmInitialized) {
3261                         throw new Error("initializeWasm() must be awaited first!");
3262                 }
3263                 const nativeResponseValue = wasm.TS_KeysInterface_read_chan_signer(this_arg, encodeUint8Array(reader));
3264                 return nativeResponseValue;
3265         }
3266         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
3267         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
3268                 if(!isWasmInitialized) {
3269                         throw new Error("initializeWasm() must be awaited first!");
3270                 }
3271                 const nativeResponseValue = wasm.TS_KeysInterface_sign_invoice(this_arg, encodeUint8Array(invoice_preimage));
3272                 return nativeResponseValue;
3273         }
3274         // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
3275         export function KeysInterface_get_inbound_payment_key_material(this_arg: number): Uint8Array {
3276                 if(!isWasmInitialized) {
3277                         throw new Error("initializeWasm() must be awaited first!");
3278                 }
3279                 const nativeResponseValue = wasm.TS_KeysInterface_get_inbound_payment_key_material(this_arg);
3280                 return decodeUint8Array(nativeResponseValue);
3281         }
3282
3283
3284
3285 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3286
3287                 export interface LDKFeeEstimator {
3288                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
3289                 }
3290
3291                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
3292                         throw new Error('unimplemented'); // TODO: bind to WASM
3293                 }
3294
3295 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3296
3297
3298         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
3299         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
3300                 if(!isWasmInitialized) {
3301                         throw new Error("initializeWasm() must be awaited first!");
3302                 }
3303                 const nativeResponseValue = wasm.TS_FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
3304                 return nativeResponseValue;
3305         }
3306
3307
3308
3309 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3310
3311                 export interface LDKLogger {
3312                         log (record: number): void;
3313                 }
3314
3315                 export function LDKLogger_new(impl: LDKLogger): number {
3316                         throw new Error('unimplemented'); // TODO: bind to WASM
3317                 }
3318
3319 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3320
3321
3322         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
3323         export function C2Tuple_BlockHashChannelManagerZ_get_a(owner: number): Uint8Array {
3324                 if(!isWasmInitialized) {
3325                         throw new Error("initializeWasm() must be awaited first!");
3326                 }
3327                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_a(owner);
3328                 return decodeUint8Array(nativeResponseValue);
3329         }
3330         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
3331         export function C2Tuple_BlockHashChannelManagerZ_get_b(owner: number): number {
3332                 if(!isWasmInitialized) {
3333                         throw new Error("initializeWasm() must be awaited first!");
3334                 }
3335                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_b(owner);
3336                 return nativeResponseValue;
3337         }
3338         // struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
3339         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner: number): number {
3340                 if(!isWasmInitialized) {
3341                         throw new Error("initializeWasm() must be awaited first!");
3342                 }
3343                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner);
3344                 return nativeResponseValue;
3345         }
3346         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
3347         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner: number): number {
3348                 if(!isWasmInitialized) {
3349                         throw new Error("initializeWasm() must be awaited first!");
3350                 }
3351                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner);
3352                 return nativeResponseValue;
3353         }
3354
3355
3356
3357 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3358
3359                 export interface LDKMessageSendEventsProvider {
3360                         get_and_clear_pending_msg_events (): number[];
3361                 }
3362
3363                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
3364                         throw new Error('unimplemented'); // TODO: bind to WASM
3365                 }
3366
3367 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3368
3369
3370         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
3371         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
3372                 if(!isWasmInitialized) {
3373                         throw new Error("initializeWasm() must be awaited first!");
3374                 }
3375                 const nativeResponseValue = wasm.TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
3376                 return nativeResponseValue;
3377         }
3378
3379
3380
3381 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3382
3383                 export interface LDKEventHandler {
3384                         handle_event (event: number): void;
3385                 }
3386
3387                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
3388                         throw new Error('unimplemented'); // TODO: bind to WASM
3389                 }
3390
3391 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3392
3393
3394         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
3395         export function EventHandler_handle_event(this_arg: number, event: number): void {
3396                 if(!isWasmInitialized) {
3397                         throw new Error("initializeWasm() must be awaited first!");
3398                 }
3399                 const nativeResponseValue = wasm.TS_EventHandler_handle_event(this_arg, event);
3400                 // debug statements here
3401         }
3402
3403
3404
3405 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3406
3407                 export interface LDKEventsProvider {
3408                         process_pending_events (handler: number): void;
3409                 }
3410
3411                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
3412                         throw new Error('unimplemented'); // TODO: bind to WASM
3413                 }
3414
3415 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3416
3417
3418         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
3419         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
3420                 if(!isWasmInitialized) {
3421                         throw new Error("initializeWasm() must be awaited first!");
3422                 }
3423                 const nativeResponseValue = wasm.TS_EventsProvider_process_pending_events(this_arg, handler);
3424                 // debug statements here
3425         }
3426
3427
3428
3429 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3430
3431                 export interface LDKListen {
3432                         block_connected (block: Uint8Array, height: number): void;
3433                         block_disconnected (header: Uint8Array, height: number): void;
3434                 }
3435
3436                 export function LDKListen_new(impl: LDKListen): number {
3437                         throw new Error('unimplemented'); // TODO: bind to WASM
3438                 }
3439
3440 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3441
3442
3443         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
3444         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
3445                 if(!isWasmInitialized) {
3446                         throw new Error("initializeWasm() must be awaited first!");
3447                 }
3448                 const nativeResponseValue = wasm.TS_Listen_block_connected(this_arg, encodeUint8Array(block), height);
3449                 // debug statements here
3450         }
3451         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
3452         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
3453                 if(!isWasmInitialized) {
3454                         throw new Error("initializeWasm() must be awaited first!");
3455                 }
3456                 const nativeResponseValue = wasm.TS_Listen_block_disconnected(this_arg, encodeUint8Array(header), height);
3457                 // debug statements here
3458         }
3459
3460
3461
3462 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3463
3464                 export interface LDKConfirm {
3465                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
3466                         transaction_unconfirmed (txid: Uint8Array): void;
3467                         best_block_updated (header: Uint8Array, height: number): void;
3468                         get_relevant_txids (): Uint8Array[];
3469                 }
3470
3471                 export function LDKConfirm_new(impl: LDKConfirm): number {
3472                         throw new Error('unimplemented'); // TODO: bind to WASM
3473                 }
3474
3475 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3476
3477
3478         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
3479         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
3480                 if(!isWasmInitialized) {
3481                         throw new Error("initializeWasm() must be awaited first!");
3482                 }
3483                 const nativeResponseValue = wasm.TS_Confirm_transactions_confirmed(this_arg, encodeUint8Array(header), txdata, height);
3484                 // debug statements here
3485         }
3486         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
3487         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
3488                 if(!isWasmInitialized) {
3489                         throw new Error("initializeWasm() must be awaited first!");
3490                 }
3491                 const nativeResponseValue = wasm.TS_Confirm_transaction_unconfirmed(this_arg, encodeUint8Array(txid));
3492                 // debug statements here
3493         }
3494         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
3495         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
3496                 if(!isWasmInitialized) {
3497                         throw new Error("initializeWasm() must be awaited first!");
3498                 }
3499                 const nativeResponseValue = wasm.TS_Confirm_best_block_updated(this_arg, encodeUint8Array(header), height);
3500                 // debug statements here
3501         }
3502         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
3503         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
3504                 if(!isWasmInitialized) {
3505                         throw new Error("initializeWasm() must be awaited first!");
3506                 }
3507                 const nativeResponseValue = wasm.TS_Confirm_get_relevant_txids(this_arg);
3508                 return nativeResponseValue;
3509         }
3510
3511
3512
3513 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3514
3515                 export interface LDKPersist {
3516                         persist_new_channel (channel_id: number, data: number, update_id: number): number;
3517                         update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
3518                 }
3519
3520                 export function LDKPersist_new(impl: LDKPersist): number {
3521                         throw new Error('unimplemented'); // TODO: bind to WASM
3522                 }
3523
3524 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3525
3526
3527         // 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
3528         export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
3529                 if(!isWasmInitialized) {
3530                         throw new Error("initializeWasm() must be awaited first!");
3531                 }
3532                 const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
3533                 return nativeResponseValue;
3534         }
3535         // 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
3536         export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
3537                 if(!isWasmInitialized) {
3538                         throw new Error("initializeWasm() must be awaited first!");
3539                 }
3540                 const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
3541                 return nativeResponseValue;
3542         }
3543
3544
3545
3546 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3547
3548                 export interface LDKChannelMessageHandler {
3549                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
3550                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
3551                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
3552                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
3553                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
3554                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
3555                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
3556                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
3557                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
3558                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
3559                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
3560                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
3561                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
3562                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
3563                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
3564                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
3565                         peer_connected (their_node_id: Uint8Array, msg: number): void;
3566                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
3567                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
3568                         handle_error (their_node_id: Uint8Array, msg: number): void;
3569                 }
3570
3571                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
3572                         throw new Error('unimplemented'); // TODO: bind to WASM
3573                 }
3574
3575 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3576
3577
3578         // 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
3579         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
3580                 if(!isWasmInitialized) {
3581                         throw new Error("initializeWasm() must be awaited first!");
3582                 }
3583                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_open_channel(this_arg, encodeUint8Array(their_node_id), their_features, msg);
3584                 // debug statements here
3585         }
3586         // 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
3587         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
3588                 if(!isWasmInitialized) {
3589                         throw new Error("initializeWasm() must be awaited first!");
3590                 }
3591                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_accept_channel(this_arg, encodeUint8Array(their_node_id), their_features, msg);
3592                 // debug statements here
3593         }
3594         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
3595         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3596                 if(!isWasmInitialized) {
3597                         throw new Error("initializeWasm() must be awaited first!");
3598                 }
3599                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_created(this_arg, encodeUint8Array(their_node_id), msg);
3600                 // debug statements here
3601         }
3602         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
3603         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3604                 if(!isWasmInitialized) {
3605                         throw new Error("initializeWasm() must be awaited first!");
3606                 }
3607                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_signed(this_arg, encodeUint8Array(their_node_id), msg);
3608                 // debug statements here
3609         }
3610         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
3611         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3612                 if(!isWasmInitialized) {
3613                         throw new Error("initializeWasm() must be awaited first!");
3614                 }
3615                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_locked(this_arg, encodeUint8Array(their_node_id), msg);
3616                 // debug statements here
3617         }
3618         // 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
3619         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
3620                 if(!isWasmInitialized) {
3621                         throw new Error("initializeWasm() must be awaited first!");
3622                 }
3623                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_shutdown(this_arg, encodeUint8Array(their_node_id), their_features, msg);
3624                 // debug statements here
3625         }
3626         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
3627         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3628                 if(!isWasmInitialized) {
3629                         throw new Error("initializeWasm() must be awaited first!");
3630                 }
3631                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_closing_signed(this_arg, encodeUint8Array(their_node_id), msg);
3632                 // debug statements here
3633         }
3634         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
3635         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3636                 if(!isWasmInitialized) {
3637                         throw new Error("initializeWasm() must be awaited first!");
3638                 }
3639                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3640                 // debug statements here
3641         }
3642         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
3643         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3644                 if(!isWasmInitialized) {
3645                         throw new Error("initializeWasm() must be awaited first!");
3646                 }
3647                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3648                 // debug statements here
3649         }
3650         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
3651         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3652                 if(!isWasmInitialized) {
3653                         throw new Error("initializeWasm() must be awaited first!");
3654                 }
3655                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3656                 // debug statements here
3657         }
3658         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
3659         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3660                 if(!isWasmInitialized) {
3661                         throw new Error("initializeWasm() must be awaited first!");
3662                 }
3663                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeUint8Array(their_node_id), msg);
3664                 // debug statements here
3665         }
3666         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
3667         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3668                 if(!isWasmInitialized) {
3669                         throw new Error("initializeWasm() must be awaited first!");
3670                 }
3671                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_commitment_signed(this_arg, encodeUint8Array(their_node_id), msg);
3672                 // debug statements here
3673         }
3674         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
3675         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3676                 if(!isWasmInitialized) {
3677                         throw new Error("initializeWasm() must be awaited first!");
3678                 }
3679                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeUint8Array(their_node_id), msg);
3680                 // debug statements here
3681         }
3682         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
3683         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3684                 if(!isWasmInitialized) {
3685                         throw new Error("initializeWasm() must be awaited first!");
3686                 }
3687                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fee(this_arg, encodeUint8Array(their_node_id), msg);
3688                 // debug statements here
3689         }
3690         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
3691         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3692                 if(!isWasmInitialized) {
3693                         throw new Error("initializeWasm() must be awaited first!");
3694                 }
3695                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeUint8Array(their_node_id), msg);
3696                 // debug statements here
3697         }
3698         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
3699         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
3700                 if(!isWasmInitialized) {
3701                         throw new Error("initializeWasm() must be awaited first!");
3702                 }
3703                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, encodeUint8Array(their_node_id), no_connection_possible);
3704                 // debug statements here
3705         }
3706         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
3707         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3708                 if(!isWasmInitialized) {
3709                         throw new Error("initializeWasm() must be awaited first!");
3710                 }
3711                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, encodeUint8Array(their_node_id), msg);
3712                 // debug statements here
3713         }
3714         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
3715         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3716                 if(!isWasmInitialized) {
3717                         throw new Error("initializeWasm() must be awaited first!");
3718                 }
3719                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeUint8Array(their_node_id), msg);
3720                 // debug statements here
3721         }
3722         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
3723         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3724                 if(!isWasmInitialized) {
3725                         throw new Error("initializeWasm() must be awaited first!");
3726                 }
3727                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_update(this_arg, encodeUint8Array(their_node_id), msg);
3728                 // debug statements here
3729         }
3730         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
3731         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
3732                 if(!isWasmInitialized) {
3733                         throw new Error("initializeWasm() must be awaited first!");
3734                 }
3735                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_error(this_arg, encodeUint8Array(their_node_id), msg);
3736                 // debug statements here
3737         }
3738
3739
3740
3741 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3742
3743                 export interface LDKRoutingMessageHandler {
3744                         handle_node_announcement (msg: number): number;
3745                         handle_channel_announcement (msg: number): number;
3746                         handle_channel_update (msg: number): number;
3747                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
3748                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
3749                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
3750                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
3751                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
3752                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
3753                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
3754                 }
3755
3756                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
3757                         throw new Error('unimplemented'); // TODO: bind to WASM
3758                 }
3759
3760 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3761
3762
3763         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
3764         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
3765                 if(!isWasmInitialized) {
3766                         throw new Error("initializeWasm() must be awaited first!");
3767                 }
3768                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_node_announcement(this_arg, msg);
3769                 return nativeResponseValue;
3770         }
3771         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
3772         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
3773                 if(!isWasmInitialized) {
3774                         throw new Error("initializeWasm() must be awaited first!");
3775                 }
3776                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
3777                 return nativeResponseValue;
3778         }
3779         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
3780         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
3781                 if(!isWasmInitialized) {
3782                         throw new Error("initializeWasm() must be awaited first!");
3783                 }
3784                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_update(this_arg, msg);
3785                 return nativeResponseValue;
3786         }
3787         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
3788         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
3789                 if(!isWasmInitialized) {
3790                         throw new Error("initializeWasm() must be awaited first!");
3791                 }
3792                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
3793                 return nativeResponseValue;
3794         }
3795         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
3796         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
3797                 if(!isWasmInitialized) {
3798                         throw new Error("initializeWasm() must be awaited first!");
3799                 }
3800                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcements(this_arg, encodeUint8Array(starting_point), batch_amount);
3801                 return nativeResponseValue;
3802         }
3803         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
3804         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
3805                 if(!isWasmInitialized) {
3806                         throw new Error("initializeWasm() must be awaited first!");
3807                 }
3808                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_sync_routing_table(this_arg, encodeUint8Array(their_node_id), init);
3809                 // debug statements here
3810         }
3811         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
3812         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3813                 if(!isWasmInitialized) {
3814                         throw new Error("initializeWasm() must be awaited first!");
3815                 }
3816                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeUint8Array(their_node_id), msg);
3817                 return nativeResponseValue;
3818         }
3819         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
3820         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3821                 if(!isWasmInitialized) {
3822                         throw new Error("initializeWasm() must be awaited first!");
3823                 }
3824                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeUint8Array(their_node_id), msg);
3825                 return nativeResponseValue;
3826         }
3827         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
3828         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3829                 if(!isWasmInitialized) {
3830                         throw new Error("initializeWasm() must be awaited first!");
3831                 }
3832                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_channel_range(this_arg, encodeUint8Array(their_node_id), msg);
3833                 return nativeResponseValue;
3834         }
3835         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
3836         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
3837                 if(!isWasmInitialized) {
3838                         throw new Error("initializeWasm() must be awaited first!");
3839                 }
3840                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeUint8Array(their_node_id), msg);
3841                 return nativeResponseValue;
3842         }
3843
3844
3845
3846 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3847
3848                 export interface LDKCustomMessageReader {
3849                         read (message_type: number, buffer: Uint8Array): number;
3850                 }
3851
3852                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
3853                         throw new Error('unimplemented'); // TODO: bind to WASM
3854                 }
3855
3856 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3857
3858
3859         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
3860         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
3861                 if(!isWasmInitialized) {
3862                         throw new Error("initializeWasm() must be awaited first!");
3863                 }
3864                 const nativeResponseValue = wasm.TS_CustomMessageReader_read(this_arg, message_type, encodeUint8Array(buffer));
3865                 return nativeResponseValue;
3866         }
3867
3868
3869
3870 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3871
3872                 export interface LDKCustomMessageHandler {
3873                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
3874                         get_and_clear_pending_msg (): number[];
3875                 }
3876
3877                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
3878                         throw new Error('unimplemented'); // TODO: bind to WASM
3879                 }
3880
3881 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3882
3883
3884         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
3885         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
3886                 if(!isWasmInitialized) {
3887                         throw new Error("initializeWasm() must be awaited first!");
3888                 }
3889                 const nativeResponseValue = wasm.TS_CustomMessageHandler_handle_custom_message(this_arg, msg, encodeUint8Array(sender_node_id));
3890                 return nativeResponseValue;
3891         }
3892         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
3893         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
3894                 if(!isWasmInitialized) {
3895                         throw new Error("initializeWasm() must be awaited first!");
3896                 }
3897                 const nativeResponseValue = wasm.TS_CustomMessageHandler_get_and_clear_pending_msg(this_arg);
3898                 return nativeResponseValue;
3899         }
3900
3901
3902
3903 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3904
3905                 export interface LDKSocketDescriptor {
3906                         send_data (data: Uint8Array, resume_read: boolean): number;
3907                         disconnect_socket (): void;
3908                         eq (other_arg: number): boolean;
3909                         hash (): number;
3910                 }
3911
3912                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
3913                         throw new Error('unimplemented'); // TODO: bind to WASM
3914                 }
3915
3916 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3917
3918
3919         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
3920         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
3921                 if(!isWasmInitialized) {
3922                         throw new Error("initializeWasm() must be awaited first!");
3923                 }
3924                 const nativeResponseValue = wasm.TS_SocketDescriptor_send_data(this_arg, encodeUint8Array(data), resume_read);
3925                 return nativeResponseValue;
3926         }
3927         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
3928         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
3929                 if(!isWasmInitialized) {
3930                         throw new Error("initializeWasm() must be awaited first!");
3931                 }
3932                 const nativeResponseValue = wasm.TS_SocketDescriptor_disconnect_socket(this_arg);
3933                 // debug statements here
3934         }
3935         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
3936         export function SocketDescriptor_hash(this_arg: number): number {
3937                 if(!isWasmInitialized) {
3938                         throw new Error("initializeWasm() must be awaited first!");
3939                 }
3940                 const nativeResponseValue = wasm.TS_SocketDescriptor_hash(this_arg);
3941                 return nativeResponseValue;
3942         }
3943
3944
3945
3946 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3947
3948                 export interface LDKScore {
3949                         channel_penalty_msat (short_channel_id: number, send_amt_msat: number, channel_capacity_msat: number, source: number, target: number): number;
3950                         payment_path_failed (path: number[], short_channel_id: number): void;
3951                         payment_path_successful (path: number[]): void;
3952                         write (): Uint8Array;
3953                 }
3954
3955                 export function LDKScore_new(impl: LDKScore): number {
3956                         throw new Error('unimplemented'); // TODO: bind to WASM
3957                 }
3958
3959 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3960
3961
3962         // 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
3963         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 {
3964                 if(!isWasmInitialized) {
3965                         throw new Error("initializeWasm() must be awaited first!");
3966                 }
3967                 const nativeResponseValue = wasm.TS_Score_channel_penalty_msat(this_arg, short_channel_id, send_amt_msat, channel_capacity_msat, source, target);
3968                 return nativeResponseValue;
3969         }
3970         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
3971         export function Score_payment_path_failed(this_arg: number, path: number[], short_channel_id: number): void {
3972                 if(!isWasmInitialized) {
3973                         throw new Error("initializeWasm() must be awaited first!");
3974                 }
3975                 const nativeResponseValue = wasm.TS_Score_payment_path_failed(this_arg, path, short_channel_id);
3976                 // debug statements here
3977         }
3978         // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
3979         export function Score_payment_path_successful(this_arg: number, path: number[]): void {
3980                 if(!isWasmInitialized) {
3981                         throw new Error("initializeWasm() must be awaited first!");
3982                 }
3983                 const nativeResponseValue = wasm.TS_Score_payment_path_successful(this_arg, path);
3984                 // debug statements here
3985         }
3986         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
3987         export function Score_write(this_arg: number): Uint8Array {
3988                 if(!isWasmInitialized) {
3989                         throw new Error("initializeWasm() must be awaited first!");
3990                 }
3991                 const nativeResponseValue = wasm.TS_Score_write(this_arg);
3992                 return decodeUint8Array(nativeResponseValue);
3993         }
3994
3995
3996
3997 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3998
3999                 export interface LDKLockableScore {
4000                         lock (): number;
4001                 }
4002
4003                 export function LDKLockableScore_new(impl: LDKLockableScore): number {
4004                         throw new Error('unimplemented'); // TODO: bind to WASM
4005                 }
4006
4007 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4008
4009
4010         // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
4011         export function LockableScore_lock(this_arg: number): number {
4012                 if(!isWasmInitialized) {
4013                         throw new Error("initializeWasm() must be awaited first!");
4014                 }
4015                 const nativeResponseValue = wasm.TS_LockableScore_lock(this_arg);
4016                 return nativeResponseValue;
4017         }
4018         // struct LDKStr _ldk_get_compiled_version(void);
4019         export function _ldk_get_compiled_version(): String {
4020                 if(!isWasmInitialized) {
4021                         throw new Error("initializeWasm() must be awaited first!");
4022                 }
4023                 const nativeResponseValue = wasm.TS__ldk_get_compiled_version();
4024                 return nativeResponseValue;
4025         }
4026         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
4027         export function _ldk_c_bindings_get_compiled_version(): String {
4028                 if(!isWasmInitialized) {
4029                         throw new Error("initializeWasm() must be awaited first!");
4030                 }
4031                 const nativeResponseValue = wasm.TS__ldk_c_bindings_get_compiled_version();
4032                 return nativeResponseValue;
4033         }
4034         // void Transaction_free(struct LDKTransaction _res);
4035         export function Transaction_free(_res: Uint8Array): void {
4036                 if(!isWasmInitialized) {
4037                         throw new Error("initializeWasm() must be awaited first!");
4038                 }
4039                 const nativeResponseValue = wasm.TS_Transaction_free(encodeUint8Array(_res));
4040                 // debug statements here
4041         }
4042         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
4043         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
4044                 if(!isWasmInitialized) {
4045                         throw new Error("initializeWasm() must be awaited first!");
4046                 }
4047                 const nativeResponseValue = wasm.TS_TxOut_new(encodeUint8Array(script_pubkey), value);
4048                 return nativeResponseValue;
4049         }
4050         // void TxOut_free(struct LDKTxOut _res);
4051         export function TxOut_free(_res: number): void {
4052                 if(!isWasmInitialized) {
4053                         throw new Error("initializeWasm() must be awaited first!");
4054                 }
4055                 const nativeResponseValue = wasm.TS_TxOut_free(_res);
4056                 // debug statements here
4057         }
4058         // uint64_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
4059         export function TxOut_clone_ptr(arg: number): number {
4060                 if(!isWasmInitialized) {
4061                         throw new Error("initializeWasm() must be awaited first!");
4062                 }
4063                 const nativeResponseValue = wasm.TS_TxOut_clone_ptr(arg);
4064                 return nativeResponseValue;
4065         }
4066         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
4067         export function TxOut_clone(orig: number): number {
4068                 if(!isWasmInitialized) {
4069                         throw new Error("initializeWasm() must be awaited first!");
4070                 }
4071                 const nativeResponseValue = wasm.TS_TxOut_clone(orig);
4072                 return nativeResponseValue;
4073         }
4074         // void Str_free(struct LDKStr _res);
4075         export function Str_free(_res: String): void {
4076                 if(!isWasmInitialized) {
4077                         throw new Error("initializeWasm() must be awaited first!");
4078                 }
4079                 const nativeResponseValue = wasm.TS_Str_free(_res);
4080                 // debug statements here
4081         }
4082         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4083         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4084                 if(!isWasmInitialized) {
4085                         throw new Error("initializeWasm() must be awaited first!");
4086                 }
4087                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_ok(o);
4088                 return nativeResponseValue;
4089         }
4090         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4091         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4092                 if(!isWasmInitialized) {
4093                         throw new Error("initializeWasm() must be awaited first!");
4094                 }
4095                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_err(e);
4096                 return nativeResponseValue;
4097         }
4098         // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
4099         export function CResult_ChannelConfigDecodeErrorZ_is_ok(o: number): boolean {
4100                 if(!isWasmInitialized) {
4101                         throw new Error("initializeWasm() must be awaited first!");
4102                 }
4103                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_is_ok(o);
4104                 return nativeResponseValue;
4105         }
4106         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4107         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4108                 if(!isWasmInitialized) {
4109                         throw new Error("initializeWasm() must be awaited first!");
4110                 }
4111                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_free(_res);
4112                 // debug statements here
4113         }
4114         // uint64_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
4115         export function CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg: number): number {
4116                 if(!isWasmInitialized) {
4117                         throw new Error("initializeWasm() must be awaited first!");
4118                 }
4119                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg);
4120                 return nativeResponseValue;
4121         }
4122         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4123         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4124                 if(!isWasmInitialized) {
4125                         throw new Error("initializeWasm() must be awaited first!");
4126                 }
4127                 const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone(orig);
4128                 return nativeResponseValue;
4129         }
4130         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4131         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4132                 if(!isWasmInitialized) {
4133                         throw new Error("initializeWasm() must be awaited first!");
4134                 }
4135                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_ok(o);
4136                 return nativeResponseValue;
4137         }
4138         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4139         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4140                 if(!isWasmInitialized) {
4141                         throw new Error("initializeWasm() must be awaited first!");
4142                 }
4143                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_err(e);
4144                 return nativeResponseValue;
4145         }
4146         // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
4147         export function CResult_OutPointDecodeErrorZ_is_ok(o: number): boolean {
4148                 if(!isWasmInitialized) {
4149                         throw new Error("initializeWasm() must be awaited first!");
4150                 }
4151                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_is_ok(o);
4152                 return nativeResponseValue;
4153         }
4154         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4155         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4156                 if(!isWasmInitialized) {
4157                         throw new Error("initializeWasm() must be awaited first!");
4158                 }
4159                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_free(_res);
4160                 // debug statements here
4161         }
4162         // uint64_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
4163         export function CResult_OutPointDecodeErrorZ_clone_ptr(arg: number): number {
4164                 if(!isWasmInitialized) {
4165                         throw new Error("initializeWasm() must be awaited first!");
4166                 }
4167                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone_ptr(arg);
4168                 return nativeResponseValue;
4169         }
4170         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4171         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4172                 if(!isWasmInitialized) {
4173                         throw new Error("initializeWasm() must be awaited first!");
4174                 }
4175                 const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone(orig);
4176                 return nativeResponseValue;
4177         }
4178         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
4179         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
4180                 if(!isWasmInitialized) {
4181                         throw new Error("initializeWasm() must be awaited first!");
4182                 }
4183                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_ok(encodeUint8Array(o));
4184                 return nativeResponseValue;
4185         }
4186         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
4187         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
4188                 if(!isWasmInitialized) {
4189                         throw new Error("initializeWasm() must be awaited first!");
4190                 }
4191                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_err(e);
4192                 return nativeResponseValue;
4193         }
4194         // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
4195         export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
4196                 if(!isWasmInitialized) {
4197                         throw new Error("initializeWasm() must be awaited first!");
4198                 }
4199                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_is_ok(o);
4200                 return nativeResponseValue;
4201         }
4202         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
4203         export function CResult_SecretKeyErrorZ_free(_res: number): void {
4204                 if(!isWasmInitialized) {
4205                         throw new Error("initializeWasm() must be awaited first!");
4206                 }
4207                 const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_free(_res);
4208                 // debug statements here
4209         }
4210         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
4211         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
4212                 if(!isWasmInitialized) {
4213                         throw new Error("initializeWasm() must be awaited first!");
4214                 }
4215                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_ok(encodeUint8Array(o));
4216                 return nativeResponseValue;
4217         }
4218         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
4219         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
4220                 if(!isWasmInitialized) {
4221                         throw new Error("initializeWasm() must be awaited first!");
4222                 }
4223                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_err(e);
4224                 return nativeResponseValue;
4225         }
4226         // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
4227         export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
4228                 if(!isWasmInitialized) {
4229                         throw new Error("initializeWasm() must be awaited first!");
4230                 }
4231                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_is_ok(o);
4232                 return nativeResponseValue;
4233         }
4234         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
4235         export function CResult_PublicKeyErrorZ_free(_res: number): void {
4236                 if(!isWasmInitialized) {
4237                         throw new Error("initializeWasm() must be awaited first!");
4238                 }
4239                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_free(_res);
4240                 // debug statements here
4241         }
4242         // uint64_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
4243         export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
4244                 if(!isWasmInitialized) {
4245                         throw new Error("initializeWasm() must be awaited first!");
4246                 }
4247                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone_ptr(arg);
4248                 return nativeResponseValue;
4249         }
4250         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
4251         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
4252                 if(!isWasmInitialized) {
4253                         throw new Error("initializeWasm() must be awaited first!");
4254                 }
4255                 const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone(orig);
4256                 return nativeResponseValue;
4257         }
4258         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
4259         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
4260                 if(!isWasmInitialized) {
4261                         throw new Error("initializeWasm() must be awaited first!");
4262                 }
4263                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_ok(o);
4264                 return nativeResponseValue;
4265         }
4266         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
4267         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
4268                 if(!isWasmInitialized) {
4269                         throw new Error("initializeWasm() must be awaited first!");
4270                 }
4271                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_err(e);
4272                 return nativeResponseValue;
4273         }
4274         // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
4275         export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
4276                 if(!isWasmInitialized) {
4277                         throw new Error("initializeWasm() must be awaited first!");
4278                 }
4279                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
4280                 return nativeResponseValue;
4281         }
4282         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
4283         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
4284                 if(!isWasmInitialized) {
4285                         throw new Error("initializeWasm() must be awaited first!");
4286                 }
4287                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_free(_res);
4288                 // debug statements here
4289         }
4290         // uint64_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
4291         export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
4292                 if(!isWasmInitialized) {
4293                         throw new Error("initializeWasm() must be awaited first!");
4294                 }
4295                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
4296                 return nativeResponseValue;
4297         }
4298         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
4299         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
4300                 if(!isWasmInitialized) {
4301                         throw new Error("initializeWasm() must be awaited first!");
4302                 }
4303                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone(orig);
4304                 return nativeResponseValue;
4305         }
4306         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
4307         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
4308                 if(!isWasmInitialized) {
4309                         throw new Error("initializeWasm() must be awaited first!");
4310                 }
4311                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
4312                 return nativeResponseValue;
4313         }
4314         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
4315         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
4316                 if(!isWasmInitialized) {
4317                         throw new Error("initializeWasm() must be awaited first!");
4318                 }
4319                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_err(e);
4320                 return nativeResponseValue;
4321         }
4322         // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
4323         export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
4324                 if(!isWasmInitialized) {
4325                         throw new Error("initializeWasm() must be awaited first!");
4326                 }
4327                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
4328                 return nativeResponseValue;
4329         }
4330         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
4331         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
4332                 if(!isWasmInitialized) {
4333                         throw new Error("initializeWasm() must be awaited first!");
4334                 }
4335                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
4336                 // debug statements here
4337         }
4338         // uint64_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
4339         export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
4340                 if(!isWasmInitialized) {
4341                         throw new Error("initializeWasm() must be awaited first!");
4342                 }
4343                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
4344                 return nativeResponseValue;
4345         }
4346         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
4347         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
4348                 if(!isWasmInitialized) {
4349                         throw new Error("initializeWasm() must be awaited first!");
4350                 }
4351                 const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
4352                 return nativeResponseValue;
4353         }
4354         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
4355         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
4356                 if(!isWasmInitialized) {
4357                         throw new Error("initializeWasm() must be awaited first!");
4358                 }
4359                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_ok(o);
4360                 return nativeResponseValue;
4361         }
4362         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
4363         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
4364                 if(!isWasmInitialized) {
4365                         throw new Error("initializeWasm() must be awaited first!");
4366                 }
4367                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_err(e);
4368                 return nativeResponseValue;
4369         }
4370         // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
4371         export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
4372                 if(!isWasmInitialized) {
4373                         throw new Error("initializeWasm() must be awaited first!");
4374                 }
4375                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_is_ok(o);
4376                 return nativeResponseValue;
4377         }
4378         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
4379         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
4380                 if(!isWasmInitialized) {
4381                         throw new Error("initializeWasm() must be awaited first!");
4382                 }
4383                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_free(_res);
4384                 // debug statements here
4385         }
4386         // uint64_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
4387         export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
4388                 if(!isWasmInitialized) {
4389                         throw new Error("initializeWasm() must be awaited first!");
4390                 }
4391                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone_ptr(arg);
4392                 return nativeResponseValue;
4393         }
4394         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
4395         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
4396                 if(!isWasmInitialized) {
4397                         throw new Error("initializeWasm() must be awaited first!");
4398                 }
4399                 const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone(orig);
4400                 return nativeResponseValue;
4401         }
4402         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
4403         export function COption_u32Z_some(o: number): number {
4404                 if(!isWasmInitialized) {
4405                         throw new Error("initializeWasm() must be awaited first!");
4406                 }
4407                 const nativeResponseValue = wasm.TS_COption_u32Z_some(o);
4408                 return nativeResponseValue;
4409         }
4410         // struct LDKCOption_u32Z COption_u32Z_none(void);
4411         export function COption_u32Z_none(): number {
4412                 if(!isWasmInitialized) {
4413                         throw new Error("initializeWasm() must be awaited first!");
4414                 }
4415                 const nativeResponseValue = wasm.TS_COption_u32Z_none();
4416                 return nativeResponseValue;
4417         }
4418         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
4419         export function COption_u32Z_free(_res: number): void {
4420                 if(!isWasmInitialized) {
4421                         throw new Error("initializeWasm() must be awaited first!");
4422                 }
4423                 const nativeResponseValue = wasm.TS_COption_u32Z_free(_res);
4424                 // debug statements here
4425         }
4426         // uint64_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
4427         export function COption_u32Z_clone_ptr(arg: number): number {
4428                 if(!isWasmInitialized) {
4429                         throw new Error("initializeWasm() must be awaited first!");
4430                 }
4431                 const nativeResponseValue = wasm.TS_COption_u32Z_clone_ptr(arg);
4432                 return nativeResponseValue;
4433         }
4434         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
4435         export function COption_u32Z_clone(orig: number): number {
4436                 if(!isWasmInitialized) {
4437                         throw new Error("initializeWasm() must be awaited first!");
4438                 }
4439                 const nativeResponseValue = wasm.TS_COption_u32Z_clone(orig);
4440                 return nativeResponseValue;
4441         }
4442         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
4443         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
4444                 if(!isWasmInitialized) {
4445                         throw new Error("initializeWasm() must be awaited first!");
4446                 }
4447                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
4448                 return nativeResponseValue;
4449         }
4450         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
4451         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
4452                 if(!isWasmInitialized) {
4453                         throw new Error("initializeWasm() must be awaited first!");
4454                 }
4455                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
4456                 return nativeResponseValue;
4457         }
4458         // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
4459         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
4460                 if(!isWasmInitialized) {
4461                         throw new Error("initializeWasm() must be awaited first!");
4462                 }
4463                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
4464                 return nativeResponseValue;
4465         }
4466         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
4467         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
4468                 if(!isWasmInitialized) {
4469                         throw new Error("initializeWasm() must be awaited first!");
4470                 }
4471                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
4472                 // debug statements here
4473         }
4474         // uint64_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
4475         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
4476                 if(!isWasmInitialized) {
4477                         throw new Error("initializeWasm() must be awaited first!");
4478                 }
4479                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
4480                 return nativeResponseValue;
4481         }
4482         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
4483         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
4484                 if(!isWasmInitialized) {
4485                         throw new Error("initializeWasm() must be awaited first!");
4486                 }
4487                 const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
4488                 return nativeResponseValue;
4489         }
4490         // enum LDKCOption_NoneZ COption_NoneZ_some(void);
4491         export function COption_NoneZ_some(): COption_NoneZ {
4492                 if(!isWasmInitialized) {
4493                         throw new Error("initializeWasm() must be awaited first!");
4494                 }
4495                 const nativeResponseValue = wasm.TS_COption_NoneZ_some();
4496                 return nativeResponseValue;
4497         }
4498         // enum LDKCOption_NoneZ COption_NoneZ_none(void);
4499         export function COption_NoneZ_none(): COption_NoneZ {
4500                 if(!isWasmInitialized) {
4501                         throw new Error("initializeWasm() must be awaited first!");
4502                 }
4503                 const nativeResponseValue = wasm.TS_COption_NoneZ_none();
4504                 return nativeResponseValue;
4505         }
4506         // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
4507         export function COption_NoneZ_free(_res: COption_NoneZ): void {
4508                 if(!isWasmInitialized) {
4509                         throw new Error("initializeWasm() must be awaited first!");
4510                 }
4511                 const nativeResponseValue = wasm.TS_COption_NoneZ_free(_res);
4512                 // debug statements here
4513         }
4514         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
4515         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
4516                 if(!isWasmInitialized) {
4517                         throw new Error("initializeWasm() must be awaited first!");
4518                 }
4519                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
4520                 return nativeResponseValue;
4521         }
4522         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
4523         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
4524                 if(!isWasmInitialized) {
4525                         throw new Error("initializeWasm() must be awaited first!");
4526                 }
4527                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
4528                 return nativeResponseValue;
4529         }
4530         // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
4531         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
4532                 if(!isWasmInitialized) {
4533                         throw new Error("initializeWasm() must be awaited first!");
4534                 }
4535                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
4536                 return nativeResponseValue;
4537         }
4538         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
4539         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
4540                 if(!isWasmInitialized) {
4541                         throw new Error("initializeWasm() must be awaited first!");
4542                 }
4543                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
4544                 // debug statements here
4545         }
4546         // uint64_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
4547         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
4548                 if(!isWasmInitialized) {
4549                         throw new Error("initializeWasm() must be awaited first!");
4550                 }
4551                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
4552                 return nativeResponseValue;
4553         }
4554         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
4555         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
4556                 if(!isWasmInitialized) {
4557                         throw new Error("initializeWasm() must be awaited first!");
4558                 }
4559                 const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
4560                 return nativeResponseValue;
4561         }
4562         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
4563         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
4564                 if(!isWasmInitialized) {
4565                         throw new Error("initializeWasm() must be awaited first!");
4566                 }
4567                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
4568                 return nativeResponseValue;
4569         }
4570         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
4571         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
4572                 if(!isWasmInitialized) {
4573                         throw new Error("initializeWasm() must be awaited first!");
4574                 }
4575                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
4576                 return nativeResponseValue;
4577         }
4578         // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
4579         export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
4580                 if(!isWasmInitialized) {
4581                         throw new Error("initializeWasm() must be awaited first!");
4582                 }
4583                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
4584                 return nativeResponseValue;
4585         }
4586         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
4587         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
4588                 if(!isWasmInitialized) {
4589                         throw new Error("initializeWasm() must be awaited first!");
4590                 }
4591                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
4592                 // debug statements here
4593         }
4594         // uint64_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
4595         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
4596                 if(!isWasmInitialized) {
4597                         throw new Error("initializeWasm() must be awaited first!");
4598                 }
4599                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
4600                 return nativeResponseValue;
4601         }
4602         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
4603         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
4604                 if(!isWasmInitialized) {
4605                         throw new Error("initializeWasm() must be awaited first!");
4606                 }
4607                 const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
4608                 return nativeResponseValue;
4609         }
4610         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
4611         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
4612                 if(!isWasmInitialized) {
4613                         throw new Error("initializeWasm() must be awaited first!");
4614                 }
4615                 const nativeResponseValue = wasm.TS_CVec_SignatureZ_free(_res);
4616                 // debug statements here
4617         }
4618         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
4619         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
4620                 if(!isWasmInitialized) {
4621                         throw new Error("initializeWasm() must be awaited first!");
4622                 }
4623                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
4624                 return nativeResponseValue;
4625         }
4626         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
4627         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
4628                 if(!isWasmInitialized) {
4629                         throw new Error("initializeWasm() must be awaited first!");
4630                 }
4631                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
4632                 return nativeResponseValue;
4633         }
4634         // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
4635         export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
4636                 if(!isWasmInitialized) {
4637                         throw new Error("initializeWasm() must be awaited first!");
4638                 }
4639                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
4640                 return nativeResponseValue;
4641         }
4642         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
4643         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
4644                 if(!isWasmInitialized) {
4645                         throw new Error("initializeWasm() must be awaited first!");
4646                 }
4647                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
4648                 // debug statements here
4649         }
4650         // uint64_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
4651         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
4652                 if(!isWasmInitialized) {
4653                         throw new Error("initializeWasm() must be awaited first!");
4654                 }
4655                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
4656                 return nativeResponseValue;
4657         }
4658         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
4659         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
4660                 if(!isWasmInitialized) {
4661                         throw new Error("initializeWasm() must be awaited first!");
4662                 }
4663                 const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
4664                 return nativeResponseValue;
4665         }
4666         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
4667         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
4668                 if(!isWasmInitialized) {
4669                         throw new Error("initializeWasm() must be awaited first!");
4670                 }
4671                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
4672                 return nativeResponseValue;
4673         }
4674         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
4675         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
4676                 if(!isWasmInitialized) {
4677                         throw new Error("initializeWasm() must be awaited first!");
4678                 }
4679                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
4680                 return nativeResponseValue;
4681         }
4682         // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
4683         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
4684                 if(!isWasmInitialized) {
4685                         throw new Error("initializeWasm() must be awaited first!");
4686                 }
4687                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
4688                 return nativeResponseValue;
4689         }
4690         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
4691         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
4692                 if(!isWasmInitialized) {
4693                         throw new Error("initializeWasm() must be awaited first!");
4694                 }
4695                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
4696                 // debug statements here
4697         }
4698         // uint64_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
4699         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
4700                 if(!isWasmInitialized) {
4701                         throw new Error("initializeWasm() must be awaited first!");
4702                 }
4703                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
4704                 return nativeResponseValue;
4705         }
4706         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
4707         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
4708                 if(!isWasmInitialized) {
4709                         throw new Error("initializeWasm() must be awaited first!");
4710                 }
4711                 const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
4712                 return nativeResponseValue;
4713         }
4714         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
4715         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
4716                 if(!isWasmInitialized) {
4717                         throw new Error("initializeWasm() must be awaited first!");
4718                 }
4719                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_ok(o);
4720                 return nativeResponseValue;
4721         }
4722         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
4723         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
4724                 if(!isWasmInitialized) {
4725                         throw new Error("initializeWasm() must be awaited first!");
4726                 }
4727                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_err();
4728                 return nativeResponseValue;
4729         }
4730         // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
4731         export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
4732                 if(!isWasmInitialized) {
4733                         throw new Error("initializeWasm() must be awaited first!");
4734                 }
4735                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_is_ok(o);
4736                 return nativeResponseValue;
4737         }
4738         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
4739         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
4740                 if(!isWasmInitialized) {
4741                         throw new Error("initializeWasm() must be awaited first!");
4742                 }
4743                 const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_free(_res);
4744                 // debug statements here
4745         }
4746         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
4747         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
4748                 if(!isWasmInitialized) {
4749                         throw new Error("initializeWasm() must be awaited first!");
4750                 }
4751                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_ok(o);
4752                 return nativeResponseValue;
4753         }
4754         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
4755         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
4756                 if(!isWasmInitialized) {
4757                         throw new Error("initializeWasm() must be awaited first!");
4758                 }
4759                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_err(e);
4760                 return nativeResponseValue;
4761         }
4762         // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
4763         export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
4764                 if(!isWasmInitialized) {
4765                         throw new Error("initializeWasm() must be awaited first!");
4766                 }
4767                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
4768                 return nativeResponseValue;
4769         }
4770         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
4771         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
4772                 if(!isWasmInitialized) {
4773                         throw new Error("initializeWasm() must be awaited first!");
4774                 }
4775                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_free(_res);
4776                 // debug statements here
4777         }
4778         // uint64_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
4779         export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
4780                 if(!isWasmInitialized) {
4781                         throw new Error("initializeWasm() must be awaited first!");
4782                 }
4783                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
4784                 return nativeResponseValue;
4785         }
4786         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
4787         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
4788                 if(!isWasmInitialized) {
4789                         throw new Error("initializeWasm() must be awaited first!");
4790                 }
4791                 const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
4792                 return nativeResponseValue;
4793         }
4794         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
4795         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
4796                 if(!isWasmInitialized) {
4797                         throw new Error("initializeWasm() must be awaited first!");
4798                 }
4799                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_ok(o);
4800                 return nativeResponseValue;
4801         }
4802         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
4803         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
4804                 if(!isWasmInitialized) {
4805                         throw new Error("initializeWasm() must be awaited first!");
4806                 }
4807                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_err();
4808                 return nativeResponseValue;
4809         }
4810         // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
4811         export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
4812                 if(!isWasmInitialized) {
4813                         throw new Error("initializeWasm() must be awaited first!");
4814                 }
4815                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
4816                 return nativeResponseValue;
4817         }
4818         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
4819         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
4820                 if(!isWasmInitialized) {
4821                         throw new Error("initializeWasm() must be awaited first!");
4822                 }
4823                 const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_free(_res);
4824                 // debug statements here
4825         }
4826         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
4827         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
4828                 if(!isWasmInitialized) {
4829                         throw new Error("initializeWasm() must be awaited first!");
4830                 }
4831                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_ok(o);
4832                 return nativeResponseValue;
4833         }
4834         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
4835         export function CResult_CVec_SignatureZNoneZ_err(): number {
4836                 if(!isWasmInitialized) {
4837                         throw new Error("initializeWasm() must be awaited first!");
4838                 }
4839                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_err();
4840                 return nativeResponseValue;
4841         }
4842         // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
4843         export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
4844                 if(!isWasmInitialized) {
4845                         throw new Error("initializeWasm() must be awaited first!");
4846                 }
4847                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_is_ok(o);
4848                 return nativeResponseValue;
4849         }
4850         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
4851         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
4852                 if(!isWasmInitialized) {
4853                         throw new Error("initializeWasm() must be awaited first!");
4854                 }
4855                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_free(_res);
4856                 // debug statements here
4857         }
4858         // uint64_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
4859         export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
4860                 if(!isWasmInitialized) {
4861                         throw new Error("initializeWasm() must be awaited first!");
4862                 }
4863                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
4864                 return nativeResponseValue;
4865         }
4866         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
4867         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
4868                 if(!isWasmInitialized) {
4869                         throw new Error("initializeWasm() must be awaited first!");
4870                 }
4871                 const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone(orig);
4872                 return nativeResponseValue;
4873         }
4874         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
4875         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
4876                 if(!isWasmInitialized) {
4877                         throw new Error("initializeWasm() must be awaited first!");
4878                 }
4879                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_ok(o);
4880                 return nativeResponseValue;
4881         }
4882         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
4883         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
4884                 if(!isWasmInitialized) {
4885                         throw new Error("initializeWasm() must be awaited first!");
4886                 }
4887                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_err(e);
4888                 return nativeResponseValue;
4889         }
4890         // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
4891         export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
4892                 if(!isWasmInitialized) {
4893                         throw new Error("initializeWasm() must be awaited first!");
4894                 }
4895                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
4896                 return nativeResponseValue;
4897         }
4898         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
4899         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
4900                 if(!isWasmInitialized) {
4901                         throw new Error("initializeWasm() must be awaited first!");
4902                 }
4903                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_free(_res);
4904                 // debug statements here
4905         }
4906         // uint64_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
4907         export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
4908                 if(!isWasmInitialized) {
4909                         throw new Error("initializeWasm() must be awaited first!");
4910                 }
4911                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
4912                 return nativeResponseValue;
4913         }
4914         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
4915         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
4916                 if(!isWasmInitialized) {
4917                         throw new Error("initializeWasm() must be awaited first!");
4918                 }
4919                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone(orig);
4920                 return nativeResponseValue;
4921         }
4922         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
4923         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
4924                 if(!isWasmInitialized) {
4925                         throw new Error("initializeWasm() must be awaited first!");
4926                 }
4927                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
4928                 return nativeResponseValue;
4929         }
4930         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
4931         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
4932                 if(!isWasmInitialized) {
4933                         throw new Error("initializeWasm() must be awaited first!");
4934                 }
4935                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
4936                 return nativeResponseValue;
4937         }
4938         // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
4939         export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
4940                 if(!isWasmInitialized) {
4941                         throw new Error("initializeWasm() must be awaited first!");
4942                 }
4943                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
4944                 return nativeResponseValue;
4945         }
4946         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
4947         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
4948                 if(!isWasmInitialized) {
4949                         throw new Error("initializeWasm() must be awaited first!");
4950                 }
4951                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
4952                 // debug statements here
4953         }
4954         // uint64_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
4955         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
4956                 if(!isWasmInitialized) {
4957                         throw new Error("initializeWasm() must be awaited first!");
4958                 }
4959                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
4960                 return nativeResponseValue;
4961         }
4962         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
4963         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
4964                 if(!isWasmInitialized) {
4965                         throw new Error("initializeWasm() must be awaited first!");
4966                 }
4967                 const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
4968                 return nativeResponseValue;
4969         }
4970         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
4971         export function COption_TypeZ_some(o: number): number {
4972                 if(!isWasmInitialized) {
4973                         throw new Error("initializeWasm() must be awaited first!");
4974                 }
4975                 const nativeResponseValue = wasm.TS_COption_TypeZ_some(o);
4976                 return nativeResponseValue;
4977         }
4978         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
4979         export function COption_TypeZ_none(): number {
4980                 if(!isWasmInitialized) {
4981                         throw new Error("initializeWasm() must be awaited first!");
4982                 }
4983                 const nativeResponseValue = wasm.TS_COption_TypeZ_none();
4984                 return nativeResponseValue;
4985         }
4986         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
4987         export function COption_TypeZ_free(_res: number): void {
4988                 if(!isWasmInitialized) {
4989                         throw new Error("initializeWasm() must be awaited first!");
4990                 }
4991                 const nativeResponseValue = wasm.TS_COption_TypeZ_free(_res);
4992                 // debug statements here
4993         }
4994         // uint64_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
4995         export function COption_TypeZ_clone_ptr(arg: number): number {
4996                 if(!isWasmInitialized) {
4997                         throw new Error("initializeWasm() must be awaited first!");
4998                 }
4999                 const nativeResponseValue = wasm.TS_COption_TypeZ_clone_ptr(arg);
5000                 return nativeResponseValue;
5001         }
5002         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
5003         export function COption_TypeZ_clone(orig: number): number {
5004                 if(!isWasmInitialized) {
5005                         throw new Error("initializeWasm() must be awaited first!");
5006                 }
5007                 const nativeResponseValue = wasm.TS_COption_TypeZ_clone(orig);
5008                 return nativeResponseValue;
5009         }
5010         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
5011         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
5012                 if(!isWasmInitialized) {
5013                         throw new Error("initializeWasm() must be awaited first!");
5014                 }
5015                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_ok(o);
5016                 return nativeResponseValue;
5017         }
5018         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
5019         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
5020                 if(!isWasmInitialized) {
5021                         throw new Error("initializeWasm() must be awaited first!");
5022                 }
5023                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_err(e);
5024                 return nativeResponseValue;
5025         }
5026         // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
5027         export function CResult_COption_TypeZDecodeErrorZ_is_ok(o: number): boolean {
5028                 if(!isWasmInitialized) {
5029                         throw new Error("initializeWasm() must be awaited first!");
5030                 }
5031                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_is_ok(o);
5032                 return nativeResponseValue;
5033         }
5034         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
5035         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
5036                 if(!isWasmInitialized) {
5037                         throw new Error("initializeWasm() must be awaited first!");
5038                 }
5039                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_free(_res);
5040                 // debug statements here
5041         }
5042         // uint64_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
5043         export function CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg: number): number {
5044                 if(!isWasmInitialized) {
5045                         throw new Error("initializeWasm() must be awaited first!");
5046                 }
5047                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg);
5048                 return nativeResponseValue;
5049         }
5050         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
5051         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
5052                 if(!isWasmInitialized) {
5053                         throw new Error("initializeWasm() must be awaited first!");
5054                 }
5055                 const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone(orig);
5056                 return nativeResponseValue;
5057         }
5058         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
5059         export function CResult_StringErrorZ_ok(o: String): number {
5060                 if(!isWasmInitialized) {
5061                         throw new Error("initializeWasm() must be awaited first!");
5062                 }
5063                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_ok(o);
5064                 return nativeResponseValue;
5065         }
5066         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
5067         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
5068                 if(!isWasmInitialized) {
5069                         throw new Error("initializeWasm() must be awaited first!");
5070                 }
5071                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_err(e);
5072                 return nativeResponseValue;
5073         }
5074         // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
5075         export function CResult_StringErrorZ_is_ok(o: number): boolean {
5076                 if(!isWasmInitialized) {
5077                         throw new Error("initializeWasm() must be awaited first!");
5078                 }
5079                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_is_ok(o);
5080                 return nativeResponseValue;
5081         }
5082         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
5083         export function CResult_StringErrorZ_free(_res: number): void {
5084                 if(!isWasmInitialized) {
5085                         throw new Error("initializeWasm() must be awaited first!");
5086                 }
5087                 const nativeResponseValue = wasm.TS_CResult_StringErrorZ_free(_res);
5088                 // debug statements here
5089         }
5090         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
5091         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
5092                 if(!isWasmInitialized) {
5093                         throw new Error("initializeWasm() must be awaited first!");
5094                 }
5095                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
5096                 return nativeResponseValue;
5097         }
5098         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5099         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
5100                 if(!isWasmInitialized) {
5101                         throw new Error("initializeWasm() must be awaited first!");
5102                 }
5103                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
5104                 return nativeResponseValue;
5105         }
5106         // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
5107         export function CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: number): boolean {
5108                 if(!isWasmInitialized) {
5109                         throw new Error("initializeWasm() must be awaited first!");
5110                 }
5111                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o);
5112                 return nativeResponseValue;
5113         }
5114         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
5115         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
5116                 if(!isWasmInitialized) {
5117                         throw new Error("initializeWasm() must be awaited first!");
5118                 }
5119                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
5120                 // debug statements here
5121         }
5122         // uint64_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
5123         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg: number): number {
5124                 if(!isWasmInitialized) {
5125                         throw new Error("initializeWasm() must be awaited first!");
5126                 }
5127                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg);
5128                 return nativeResponseValue;
5129         }
5130         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
5131         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
5132                 if(!isWasmInitialized) {
5133                         throw new Error("initializeWasm() must be awaited first!");
5134                 }
5135                 const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
5136                 return nativeResponseValue;
5137         }
5138         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
5139         export function COption_MonitorEventZ_some(o: number): number {
5140                 if(!isWasmInitialized) {
5141                         throw new Error("initializeWasm() must be awaited first!");
5142                 }
5143                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_some(o);
5144                 return nativeResponseValue;
5145         }
5146         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
5147         export function COption_MonitorEventZ_none(): number {
5148                 if(!isWasmInitialized) {
5149                         throw new Error("initializeWasm() must be awaited first!");
5150                 }
5151                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_none();
5152                 return nativeResponseValue;
5153         }
5154         // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
5155         export function COption_MonitorEventZ_free(_res: number): void {
5156                 if(!isWasmInitialized) {
5157                         throw new Error("initializeWasm() must be awaited first!");
5158                 }
5159                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_free(_res);
5160                 // debug statements here
5161         }
5162         // uint64_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
5163         export function COption_MonitorEventZ_clone_ptr(arg: number): number {
5164                 if(!isWasmInitialized) {
5165                         throw new Error("initializeWasm() must be awaited first!");
5166                 }
5167                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone_ptr(arg);
5168                 return nativeResponseValue;
5169         }
5170         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
5171         export function COption_MonitorEventZ_clone(orig: number): number {
5172                 if(!isWasmInitialized) {
5173                         throw new Error("initializeWasm() must be awaited first!");
5174                 }
5175                 const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone(orig);
5176                 return nativeResponseValue;
5177         }
5178         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
5179         export function CResult_COption_MonitorEventZDecodeErrorZ_ok(o: number): number {
5180                 if(!isWasmInitialized) {
5181                         throw new Error("initializeWasm() must be awaited first!");
5182                 }
5183                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_ok(o);
5184                 return nativeResponseValue;
5185         }
5186         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
5187         export function CResult_COption_MonitorEventZDecodeErrorZ_err(e: number): number {
5188                 if(!isWasmInitialized) {
5189                         throw new Error("initializeWasm() must be awaited first!");
5190                 }
5191                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_err(e);
5192                 return nativeResponseValue;
5193         }
5194         // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
5195         export function CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: number): boolean {
5196                 if(!isWasmInitialized) {
5197                         throw new Error("initializeWasm() must be awaited first!");
5198                 }
5199                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o);
5200                 return nativeResponseValue;
5201         }
5202         // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
5203         export function CResult_COption_MonitorEventZDecodeErrorZ_free(_res: number): void {
5204                 if(!isWasmInitialized) {
5205                         throw new Error("initializeWasm() must be awaited first!");
5206                 }
5207                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_free(_res);
5208                 // debug statements here
5209         }
5210         // uint64_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
5211         export function CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg: number): number {
5212                 if(!isWasmInitialized) {
5213                         throw new Error("initializeWasm() must be awaited first!");
5214                 }
5215                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg);
5216                 return nativeResponseValue;
5217         }
5218         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
5219         export function CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: number): number {
5220                 if(!isWasmInitialized) {
5221                         throw new Error("initializeWasm() must be awaited first!");
5222                 }
5223                 const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone(orig);
5224                 return nativeResponseValue;
5225         }
5226         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
5227         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
5228                 if(!isWasmInitialized) {
5229                         throw new Error("initializeWasm() must be awaited first!");
5230                 }
5231                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_ok(o);
5232                 return nativeResponseValue;
5233         }
5234         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5235         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
5236                 if(!isWasmInitialized) {
5237                         throw new Error("initializeWasm() must be awaited first!");
5238                 }
5239                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_err(e);
5240                 return nativeResponseValue;
5241         }
5242         // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
5243         export function CResult_HTLCUpdateDecodeErrorZ_is_ok(o: number): boolean {
5244                 if(!isWasmInitialized) {
5245                         throw new Error("initializeWasm() must be awaited first!");
5246                 }
5247                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_is_ok(o);
5248                 return nativeResponseValue;
5249         }
5250         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
5251         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
5252                 if(!isWasmInitialized) {
5253                         throw new Error("initializeWasm() must be awaited first!");
5254                 }
5255                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_free(_res);
5256                 // debug statements here
5257         }
5258         // uint64_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
5259         export function CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg: number): number {
5260                 if(!isWasmInitialized) {
5261                         throw new Error("initializeWasm() must be awaited first!");
5262                 }
5263                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg);
5264                 return nativeResponseValue;
5265         }
5266         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
5267         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
5268                 if(!isWasmInitialized) {
5269                         throw new Error("initializeWasm() must be awaited first!");
5270                 }
5271                 const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone(orig);
5272                 return nativeResponseValue;
5273         }
5274         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
5275         export function CResult_NoneNoneZ_ok(): number {
5276                 if(!isWasmInitialized) {
5277                         throw new Error("initializeWasm() must be awaited first!");
5278                 }
5279                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_ok();
5280                 return nativeResponseValue;
5281         }
5282         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
5283         export function CResult_NoneNoneZ_err(): number {
5284                 if(!isWasmInitialized) {
5285                         throw new Error("initializeWasm() must be awaited first!");
5286                 }
5287                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_err();
5288                 return nativeResponseValue;
5289         }
5290         // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
5291         export function CResult_NoneNoneZ_is_ok(o: number): boolean {
5292                 if(!isWasmInitialized) {
5293                         throw new Error("initializeWasm() must be awaited first!");
5294                 }
5295                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_is_ok(o);
5296                 return nativeResponseValue;
5297         }
5298         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
5299         export function CResult_NoneNoneZ_free(_res: number): void {
5300                 if(!isWasmInitialized) {
5301                         throw new Error("initializeWasm() must be awaited first!");
5302                 }
5303                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_free(_res);
5304                 // debug statements here
5305         }
5306         // uint64_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
5307         export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
5308                 if(!isWasmInitialized) {
5309                         throw new Error("initializeWasm() must be awaited first!");
5310                 }
5311                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone_ptr(arg);
5312                 return nativeResponseValue;
5313         }
5314         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
5315         export function CResult_NoneNoneZ_clone(orig: number): number {
5316                 if(!isWasmInitialized) {
5317                         throw new Error("initializeWasm() must be awaited first!");
5318                 }
5319                 const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone(orig);
5320                 return nativeResponseValue;
5321         }
5322         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
5323         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
5324                 if(!isWasmInitialized) {
5325                         throw new Error("initializeWasm() must be awaited first!");
5326                 }
5327                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_new(a, encodeUint8Array(b));
5328                 return nativeResponseValue;
5329         }
5330         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
5331         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
5332                 if(!isWasmInitialized) {
5333                         throw new Error("initializeWasm() must be awaited first!");
5334                 }
5335                 const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_free(_res);
5336                 // debug statements here
5337         }
5338         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
5339         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
5340                 if(!isWasmInitialized) {
5341                         throw new Error("initializeWasm() must be awaited first!");
5342                 }
5343                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_new(a, encodeUint8Array(b));
5344                 return nativeResponseValue;
5345         }
5346         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
5347         export function C2Tuple_u32ScriptZ_free(_res: number): void {
5348                 if(!isWasmInitialized) {
5349                         throw new Error("initializeWasm() must be awaited first!");
5350                 }
5351                 const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_free(_res);
5352                 // debug statements here
5353         }
5354         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
5355         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
5356                 if(!isWasmInitialized) {
5357                         throw new Error("initializeWasm() must be awaited first!");
5358                 }
5359                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32ScriptZZ_free(_res);
5360                 // debug statements here
5361         }
5362         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
5363         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
5364                 if(!isWasmInitialized) {
5365                         throw new Error("initializeWasm() must be awaited first!");
5366                 }
5367                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeUint8Array(a), b);
5368                 return nativeResponseValue;
5369         }
5370         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
5371         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
5372                 if(!isWasmInitialized) {
5373                         throw new Error("initializeWasm() must be awaited first!");
5374                 }
5375                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
5376                 // debug statements here
5377         }
5378         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
5379         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
5380                 if(!isWasmInitialized) {
5381                         throw new Error("initializeWasm() must be awaited first!");
5382                 }
5383                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
5384                 // debug statements here
5385         }
5386         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
5387         export function CVec_MonitorEventZ_free(_res: number[]): void {
5388                 if(!isWasmInitialized) {
5389                         throw new Error("initializeWasm() must be awaited first!");
5390                 }
5391                 const nativeResponseValue = wasm.TS_CVec_MonitorEventZ_free(_res);
5392                 // debug statements here
5393         }
5394         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
5395         export function CVec_EventZ_free(_res: number[]): void {
5396                 if(!isWasmInitialized) {
5397                         throw new Error("initializeWasm() must be awaited first!");
5398                 }
5399                 const nativeResponseValue = wasm.TS_CVec_EventZ_free(_res);
5400                 // debug statements here
5401         }
5402         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
5403         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
5404                 if(!isWasmInitialized) {
5405                         throw new Error("initializeWasm() must be awaited first!");
5406                 }
5407                 const nativeResponseValue = wasm.TS_CVec_TransactionZ_free(_res);
5408                 // debug statements here
5409         }
5410         // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
5411         export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
5412                 if(!isWasmInitialized) {
5413                         throw new Error("initializeWasm() must be awaited first!");
5414                 }
5415                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone_ptr(arg);
5416                 return nativeResponseValue;
5417         }
5418         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
5419         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
5420                 if(!isWasmInitialized) {
5421                         throw new Error("initializeWasm() must be awaited first!");
5422                 }
5423                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone(orig);
5424                 return nativeResponseValue;
5425         }
5426         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
5427         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
5428                 if(!isWasmInitialized) {
5429                         throw new Error("initializeWasm() must be awaited first!");
5430                 }
5431                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_new(a, encodeUint8Array(b));
5432                 return nativeResponseValue;
5433         }
5434         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
5435         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
5436                 if(!isWasmInitialized) {
5437                         throw new Error("initializeWasm() must be awaited first!");
5438                 }
5439                 const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_free(_res);
5440                 // debug statements here
5441         }
5442         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
5443         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
5444                 if(!isWasmInitialized) {
5445                         throw new Error("initializeWasm() must be awaited first!");
5446                 }
5447                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_usizeTransactionZZ_free(_res);
5448                 // debug statements here
5449         }
5450         // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
5451         export function C2Tuple_u32TxOutZ_clone_ptr(arg: number): number {
5452                 if(!isWasmInitialized) {
5453                         throw new Error("initializeWasm() must be awaited first!");
5454                 }
5455                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone_ptr(arg);
5456                 return nativeResponseValue;
5457         }
5458         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
5459         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
5460                 if(!isWasmInitialized) {
5461                         throw new Error("initializeWasm() must be awaited first!");
5462                 }
5463                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone(orig);
5464                 return nativeResponseValue;
5465         }
5466         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
5467         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
5468                 if(!isWasmInitialized) {
5469                         throw new Error("initializeWasm() must be awaited first!");
5470                 }
5471                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_new(a, b);
5472                 return nativeResponseValue;
5473         }
5474         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
5475         export function C2Tuple_u32TxOutZ_free(_res: number): void {
5476                 if(!isWasmInitialized) {
5477                         throw new Error("initializeWasm() must be awaited first!");
5478                 }
5479                 const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_free(_res);
5480                 // debug statements here
5481         }
5482         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
5483         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
5484                 if(!isWasmInitialized) {
5485                         throw new Error("initializeWasm() must be awaited first!");
5486                 }
5487                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32TxOutZZ_free(_res);
5488                 // debug statements here
5489         }
5490         // uint64_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
5491         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg: number): number {
5492                 if(!isWasmInitialized) {
5493                         throw new Error("initializeWasm() must be awaited first!");
5494                 }
5495                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg);
5496                 return nativeResponseValue;
5497         }
5498         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
5499         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
5500                 if(!isWasmInitialized) {
5501                         throw new Error("initializeWasm() must be awaited first!");
5502                 }
5503                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
5504                 return nativeResponseValue;
5505         }
5506         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
5507         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
5508                 if(!isWasmInitialized) {
5509                         throw new Error("initializeWasm() must be awaited first!");
5510                 }
5511                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeUint8Array(a), b);
5512                 return nativeResponseValue;
5513         }
5514         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
5515         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
5516                 if(!isWasmInitialized) {
5517                         throw new Error("initializeWasm() must be awaited first!");
5518                 }
5519                 const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
5520                 // debug statements here
5521         }
5522         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
5523         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
5524                 if(!isWasmInitialized) {
5525                         throw new Error("initializeWasm() must be awaited first!");
5526                 }
5527                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
5528                 // debug statements here
5529         }
5530         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
5531         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
5532                 if(!isWasmInitialized) {
5533                         throw new Error("initializeWasm() must be awaited first!");
5534                 }
5535                 const nativeResponseValue = wasm.TS_CVec_TxidZ_free(_res);
5536                 // debug statements here
5537         }
5538         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
5539         export function CVec_BalanceZ_free(_res: number[]): void {
5540                 if(!isWasmInitialized) {
5541                         throw new Error("initializeWasm() must be awaited first!");
5542                 }
5543                 const nativeResponseValue = wasm.TS_CVec_BalanceZ_free(_res);
5544                 // debug statements here
5545         }
5546         // uint64_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
5547         export function C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg: number): number {
5548                 if(!isWasmInitialized) {
5549                         throw new Error("initializeWasm() must be awaited first!");
5550                 }
5551                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg);
5552                 return nativeResponseValue;
5553         }
5554         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
5555         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
5556                 if(!isWasmInitialized) {
5557                         throw new Error("initializeWasm() must be awaited first!");
5558                 }
5559                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone(orig);
5560                 return nativeResponseValue;
5561         }
5562         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
5563         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
5564                 if(!isWasmInitialized) {
5565                         throw new Error("initializeWasm() must be awaited first!");
5566                 }
5567                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_new(encodeUint8Array(a), b);
5568                 return nativeResponseValue;
5569         }
5570         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
5571         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
5572                 if(!isWasmInitialized) {
5573                         throw new Error("initializeWasm() must be awaited first!");
5574                 }
5575                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_free(_res);
5576                 // debug statements here
5577         }
5578         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
5579         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
5580                 if(!isWasmInitialized) {
5581                         throw new Error("initializeWasm() must be awaited first!");
5582                 }
5583                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
5584                 return nativeResponseValue;
5585         }
5586         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
5587         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
5588                 if(!isWasmInitialized) {
5589                         throw new Error("initializeWasm() must be awaited first!");
5590                 }
5591                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
5592                 return nativeResponseValue;
5593         }
5594         // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
5595         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o: number): boolean {
5596                 if(!isWasmInitialized) {
5597                         throw new Error("initializeWasm() must be awaited first!");
5598                 }
5599                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o);
5600                 return nativeResponseValue;
5601         }
5602         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
5603         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
5604                 if(!isWasmInitialized) {
5605                         throw new Error("initializeWasm() must be awaited first!");
5606                 }
5607                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
5608                 // debug statements here
5609         }
5610         // uint64_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
5611         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg: number): number {
5612                 if(!isWasmInitialized) {
5613                         throw new Error("initializeWasm() must be awaited first!");
5614                 }
5615                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg);
5616                 return nativeResponseValue;
5617         }
5618         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
5619         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
5620                 if(!isWasmInitialized) {
5621                         throw new Error("initializeWasm() must be awaited first!");
5622                 }
5623                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
5624                 return nativeResponseValue;
5625         }
5626         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
5627         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
5628                 if(!isWasmInitialized) {
5629                         throw new Error("initializeWasm() must be awaited first!");
5630                 }
5631                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_ok(o);
5632                 return nativeResponseValue;
5633         }
5634         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
5635         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
5636                 if(!isWasmInitialized) {
5637                         throw new Error("initializeWasm() must be awaited first!");
5638                 }
5639                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_err(e);
5640                 return nativeResponseValue;
5641         }
5642         // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
5643         export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
5644                 if(!isWasmInitialized) {
5645                         throw new Error("initializeWasm() must be awaited first!");
5646                 }
5647                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_is_ok(o);
5648                 return nativeResponseValue;
5649         }
5650         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
5651         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
5652                 if(!isWasmInitialized) {
5653                         throw new Error("initializeWasm() must be awaited first!");
5654                 }
5655                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_free(_res);
5656                 // debug statements here
5657         }
5658         // uint64_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
5659         export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
5660                 if(!isWasmInitialized) {
5661                         throw new Error("initializeWasm() must be awaited first!");
5662                 }
5663                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
5664                 return nativeResponseValue;
5665         }
5666         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
5667         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
5668                 if(!isWasmInitialized) {
5669                         throw new Error("initializeWasm() must be awaited first!");
5670                 }
5671                 const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone(orig);
5672                 return nativeResponseValue;
5673         }
5674         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
5675         export function CVec_RouteHopZ_free(_res: number[]): void {
5676                 if(!isWasmInitialized) {
5677                         throw new Error("initializeWasm() must be awaited first!");
5678                 }
5679                 const nativeResponseValue = wasm.TS_CVec_RouteHopZ_free(_res);
5680                 // debug statements here
5681         }
5682         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
5683         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
5684                 if(!isWasmInitialized) {
5685                         throw new Error("initializeWasm() must be awaited first!");
5686                 }
5687                 const nativeResponseValue = wasm.TS_CVec_CVec_RouteHopZZ_free(_res);
5688                 // debug statements here
5689         }
5690         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
5691         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
5692                 if(!isWasmInitialized) {
5693                         throw new Error("initializeWasm() must be awaited first!");
5694                 }
5695                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_ok(o);
5696                 return nativeResponseValue;
5697         }
5698         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
5699         export function CResult_RouteDecodeErrorZ_err(e: number): number {
5700                 if(!isWasmInitialized) {
5701                         throw new Error("initializeWasm() must be awaited first!");
5702                 }
5703                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_err(e);
5704                 return nativeResponseValue;
5705         }
5706         // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
5707         export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
5708                 if(!isWasmInitialized) {
5709                         throw new Error("initializeWasm() must be awaited first!");
5710                 }
5711                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_is_ok(o);
5712                 return nativeResponseValue;
5713         }
5714         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
5715         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
5716                 if(!isWasmInitialized) {
5717                         throw new Error("initializeWasm() must be awaited first!");
5718                 }
5719                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_free(_res);
5720                 // debug statements here
5721         }
5722         // uint64_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
5723         export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
5724                 if(!isWasmInitialized) {
5725                         throw new Error("initializeWasm() must be awaited first!");
5726                 }
5727                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone_ptr(arg);
5728                 return nativeResponseValue;
5729         }
5730         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
5731         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
5732                 if(!isWasmInitialized) {
5733                         throw new Error("initializeWasm() must be awaited first!");
5734                 }
5735                 const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone(orig);
5736                 return nativeResponseValue;
5737         }
5738         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
5739         export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
5740                 if(!isWasmInitialized) {
5741                         throw new Error("initializeWasm() must be awaited first!");
5742                 }
5743                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_ok(o);
5744                 return nativeResponseValue;
5745         }
5746         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
5747         export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
5748                 if(!isWasmInitialized) {
5749                         throw new Error("initializeWasm() must be awaited first!");
5750                 }
5751                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_err(e);
5752                 return nativeResponseValue;
5753         }
5754         // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
5755         export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
5756                 if(!isWasmInitialized) {
5757                         throw new Error("initializeWasm() must be awaited first!");
5758                 }
5759                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_is_ok(o);
5760                 return nativeResponseValue;
5761         }
5762         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
5763         export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
5764                 if(!isWasmInitialized) {
5765                         throw new Error("initializeWasm() must be awaited first!");
5766                 }
5767                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_free(_res);
5768                 // debug statements here
5769         }
5770         // uint64_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
5771         export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
5772                 if(!isWasmInitialized) {
5773                         throw new Error("initializeWasm() must be awaited first!");
5774                 }
5775                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
5776                 return nativeResponseValue;
5777         }
5778         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
5779         export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
5780                 if(!isWasmInitialized) {
5781                         throw new Error("initializeWasm() must be awaited first!");
5782                 }
5783                 const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone(orig);
5784                 return nativeResponseValue;
5785         }
5786         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
5787         export function CVec_RouteHintZ_free(_res: number[]): void {
5788                 if(!isWasmInitialized) {
5789                         throw new Error("initializeWasm() must be awaited first!");
5790                 }
5791                 const nativeResponseValue = wasm.TS_CVec_RouteHintZ_free(_res);
5792                 // debug statements here
5793         }
5794         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
5795         export function COption_u64Z_some(o: number): number {
5796                 if(!isWasmInitialized) {
5797                         throw new Error("initializeWasm() must be awaited first!");
5798                 }
5799                 const nativeResponseValue = wasm.TS_COption_u64Z_some(o);
5800                 return nativeResponseValue;
5801         }
5802         // struct LDKCOption_u64Z COption_u64Z_none(void);
5803         export function COption_u64Z_none(): number {
5804                 if(!isWasmInitialized) {
5805                         throw new Error("initializeWasm() must be awaited first!");
5806                 }
5807                 const nativeResponseValue = wasm.TS_COption_u64Z_none();
5808                 return nativeResponseValue;
5809         }
5810         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
5811         export function COption_u64Z_free(_res: number): void {
5812                 if(!isWasmInitialized) {
5813                         throw new Error("initializeWasm() must be awaited first!");
5814                 }
5815                 const nativeResponseValue = wasm.TS_COption_u64Z_free(_res);
5816                 // debug statements here
5817         }
5818         // uint64_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
5819         export function COption_u64Z_clone_ptr(arg: number): number {
5820                 if(!isWasmInitialized) {
5821                         throw new Error("initializeWasm() must be awaited first!");
5822                 }
5823                 const nativeResponseValue = wasm.TS_COption_u64Z_clone_ptr(arg);
5824                 return nativeResponseValue;
5825         }
5826         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
5827         export function COption_u64Z_clone(orig: number): number {
5828                 if(!isWasmInitialized) {
5829                         throw new Error("initializeWasm() must be awaited first!");
5830                 }
5831                 const nativeResponseValue = wasm.TS_COption_u64Z_clone(orig);
5832                 return nativeResponseValue;
5833         }
5834         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
5835         export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
5836                 if(!isWasmInitialized) {
5837                         throw new Error("initializeWasm() must be awaited first!");
5838                 }
5839                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_ok(o);
5840                 return nativeResponseValue;
5841         }
5842         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
5843         export function CResult_PayeeDecodeErrorZ_err(e: number): number {
5844                 if(!isWasmInitialized) {
5845                         throw new Error("initializeWasm() must be awaited first!");
5846                 }
5847                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_err(e);
5848                 return nativeResponseValue;
5849         }
5850         // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
5851         export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
5852                 if(!isWasmInitialized) {
5853                         throw new Error("initializeWasm() must be awaited first!");
5854                 }
5855                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_is_ok(o);
5856                 return nativeResponseValue;
5857         }
5858         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
5859         export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
5860                 if(!isWasmInitialized) {
5861                         throw new Error("initializeWasm() must be awaited first!");
5862                 }
5863                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_free(_res);
5864                 // debug statements here
5865         }
5866         // uint64_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
5867         export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
5868                 if(!isWasmInitialized) {
5869                         throw new Error("initializeWasm() must be awaited first!");
5870                 }
5871                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone_ptr(arg);
5872                 return nativeResponseValue;
5873         }
5874         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
5875         export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
5876                 if(!isWasmInitialized) {
5877                         throw new Error("initializeWasm() must be awaited first!");
5878                 }
5879                 const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone(orig);
5880                 return nativeResponseValue;
5881         }
5882         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
5883         export function CVec_RouteHintHopZ_free(_res: number[]): void {
5884                 if(!isWasmInitialized) {
5885                         throw new Error("initializeWasm() must be awaited first!");
5886                 }
5887                 const nativeResponseValue = wasm.TS_CVec_RouteHintHopZ_free(_res);
5888                 // debug statements here
5889         }
5890         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
5891         export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
5892                 if(!isWasmInitialized) {
5893                         throw new Error("initializeWasm() must be awaited first!");
5894                 }
5895                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_ok(o);
5896                 return nativeResponseValue;
5897         }
5898         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
5899         export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
5900                 if(!isWasmInitialized) {
5901                         throw new Error("initializeWasm() must be awaited first!");
5902                 }
5903                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_err(e);
5904                 return nativeResponseValue;
5905         }
5906         // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
5907         export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
5908                 if(!isWasmInitialized) {
5909                         throw new Error("initializeWasm() must be awaited first!");
5910                 }
5911                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_is_ok(o);
5912                 return nativeResponseValue;
5913         }
5914         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
5915         export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
5916                 if(!isWasmInitialized) {
5917                         throw new Error("initializeWasm() must be awaited first!");
5918                 }
5919                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_free(_res);
5920                 // debug statements here
5921         }
5922         // uint64_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
5923         export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
5924                 if(!isWasmInitialized) {
5925                         throw new Error("initializeWasm() must be awaited first!");
5926                 }
5927                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
5928                 return nativeResponseValue;
5929         }
5930         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
5931         export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
5932                 if(!isWasmInitialized) {
5933                         throw new Error("initializeWasm() must be awaited first!");
5934                 }
5935                 const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone(orig);
5936                 return nativeResponseValue;
5937         }
5938         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
5939         export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
5940                 if(!isWasmInitialized) {
5941                         throw new Error("initializeWasm() must be awaited first!");
5942                 }
5943                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_ok(o);
5944                 return nativeResponseValue;
5945         }
5946         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
5947         export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
5948                 if(!isWasmInitialized) {
5949                         throw new Error("initializeWasm() must be awaited first!");
5950                 }
5951                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_err(e);
5952                 return nativeResponseValue;
5953         }
5954         // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
5955         export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
5956                 if(!isWasmInitialized) {
5957                         throw new Error("initializeWasm() must be awaited first!");
5958                 }
5959                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_is_ok(o);
5960                 return nativeResponseValue;
5961         }
5962         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
5963         export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
5964                 if(!isWasmInitialized) {
5965                         throw new Error("initializeWasm() must be awaited first!");
5966                 }
5967                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_free(_res);
5968                 // debug statements here
5969         }
5970         // uint64_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
5971         export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
5972                 if(!isWasmInitialized) {
5973                         throw new Error("initializeWasm() must be awaited first!");
5974                 }
5975                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
5976                 return nativeResponseValue;
5977         }
5978         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
5979         export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
5980                 if(!isWasmInitialized) {
5981                         throw new Error("initializeWasm() must be awaited first!");
5982                 }
5983                 const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone(orig);
5984                 return nativeResponseValue;
5985         }
5986         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
5987         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
5988                 if(!isWasmInitialized) {
5989                         throw new Error("initializeWasm() must be awaited first!");
5990                 }
5991                 const nativeResponseValue = wasm.TS_CVec_ChannelDetailsZ_free(_res);
5992                 // debug statements here
5993         }
5994         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
5995         export function CResult_RouteLightningErrorZ_ok(o: number): number {
5996                 if(!isWasmInitialized) {
5997                         throw new Error("initializeWasm() must be awaited first!");
5998                 }
5999                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_ok(o);
6000                 return nativeResponseValue;
6001         }
6002         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
6003         export function CResult_RouteLightningErrorZ_err(e: number): number {
6004                 if(!isWasmInitialized) {
6005                         throw new Error("initializeWasm() must be awaited first!");
6006                 }
6007                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_err(e);
6008                 return nativeResponseValue;
6009         }
6010         // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
6011         export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
6012                 if(!isWasmInitialized) {
6013                         throw new Error("initializeWasm() must be awaited first!");
6014                 }
6015                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_is_ok(o);
6016                 return nativeResponseValue;
6017         }
6018         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
6019         export function CResult_RouteLightningErrorZ_free(_res: number): void {
6020                 if(!isWasmInitialized) {
6021                         throw new Error("initializeWasm() must be awaited first!");
6022                 }
6023                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_free(_res);
6024                 // debug statements here
6025         }
6026         // uint64_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
6027         export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
6028                 if(!isWasmInitialized) {
6029                         throw new Error("initializeWasm() must be awaited first!");
6030                 }
6031                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone_ptr(arg);
6032                 return nativeResponseValue;
6033         }
6034         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
6035         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
6036                 if(!isWasmInitialized) {
6037                         throw new Error("initializeWasm() must be awaited first!");
6038                 }
6039                 const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone(orig);
6040                 return nativeResponseValue;
6041         }
6042         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
6043         export function CResult_NoneLightningErrorZ_ok(): number {
6044                 if(!isWasmInitialized) {
6045                         throw new Error("initializeWasm() must be awaited first!");
6046                 }
6047                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_ok();
6048                 return nativeResponseValue;
6049         }
6050         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
6051         export function CResult_NoneLightningErrorZ_err(e: number): number {
6052                 if(!isWasmInitialized) {
6053                         throw new Error("initializeWasm() must be awaited first!");
6054                 }
6055                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_err(e);
6056                 return nativeResponseValue;
6057         }
6058         // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
6059         export function CResult_NoneLightningErrorZ_is_ok(o: number): boolean {
6060                 if(!isWasmInitialized) {
6061                         throw new Error("initializeWasm() must be awaited first!");
6062                 }
6063                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_is_ok(o);
6064                 return nativeResponseValue;
6065         }
6066         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
6067         export function CResult_NoneLightningErrorZ_free(_res: number): void {
6068                 if(!isWasmInitialized) {
6069                         throw new Error("initializeWasm() must be awaited first!");
6070                 }
6071                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_free(_res);
6072                 // debug statements here
6073         }
6074         // uint64_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
6075         export function CResult_NoneLightningErrorZ_clone_ptr(arg: number): number {
6076                 if(!isWasmInitialized) {
6077                         throw new Error("initializeWasm() must be awaited first!");
6078                 }
6079                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone_ptr(arg);
6080                 return nativeResponseValue;
6081         }
6082         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
6083         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
6084                 if(!isWasmInitialized) {
6085                         throw new Error("initializeWasm() must be awaited first!");
6086                 }
6087                 const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone(orig);
6088                 return nativeResponseValue;
6089         }
6090         // uint64_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
6091         export function C2Tuple_PublicKeyTypeZ_clone_ptr(arg: number): number {
6092                 if(!isWasmInitialized) {
6093                         throw new Error("initializeWasm() must be awaited first!");
6094                 }
6095                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone_ptr(arg);
6096                 return nativeResponseValue;
6097         }
6098         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
6099         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
6100                 if(!isWasmInitialized) {
6101                         throw new Error("initializeWasm() must be awaited first!");
6102                 }
6103                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone(orig);
6104                 return nativeResponseValue;
6105         }
6106         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
6107         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
6108                 if(!isWasmInitialized) {
6109                         throw new Error("initializeWasm() must be awaited first!");
6110                 }
6111                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_new(encodeUint8Array(a), b);
6112                 return nativeResponseValue;
6113         }
6114         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
6115         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
6116                 if(!isWasmInitialized) {
6117                         throw new Error("initializeWasm() must be awaited first!");
6118                 }
6119                 const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_free(_res);
6120                 // debug statements here
6121         }
6122         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
6123         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
6124                 if(!isWasmInitialized) {
6125                         throw new Error("initializeWasm() must be awaited first!");
6126                 }
6127                 const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
6128                 // debug statements here
6129         }
6130         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
6131         export function CVec_MessageSendEventZ_free(_res: number[]): void {
6132                 if(!isWasmInitialized) {
6133                         throw new Error("initializeWasm() must be awaited first!");
6134                 }
6135                 const nativeResponseValue = wasm.TS_CVec_MessageSendEventZ_free(_res);
6136                 // debug statements here
6137         }
6138         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
6139         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
6140                 if(!isWasmInitialized) {
6141                         throw new Error("initializeWasm() must be awaited first!");
6142                 }
6143                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_ok(o);
6144                 return nativeResponseValue;
6145         }
6146         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
6147         export function CResult_boolLightningErrorZ_err(e: number): number {
6148                 if(!isWasmInitialized) {
6149                         throw new Error("initializeWasm() must be awaited first!");
6150                 }
6151                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_err(e);
6152                 return nativeResponseValue;
6153         }
6154         // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
6155         export function CResult_boolLightningErrorZ_is_ok(o: number): boolean {
6156                 if(!isWasmInitialized) {
6157                         throw new Error("initializeWasm() must be awaited first!");
6158                 }
6159                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_is_ok(o);
6160                 return nativeResponseValue;
6161         }
6162         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
6163         export function CResult_boolLightningErrorZ_free(_res: number): void {
6164                 if(!isWasmInitialized) {
6165                         throw new Error("initializeWasm() must be awaited first!");
6166                 }
6167                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_free(_res);
6168                 // debug statements here
6169         }
6170         // uint64_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
6171         export function CResult_boolLightningErrorZ_clone_ptr(arg: number): number {
6172                 if(!isWasmInitialized) {
6173                         throw new Error("initializeWasm() must be awaited first!");
6174                 }
6175                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone_ptr(arg);
6176                 return nativeResponseValue;
6177         }
6178         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
6179         export function CResult_boolLightningErrorZ_clone(orig: number): number {
6180                 if(!isWasmInitialized) {
6181                         throw new Error("initializeWasm() must be awaited first!");
6182                 }
6183                 const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone(orig);
6184                 return nativeResponseValue;
6185         }
6186         // uint64_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
6187         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg: number): number {
6188                 if(!isWasmInitialized) {
6189                         throw new Error("initializeWasm() must be awaited first!");
6190                 }
6191                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg);
6192                 return nativeResponseValue;
6193         }
6194         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
6195         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
6196                 if(!isWasmInitialized) {
6197                         throw new Error("initializeWasm() must be awaited first!");
6198                 }
6199                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
6200                 return nativeResponseValue;
6201         }
6202         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
6203         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
6204                 if(!isWasmInitialized) {
6205                         throw new Error("initializeWasm() must be awaited first!");
6206                 }
6207                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
6208                 return nativeResponseValue;
6209         }
6210         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
6211         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
6212                 if(!isWasmInitialized) {
6213                         throw new Error("initializeWasm() must be awaited first!");
6214                 }
6215                 const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
6216                 // debug statements here
6217         }
6218         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
6219         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
6220                 if(!isWasmInitialized) {
6221                         throw new Error("initializeWasm() must be awaited first!");
6222                 }
6223                 const nativeResponseValue = wasm.TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
6224                 // debug statements here
6225         }
6226         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
6227         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
6228                 if(!isWasmInitialized) {
6229                         throw new Error("initializeWasm() must be awaited first!");
6230                 }
6231                 const nativeResponseValue = wasm.TS_CVec_NodeAnnouncementZ_free(_res);
6232                 // debug statements here
6233         }
6234         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
6235         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
6236                 if(!isWasmInitialized) {
6237                         throw new Error("initializeWasm() must be awaited first!");
6238                 }
6239                 const nativeResponseValue = wasm.TS_CVec_PublicKeyZ_free(_res);
6240                 // debug statements here
6241         }
6242         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
6243         export function CVec_u8Z_free(_res: Uint8Array): void {
6244                 if(!isWasmInitialized) {
6245                         throw new Error("initializeWasm() must be awaited first!");
6246                 }
6247                 const nativeResponseValue = wasm.TS_CVec_u8Z_free(encodeUint8Array(_res));
6248                 // debug statements here
6249         }
6250         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
6251         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
6252                 if(!isWasmInitialized) {
6253                         throw new Error("initializeWasm() must be awaited first!");
6254                 }
6255                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeUint8Array(o));
6256                 return nativeResponseValue;
6257         }
6258         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
6259         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
6260                 if(!isWasmInitialized) {
6261                         throw new Error("initializeWasm() must be awaited first!");
6262                 }
6263                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_err(e);
6264                 return nativeResponseValue;
6265         }
6266         // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
6267         export function CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: number): boolean {
6268                 if(!isWasmInitialized) {
6269                         throw new Error("initializeWasm() must be awaited first!");
6270                 }
6271                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o);
6272                 return nativeResponseValue;
6273         }
6274         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
6275         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
6276                 if(!isWasmInitialized) {
6277                         throw new Error("initializeWasm() must be awaited first!");
6278                 }
6279                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
6280                 // debug statements here
6281         }
6282         // uint64_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
6283         export function CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg: number): number {
6284                 if(!isWasmInitialized) {
6285                         throw new Error("initializeWasm() must be awaited first!");
6286                 }
6287                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg);
6288                 return nativeResponseValue;
6289         }
6290         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
6291         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
6292                 if(!isWasmInitialized) {
6293                         throw new Error("initializeWasm() must be awaited first!");
6294                 }
6295                 const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
6296                 return nativeResponseValue;
6297         }
6298         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
6299         export function CResult_NonePeerHandleErrorZ_ok(): number {
6300                 if(!isWasmInitialized) {
6301                         throw new Error("initializeWasm() must be awaited first!");
6302                 }
6303                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_ok();
6304                 return nativeResponseValue;
6305         }
6306         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
6307         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
6308                 if(!isWasmInitialized) {
6309                         throw new Error("initializeWasm() must be awaited first!");
6310                 }
6311                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_err(e);
6312                 return nativeResponseValue;
6313         }
6314         // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
6315         export function CResult_NonePeerHandleErrorZ_is_ok(o: number): boolean {
6316                 if(!isWasmInitialized) {
6317                         throw new Error("initializeWasm() must be awaited first!");
6318                 }
6319                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_is_ok(o);
6320                 return nativeResponseValue;
6321         }
6322         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
6323         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
6324                 if(!isWasmInitialized) {
6325                         throw new Error("initializeWasm() must be awaited first!");
6326                 }
6327                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_free(_res);
6328                 // debug statements here
6329         }
6330         // uint64_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
6331         export function CResult_NonePeerHandleErrorZ_clone_ptr(arg: number): number {
6332                 if(!isWasmInitialized) {
6333                         throw new Error("initializeWasm() must be awaited first!");
6334                 }
6335                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone_ptr(arg);
6336                 return nativeResponseValue;
6337         }
6338         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
6339         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
6340                 if(!isWasmInitialized) {
6341                         throw new Error("initializeWasm() must be awaited first!");
6342                 }
6343                 const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone(orig);
6344                 return nativeResponseValue;
6345         }
6346         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
6347         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
6348                 if(!isWasmInitialized) {
6349                         throw new Error("initializeWasm() must be awaited first!");
6350                 }
6351                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_ok(o);
6352                 return nativeResponseValue;
6353         }
6354         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
6355         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
6356                 if(!isWasmInitialized) {
6357                         throw new Error("initializeWasm() must be awaited first!");
6358                 }
6359                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_err(e);
6360                 return nativeResponseValue;
6361         }
6362         // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
6363         export function CResult_boolPeerHandleErrorZ_is_ok(o: number): boolean {
6364                 if(!isWasmInitialized) {
6365                         throw new Error("initializeWasm() must be awaited first!");
6366                 }
6367                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_is_ok(o);
6368                 return nativeResponseValue;
6369         }
6370         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
6371         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
6372                 if(!isWasmInitialized) {
6373                         throw new Error("initializeWasm() must be awaited first!");
6374                 }
6375                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_free(_res);
6376                 // debug statements here
6377         }
6378         // uint64_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
6379         export function CResult_boolPeerHandleErrorZ_clone_ptr(arg: number): number {
6380                 if(!isWasmInitialized) {
6381                         throw new Error("initializeWasm() must be awaited first!");
6382                 }
6383                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone_ptr(arg);
6384                 return nativeResponseValue;
6385         }
6386         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
6387         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
6388                 if(!isWasmInitialized) {
6389                         throw new Error("initializeWasm() must be awaited first!");
6390                 }
6391                 const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone(orig);
6392                 return nativeResponseValue;
6393         }
6394         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
6395         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
6396                 if(!isWasmInitialized) {
6397                         throw new Error("initializeWasm() must be awaited first!");
6398                 }
6399                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_ok(o);
6400                 return nativeResponseValue;
6401         }
6402         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
6403         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
6404                 if(!isWasmInitialized) {
6405                         throw new Error("initializeWasm() must be awaited first!");
6406                 }
6407                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_err(e);
6408                 return nativeResponseValue;
6409         }
6410         // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
6411         export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
6412                 if(!isWasmInitialized) {
6413                         throw new Error("initializeWasm() must be awaited first!");
6414                 }
6415                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_is_ok(o);
6416                 return nativeResponseValue;
6417         }
6418         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
6419         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
6420                 if(!isWasmInitialized) {
6421                         throw new Error("initializeWasm() must be awaited first!");
6422                 }
6423                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_free(_res);
6424                 // debug statements here
6425         }
6426         // uint64_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
6427         export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
6428                 if(!isWasmInitialized) {
6429                         throw new Error("initializeWasm() must be awaited first!");
6430                 }
6431                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone_ptr(arg);
6432                 return nativeResponseValue;
6433         }
6434         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
6435         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
6436                 if(!isWasmInitialized) {
6437                         throw new Error("initializeWasm() must be awaited first!");
6438                 }
6439                 const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone(orig);
6440                 return nativeResponseValue;
6441         }
6442         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
6443         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
6444                 if(!isWasmInitialized) {
6445                         throw new Error("initializeWasm() must be awaited first!");
6446                 }
6447                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_ok();
6448                 return nativeResponseValue;
6449         }
6450         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
6451         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
6452                 if(!isWasmInitialized) {
6453                         throw new Error("initializeWasm() must be awaited first!");
6454                 }
6455                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_err(e);
6456                 return nativeResponseValue;
6457         }
6458         // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
6459         export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
6460                 if(!isWasmInitialized) {
6461                         throw new Error("initializeWasm() must be awaited first!");
6462                 }
6463                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
6464                 return nativeResponseValue;
6465         }
6466         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
6467         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
6468                 if(!isWasmInitialized) {
6469                         throw new Error("initializeWasm() must be awaited first!");
6470                 }
6471                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_free(_res);
6472                 // debug statements here
6473         }
6474         // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
6475         export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
6476                 if(!isWasmInitialized) {
6477                         throw new Error("initializeWasm() must be awaited first!");
6478                 }
6479                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
6480                 return nativeResponseValue;
6481         }
6482         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
6483         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
6484                 if(!isWasmInitialized) {
6485                         throw new Error("initializeWasm() must be awaited first!");
6486                 }
6487                 const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
6488                 return nativeResponseValue;
6489         }
6490         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
6491         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
6492                 if(!isWasmInitialized) {
6493                         throw new Error("initializeWasm() must be awaited first!");
6494                 }
6495                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_some(o);
6496                 return nativeResponseValue;
6497         }
6498         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
6499         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
6500                 if(!isWasmInitialized) {
6501                         throw new Error("initializeWasm() must be awaited first!");
6502                 }
6503                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_none();
6504                 return nativeResponseValue;
6505         }
6506         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
6507         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
6508                 if(!isWasmInitialized) {
6509                         throw new Error("initializeWasm() must be awaited first!");
6510                 }
6511                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_free(_res);
6512                 // debug statements here
6513         }
6514         // uint64_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
6515         export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
6516                 if(!isWasmInitialized) {
6517                         throw new Error("initializeWasm() must be awaited first!");
6518                 }
6519                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
6520                 return nativeResponseValue;
6521         }
6522         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
6523         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
6524                 if(!isWasmInitialized) {
6525                         throw new Error("initializeWasm() must be awaited first!");
6526                 }
6527                 const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone(orig);
6528                 return nativeResponseValue;
6529         }
6530         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
6531         export function COption_ClosureReasonZ_some(o: number): number {
6532                 if(!isWasmInitialized) {
6533                         throw new Error("initializeWasm() must be awaited first!");
6534                 }
6535                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_some(o);
6536                 return nativeResponseValue;
6537         }
6538         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
6539         export function COption_ClosureReasonZ_none(): number {
6540                 if(!isWasmInitialized) {
6541                         throw new Error("initializeWasm() must be awaited first!");
6542                 }
6543                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_none();
6544                 return nativeResponseValue;
6545         }
6546         // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
6547         export function COption_ClosureReasonZ_free(_res: number): void {
6548                 if(!isWasmInitialized) {
6549                         throw new Error("initializeWasm() must be awaited first!");
6550                 }
6551                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_free(_res);
6552                 // debug statements here
6553         }
6554         // uint64_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
6555         export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
6556                 if(!isWasmInitialized) {
6557                         throw new Error("initializeWasm() must be awaited first!");
6558                 }
6559                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone_ptr(arg);
6560                 return nativeResponseValue;
6561         }
6562         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
6563         export function COption_ClosureReasonZ_clone(orig: number): number {
6564                 if(!isWasmInitialized) {
6565                         throw new Error("initializeWasm() must be awaited first!");
6566                 }
6567                 const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone(orig);
6568                 return nativeResponseValue;
6569         }
6570         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
6571         export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
6572                 if(!isWasmInitialized) {
6573                         throw new Error("initializeWasm() must be awaited first!");
6574                 }
6575                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
6576                 return nativeResponseValue;
6577         }
6578         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
6579         export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
6580                 if(!isWasmInitialized) {
6581                         throw new Error("initializeWasm() must be awaited first!");
6582                 }
6583                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
6584                 return nativeResponseValue;
6585         }
6586         // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
6587         export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
6588                 if(!isWasmInitialized) {
6589                         throw new Error("initializeWasm() must be awaited first!");
6590                 }
6591                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
6592                 return nativeResponseValue;
6593         }
6594         // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
6595         export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
6596                 if(!isWasmInitialized) {
6597                         throw new Error("initializeWasm() must be awaited first!");
6598                 }
6599                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
6600                 // debug statements here
6601         }
6602         // uint64_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
6603         export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
6604                 if(!isWasmInitialized) {
6605                         throw new Error("initializeWasm() must be awaited first!");
6606                 }
6607                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
6608                 return nativeResponseValue;
6609         }
6610         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
6611         export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
6612                 if(!isWasmInitialized) {
6613                         throw new Error("initializeWasm() must be awaited first!");
6614                 }
6615                 const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
6616                 return nativeResponseValue;
6617         }
6618         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
6619         export function COption_NetworkUpdateZ_some(o: number): number {
6620                 if(!isWasmInitialized) {
6621                         throw new Error("initializeWasm() must be awaited first!");
6622                 }
6623                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_some(o);
6624                 return nativeResponseValue;
6625         }
6626         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
6627         export function COption_NetworkUpdateZ_none(): number {
6628                 if(!isWasmInitialized) {
6629                         throw new Error("initializeWasm() must be awaited first!");
6630                 }
6631                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_none();
6632                 return nativeResponseValue;
6633         }
6634         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
6635         export function COption_NetworkUpdateZ_free(_res: number): void {
6636                 if(!isWasmInitialized) {
6637                         throw new Error("initializeWasm() must be awaited first!");
6638                 }
6639                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_free(_res);
6640                 // debug statements here
6641         }
6642         // uint64_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
6643         export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
6644                 if(!isWasmInitialized) {
6645                         throw new Error("initializeWasm() must be awaited first!");
6646                 }
6647                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone_ptr(arg);
6648                 return nativeResponseValue;
6649         }
6650         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
6651         export function COption_NetworkUpdateZ_clone(orig: number): number {
6652                 if(!isWasmInitialized) {
6653                         throw new Error("initializeWasm() must be awaited first!");
6654                 }
6655                 const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone(orig);
6656                 return nativeResponseValue;
6657         }
6658         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
6659         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
6660                 if(!isWasmInitialized) {
6661                         throw new Error("initializeWasm() must be awaited first!");
6662                 }
6663                 const nativeResponseValue = wasm.TS_CVec_SpendableOutputDescriptorZ_free(_res);
6664                 // debug statements here
6665         }
6666         // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
6667         export function COption_EventZ_some(o: number): number {
6668                 if(!isWasmInitialized) {
6669                         throw new Error("initializeWasm() must be awaited first!");
6670                 }
6671                 const nativeResponseValue = wasm.TS_COption_EventZ_some(o);
6672                 return nativeResponseValue;
6673         }
6674         // struct LDKCOption_EventZ COption_EventZ_none(void);
6675         export function COption_EventZ_none(): number {
6676                 if(!isWasmInitialized) {
6677                         throw new Error("initializeWasm() must be awaited first!");
6678                 }
6679                 const nativeResponseValue = wasm.TS_COption_EventZ_none();
6680                 return nativeResponseValue;
6681         }
6682         // void COption_EventZ_free(struct LDKCOption_EventZ _res);
6683         export function COption_EventZ_free(_res: number): void {
6684                 if(!isWasmInitialized) {
6685                         throw new Error("initializeWasm() must be awaited first!");
6686                 }
6687                 const nativeResponseValue = wasm.TS_COption_EventZ_free(_res);
6688                 // debug statements here
6689         }
6690         // uint64_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
6691         export function COption_EventZ_clone_ptr(arg: number): number {
6692                 if(!isWasmInitialized) {
6693                         throw new Error("initializeWasm() must be awaited first!");
6694                 }
6695                 const nativeResponseValue = wasm.TS_COption_EventZ_clone_ptr(arg);
6696                 return nativeResponseValue;
6697         }
6698         // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
6699         export function COption_EventZ_clone(orig: number): number {
6700                 if(!isWasmInitialized) {
6701                         throw new Error("initializeWasm() must be awaited first!");
6702                 }
6703                 const nativeResponseValue = wasm.TS_COption_EventZ_clone(orig);
6704                 return nativeResponseValue;
6705         }
6706         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
6707         export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
6708                 if(!isWasmInitialized) {
6709                         throw new Error("initializeWasm() must be awaited first!");
6710                 }
6711                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_ok(o);
6712                 return nativeResponseValue;
6713         }
6714         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
6715         export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
6716                 if(!isWasmInitialized) {
6717                         throw new Error("initializeWasm() must be awaited first!");
6718                 }
6719                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_err(e);
6720                 return nativeResponseValue;
6721         }
6722         // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
6723         export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
6724                 if(!isWasmInitialized) {
6725                         throw new Error("initializeWasm() must be awaited first!");
6726                 }
6727                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_is_ok(o);
6728                 return nativeResponseValue;
6729         }
6730         // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
6731         export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
6732                 if(!isWasmInitialized) {
6733                         throw new Error("initializeWasm() must be awaited first!");
6734                 }
6735                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_free(_res);
6736                 // debug statements here
6737         }
6738         // uint64_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
6739         export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
6740                 if(!isWasmInitialized) {
6741                         throw new Error("initializeWasm() must be awaited first!");
6742                 }
6743                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
6744                 return nativeResponseValue;
6745         }
6746         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
6747         export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
6748                 if(!isWasmInitialized) {
6749                         throw new Error("initializeWasm() must be awaited first!");
6750                 }
6751                 const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone(orig);
6752                 return nativeResponseValue;
6753         }
6754         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
6755         export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
6756                 if(!isWasmInitialized) {
6757                         throw new Error("initializeWasm() must be awaited first!");
6758                 }
6759                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_ok(o);
6760                 return nativeResponseValue;
6761         }
6762         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
6763         export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
6764                 if(!isWasmInitialized) {
6765                         throw new Error("initializeWasm() must be awaited first!");
6766                 }
6767                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_err(e);
6768                 return nativeResponseValue;
6769         }
6770         // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
6771         export function CResult_NodeIdDecodeErrorZ_is_ok(o: number): boolean {
6772                 if(!isWasmInitialized) {
6773                         throw new Error("initializeWasm() must be awaited first!");
6774                 }
6775                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_is_ok(o);
6776                 return nativeResponseValue;
6777         }
6778         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
6779         export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
6780                 if(!isWasmInitialized) {
6781                         throw new Error("initializeWasm() must be awaited first!");
6782                 }
6783                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_free(_res);
6784                 // debug statements here
6785         }
6786         // uint64_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
6787         export function CResult_NodeIdDecodeErrorZ_clone_ptr(arg: number): number {
6788                 if(!isWasmInitialized) {
6789                         throw new Error("initializeWasm() must be awaited first!");
6790                 }
6791                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone_ptr(arg);
6792                 return nativeResponseValue;
6793         }
6794         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
6795         export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
6796                 if(!isWasmInitialized) {
6797                         throw new Error("initializeWasm() must be awaited first!");
6798                 }
6799                 const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone(orig);
6800                 return nativeResponseValue;
6801         }
6802         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
6803         export function CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o: number): number {
6804                 if(!isWasmInitialized) {
6805                         throw new Error("initializeWasm() must be awaited first!");
6806                 }
6807                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o);
6808                 return nativeResponseValue;
6809         }
6810         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
6811         export function CResult_COption_NetworkUpdateZDecodeErrorZ_err(e: number): number {
6812                 if(!isWasmInitialized) {
6813                         throw new Error("initializeWasm() must be awaited first!");
6814                 }
6815                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(e);
6816                 return nativeResponseValue;
6817         }
6818         // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
6819         export function CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o: number): boolean {
6820                 if(!isWasmInitialized) {
6821                         throw new Error("initializeWasm() must be awaited first!");
6822                 }
6823                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o);
6824                 return nativeResponseValue;
6825         }
6826         // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
6827         export function CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res: number): void {
6828                 if(!isWasmInitialized) {
6829                         throw new Error("initializeWasm() must be awaited first!");
6830                 }
6831                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res);
6832                 // debug statements here
6833         }
6834         // uint64_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
6835         export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg: number): number {
6836                 if(!isWasmInitialized) {
6837                         throw new Error("initializeWasm() must be awaited first!");
6838                 }
6839                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg);
6840                 return nativeResponseValue;
6841         }
6842         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
6843         export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig: number): number {
6844                 if(!isWasmInitialized) {
6845                         throw new Error("initializeWasm() must be awaited first!");
6846                 }
6847                 const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig);
6848                 return nativeResponseValue;
6849         }
6850         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
6851         export function COption_AccessZ_some(o: number): number {
6852                 if(!isWasmInitialized) {
6853                         throw new Error("initializeWasm() must be awaited first!");
6854                 }
6855                 const nativeResponseValue = wasm.TS_COption_AccessZ_some(o);
6856                 return nativeResponseValue;
6857         }
6858         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
6859         export function COption_AccessZ_none(): number {
6860                 if(!isWasmInitialized) {
6861                         throw new Error("initializeWasm() must be awaited first!");
6862                 }
6863                 const nativeResponseValue = wasm.TS_COption_AccessZ_none();
6864                 return nativeResponseValue;
6865         }
6866         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
6867         export function COption_AccessZ_free(_res: number): void {
6868                 if(!isWasmInitialized) {
6869                         throw new Error("initializeWasm() must be awaited first!");
6870                 }
6871                 const nativeResponseValue = wasm.TS_COption_AccessZ_free(_res);
6872                 // debug statements here
6873         }
6874         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
6875         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
6876                 if(!isWasmInitialized) {
6877                         throw new Error("initializeWasm() must be awaited first!");
6878                 }
6879                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
6880                 return nativeResponseValue;
6881         }
6882         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
6883         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
6884                 if(!isWasmInitialized) {
6885                         throw new Error("initializeWasm() must be awaited first!");
6886                 }
6887                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
6888                 return nativeResponseValue;
6889         }
6890         // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
6891         export function CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
6892                 if(!isWasmInitialized) {
6893                         throw new Error("initializeWasm() must be awaited first!");
6894                 }
6895                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o);
6896                 return nativeResponseValue;
6897         }
6898         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
6899         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
6900                 if(!isWasmInitialized) {
6901                         throw new Error("initializeWasm() must be awaited first!");
6902                 }
6903                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
6904                 // debug statements here
6905         }
6906         // uint64_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
6907         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
6908                 if(!isWasmInitialized) {
6909                         throw new Error("initializeWasm() must be awaited first!");
6910                 }
6911                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg);
6912                 return nativeResponseValue;
6913         }
6914         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
6915         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
6916                 if(!isWasmInitialized) {
6917                         throw new Error("initializeWasm() must be awaited first!");
6918                 }
6919                 const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
6920                 return nativeResponseValue;
6921         }
6922         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
6923         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
6924                 if(!isWasmInitialized) {
6925                         throw new Error("initializeWasm() must be awaited first!");
6926                 }
6927                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_ok(o);
6928                 return nativeResponseValue;
6929         }
6930         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
6931         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
6932                 if(!isWasmInitialized) {
6933                         throw new Error("initializeWasm() must be awaited first!");
6934                 }
6935                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_err(e);
6936                 return nativeResponseValue;
6937         }
6938         // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
6939         export function CResult_ChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
6940                 if(!isWasmInitialized) {
6941                         throw new Error("initializeWasm() must be awaited first!");
6942                 }
6943                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_is_ok(o);
6944                 return nativeResponseValue;
6945         }
6946         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
6947         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
6948                 if(!isWasmInitialized) {
6949                         throw new Error("initializeWasm() must be awaited first!");
6950                 }
6951                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_free(_res);
6952                 // debug statements here
6953         }
6954         // uint64_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
6955         export function CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
6956                 if(!isWasmInitialized) {
6957                         throw new Error("initializeWasm() must be awaited first!");
6958                 }
6959                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg);
6960                 return nativeResponseValue;
6961         }
6962         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
6963         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
6964                 if(!isWasmInitialized) {
6965                         throw new Error("initializeWasm() must be awaited first!");
6966                 }
6967                 const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone(orig);
6968                 return nativeResponseValue;
6969         }
6970         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
6971         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
6972                 if(!isWasmInitialized) {
6973                         throw new Error("initializeWasm() must be awaited first!");
6974                 }
6975                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_ok(o);
6976                 return nativeResponseValue;
6977         }
6978         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
6979         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
6980                 if(!isWasmInitialized) {
6981                         throw new Error("initializeWasm() must be awaited first!");
6982                 }
6983                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_err(e);
6984                 return nativeResponseValue;
6985         }
6986         // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
6987         export function CResult_RoutingFeesDecodeErrorZ_is_ok(o: number): boolean {
6988                 if(!isWasmInitialized) {
6989                         throw new Error("initializeWasm() must be awaited first!");
6990                 }
6991                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_is_ok(o);
6992                 return nativeResponseValue;
6993         }
6994         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
6995         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
6996                 if(!isWasmInitialized) {
6997                         throw new Error("initializeWasm() must be awaited first!");
6998                 }
6999                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_free(_res);
7000                 // debug statements here
7001         }
7002         // uint64_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
7003         export function CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg: number): number {
7004                 if(!isWasmInitialized) {
7005                         throw new Error("initializeWasm() must be awaited first!");
7006                 }
7007                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg);
7008                 return nativeResponseValue;
7009         }
7010         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
7011         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
7012                 if(!isWasmInitialized) {
7013                         throw new Error("initializeWasm() must be awaited first!");
7014                 }
7015                 const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone(orig);
7016                 return nativeResponseValue;
7017         }
7018         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
7019         export function CVec_NetAddressZ_free(_res: number[]): void {
7020                 if(!isWasmInitialized) {
7021                         throw new Error("initializeWasm() must be awaited first!");
7022                 }
7023                 const nativeResponseValue = wasm.TS_CVec_NetAddressZ_free(_res);
7024                 // debug statements here
7025         }
7026         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
7027         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
7028                 if(!isWasmInitialized) {
7029                         throw new Error("initializeWasm() must be awaited first!");
7030                 }
7031                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
7032                 return nativeResponseValue;
7033         }
7034         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
7035         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
7036                 if(!isWasmInitialized) {
7037                         throw new Error("initializeWasm() must be awaited first!");
7038                 }
7039                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
7040                 return nativeResponseValue;
7041         }
7042         // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
7043         export function CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o: number): boolean {
7044                 if(!isWasmInitialized) {
7045                         throw new Error("initializeWasm() must be awaited first!");
7046                 }
7047                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o);
7048                 return nativeResponseValue;
7049         }
7050         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
7051         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
7052                 if(!isWasmInitialized) {
7053                         throw new Error("initializeWasm() must be awaited first!");
7054                 }
7055                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
7056                 // debug statements here
7057         }
7058         // uint64_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
7059         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg: number): number {
7060                 if(!isWasmInitialized) {
7061                         throw new Error("initializeWasm() must be awaited first!");
7062                 }
7063                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg);
7064                 return nativeResponseValue;
7065         }
7066         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
7067         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
7068                 if(!isWasmInitialized) {
7069                         throw new Error("initializeWasm() must be awaited first!");
7070                 }
7071                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
7072                 return nativeResponseValue;
7073         }
7074         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
7075         export function CVec_u64Z_free(_res: number[]): void {
7076                 if(!isWasmInitialized) {
7077                         throw new Error("initializeWasm() must be awaited first!");
7078                 }
7079                 const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
7080                 // debug statements here
7081         }
7082         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
7083         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
7084                 if(!isWasmInitialized) {
7085                         throw new Error("initializeWasm() must be awaited first!");
7086                 }
7087                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_ok(o);
7088                 return nativeResponseValue;
7089         }
7090         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
7091         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
7092                 if(!isWasmInitialized) {
7093                         throw new Error("initializeWasm() must be awaited first!");
7094                 }
7095                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_err(e);
7096                 return nativeResponseValue;
7097         }
7098         // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
7099         export function CResult_NodeInfoDecodeErrorZ_is_ok(o: number): boolean {
7100                 if(!isWasmInitialized) {
7101                         throw new Error("initializeWasm() must be awaited first!");
7102                 }
7103                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_is_ok(o);
7104                 return nativeResponseValue;
7105         }
7106         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
7107         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
7108                 if(!isWasmInitialized) {
7109                         throw new Error("initializeWasm() must be awaited first!");
7110                 }
7111                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_free(_res);
7112                 // debug statements here
7113         }
7114         // uint64_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
7115         export function CResult_NodeInfoDecodeErrorZ_clone_ptr(arg: number): number {
7116                 if(!isWasmInitialized) {
7117                         throw new Error("initializeWasm() must be awaited first!");
7118                 }
7119                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone_ptr(arg);
7120                 return nativeResponseValue;
7121         }
7122         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
7123         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
7124                 if(!isWasmInitialized) {
7125                         throw new Error("initializeWasm() must be awaited first!");
7126                 }
7127                 const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone(orig);
7128                 return nativeResponseValue;
7129         }
7130         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
7131         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
7132                 if(!isWasmInitialized) {
7133                         throw new Error("initializeWasm() must be awaited first!");
7134                 }
7135                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_ok(o);
7136                 return nativeResponseValue;
7137         }
7138         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
7139         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
7140                 if(!isWasmInitialized) {
7141                         throw new Error("initializeWasm() must be awaited first!");
7142                 }
7143                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_err(e);
7144                 return nativeResponseValue;
7145         }
7146         // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
7147         export function CResult_NetworkGraphDecodeErrorZ_is_ok(o: number): boolean {
7148                 if(!isWasmInitialized) {
7149                         throw new Error("initializeWasm() must be awaited first!");
7150                 }
7151                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_is_ok(o);
7152                 return nativeResponseValue;
7153         }
7154         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
7155         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
7156                 if(!isWasmInitialized) {
7157                         throw new Error("initializeWasm() must be awaited first!");
7158                 }
7159                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_free(_res);
7160                 // debug statements here
7161         }
7162         // uint64_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
7163         export function CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg: number): number {
7164                 if(!isWasmInitialized) {
7165                         throw new Error("initializeWasm() must be awaited first!");
7166                 }
7167                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg);
7168                 return nativeResponseValue;
7169         }
7170         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
7171         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
7172                 if(!isWasmInitialized) {
7173                         throw new Error("initializeWasm() must be awaited first!");
7174                 }
7175                 const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone(orig);
7176                 return nativeResponseValue;
7177         }
7178         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
7179         export function COption_CVec_NetAddressZZ_some(o: number[]): number {
7180                 if(!isWasmInitialized) {
7181                         throw new Error("initializeWasm() must be awaited first!");
7182                 }
7183                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_some(o);
7184                 return nativeResponseValue;
7185         }
7186         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
7187         export function COption_CVec_NetAddressZZ_none(): number {
7188                 if(!isWasmInitialized) {
7189                         throw new Error("initializeWasm() must be awaited first!");
7190                 }
7191                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_none();
7192                 return nativeResponseValue;
7193         }
7194         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
7195         export function COption_CVec_NetAddressZZ_free(_res: number): void {
7196                 if(!isWasmInitialized) {
7197                         throw new Error("initializeWasm() must be awaited first!");
7198                 }
7199                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_free(_res);
7200                 // debug statements here
7201         }
7202         // uint64_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
7203         export function COption_CVec_NetAddressZZ_clone_ptr(arg: number): number {
7204                 if(!isWasmInitialized) {
7205                         throw new Error("initializeWasm() must be awaited first!");
7206                 }
7207                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone_ptr(arg);
7208                 return nativeResponseValue;
7209         }
7210         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
7211         export function COption_CVec_NetAddressZZ_clone(orig: number): number {
7212                 if(!isWasmInitialized) {
7213                         throw new Error("initializeWasm() must be awaited first!");
7214                 }
7215                 const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone(orig);
7216                 return nativeResponseValue;
7217         }
7218         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
7219         export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
7220                 if(!isWasmInitialized) {
7221                         throw new Error("initializeWasm() must be awaited first!");
7222                 }
7223                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_ok(o);
7224                 return nativeResponseValue;
7225         }
7226         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
7227         export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
7228                 if(!isWasmInitialized) {
7229                         throw new Error("initializeWasm() must be awaited first!");
7230                 }
7231                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_err(e);
7232                 return nativeResponseValue;
7233         }
7234         // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
7235         export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
7236                 if(!isWasmInitialized) {
7237                         throw new Error("initializeWasm() must be awaited first!");
7238                 }
7239                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_is_ok(o);
7240                 return nativeResponseValue;
7241         }
7242         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
7243         export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
7244                 if(!isWasmInitialized) {
7245                         throw new Error("initializeWasm() must be awaited first!");
7246                 }
7247                 const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_free(_res);
7248                 // debug statements here
7249         }
7250         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
7251         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
7252                 if(!isWasmInitialized) {
7253                         throw new Error("initializeWasm() must be awaited first!");
7254                 }
7255                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_ok(o);
7256                 return nativeResponseValue;
7257         }
7258         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7259         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
7260                 if(!isWasmInitialized) {
7261                         throw new Error("initializeWasm() must be awaited first!");
7262                 }
7263                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_err(e);
7264                 return nativeResponseValue;
7265         }
7266         // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
7267         export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7268                 if(!isWasmInitialized) {
7269                         throw new Error("initializeWasm() must be awaited first!");
7270                 }
7271                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_is_ok(o);
7272                 return nativeResponseValue;
7273         }
7274         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
7275         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
7276                 if(!isWasmInitialized) {
7277                         throw new Error("initializeWasm() must be awaited first!");
7278                 }
7279                 const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_free(_res);
7280                 // debug statements here
7281         }
7282         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
7283         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
7284                 if(!isWasmInitialized) {
7285                         throw new Error("initializeWasm() must be awaited first!");
7286                 }
7287                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_ok(o);
7288                 return nativeResponseValue;
7289         }
7290         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7291         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
7292                 if(!isWasmInitialized) {
7293                         throw new Error("initializeWasm() must be awaited first!");
7294                 }
7295                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_err(e);
7296                 return nativeResponseValue;
7297         }
7298         // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
7299         export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7300                 if(!isWasmInitialized) {
7301                         throw new Error("initializeWasm() must be awaited first!");
7302                 }
7303                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
7304                 return nativeResponseValue;
7305         }
7306         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
7307         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
7308                 if(!isWasmInitialized) {
7309                         throw new Error("initializeWasm() must be awaited first!");
7310                 }
7311                 const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_free(_res);
7312                 // debug statements here
7313         }
7314         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
7315         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
7316                 if(!isWasmInitialized) {
7317                         throw new Error("initializeWasm() must be awaited first!");
7318                 }
7319                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_ok(o);
7320                 return nativeResponseValue;
7321         }
7322         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7323         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
7324                 if(!isWasmInitialized) {
7325                         throw new Error("initializeWasm() must be awaited first!");
7326                 }
7327                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_err(e);
7328                 return nativeResponseValue;
7329         }
7330         // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
7331         export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7332                 if(!isWasmInitialized) {
7333                         throw new Error("initializeWasm() must be awaited first!");
7334                 }
7335                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
7336                 return nativeResponseValue;
7337         }
7338         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
7339         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
7340                 if(!isWasmInitialized) {
7341                         throw new Error("initializeWasm() must be awaited first!");
7342                 }
7343                 const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_free(_res);
7344                 // debug statements here
7345         }
7346         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
7347         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
7348                 if(!isWasmInitialized) {
7349                         throw new Error("initializeWasm() must be awaited first!");
7350                 }
7351                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
7352                 return nativeResponseValue;
7353         }
7354         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7355         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
7356                 if(!isWasmInitialized) {
7357                         throw new Error("initializeWasm() must be awaited first!");
7358                 }
7359                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_err(e);
7360                 return nativeResponseValue;
7361         }
7362         // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
7363         export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7364                 if(!isWasmInitialized) {
7365                         throw new Error("initializeWasm() must be awaited first!");
7366                 }
7367                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
7368                 return nativeResponseValue;
7369         }
7370         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
7371         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
7372                 if(!isWasmInitialized) {
7373                         throw new Error("initializeWasm() must be awaited first!");
7374                 }
7375                 const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
7376                 // debug statements here
7377         }
7378         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
7379         export function CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o: number): number {
7380                 if(!isWasmInitialized) {
7381                         throw new Error("initializeWasm() must be awaited first!");
7382                 }
7383                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o);
7384                 return nativeResponseValue;
7385         }
7386         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
7387         export function CResult_ChannelTypeFeaturesDecodeErrorZ_err(e: number): number {
7388                 if(!isWasmInitialized) {
7389                         throw new Error("initializeWasm() must be awaited first!");
7390                 }
7391                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(e);
7392                 return nativeResponseValue;
7393         }
7394         // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
7395         export function CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
7396                 if(!isWasmInitialized) {
7397                         throw new Error("initializeWasm() must be awaited first!");
7398                 }
7399                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o);
7400                 return nativeResponseValue;
7401         }
7402         // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
7403         export function CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res: number): void {
7404                 if(!isWasmInitialized) {
7405                         throw new Error("initializeWasm() must be awaited first!");
7406                 }
7407                 const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res);
7408                 // debug statements here
7409         }
7410         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
7411         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
7412                 if(!isWasmInitialized) {
7413                         throw new Error("initializeWasm() must be awaited first!");
7414                 }
7415                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_ok(o);
7416                 return nativeResponseValue;
7417         }
7418         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
7419         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
7420                 if(!isWasmInitialized) {
7421                         throw new Error("initializeWasm() must be awaited first!");
7422                 }
7423                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_err(e);
7424                 return nativeResponseValue;
7425         }
7426         // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
7427         export function CResult_NetAddressDecodeErrorZ_is_ok(o: number): boolean {
7428                 if(!isWasmInitialized) {
7429                         throw new Error("initializeWasm() must be awaited first!");
7430                 }
7431                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_is_ok(o);
7432                 return nativeResponseValue;
7433         }
7434         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
7435         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
7436                 if(!isWasmInitialized) {
7437                         throw new Error("initializeWasm() must be awaited first!");
7438                 }
7439                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_free(_res);
7440                 // debug statements here
7441         }
7442         // uint64_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
7443         export function CResult_NetAddressDecodeErrorZ_clone_ptr(arg: number): number {
7444                 if(!isWasmInitialized) {
7445                         throw new Error("initializeWasm() must be awaited first!");
7446                 }
7447                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone_ptr(arg);
7448                 return nativeResponseValue;
7449         }
7450         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
7451         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
7452                 if(!isWasmInitialized) {
7453                         throw new Error("initializeWasm() must be awaited first!");
7454                 }
7455                 const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone(orig);
7456                 return nativeResponseValue;
7457         }
7458         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
7459         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
7460                 if(!isWasmInitialized) {
7461                         throw new Error("initializeWasm() must be awaited first!");
7462                 }
7463                 const nativeResponseValue = wasm.TS_CVec_UpdateAddHTLCZ_free(_res);
7464                 // debug statements here
7465         }
7466         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
7467         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
7468                 if(!isWasmInitialized) {
7469                         throw new Error("initializeWasm() must be awaited first!");
7470                 }
7471                 const nativeResponseValue = wasm.TS_CVec_UpdateFulfillHTLCZ_free(_res);
7472                 // debug statements here
7473         }
7474         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
7475         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
7476                 if(!isWasmInitialized) {
7477                         throw new Error("initializeWasm() must be awaited first!");
7478                 }
7479                 const nativeResponseValue = wasm.TS_CVec_UpdateFailHTLCZ_free(_res);
7480                 // debug statements here
7481         }
7482         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
7483         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
7484                 if(!isWasmInitialized) {
7485                         throw new Error("initializeWasm() must be awaited first!");
7486                 }
7487                 const nativeResponseValue = wasm.TS_CVec_UpdateFailMalformedHTLCZ_free(_res);
7488                 // debug statements here
7489         }
7490         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
7491         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
7492                 if(!isWasmInitialized) {
7493                         throw new Error("initializeWasm() must be awaited first!");
7494                 }
7495                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_ok(o);
7496                 return nativeResponseValue;
7497         }
7498         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
7499         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
7500                 if(!isWasmInitialized) {
7501                         throw new Error("initializeWasm() must be awaited first!");
7502                 }
7503                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_err(e);
7504                 return nativeResponseValue;
7505         }
7506         // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
7507         export function CResult_AcceptChannelDecodeErrorZ_is_ok(o: number): boolean {
7508                 if(!isWasmInitialized) {
7509                         throw new Error("initializeWasm() must be awaited first!");
7510                 }
7511                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_is_ok(o);
7512                 return nativeResponseValue;
7513         }
7514         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
7515         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
7516                 if(!isWasmInitialized) {
7517                         throw new Error("initializeWasm() must be awaited first!");
7518                 }
7519                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_free(_res);
7520                 // debug statements here
7521         }
7522         // uint64_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
7523         export function CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg: number): number {
7524                 if(!isWasmInitialized) {
7525                         throw new Error("initializeWasm() must be awaited first!");
7526                 }
7527                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg);
7528                 return nativeResponseValue;
7529         }
7530         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
7531         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
7532                 if(!isWasmInitialized) {
7533                         throw new Error("initializeWasm() must be awaited first!");
7534                 }
7535                 const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone(orig);
7536                 return nativeResponseValue;
7537         }
7538         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
7539         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
7540                 if(!isWasmInitialized) {
7541                         throw new Error("initializeWasm() must be awaited first!");
7542                 }
7543                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
7544                 return nativeResponseValue;
7545         }
7546         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
7547         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
7548                 if(!isWasmInitialized) {
7549                         throw new Error("initializeWasm() must be awaited first!");
7550                 }
7551                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
7552                 return nativeResponseValue;
7553         }
7554         // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
7555         export function CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: number): boolean {
7556                 if(!isWasmInitialized) {
7557                         throw new Error("initializeWasm() must be awaited first!");
7558                 }
7559                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o);
7560                 return nativeResponseValue;
7561         }
7562         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
7563         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
7564                 if(!isWasmInitialized) {
7565                         throw new Error("initializeWasm() must be awaited first!");
7566                 }
7567                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
7568                 // debug statements here
7569         }
7570         // uint64_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
7571         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg: number): number {
7572                 if(!isWasmInitialized) {
7573                         throw new Error("initializeWasm() must be awaited first!");
7574                 }
7575                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg);
7576                 return nativeResponseValue;
7577         }
7578         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
7579         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
7580                 if(!isWasmInitialized) {
7581                         throw new Error("initializeWasm() must be awaited first!");
7582                 }
7583                 const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
7584                 return nativeResponseValue;
7585         }
7586         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
7587         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
7588                 if(!isWasmInitialized) {
7589                         throw new Error("initializeWasm() must be awaited first!");
7590                 }
7591                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_ok(o);
7592                 return nativeResponseValue;
7593         }
7594         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
7595         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
7596                 if(!isWasmInitialized) {
7597                         throw new Error("initializeWasm() must be awaited first!");
7598                 }
7599                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_err(e);
7600                 return nativeResponseValue;
7601         }
7602         // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
7603         export function CResult_ChannelReestablishDecodeErrorZ_is_ok(o: number): boolean {
7604                 if(!isWasmInitialized) {
7605                         throw new Error("initializeWasm() must be awaited first!");
7606                 }
7607                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_is_ok(o);
7608                 return nativeResponseValue;
7609         }
7610         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
7611         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
7612                 if(!isWasmInitialized) {
7613                         throw new Error("initializeWasm() must be awaited first!");
7614                 }
7615                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_free(_res);
7616                 // debug statements here
7617         }
7618         // uint64_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
7619         export function CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg: number): number {
7620                 if(!isWasmInitialized) {
7621                         throw new Error("initializeWasm() must be awaited first!");
7622                 }
7623                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg);
7624                 return nativeResponseValue;
7625         }
7626         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
7627         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
7628                 if(!isWasmInitialized) {
7629                         throw new Error("initializeWasm() must be awaited first!");
7630                 }
7631                 const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone(orig);
7632                 return nativeResponseValue;
7633         }
7634         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
7635         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
7636                 if(!isWasmInitialized) {
7637                         throw new Error("initializeWasm() must be awaited first!");
7638                 }
7639                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_ok(o);
7640                 return nativeResponseValue;
7641         }
7642         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
7643         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
7644                 if(!isWasmInitialized) {
7645                         throw new Error("initializeWasm() must be awaited first!");
7646                 }
7647                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_err(e);
7648                 return nativeResponseValue;
7649         }
7650         // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
7651         export function CResult_ClosingSignedDecodeErrorZ_is_ok(o: number): boolean {
7652                 if(!isWasmInitialized) {
7653                         throw new Error("initializeWasm() must be awaited first!");
7654                 }
7655                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_is_ok(o);
7656                 return nativeResponseValue;
7657         }
7658         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
7659         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
7660                 if(!isWasmInitialized) {
7661                         throw new Error("initializeWasm() must be awaited first!");
7662                 }
7663                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_free(_res);
7664                 // debug statements here
7665         }
7666         // uint64_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
7667         export function CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg: number): number {
7668                 if(!isWasmInitialized) {
7669                         throw new Error("initializeWasm() must be awaited first!");
7670                 }
7671                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg);
7672                 return nativeResponseValue;
7673         }
7674         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
7675         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
7676                 if(!isWasmInitialized) {
7677                         throw new Error("initializeWasm() must be awaited first!");
7678                 }
7679                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone(orig);
7680                 return nativeResponseValue;
7681         }
7682         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
7683         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
7684                 if(!isWasmInitialized) {
7685                         throw new Error("initializeWasm() must be awaited first!");
7686                 }
7687                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
7688                 return nativeResponseValue;
7689         }
7690         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
7691         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
7692                 if(!isWasmInitialized) {
7693                         throw new Error("initializeWasm() must be awaited first!");
7694                 }
7695                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
7696                 return nativeResponseValue;
7697         }
7698         // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
7699         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: number): boolean {
7700                 if(!isWasmInitialized) {
7701                         throw new Error("initializeWasm() must be awaited first!");
7702                 }
7703                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o);
7704                 return nativeResponseValue;
7705         }
7706         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
7707         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
7708                 if(!isWasmInitialized) {
7709                         throw new Error("initializeWasm() must be awaited first!");
7710                 }
7711                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
7712                 // debug statements here
7713         }
7714         // uint64_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
7715         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg: number): number {
7716                 if(!isWasmInitialized) {
7717                         throw new Error("initializeWasm() must be awaited first!");
7718                 }
7719                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg);
7720                 return nativeResponseValue;
7721         }
7722         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
7723         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
7724                 if(!isWasmInitialized) {
7725                         throw new Error("initializeWasm() must be awaited first!");
7726                 }
7727                 const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
7728                 return nativeResponseValue;
7729         }
7730         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
7731         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
7732                 if(!isWasmInitialized) {
7733                         throw new Error("initializeWasm() must be awaited first!");
7734                 }
7735                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_ok(o);
7736                 return nativeResponseValue;
7737         }
7738         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
7739         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
7740                 if(!isWasmInitialized) {
7741                         throw new Error("initializeWasm() must be awaited first!");
7742                 }
7743                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_err(e);
7744                 return nativeResponseValue;
7745         }
7746         // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
7747         export function CResult_CommitmentSignedDecodeErrorZ_is_ok(o: number): boolean {
7748                 if(!isWasmInitialized) {
7749                         throw new Error("initializeWasm() must be awaited first!");
7750                 }
7751                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_is_ok(o);
7752                 return nativeResponseValue;
7753         }
7754         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
7755         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
7756                 if(!isWasmInitialized) {
7757                         throw new Error("initializeWasm() must be awaited first!");
7758                 }
7759                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_free(_res);
7760                 // debug statements here
7761         }
7762         // uint64_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
7763         export function CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg: number): number {
7764                 if(!isWasmInitialized) {
7765                         throw new Error("initializeWasm() must be awaited first!");
7766                 }
7767                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg);
7768                 return nativeResponseValue;
7769         }
7770         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
7771         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
7772                 if(!isWasmInitialized) {
7773                         throw new Error("initializeWasm() must be awaited first!");
7774                 }
7775                 const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone(orig);
7776                 return nativeResponseValue;
7777         }
7778         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
7779         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
7780                 if(!isWasmInitialized) {
7781                         throw new Error("initializeWasm() must be awaited first!");
7782                 }
7783                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_ok(o);
7784                 return nativeResponseValue;
7785         }
7786         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
7787         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
7788                 if(!isWasmInitialized) {
7789                         throw new Error("initializeWasm() must be awaited first!");
7790                 }
7791                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_err(e);
7792                 return nativeResponseValue;
7793         }
7794         // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
7795         export function CResult_FundingCreatedDecodeErrorZ_is_ok(o: number): boolean {
7796                 if(!isWasmInitialized) {
7797                         throw new Error("initializeWasm() must be awaited first!");
7798                 }
7799                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_is_ok(o);
7800                 return nativeResponseValue;
7801         }
7802         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
7803         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
7804                 if(!isWasmInitialized) {
7805                         throw new Error("initializeWasm() must be awaited first!");
7806                 }
7807                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_free(_res);
7808                 // debug statements here
7809         }
7810         // uint64_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
7811         export function CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg: number): number {
7812                 if(!isWasmInitialized) {
7813                         throw new Error("initializeWasm() must be awaited first!");
7814                 }
7815                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg);
7816                 return nativeResponseValue;
7817         }
7818         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
7819         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
7820                 if(!isWasmInitialized) {
7821                         throw new Error("initializeWasm() must be awaited first!");
7822                 }
7823                 const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone(orig);
7824                 return nativeResponseValue;
7825         }
7826         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
7827         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
7828                 if(!isWasmInitialized) {
7829                         throw new Error("initializeWasm() must be awaited first!");
7830                 }
7831                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_ok(o);
7832                 return nativeResponseValue;
7833         }
7834         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
7835         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
7836                 if(!isWasmInitialized) {
7837                         throw new Error("initializeWasm() must be awaited first!");
7838                 }
7839                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_err(e);
7840                 return nativeResponseValue;
7841         }
7842         // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
7843         export function CResult_FundingSignedDecodeErrorZ_is_ok(o: number): boolean {
7844                 if(!isWasmInitialized) {
7845                         throw new Error("initializeWasm() must be awaited first!");
7846                 }
7847                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_is_ok(o);
7848                 return nativeResponseValue;
7849         }
7850         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
7851         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
7852                 if(!isWasmInitialized) {
7853                         throw new Error("initializeWasm() must be awaited first!");
7854                 }
7855                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_free(_res);
7856                 // debug statements here
7857         }
7858         // uint64_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
7859         export function CResult_FundingSignedDecodeErrorZ_clone_ptr(arg: number): number {
7860                 if(!isWasmInitialized) {
7861                         throw new Error("initializeWasm() must be awaited first!");
7862                 }
7863                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone_ptr(arg);
7864                 return nativeResponseValue;
7865         }
7866         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
7867         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
7868                 if(!isWasmInitialized) {
7869                         throw new Error("initializeWasm() must be awaited first!");
7870                 }
7871                 const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone(orig);
7872                 return nativeResponseValue;
7873         }
7874         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
7875         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
7876                 if(!isWasmInitialized) {
7877                         throw new Error("initializeWasm() must be awaited first!");
7878                 }
7879                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_ok(o);
7880                 return nativeResponseValue;
7881         }
7882         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
7883         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
7884                 if(!isWasmInitialized) {
7885                         throw new Error("initializeWasm() must be awaited first!");
7886                 }
7887                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_err(e);
7888                 return nativeResponseValue;
7889         }
7890         // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
7891         export function CResult_FundingLockedDecodeErrorZ_is_ok(o: number): boolean {
7892                 if(!isWasmInitialized) {
7893                         throw new Error("initializeWasm() must be awaited first!");
7894                 }
7895                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_is_ok(o);
7896                 return nativeResponseValue;
7897         }
7898         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
7899         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
7900                 if(!isWasmInitialized) {
7901                         throw new Error("initializeWasm() must be awaited first!");
7902                 }
7903                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_free(_res);
7904                 // debug statements here
7905         }
7906         // uint64_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
7907         export function CResult_FundingLockedDecodeErrorZ_clone_ptr(arg: number): number {
7908                 if(!isWasmInitialized) {
7909                         throw new Error("initializeWasm() must be awaited first!");
7910                 }
7911                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone_ptr(arg);
7912                 return nativeResponseValue;
7913         }
7914         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
7915         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
7916                 if(!isWasmInitialized) {
7917                         throw new Error("initializeWasm() must be awaited first!");
7918                 }
7919                 const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone(orig);
7920                 return nativeResponseValue;
7921         }
7922         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
7923         export function CResult_InitDecodeErrorZ_ok(o: number): number {
7924                 if(!isWasmInitialized) {
7925                         throw new Error("initializeWasm() must be awaited first!");
7926                 }
7927                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_ok(o);
7928                 return nativeResponseValue;
7929         }
7930         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
7931         export function CResult_InitDecodeErrorZ_err(e: number): number {
7932                 if(!isWasmInitialized) {
7933                         throw new Error("initializeWasm() must be awaited first!");
7934                 }
7935                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_err(e);
7936                 return nativeResponseValue;
7937         }
7938         // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
7939         export function CResult_InitDecodeErrorZ_is_ok(o: number): boolean {
7940                 if(!isWasmInitialized) {
7941                         throw new Error("initializeWasm() must be awaited first!");
7942                 }
7943                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_is_ok(o);
7944                 return nativeResponseValue;
7945         }
7946         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
7947         export function CResult_InitDecodeErrorZ_free(_res: number): void {
7948                 if(!isWasmInitialized) {
7949                         throw new Error("initializeWasm() must be awaited first!");
7950                 }
7951                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_free(_res);
7952                 // debug statements here
7953         }
7954         // uint64_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
7955         export function CResult_InitDecodeErrorZ_clone_ptr(arg: number): number {
7956                 if(!isWasmInitialized) {
7957                         throw new Error("initializeWasm() must be awaited first!");
7958                 }
7959                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone_ptr(arg);
7960                 return nativeResponseValue;
7961         }
7962         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
7963         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
7964                 if(!isWasmInitialized) {
7965                         throw new Error("initializeWasm() must be awaited first!");
7966                 }
7967                 const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone(orig);
7968                 return nativeResponseValue;
7969         }
7970         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
7971         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
7972                 if(!isWasmInitialized) {
7973                         throw new Error("initializeWasm() must be awaited first!");
7974                 }
7975                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_ok(o);
7976                 return nativeResponseValue;
7977         }
7978         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
7979         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
7980                 if(!isWasmInitialized) {
7981                         throw new Error("initializeWasm() must be awaited first!");
7982                 }
7983                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_err(e);
7984                 return nativeResponseValue;
7985         }
7986         // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
7987         export function CResult_OpenChannelDecodeErrorZ_is_ok(o: number): boolean {
7988                 if(!isWasmInitialized) {
7989                         throw new Error("initializeWasm() must be awaited first!");
7990                 }
7991                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_is_ok(o);
7992                 return nativeResponseValue;
7993         }
7994         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
7995         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
7996                 if(!isWasmInitialized) {
7997                         throw new Error("initializeWasm() must be awaited first!");
7998                 }
7999                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_free(_res);
8000                 // debug statements here
8001         }
8002         // uint64_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
8003         export function CResult_OpenChannelDecodeErrorZ_clone_ptr(arg: number): number {
8004                 if(!isWasmInitialized) {
8005                         throw new Error("initializeWasm() must be awaited first!");
8006                 }
8007                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone_ptr(arg);
8008                 return nativeResponseValue;
8009         }
8010         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
8011         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
8012                 if(!isWasmInitialized) {
8013                         throw new Error("initializeWasm() must be awaited first!");
8014                 }
8015                 const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone(orig);
8016                 return nativeResponseValue;
8017         }
8018         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
8019         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
8020                 if(!isWasmInitialized) {
8021                         throw new Error("initializeWasm() must be awaited first!");
8022                 }
8023                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_ok(o);
8024                 return nativeResponseValue;
8025         }
8026         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
8027         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
8028                 if(!isWasmInitialized) {
8029                         throw new Error("initializeWasm() must be awaited first!");
8030                 }
8031                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_err(e);
8032                 return nativeResponseValue;
8033         }
8034         // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
8035         export function CResult_RevokeAndACKDecodeErrorZ_is_ok(o: number): boolean {
8036                 if(!isWasmInitialized) {
8037                         throw new Error("initializeWasm() must be awaited first!");
8038                 }
8039                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_is_ok(o);
8040                 return nativeResponseValue;
8041         }
8042         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
8043         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
8044                 if(!isWasmInitialized) {
8045                         throw new Error("initializeWasm() must be awaited first!");
8046                 }
8047                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_free(_res);
8048                 // debug statements here
8049         }
8050         // uint64_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
8051         export function CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg: number): number {
8052                 if(!isWasmInitialized) {
8053                         throw new Error("initializeWasm() must be awaited first!");
8054                 }
8055                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg);
8056                 return nativeResponseValue;
8057         }
8058         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
8059         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
8060                 if(!isWasmInitialized) {
8061                         throw new Error("initializeWasm() must be awaited first!");
8062                 }
8063                 const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone(orig);
8064                 return nativeResponseValue;
8065         }
8066         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
8067         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
8068                 if(!isWasmInitialized) {
8069                         throw new Error("initializeWasm() must be awaited first!");
8070                 }
8071                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_ok(o);
8072                 return nativeResponseValue;
8073         }
8074         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
8075         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
8076                 if(!isWasmInitialized) {
8077                         throw new Error("initializeWasm() must be awaited first!");
8078                 }
8079                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_err(e);
8080                 return nativeResponseValue;
8081         }
8082         // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
8083         export function CResult_ShutdownDecodeErrorZ_is_ok(o: number): boolean {
8084                 if(!isWasmInitialized) {
8085                         throw new Error("initializeWasm() must be awaited first!");
8086                 }
8087                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_is_ok(o);
8088                 return nativeResponseValue;
8089         }
8090         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
8091         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
8092                 if(!isWasmInitialized) {
8093                         throw new Error("initializeWasm() must be awaited first!");
8094                 }
8095                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_free(_res);
8096                 // debug statements here
8097         }
8098         // uint64_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
8099         export function CResult_ShutdownDecodeErrorZ_clone_ptr(arg: number): number {
8100                 if(!isWasmInitialized) {
8101                         throw new Error("initializeWasm() must be awaited first!");
8102                 }
8103                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone_ptr(arg);
8104                 return nativeResponseValue;
8105         }
8106         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
8107         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
8108                 if(!isWasmInitialized) {
8109                         throw new Error("initializeWasm() must be awaited first!");
8110                 }
8111                 const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone(orig);
8112                 return nativeResponseValue;
8113         }
8114         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
8115         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
8116                 if(!isWasmInitialized) {
8117                         throw new Error("initializeWasm() must be awaited first!");
8118                 }
8119                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
8120                 return nativeResponseValue;
8121         }
8122         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8123         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
8124                 if(!isWasmInitialized) {
8125                         throw new Error("initializeWasm() must be awaited first!");
8126                 }
8127                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_err(e);
8128                 return nativeResponseValue;
8129         }
8130         // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
8131         export function CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: number): boolean {
8132                 if(!isWasmInitialized) {
8133                         throw new Error("initializeWasm() must be awaited first!");
8134                 }
8135                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o);
8136                 return nativeResponseValue;
8137         }
8138         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
8139         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
8140                 if(!isWasmInitialized) {
8141                         throw new Error("initializeWasm() must be awaited first!");
8142                 }
8143                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
8144                 // debug statements here
8145         }
8146         // uint64_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
8147         export function CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8148                 if(!isWasmInitialized) {
8149                         throw new Error("initializeWasm() must be awaited first!");
8150                 }
8151                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg);
8152                 return nativeResponseValue;
8153         }
8154         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
8155         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
8156                 if(!isWasmInitialized) {
8157                         throw new Error("initializeWasm() must be awaited first!");
8158                 }
8159                 const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
8160                 return nativeResponseValue;
8161         }
8162         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
8163         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
8164                 if(!isWasmInitialized) {
8165                         throw new Error("initializeWasm() must be awaited first!");
8166                 }
8167                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
8168                 return nativeResponseValue;
8169         }
8170         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8171         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
8172                 if(!isWasmInitialized) {
8173                         throw new Error("initializeWasm() must be awaited first!");
8174                 }
8175                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
8176                 return nativeResponseValue;
8177         }
8178         // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
8179         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: number): boolean {
8180                 if(!isWasmInitialized) {
8181                         throw new Error("initializeWasm() must be awaited first!");
8182                 }
8183                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o);
8184                 return nativeResponseValue;
8185         }
8186         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
8187         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
8188                 if(!isWasmInitialized) {
8189                         throw new Error("initializeWasm() must be awaited first!");
8190                 }
8191                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
8192                 // debug statements here
8193         }
8194         // uint64_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
8195         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8196                 if(!isWasmInitialized) {
8197                         throw new Error("initializeWasm() must be awaited first!");
8198                 }
8199                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg);
8200                 return nativeResponseValue;
8201         }
8202         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
8203         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
8204                 if(!isWasmInitialized) {
8205                         throw new Error("initializeWasm() must be awaited first!");
8206                 }
8207                 const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
8208                 return nativeResponseValue;
8209         }
8210         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
8211         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
8212                 if(!isWasmInitialized) {
8213                         throw new Error("initializeWasm() must be awaited first!");
8214                 }
8215                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_ok(o);
8216                 return nativeResponseValue;
8217         }
8218         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
8219         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
8220                 if(!isWasmInitialized) {
8221                         throw new Error("initializeWasm() must be awaited first!");
8222                 }
8223                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_err(e);
8224                 return nativeResponseValue;
8225         }
8226         // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
8227         export function CResult_UpdateFeeDecodeErrorZ_is_ok(o: number): boolean {
8228                 if(!isWasmInitialized) {
8229                         throw new Error("initializeWasm() must be awaited first!");
8230                 }
8231                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_is_ok(o);
8232                 return nativeResponseValue;
8233         }
8234         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
8235         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
8236                 if(!isWasmInitialized) {
8237                         throw new Error("initializeWasm() must be awaited first!");
8238                 }
8239                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_free(_res);
8240                 // debug statements here
8241         }
8242         // uint64_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
8243         export function CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg: number): number {
8244                 if(!isWasmInitialized) {
8245                         throw new Error("initializeWasm() must be awaited first!");
8246                 }
8247                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg);
8248                 return nativeResponseValue;
8249         }
8250         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
8251         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
8252                 if(!isWasmInitialized) {
8253                         throw new Error("initializeWasm() must be awaited first!");
8254                 }
8255                 const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone(orig);
8256                 return nativeResponseValue;
8257         }
8258         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
8259         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
8260                 if(!isWasmInitialized) {
8261                         throw new Error("initializeWasm() must be awaited first!");
8262                 }
8263                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
8264                 return nativeResponseValue;
8265         }
8266         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8267         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
8268                 if(!isWasmInitialized) {
8269                         throw new Error("initializeWasm() must be awaited first!");
8270                 }
8271                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
8272                 return nativeResponseValue;
8273         }
8274         // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
8275         export function CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: number): boolean {
8276                 if(!isWasmInitialized) {
8277                         throw new Error("initializeWasm() must be awaited first!");
8278                 }
8279                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o);
8280                 return nativeResponseValue;
8281         }
8282         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
8283         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
8284                 if(!isWasmInitialized) {
8285                         throw new Error("initializeWasm() must be awaited first!");
8286                 }
8287                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
8288                 // debug statements here
8289         }
8290         // uint64_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
8291         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8292                 if(!isWasmInitialized) {
8293                         throw new Error("initializeWasm() must be awaited first!");
8294                 }
8295                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg);
8296                 return nativeResponseValue;
8297         }
8298         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
8299         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
8300                 if(!isWasmInitialized) {
8301                         throw new Error("initializeWasm() must be awaited first!");
8302                 }
8303                 const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
8304                 return nativeResponseValue;
8305         }
8306         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
8307         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
8308                 if(!isWasmInitialized) {
8309                         throw new Error("initializeWasm() must be awaited first!");
8310                 }
8311                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
8312                 return nativeResponseValue;
8313         }
8314         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8315         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
8316                 if(!isWasmInitialized) {
8317                         throw new Error("initializeWasm() must be awaited first!");
8318                 }
8319                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_err(e);
8320                 return nativeResponseValue;
8321         }
8322         // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
8323         export function CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: number): boolean {
8324                 if(!isWasmInitialized) {
8325                         throw new Error("initializeWasm() must be awaited first!");
8326                 }
8327                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o);
8328                 return nativeResponseValue;
8329         }
8330         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
8331         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
8332                 if(!isWasmInitialized) {
8333                         throw new Error("initializeWasm() must be awaited first!");
8334                 }
8335                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
8336                 // debug statements here
8337         }
8338         // uint64_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
8339         export function CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8340                 if(!isWasmInitialized) {
8341                         throw new Error("initializeWasm() must be awaited first!");
8342                 }
8343                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg);
8344                 return nativeResponseValue;
8345         }
8346         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
8347         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
8348                 if(!isWasmInitialized) {
8349                         throw new Error("initializeWasm() must be awaited first!");
8350                 }
8351                 const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
8352                 return nativeResponseValue;
8353         }
8354         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
8355         export function CResult_PingDecodeErrorZ_ok(o: number): number {
8356                 if(!isWasmInitialized) {
8357                         throw new Error("initializeWasm() must be awaited first!");
8358                 }
8359                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_ok(o);
8360                 return nativeResponseValue;
8361         }
8362         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
8363         export function CResult_PingDecodeErrorZ_err(e: number): number {
8364                 if(!isWasmInitialized) {
8365                         throw new Error("initializeWasm() must be awaited first!");
8366                 }
8367                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_err(e);
8368                 return nativeResponseValue;
8369         }
8370         // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
8371         export function CResult_PingDecodeErrorZ_is_ok(o: number): boolean {
8372                 if(!isWasmInitialized) {
8373                         throw new Error("initializeWasm() must be awaited first!");
8374                 }
8375                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_is_ok(o);
8376                 return nativeResponseValue;
8377         }
8378         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
8379         export function CResult_PingDecodeErrorZ_free(_res: number): void {
8380                 if(!isWasmInitialized) {
8381                         throw new Error("initializeWasm() must be awaited first!");
8382                 }
8383                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_free(_res);
8384                 // debug statements here
8385         }
8386         // uint64_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
8387         export function CResult_PingDecodeErrorZ_clone_ptr(arg: number): number {
8388                 if(!isWasmInitialized) {
8389                         throw new Error("initializeWasm() must be awaited first!");
8390                 }
8391                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone_ptr(arg);
8392                 return nativeResponseValue;
8393         }
8394         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
8395         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
8396                 if(!isWasmInitialized) {
8397                         throw new Error("initializeWasm() must be awaited first!");
8398                 }
8399                 const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone(orig);
8400                 return nativeResponseValue;
8401         }
8402         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
8403         export function CResult_PongDecodeErrorZ_ok(o: number): number {
8404                 if(!isWasmInitialized) {
8405                         throw new Error("initializeWasm() must be awaited first!");
8406                 }
8407                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_ok(o);
8408                 return nativeResponseValue;
8409         }
8410         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
8411         export function CResult_PongDecodeErrorZ_err(e: number): number {
8412                 if(!isWasmInitialized) {
8413                         throw new Error("initializeWasm() must be awaited first!");
8414                 }
8415                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_err(e);
8416                 return nativeResponseValue;
8417         }
8418         // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
8419         export function CResult_PongDecodeErrorZ_is_ok(o: number): boolean {
8420                 if(!isWasmInitialized) {
8421                         throw new Error("initializeWasm() must be awaited first!");
8422                 }
8423                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_is_ok(o);
8424                 return nativeResponseValue;
8425         }
8426         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
8427         export function CResult_PongDecodeErrorZ_free(_res: number): void {
8428                 if(!isWasmInitialized) {
8429                         throw new Error("initializeWasm() must be awaited first!");
8430                 }
8431                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_free(_res);
8432                 // debug statements here
8433         }
8434         // uint64_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
8435         export function CResult_PongDecodeErrorZ_clone_ptr(arg: number): number {
8436                 if(!isWasmInitialized) {
8437                         throw new Error("initializeWasm() must be awaited first!");
8438                 }
8439                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone_ptr(arg);
8440                 return nativeResponseValue;
8441         }
8442         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
8443         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
8444                 if(!isWasmInitialized) {
8445                         throw new Error("initializeWasm() must be awaited first!");
8446                 }
8447                 const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone(orig);
8448                 return nativeResponseValue;
8449         }
8450         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
8451         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8452                 if(!isWasmInitialized) {
8453                         throw new Error("initializeWasm() must be awaited first!");
8454                 }
8455                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
8456                 return nativeResponseValue;
8457         }
8458         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8459         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
8460                 if(!isWasmInitialized) {
8461                         throw new Error("initializeWasm() must be awaited first!");
8462                 }
8463                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
8464                 return nativeResponseValue;
8465         }
8466         // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8467         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8468                 if(!isWasmInitialized) {
8469                         throw new Error("initializeWasm() must be awaited first!");
8470                 }
8471                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o);
8472                 return nativeResponseValue;
8473         }
8474         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
8475         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8476                 if(!isWasmInitialized) {
8477                         throw new Error("initializeWasm() must be awaited first!");
8478                 }
8479                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
8480                 // debug statements here
8481         }
8482         // uint64_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8483         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8484                 if(!isWasmInitialized) {
8485                         throw new Error("initializeWasm() must be awaited first!");
8486                 }
8487                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8488                 return nativeResponseValue;
8489         }
8490         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8491         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8492                 if(!isWasmInitialized) {
8493                         throw new Error("initializeWasm() must be awaited first!");
8494                 }
8495                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
8496                 return nativeResponseValue;
8497         }
8498         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
8499         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8500                 if(!isWasmInitialized) {
8501                         throw new Error("initializeWasm() must be awaited first!");
8502                 }
8503                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
8504                 return nativeResponseValue;
8505         }
8506         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8507         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
8508                 if(!isWasmInitialized) {
8509                         throw new Error("initializeWasm() must be awaited first!");
8510                 }
8511                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_err(e);
8512                 return nativeResponseValue;
8513         }
8514         // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8515         export function CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8516                 if(!isWasmInitialized) {
8517                         throw new Error("initializeWasm() must be awaited first!");
8518                 }
8519                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o);
8520                 return nativeResponseValue;
8521         }
8522         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
8523         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8524                 if(!isWasmInitialized) {
8525                         throw new Error("initializeWasm() must be awaited first!");
8526                 }
8527                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
8528                 // debug statements here
8529         }
8530         // uint64_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8531         export function CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8532                 if(!isWasmInitialized) {
8533                         throw new Error("initializeWasm() must be awaited first!");
8534                 }
8535                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8536                 return nativeResponseValue;
8537         }
8538         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8539         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8540                 if(!isWasmInitialized) {
8541                         throw new Error("initializeWasm() must be awaited first!");
8542                 }
8543                 const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
8544                 return nativeResponseValue;
8545         }
8546         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
8547         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
8548                 if(!isWasmInitialized) {
8549                         throw new Error("initializeWasm() must be awaited first!");
8550                 }
8551                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
8552                 return nativeResponseValue;
8553         }
8554         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8555         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
8556                 if(!isWasmInitialized) {
8557                         throw new Error("initializeWasm() must be awaited first!");
8558                 }
8559                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
8560                 return nativeResponseValue;
8561         }
8562         // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8563         export function CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8564                 if(!isWasmInitialized) {
8565                         throw new Error("initializeWasm() must be awaited first!");
8566                 }
8567                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o);
8568                 return nativeResponseValue;
8569         }
8570         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
8571         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
8572                 if(!isWasmInitialized) {
8573                         throw new Error("initializeWasm() must be awaited first!");
8574                 }
8575                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
8576                 // debug statements here
8577         }
8578         // uint64_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
8579         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
8580                 if(!isWasmInitialized) {
8581                         throw new Error("initializeWasm() must be awaited first!");
8582                 }
8583                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg);
8584                 return nativeResponseValue;
8585         }
8586         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
8587         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
8588                 if(!isWasmInitialized) {
8589                         throw new Error("initializeWasm() must be awaited first!");
8590                 }
8591                 const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
8592                 return nativeResponseValue;
8593         }
8594         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
8595         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
8596                 if(!isWasmInitialized) {
8597                         throw new Error("initializeWasm() must be awaited first!");
8598                 }
8599                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_ok(o);
8600                 return nativeResponseValue;
8601         }
8602         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8603         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
8604                 if(!isWasmInitialized) {
8605                         throw new Error("initializeWasm() must be awaited first!");
8606                 }
8607                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_err(e);
8608                 return nativeResponseValue;
8609         }
8610         // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8611         export function CResult_ChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8612                 if(!isWasmInitialized) {
8613                         throw new Error("initializeWasm() must be awaited first!");
8614                 }
8615                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_is_ok(o);
8616                 return nativeResponseValue;
8617         }
8618         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
8619         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
8620                 if(!isWasmInitialized) {
8621                         throw new Error("initializeWasm() must be awaited first!");
8622                 }
8623                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_free(_res);
8624                 // debug statements here
8625         }
8626         // uint64_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
8627         export function CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
8628                 if(!isWasmInitialized) {
8629                         throw new Error("initializeWasm() must be awaited first!");
8630                 }
8631                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg);
8632                 return nativeResponseValue;
8633         }
8634         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
8635         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
8636                 if(!isWasmInitialized) {
8637                         throw new Error("initializeWasm() must be awaited first!");
8638                 }
8639                 const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone(orig);
8640                 return nativeResponseValue;
8641         }
8642         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
8643         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
8644                 if(!isWasmInitialized) {
8645                         throw new Error("initializeWasm() must be awaited first!");
8646                 }
8647                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_ok(o);
8648                 return nativeResponseValue;
8649         }
8650         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
8651         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
8652                 if(!isWasmInitialized) {
8653                         throw new Error("initializeWasm() must be awaited first!");
8654                 }
8655                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_err(e);
8656                 return nativeResponseValue;
8657         }
8658         // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
8659         export function CResult_ErrorMessageDecodeErrorZ_is_ok(o: number): boolean {
8660                 if(!isWasmInitialized) {
8661                         throw new Error("initializeWasm() must be awaited first!");
8662                 }
8663                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_is_ok(o);
8664                 return nativeResponseValue;
8665         }
8666         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
8667         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
8668                 if(!isWasmInitialized) {
8669                         throw new Error("initializeWasm() must be awaited first!");
8670                 }
8671                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_free(_res);
8672                 // debug statements here
8673         }
8674         // uint64_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
8675         export function CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg: number): number {
8676                 if(!isWasmInitialized) {
8677                         throw new Error("initializeWasm() must be awaited first!");
8678                 }
8679                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg);
8680                 return nativeResponseValue;
8681         }
8682         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
8683         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
8684                 if(!isWasmInitialized) {
8685                         throw new Error("initializeWasm() must be awaited first!");
8686                 }
8687                 const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone(orig);
8688                 return nativeResponseValue;
8689         }
8690         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
8691         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
8692                 if(!isWasmInitialized) {
8693                         throw new Error("initializeWasm() must be awaited first!");
8694                 }
8695                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
8696                 return nativeResponseValue;
8697         }
8698         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8699         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
8700                 if(!isWasmInitialized) {
8701                         throw new Error("initializeWasm() must be awaited first!");
8702                 }
8703                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
8704                 return nativeResponseValue;
8705         }
8706         // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
8707         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8708                 if(!isWasmInitialized) {
8709                         throw new Error("initializeWasm() must be awaited first!");
8710                 }
8711                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o);
8712                 return nativeResponseValue;
8713         }
8714         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
8715         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
8716                 if(!isWasmInitialized) {
8717                         throw new Error("initializeWasm() must be awaited first!");
8718                 }
8719                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
8720                 // debug statements here
8721         }
8722         // uint64_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8723         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8724                 if(!isWasmInitialized) {
8725                         throw new Error("initializeWasm() must be awaited first!");
8726                 }
8727                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg);
8728                 return nativeResponseValue;
8729         }
8730         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8731         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
8732                 if(!isWasmInitialized) {
8733                         throw new Error("initializeWasm() must be awaited first!");
8734                 }
8735                 const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
8736                 return nativeResponseValue;
8737         }
8738         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
8739         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
8740                 if(!isWasmInitialized) {
8741                         throw new Error("initializeWasm() must be awaited first!");
8742                 }
8743                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_ok(o);
8744                 return nativeResponseValue;
8745         }
8746         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8747         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
8748                 if(!isWasmInitialized) {
8749                         throw new Error("initializeWasm() must be awaited first!");
8750                 }
8751                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_err(e);
8752                 return nativeResponseValue;
8753         }
8754         // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
8755         export function CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8756                 if(!isWasmInitialized) {
8757                         throw new Error("initializeWasm() must be awaited first!");
8758                 }
8759                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_is_ok(o);
8760                 return nativeResponseValue;
8761         }
8762         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
8763         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
8764                 if(!isWasmInitialized) {
8765                         throw new Error("initializeWasm() must be awaited first!");
8766                 }
8767                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_free(_res);
8768                 // debug statements here
8769         }
8770         // uint64_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8771         export function CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8772                 if(!isWasmInitialized) {
8773                         throw new Error("initializeWasm() must be awaited first!");
8774                 }
8775                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg);
8776                 return nativeResponseValue;
8777         }
8778         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8779         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
8780                 if(!isWasmInitialized) {
8781                         throw new Error("initializeWasm() must be awaited first!");
8782                 }
8783                 const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
8784                 return nativeResponseValue;
8785         }
8786         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
8787         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
8788                 if(!isWasmInitialized) {
8789                         throw new Error("initializeWasm() must be awaited first!");
8790                 }
8791                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
8792                 return nativeResponseValue;
8793         }
8794         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
8795         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
8796                 if(!isWasmInitialized) {
8797                         throw new Error("initializeWasm() must be awaited first!");
8798                 }
8799                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
8800                 return nativeResponseValue;
8801         }
8802         // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
8803         export function CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: number): boolean {
8804                 if(!isWasmInitialized) {
8805                         throw new Error("initializeWasm() must be awaited first!");
8806                 }
8807                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o);
8808                 return nativeResponseValue;
8809         }
8810         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
8811         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
8812                 if(!isWasmInitialized) {
8813                         throw new Error("initializeWasm() must be awaited first!");
8814                 }
8815                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
8816                 // debug statements here
8817         }
8818         // uint64_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
8819         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg: number): number {
8820                 if(!isWasmInitialized) {
8821                         throw new Error("initializeWasm() must be awaited first!");
8822                 }
8823                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg);
8824                 return nativeResponseValue;
8825         }
8826         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
8827         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
8828                 if(!isWasmInitialized) {
8829                         throw new Error("initializeWasm() must be awaited first!");
8830                 }
8831                 const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
8832                 return nativeResponseValue;
8833         }
8834         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
8835         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
8836                 if(!isWasmInitialized) {
8837                         throw new Error("initializeWasm() must be awaited first!");
8838                 }
8839                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
8840                 return nativeResponseValue;
8841         }
8842         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
8843         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
8844                 if(!isWasmInitialized) {
8845                         throw new Error("initializeWasm() must be awaited first!");
8846                 }
8847                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
8848                 return nativeResponseValue;
8849         }
8850         // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
8851         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: number): boolean {
8852                 if(!isWasmInitialized) {
8853                         throw new Error("initializeWasm() must be awaited first!");
8854                 }
8855                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o);
8856                 return nativeResponseValue;
8857         }
8858         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
8859         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
8860                 if(!isWasmInitialized) {
8861                         throw new Error("initializeWasm() must be awaited first!");
8862                 }
8863                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
8864                 // debug statements here
8865         }
8866         // uint64_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
8867         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg: number): number {
8868                 if(!isWasmInitialized) {
8869                         throw new Error("initializeWasm() must be awaited first!");
8870                 }
8871                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg);
8872                 return nativeResponseValue;
8873         }
8874         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
8875         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
8876                 if(!isWasmInitialized) {
8877                         throw new Error("initializeWasm() must be awaited first!");
8878                 }
8879                 const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
8880                 return nativeResponseValue;
8881         }
8882         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
8883         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
8884                 if(!isWasmInitialized) {
8885                         throw new Error("initializeWasm() must be awaited first!");
8886                 }
8887                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_ok(o);
8888                 return nativeResponseValue;
8889         }
8890         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
8891         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
8892                 if(!isWasmInitialized) {
8893                         throw new Error("initializeWasm() must be awaited first!");
8894                 }
8895                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_err(e);
8896                 return nativeResponseValue;
8897         }
8898         // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
8899         export function CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
8900                 if(!isWasmInitialized) {
8901                         throw new Error("initializeWasm() must be awaited first!");
8902                 }
8903                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_is_ok(o);
8904                 return nativeResponseValue;
8905         }
8906         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
8907         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
8908                 if(!isWasmInitialized) {
8909                         throw new Error("initializeWasm() must be awaited first!");
8910                 }
8911                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_free(_res);
8912                 // debug statements here
8913         }
8914         // uint64_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
8915         export function CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
8916                 if(!isWasmInitialized) {
8917                         throw new Error("initializeWasm() must be awaited first!");
8918                 }
8919                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg);
8920                 return nativeResponseValue;
8921         }
8922         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
8923         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
8924                 if(!isWasmInitialized) {
8925                         throw new Error("initializeWasm() must be awaited first!");
8926                 }
8927                 const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
8928                 return nativeResponseValue;
8929         }
8930         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
8931         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
8932                 if(!isWasmInitialized) {
8933                         throw new Error("initializeWasm() must be awaited first!");
8934                 }
8935                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
8936                 return nativeResponseValue;
8937         }
8938         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
8939         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
8940                 if(!isWasmInitialized) {
8941                         throw new Error("initializeWasm() must be awaited first!");
8942                 }
8943                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_err(e);
8944                 return nativeResponseValue;
8945         }
8946         // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
8947         export function CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
8948                 if(!isWasmInitialized) {
8949                         throw new Error("initializeWasm() must be awaited first!");
8950                 }
8951                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o);
8952                 return nativeResponseValue;
8953         }
8954         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
8955         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
8956                 if(!isWasmInitialized) {
8957                         throw new Error("initializeWasm() must be awaited first!");
8958                 }
8959                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
8960                 // debug statements here
8961         }
8962         // uint64_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
8963         export function CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
8964                 if(!isWasmInitialized) {
8965                         throw new Error("initializeWasm() must be awaited first!");
8966                 }
8967                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg);
8968                 return nativeResponseValue;
8969         }
8970         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
8971         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
8972                 if(!isWasmInitialized) {
8973                         throw new Error("initializeWasm() must be awaited first!");
8974                 }
8975                 const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
8976                 return nativeResponseValue;
8977         }
8978         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
8979         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
8980                 if(!isWasmInitialized) {
8981                         throw new Error("initializeWasm() must be awaited first!");
8982                 }
8983                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
8984                 return nativeResponseValue;
8985         }
8986         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
8987         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
8988                 if(!isWasmInitialized) {
8989                         throw new Error("initializeWasm() must be awaited first!");
8990                 }
8991                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_err(e);
8992                 return nativeResponseValue;
8993         }
8994         // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
8995         export function CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: number): boolean {
8996                 if(!isWasmInitialized) {
8997                         throw new Error("initializeWasm() must be awaited first!");
8998                 }
8999                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o);
9000                 return nativeResponseValue;
9001         }
9002         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
9003         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
9004                 if(!isWasmInitialized) {
9005                         throw new Error("initializeWasm() must be awaited first!");
9006                 }
9007                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
9008                 // debug statements here
9009         }
9010         // uint64_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
9011         export function CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg: number): number {
9012                 if(!isWasmInitialized) {
9013                         throw new Error("initializeWasm() must be awaited first!");
9014                 }
9015                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg);
9016                 return nativeResponseValue;
9017         }
9018         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
9019         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
9020                 if(!isWasmInitialized) {
9021                         throw new Error("initializeWasm() must be awaited first!");
9022                 }
9023                 const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
9024                 return nativeResponseValue;
9025         }
9026         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
9027         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
9028                 if(!isWasmInitialized) {
9029                         throw new Error("initializeWasm() must be awaited first!");
9030                 }
9031                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
9032                 return nativeResponseValue;
9033         }
9034         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9035         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
9036                 if(!isWasmInitialized) {
9037                         throw new Error("initializeWasm() must be awaited first!");
9038                 }
9039                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
9040                 return nativeResponseValue;
9041         }
9042         // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9043         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9044                 if(!isWasmInitialized) {
9045                         throw new Error("initializeWasm() must be awaited first!");
9046                 }
9047                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
9048                 return nativeResponseValue;
9049         }
9050         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
9051         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
9052                 if(!isWasmInitialized) {
9053                         throw new Error("initializeWasm() must be awaited first!");
9054                 }
9055                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
9056                 // debug statements here
9057         }
9058         // uint64_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9059         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9060                 if(!isWasmInitialized) {
9061                         throw new Error("initializeWasm() must be awaited first!");
9062                 }
9063                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9064                 return nativeResponseValue;
9065         }
9066         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9067         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9068                 if(!isWasmInitialized) {
9069                         throw new Error("initializeWasm() must be awaited first!");
9070                 }
9071                 const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
9072                 return nativeResponseValue;
9073         }
9074         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
9075         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
9076                 if(!isWasmInitialized) {
9077                         throw new Error("initializeWasm() must be awaited first!");
9078                 }
9079                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
9080                 return nativeResponseValue;
9081         }
9082         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9083         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
9084                 if(!isWasmInitialized) {
9085                         throw new Error("initializeWasm() must be awaited first!");
9086                 }
9087                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
9088                 return nativeResponseValue;
9089         }
9090         // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9091         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9092                 if(!isWasmInitialized) {
9093                         throw new Error("initializeWasm() must be awaited first!");
9094                 }
9095                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
9096                 return nativeResponseValue;
9097         }
9098         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
9099         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
9100                 if(!isWasmInitialized) {
9101                         throw new Error("initializeWasm() must be awaited first!");
9102                 }
9103                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
9104                 // debug statements here
9105         }
9106         // uint64_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9107         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9108                 if(!isWasmInitialized) {
9109                         throw new Error("initializeWasm() must be awaited first!");
9110                 }
9111                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9112                 return nativeResponseValue;
9113         }
9114         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9115         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9116                 if(!isWasmInitialized) {
9117                         throw new Error("initializeWasm() must be awaited first!");
9118                 }
9119                 const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
9120                 return nativeResponseValue;
9121         }
9122         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
9123         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
9124                 if(!isWasmInitialized) {
9125                         throw new Error("initializeWasm() must be awaited first!");
9126                 }
9127                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
9128                 return nativeResponseValue;
9129         }
9130         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9131         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
9132                 if(!isWasmInitialized) {
9133                         throw new Error("initializeWasm() must be awaited first!");
9134                 }
9135                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
9136                 return nativeResponseValue;
9137         }
9138         // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9139         export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9140                 if(!isWasmInitialized) {
9141                         throw new Error("initializeWasm() must be awaited first!");
9142                 }
9143                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
9144                 return nativeResponseValue;
9145         }
9146         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
9147         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
9148                 if(!isWasmInitialized) {
9149                         throw new Error("initializeWasm() must be awaited first!");
9150                 }
9151                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
9152                 // debug statements here
9153         }
9154         // uint64_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9155         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9156                 if(!isWasmInitialized) {
9157                         throw new Error("initializeWasm() must be awaited first!");
9158                 }
9159                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9160                 return nativeResponseValue;
9161         }
9162         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9163         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9164                 if(!isWasmInitialized) {
9165                         throw new Error("initializeWasm() must be awaited first!");
9166                 }
9167                 const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
9168                 return nativeResponseValue;
9169         }
9170         // uint64_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
9171         export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
9172                 if(!isWasmInitialized) {
9173                         throw new Error("initializeWasm() must be awaited first!");
9174                 }
9175                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
9176                 return nativeResponseValue;
9177         }
9178         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
9179         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
9180                 if(!isWasmInitialized) {
9181                         throw new Error("initializeWasm() must be awaited first!");
9182                 }
9183                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
9184                 return nativeResponseValue;
9185         }
9186         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
9187         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
9188                 if(!isWasmInitialized) {
9189                         throw new Error("initializeWasm() must be awaited first!");
9190                 }
9191                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_new(encodeUint8Array(a), b);
9192                 return nativeResponseValue;
9193         }
9194         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
9195         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
9196                 if(!isWasmInitialized) {
9197                         throw new Error("initializeWasm() must be awaited first!");
9198                 }
9199                 const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_free(_res);
9200                 // debug statements here
9201         }
9202         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
9203         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
9204                 if(!isWasmInitialized) {
9205                         throw new Error("initializeWasm() must be awaited first!");
9206                 }
9207                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
9208                 return nativeResponseValue;
9209         }
9210         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
9211         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
9212                 if(!isWasmInitialized) {
9213                         throw new Error("initializeWasm() must be awaited first!");
9214                 }
9215                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
9216                 return nativeResponseValue;
9217         }
9218         // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
9219         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o: number): boolean {
9220                 if(!isWasmInitialized) {
9221                         throw new Error("initializeWasm() must be awaited first!");
9222                 }
9223                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o);
9224                 return nativeResponseValue;
9225         }
9226         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
9227         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
9228                 if(!isWasmInitialized) {
9229                         throw new Error("initializeWasm() must be awaited first!");
9230                 }
9231                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
9232                 // debug statements here
9233         }
9234         // uint64_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
9235         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg: number): number {
9236                 if(!isWasmInitialized) {
9237                         throw new Error("initializeWasm() must be awaited first!");
9238                 }
9239                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg);
9240                 return nativeResponseValue;
9241         }
9242         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
9243         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
9244                 if(!isWasmInitialized) {
9245                         throw new Error("initializeWasm() must be awaited first!");
9246                 }
9247                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
9248                 return nativeResponseValue;
9249         }
9250         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
9251         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
9252                 if(!isWasmInitialized) {
9253                         throw new Error("initializeWasm() must be awaited first!");
9254                 }
9255                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_ok(encodeUint8Array(o));
9256                 return nativeResponseValue;
9257         }
9258         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
9259         export function CResult_SignatureNoneZ_err(): number {
9260                 if(!isWasmInitialized) {
9261                         throw new Error("initializeWasm() must be awaited first!");
9262                 }
9263                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_err();
9264                 return nativeResponseValue;
9265         }
9266         // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
9267         export function CResult_SignatureNoneZ_is_ok(o: number): boolean {
9268                 if(!isWasmInitialized) {
9269                         throw new Error("initializeWasm() must be awaited first!");
9270                 }
9271                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_is_ok(o);
9272                 return nativeResponseValue;
9273         }
9274         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
9275         export function CResult_SignatureNoneZ_free(_res: number): void {
9276                 if(!isWasmInitialized) {
9277                         throw new Error("initializeWasm() must be awaited first!");
9278                 }
9279                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_free(_res);
9280                 // debug statements here
9281         }
9282         // uint64_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
9283         export function CResult_SignatureNoneZ_clone_ptr(arg: number): number {
9284                 if(!isWasmInitialized) {
9285                         throw new Error("initializeWasm() must be awaited first!");
9286                 }
9287                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone_ptr(arg);
9288                 return nativeResponseValue;
9289         }
9290         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
9291         export function CResult_SignatureNoneZ_clone(orig: number): number {
9292                 if(!isWasmInitialized) {
9293                         throw new Error("initializeWasm() must be awaited first!");
9294                 }
9295                 const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone(orig);
9296                 return nativeResponseValue;
9297         }
9298         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
9299         export function CResult_SignDecodeErrorZ_ok(o: number): number {
9300                 if(!isWasmInitialized) {
9301                         throw new Error("initializeWasm() must be awaited first!");
9302                 }
9303                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_ok(o);
9304                 return nativeResponseValue;
9305         }
9306         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
9307         export function CResult_SignDecodeErrorZ_err(e: number): number {
9308                 if(!isWasmInitialized) {
9309                         throw new Error("initializeWasm() must be awaited first!");
9310                 }
9311                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_err(e);
9312                 return nativeResponseValue;
9313         }
9314         // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
9315         export function CResult_SignDecodeErrorZ_is_ok(o: number): boolean {
9316                 if(!isWasmInitialized) {
9317                         throw new Error("initializeWasm() must be awaited first!");
9318                 }
9319                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_is_ok(o);
9320                 return nativeResponseValue;
9321         }
9322         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
9323         export function CResult_SignDecodeErrorZ_free(_res: number): void {
9324                 if(!isWasmInitialized) {
9325                         throw new Error("initializeWasm() must be awaited first!");
9326                 }
9327                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_free(_res);
9328                 // debug statements here
9329         }
9330         // uint64_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
9331         export function CResult_SignDecodeErrorZ_clone_ptr(arg: number): number {
9332                 if(!isWasmInitialized) {
9333                         throw new Error("initializeWasm() must be awaited first!");
9334                 }
9335                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone_ptr(arg);
9336                 return nativeResponseValue;
9337         }
9338         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
9339         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
9340                 if(!isWasmInitialized) {
9341                         throw new Error("initializeWasm() must be awaited first!");
9342                 }
9343                 const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone(orig);
9344                 return nativeResponseValue;
9345         }
9346         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
9347         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
9348                 if(!isWasmInitialized) {
9349                         throw new Error("initializeWasm() must be awaited first!");
9350                 }
9351                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_ok(encodeUint8Array(arg));
9352                 return nativeResponseValue;
9353         }
9354         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
9355         export function CResult_RecoverableSignatureNoneZ_err(): number {
9356                 if(!isWasmInitialized) {
9357                         throw new Error("initializeWasm() must be awaited first!");
9358                 }
9359                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_err();
9360                 return nativeResponseValue;
9361         }
9362         // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
9363         export function CResult_RecoverableSignatureNoneZ_is_ok(o: number): boolean {
9364                 if(!isWasmInitialized) {
9365                         throw new Error("initializeWasm() must be awaited first!");
9366                 }
9367                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_is_ok(o);
9368                 return nativeResponseValue;
9369         }
9370         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
9371         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
9372                 if(!isWasmInitialized) {
9373                         throw new Error("initializeWasm() must be awaited first!");
9374                 }
9375                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_free(_res);
9376                 // debug statements here
9377         }
9378         // uint64_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
9379         export function CResult_RecoverableSignatureNoneZ_clone_ptr(arg: number): number {
9380                 if(!isWasmInitialized) {
9381                         throw new Error("initializeWasm() must be awaited first!");
9382                 }
9383                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone_ptr(arg);
9384                 return nativeResponseValue;
9385         }
9386         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
9387         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
9388                 if(!isWasmInitialized) {
9389                         throw new Error("initializeWasm() must be awaited first!");
9390                 }
9391                 const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone(orig);
9392                 return nativeResponseValue;
9393         }
9394         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
9395         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
9396                 if(!isWasmInitialized) {
9397                         throw new Error("initializeWasm() must be awaited first!");
9398                 }
9399                 const nativeResponseValue = wasm.TS_CVec_CVec_u8ZZ_free(_res);
9400                 // debug statements here
9401         }
9402         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
9403         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
9404                 if(!isWasmInitialized) {
9405                         throw new Error("initializeWasm() must be awaited first!");
9406                 }
9407                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_ok(o);
9408                 return nativeResponseValue;
9409         }
9410         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
9411         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
9412                 if(!isWasmInitialized) {
9413                         throw new Error("initializeWasm() must be awaited first!");
9414                 }
9415                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_err();
9416                 return nativeResponseValue;
9417         }
9418         // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
9419         export function CResult_CVec_CVec_u8ZZNoneZ_is_ok(o: number): boolean {
9420                 if(!isWasmInitialized) {
9421                         throw new Error("initializeWasm() must be awaited first!");
9422                 }
9423                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_is_ok(o);
9424                 return nativeResponseValue;
9425         }
9426         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
9427         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
9428                 if(!isWasmInitialized) {
9429                         throw new Error("initializeWasm() must be awaited first!");
9430                 }
9431                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_free(_res);
9432                 // debug statements here
9433         }
9434         // uint64_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
9435         export function CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg: number): number {
9436                 if(!isWasmInitialized) {
9437                         throw new Error("initializeWasm() must be awaited first!");
9438                 }
9439                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg);
9440                 return nativeResponseValue;
9441         }
9442         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
9443         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
9444                 if(!isWasmInitialized) {
9445                         throw new Error("initializeWasm() must be awaited first!");
9446                 }
9447                 const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
9448                 return nativeResponseValue;
9449         }
9450         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
9451         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
9452                 if(!isWasmInitialized) {
9453                         throw new Error("initializeWasm() must be awaited first!");
9454                 }
9455                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_ok(o);
9456                 return nativeResponseValue;
9457         }
9458         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
9459         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
9460                 if(!isWasmInitialized) {
9461                         throw new Error("initializeWasm() must be awaited first!");
9462                 }
9463                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_err(e);
9464                 return nativeResponseValue;
9465         }
9466         // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
9467         export function CResult_InMemorySignerDecodeErrorZ_is_ok(o: number): boolean {
9468                 if(!isWasmInitialized) {
9469                         throw new Error("initializeWasm() must be awaited first!");
9470                 }
9471                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_is_ok(o);
9472                 return nativeResponseValue;
9473         }
9474         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
9475         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
9476                 if(!isWasmInitialized) {
9477                         throw new Error("initializeWasm() must be awaited first!");
9478                 }
9479                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_free(_res);
9480                 // debug statements here
9481         }
9482         // uint64_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
9483         export function CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg: number): number {
9484                 if(!isWasmInitialized) {
9485                         throw new Error("initializeWasm() must be awaited first!");
9486                 }
9487                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg);
9488                 return nativeResponseValue;
9489         }
9490         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
9491         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
9492                 if(!isWasmInitialized) {
9493                         throw new Error("initializeWasm() must be awaited first!");
9494                 }
9495                 const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone(orig);
9496                 return nativeResponseValue;
9497         }
9498         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
9499         export function CVec_TxOutZ_free(_res: number[]): void {
9500                 if(!isWasmInitialized) {
9501                         throw new Error("initializeWasm() must be awaited first!");
9502                 }
9503                 const nativeResponseValue = wasm.TS_CVec_TxOutZ_free(_res);
9504                 // debug statements here
9505         }
9506         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
9507         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
9508                 if(!isWasmInitialized) {
9509                         throw new Error("initializeWasm() must be awaited first!");
9510                 }
9511                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_ok(encodeUint8Array(o));
9512                 return nativeResponseValue;
9513         }
9514         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
9515         export function CResult_TransactionNoneZ_err(): number {
9516                 if(!isWasmInitialized) {
9517                         throw new Error("initializeWasm() must be awaited first!");
9518                 }
9519                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_err();
9520                 return nativeResponseValue;
9521         }
9522         // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
9523         export function CResult_TransactionNoneZ_is_ok(o: number): boolean {
9524                 if(!isWasmInitialized) {
9525                         throw new Error("initializeWasm() must be awaited first!");
9526                 }
9527                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_is_ok(o);
9528                 return nativeResponseValue;
9529         }
9530         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
9531         export function CResult_TransactionNoneZ_free(_res: number): void {
9532                 if(!isWasmInitialized) {
9533                         throw new Error("initializeWasm() must be awaited first!");
9534                 }
9535                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_free(_res);
9536                 // debug statements here
9537         }
9538         // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
9539         export function CResult_TransactionNoneZ_clone_ptr(arg: number): number {
9540                 if(!isWasmInitialized) {
9541                         throw new Error("initializeWasm() must be awaited first!");
9542                 }
9543                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone_ptr(arg);
9544                 return nativeResponseValue;
9545         }
9546         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
9547         export function CResult_TransactionNoneZ_clone(orig: number): number {
9548                 if(!isWasmInitialized) {
9549                         throw new Error("initializeWasm() must be awaited first!");
9550                 }
9551                 const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone(orig);
9552                 return nativeResponseValue;
9553         }
9554         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
9555         export function COption_FilterZ_some(o: number): number {
9556                 if(!isWasmInitialized) {
9557                         throw new Error("initializeWasm() must be awaited first!");
9558                 }
9559                 const nativeResponseValue = wasm.TS_COption_FilterZ_some(o);
9560                 return nativeResponseValue;
9561         }
9562         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
9563         export function COption_FilterZ_none(): number {
9564                 if(!isWasmInitialized) {
9565                         throw new Error("initializeWasm() must be awaited first!");
9566                 }
9567                 const nativeResponseValue = wasm.TS_COption_FilterZ_none();
9568                 return nativeResponseValue;
9569         }
9570         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
9571         export function COption_FilterZ_free(_res: number): void {
9572                 if(!isWasmInitialized) {
9573                         throw new Error("initializeWasm() must be awaited first!");
9574                 }
9575                 const nativeResponseValue = wasm.TS_COption_FilterZ_free(_res);
9576                 // debug statements here
9577         }
9578         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
9579         export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
9580                 if(!isWasmInitialized) {
9581                         throw new Error("initializeWasm() must be awaited first!");
9582                 }
9583                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_ok(o);
9584                 return nativeResponseValue;
9585         }
9586         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
9587         export function CResult_LockedChannelMonitorNoneZ_err(): number {
9588                 if(!isWasmInitialized) {
9589                         throw new Error("initializeWasm() must be awaited first!");
9590                 }
9591                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_err();
9592                 return nativeResponseValue;
9593         }
9594         // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
9595         export function CResult_LockedChannelMonitorNoneZ_is_ok(o: number): boolean {
9596                 if(!isWasmInitialized) {
9597                         throw new Error("initializeWasm() must be awaited first!");
9598                 }
9599                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_is_ok(o);
9600                 return nativeResponseValue;
9601         }
9602         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
9603         export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
9604                 if(!isWasmInitialized) {
9605                         throw new Error("initializeWasm() must be awaited first!");
9606                 }
9607                 const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_free(_res);
9608                 // debug statements here
9609         }
9610         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
9611         export function CVec_OutPointZ_free(_res: number[]): void {
9612                 if(!isWasmInitialized) {
9613                         throw new Error("initializeWasm() must be awaited first!");
9614                 }
9615                 const nativeResponseValue = wasm.TS_CVec_OutPointZ_free(_res);
9616                 // debug statements here
9617         }
9618         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
9619         export function CResult_NoneAPIErrorZ_ok(): number {
9620                 if(!isWasmInitialized) {
9621                         throw new Error("initializeWasm() must be awaited first!");
9622                 }
9623                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_ok();
9624                 return nativeResponseValue;
9625         }
9626         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
9627         export function CResult_NoneAPIErrorZ_err(e: number): number {
9628                 if(!isWasmInitialized) {
9629                         throw new Error("initializeWasm() must be awaited first!");
9630                 }
9631                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_err(e);
9632                 return nativeResponseValue;
9633         }
9634         // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
9635         export function CResult_NoneAPIErrorZ_is_ok(o: number): boolean {
9636                 if(!isWasmInitialized) {
9637                         throw new Error("initializeWasm() must be awaited first!");
9638                 }
9639                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_is_ok(o);
9640                 return nativeResponseValue;
9641         }
9642         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
9643         export function CResult_NoneAPIErrorZ_free(_res: number): void {
9644                 if(!isWasmInitialized) {
9645                         throw new Error("initializeWasm() must be awaited first!");
9646                 }
9647                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_free(_res);
9648                 // debug statements here
9649         }
9650         // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
9651         export function CResult_NoneAPIErrorZ_clone_ptr(arg: number): number {
9652                 if(!isWasmInitialized) {
9653                         throw new Error("initializeWasm() must be awaited first!");
9654                 }
9655                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone_ptr(arg);
9656                 return nativeResponseValue;
9657         }
9658         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
9659         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
9660                 if(!isWasmInitialized) {
9661                         throw new Error("initializeWasm() must be awaited first!");
9662                 }
9663                 const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone(orig);
9664                 return nativeResponseValue;
9665         }
9666         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
9667         export function COption_u16Z_some(o: number): number {
9668                 if(!isWasmInitialized) {
9669                         throw new Error("initializeWasm() must be awaited first!");
9670                 }
9671                 const nativeResponseValue = wasm.TS_COption_u16Z_some(o);
9672                 return nativeResponseValue;
9673         }
9674         // struct LDKCOption_u16Z COption_u16Z_none(void);
9675         export function COption_u16Z_none(): number {
9676                 if(!isWasmInitialized) {
9677                         throw new Error("initializeWasm() must be awaited first!");
9678                 }
9679                 const nativeResponseValue = wasm.TS_COption_u16Z_none();
9680                 return nativeResponseValue;
9681         }
9682         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
9683         export function COption_u16Z_free(_res: number): void {
9684                 if(!isWasmInitialized) {
9685                         throw new Error("initializeWasm() must be awaited first!");
9686                 }
9687                 const nativeResponseValue = wasm.TS_COption_u16Z_free(_res);
9688                 // debug statements here
9689         }
9690         // uint64_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
9691         export function COption_u16Z_clone_ptr(arg: number): number {
9692                 if(!isWasmInitialized) {
9693                         throw new Error("initializeWasm() must be awaited first!");
9694                 }
9695                 const nativeResponseValue = wasm.TS_COption_u16Z_clone_ptr(arg);
9696                 return nativeResponseValue;
9697         }
9698         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
9699         export function COption_u16Z_clone(orig: number): number {
9700                 if(!isWasmInitialized) {
9701                         throw new Error("initializeWasm() must be awaited first!");
9702                 }
9703                 const nativeResponseValue = wasm.TS_COption_u16Z_clone(orig);
9704                 return nativeResponseValue;
9705         }
9706         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
9707         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
9708                 if(!isWasmInitialized) {
9709                         throw new Error("initializeWasm() must be awaited first!");
9710                 }
9711                 const nativeResponseValue = wasm.TS_CVec_CResult_NoneAPIErrorZZ_free(_res);
9712                 // debug statements here
9713         }
9714         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
9715         export function CVec_APIErrorZ_free(_res: number[]): void {
9716                 if(!isWasmInitialized) {
9717                         throw new Error("initializeWasm() must be awaited first!");
9718                 }
9719                 const nativeResponseValue = wasm.TS_CVec_APIErrorZ_free(_res);
9720                 // debug statements here
9721         }
9722         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
9723         export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
9724                 if(!isWasmInitialized) {
9725                         throw new Error("initializeWasm() must be awaited first!");
9726                 }
9727                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_ok(encodeUint8Array(o));
9728                 return nativeResponseValue;
9729         }
9730         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
9731         export function CResult__u832APIErrorZ_err(e: number): number {
9732                 if(!isWasmInitialized) {
9733                         throw new Error("initializeWasm() must be awaited first!");
9734                 }
9735                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_err(e);
9736                 return nativeResponseValue;
9737         }
9738         // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
9739         export function CResult__u832APIErrorZ_is_ok(o: number): boolean {
9740                 if(!isWasmInitialized) {
9741                         throw new Error("initializeWasm() must be awaited first!");
9742                 }
9743                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_is_ok(o);
9744                 return nativeResponseValue;
9745         }
9746         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
9747         export function CResult__u832APIErrorZ_free(_res: number): void {
9748                 if(!isWasmInitialized) {
9749                         throw new Error("initializeWasm() must be awaited first!");
9750                 }
9751                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_free(_res);
9752                 // debug statements here
9753         }
9754         // uint64_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
9755         export function CResult__u832APIErrorZ_clone_ptr(arg: number): number {
9756                 if(!isWasmInitialized) {
9757                         throw new Error("initializeWasm() must be awaited first!");
9758                 }
9759                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone_ptr(arg);
9760                 return nativeResponseValue;
9761         }
9762         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
9763         export function CResult__u832APIErrorZ_clone(orig: number): number {
9764                 if(!isWasmInitialized) {
9765                         throw new Error("initializeWasm() must be awaited first!");
9766                 }
9767                 const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone(orig);
9768                 return nativeResponseValue;
9769         }
9770         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
9771         export function CResult_PaymentIdPaymentSendFailureZ_ok(o: Uint8Array): number {
9772                 if(!isWasmInitialized) {
9773                         throw new Error("initializeWasm() must be awaited first!");
9774                 }
9775                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_ok(encodeUint8Array(o));
9776                 return nativeResponseValue;
9777         }
9778         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
9779         export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
9780                 if(!isWasmInitialized) {
9781                         throw new Error("initializeWasm() must be awaited first!");
9782                 }
9783                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_err(e);
9784                 return nativeResponseValue;
9785         }
9786         // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
9787         export function CResult_PaymentIdPaymentSendFailureZ_is_ok(o: number): boolean {
9788                 if(!isWasmInitialized) {
9789                         throw new Error("initializeWasm() must be awaited first!");
9790                 }
9791                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_is_ok(o);
9792                 return nativeResponseValue;
9793         }
9794         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
9795         export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
9796                 if(!isWasmInitialized) {
9797                         throw new Error("initializeWasm() must be awaited first!");
9798                 }
9799                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_free(_res);
9800                 // debug statements here
9801         }
9802         // uint64_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
9803         export function CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg: number): number {
9804                 if(!isWasmInitialized) {
9805                         throw new Error("initializeWasm() must be awaited first!");
9806                 }
9807                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg);
9808                 return nativeResponseValue;
9809         }
9810         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
9811         export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
9812                 if(!isWasmInitialized) {
9813                         throw new Error("initializeWasm() must be awaited first!");
9814                 }
9815                 const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone(orig);
9816                 return nativeResponseValue;
9817         }
9818         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
9819         export function CResult_NonePaymentSendFailureZ_ok(): number {
9820                 if(!isWasmInitialized) {
9821                         throw new Error("initializeWasm() must be awaited first!");
9822                 }
9823                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_ok();
9824                 return nativeResponseValue;
9825         }
9826         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
9827         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
9828                 if(!isWasmInitialized) {
9829                         throw new Error("initializeWasm() must be awaited first!");
9830                 }
9831                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_err(e);
9832                 return nativeResponseValue;
9833         }
9834         // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
9835         export function CResult_NonePaymentSendFailureZ_is_ok(o: number): boolean {
9836                 if(!isWasmInitialized) {
9837                         throw new Error("initializeWasm() must be awaited first!");
9838                 }
9839                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_is_ok(o);
9840                 return nativeResponseValue;
9841         }
9842         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
9843         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
9844                 if(!isWasmInitialized) {
9845                         throw new Error("initializeWasm() must be awaited first!");
9846                 }
9847                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_free(_res);
9848                 // debug statements here
9849         }
9850         // uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
9851         export function CResult_NonePaymentSendFailureZ_clone_ptr(arg: number): number {
9852                 if(!isWasmInitialized) {
9853                         throw new Error("initializeWasm() must be awaited first!");
9854                 }
9855                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone_ptr(arg);
9856                 return nativeResponseValue;
9857         }
9858         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
9859         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
9860                 if(!isWasmInitialized) {
9861                         throw new Error("initializeWasm() must be awaited first!");
9862                 }
9863                 const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone(orig);
9864                 return nativeResponseValue;
9865         }
9866         // uint64_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
9867         export function C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg: number): number {
9868                 if(!isWasmInitialized) {
9869                         throw new Error("initializeWasm() must be awaited first!");
9870                 }
9871                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg);
9872                 return nativeResponseValue;
9873         }
9874         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
9875         export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
9876                 if(!isWasmInitialized) {
9877                         throw new Error("initializeWasm() must be awaited first!");
9878                 }
9879                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone(orig);
9880                 return nativeResponseValue;
9881         }
9882         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
9883         export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: Uint8Array): number {
9884                 if(!isWasmInitialized) {
9885                         throw new Error("initializeWasm() must be awaited first!");
9886                 }
9887                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_new(encodeUint8Array(a), encodeUint8Array(b));
9888                 return nativeResponseValue;
9889         }
9890         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
9891         export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
9892                 if(!isWasmInitialized) {
9893                         throw new Error("initializeWasm() must be awaited first!");
9894                 }
9895                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_free(_res);
9896                 // debug statements here
9897         }
9898         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
9899         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
9900                 if(!isWasmInitialized) {
9901                         throw new Error("initializeWasm() must be awaited first!");
9902                 }
9903                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
9904                 return nativeResponseValue;
9905         }
9906         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
9907         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
9908                 if(!isWasmInitialized) {
9909                         throw new Error("initializeWasm() must be awaited first!");
9910                 }
9911                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
9912                 return nativeResponseValue;
9913         }
9914         // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
9915         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o: number): boolean {
9916                 if(!isWasmInitialized) {
9917                         throw new Error("initializeWasm() must be awaited first!");
9918                 }
9919                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o);
9920                 return nativeResponseValue;
9921         }
9922         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
9923         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
9924                 if(!isWasmInitialized) {
9925                         throw new Error("initializeWasm() must be awaited first!");
9926                 }
9927                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
9928                 // debug statements here
9929         }
9930         // uint64_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
9931         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg: number): number {
9932                 if(!isWasmInitialized) {
9933                         throw new Error("initializeWasm() must be awaited first!");
9934                 }
9935                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg);
9936                 return nativeResponseValue;
9937         }
9938         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
9939         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
9940                 if(!isWasmInitialized) {
9941                         throw new Error("initializeWasm() must be awaited first!");
9942                 }
9943                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
9944                 return nativeResponseValue;
9945         }
9946         // uint64_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
9947         export function C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg: number): number {
9948                 if(!isWasmInitialized) {
9949                         throw new Error("initializeWasm() must be awaited first!");
9950                 }
9951                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg);
9952                 return nativeResponseValue;
9953         }
9954         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
9955         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
9956                 if(!isWasmInitialized) {
9957                         throw new Error("initializeWasm() must be awaited first!");
9958                 }
9959                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
9960                 return nativeResponseValue;
9961         }
9962         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
9963         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
9964                 if(!isWasmInitialized) {
9965                         throw new Error("initializeWasm() must be awaited first!");
9966                 }
9967                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_new(encodeUint8Array(a), encodeUint8Array(b));
9968                 return nativeResponseValue;
9969         }
9970         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
9971         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
9972                 if(!isWasmInitialized) {
9973                         throw new Error("initializeWasm() must be awaited first!");
9974                 }
9975                 const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_free(_res);
9976                 // debug statements here
9977         }
9978         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
9979         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o: number): number {
9980                 if(!isWasmInitialized) {
9981                         throw new Error("initializeWasm() must be awaited first!");
9982                 }
9983                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o);
9984                 return nativeResponseValue;
9985         }
9986         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
9987         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(): number {
9988                 if(!isWasmInitialized) {
9989                         throw new Error("initializeWasm() must be awaited first!");
9990                 }
9991                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err();
9992                 return nativeResponseValue;
9993         }
9994         // bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
9995         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o: number): boolean {
9996                 if(!isWasmInitialized) {
9997                         throw new Error("initializeWasm() must be awaited first!");
9998                 }
9999                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o);
10000                 return nativeResponseValue;
10001         }
10002         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
10003         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res: number): void {
10004                 if(!isWasmInitialized) {
10005                         throw new Error("initializeWasm() must be awaited first!");
10006                 }
10007                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res);
10008                 // debug statements here
10009         }
10010         // uint64_t CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR arg);
10011         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg: number): number {
10012                 if(!isWasmInitialized) {
10013                         throw new Error("initializeWasm() must be awaited first!");
10014                 }
10015                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg);
10016                 return nativeResponseValue;
10017         }
10018         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
10019         export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig: number): number {
10020                 if(!isWasmInitialized) {
10021                         throw new Error("initializeWasm() must be awaited first!");
10022                 }
10023                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig);
10024                 return nativeResponseValue;
10025         }
10026         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
10027         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o: number): number {
10028                 if(!isWasmInitialized) {
10029                         throw new Error("initializeWasm() must be awaited first!");
10030                 }
10031                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o);
10032                 return nativeResponseValue;
10033         }
10034         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(struct LDKAPIError e);
10035         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e: number): number {
10036                 if(!isWasmInitialized) {
10037                         throw new Error("initializeWasm() must be awaited first!");
10038                 }
10039                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e);
10040                 return nativeResponseValue;
10041         }
10042         // bool CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR o);
10043         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o: number): boolean {
10044                 if(!isWasmInitialized) {
10045                         throw new Error("initializeWasm() must be awaited first!");
10046                 }
10047                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o);
10048                 return nativeResponseValue;
10049         }
10050         // void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ _res);
10051         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res: number): void {
10052                 if(!isWasmInitialized) {
10053                         throw new Error("initializeWasm() must be awaited first!");
10054                 }
10055                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res);
10056                 // debug statements here
10057         }
10058         // uint64_t CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR arg);
10059         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg: number): number {
10060                 if(!isWasmInitialized) {
10061                         throw new Error("initializeWasm() must be awaited first!");
10062                 }
10063                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg);
10064                 return nativeResponseValue;
10065         }
10066         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR orig);
10067         export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig: number): number {
10068                 if(!isWasmInitialized) {
10069                         throw new Error("initializeWasm() must be awaited first!");
10070                 }
10071                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig);
10072                 return nativeResponseValue;
10073         }
10074         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
10075         export function CResult_PaymentSecretNoneZ_ok(o: Uint8Array): number {
10076                 if(!isWasmInitialized) {
10077                         throw new Error("initializeWasm() must be awaited first!");
10078                 }
10079                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_ok(encodeUint8Array(o));
10080                 return nativeResponseValue;
10081         }
10082         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
10083         export function CResult_PaymentSecretNoneZ_err(): number {
10084                 if(!isWasmInitialized) {
10085                         throw new Error("initializeWasm() must be awaited first!");
10086                 }
10087                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_err();
10088                 return nativeResponseValue;
10089         }
10090         // bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
10091         export function CResult_PaymentSecretNoneZ_is_ok(o: number): boolean {
10092                 if(!isWasmInitialized) {
10093                         throw new Error("initializeWasm() must be awaited first!");
10094                 }
10095                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_is_ok(o);
10096                 return nativeResponseValue;
10097         }
10098         // void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
10099         export function CResult_PaymentSecretNoneZ_free(_res: number): void {
10100                 if(!isWasmInitialized) {
10101                         throw new Error("initializeWasm() must be awaited first!");
10102                 }
10103                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_free(_res);
10104                 // debug statements here
10105         }
10106         // uint64_t CResult_PaymentSecretNoneZ_clone_ptr(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR arg);
10107         export function CResult_PaymentSecretNoneZ_clone_ptr(arg: number): number {
10108                 if(!isWasmInitialized) {
10109                         throw new Error("initializeWasm() must be awaited first!");
10110                 }
10111                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone_ptr(arg);
10112                 return nativeResponseValue;
10113         }
10114         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
10115         export function CResult_PaymentSecretNoneZ_clone(orig: number): number {
10116                 if(!isWasmInitialized) {
10117                         throw new Error("initializeWasm() must be awaited first!");
10118                 }
10119                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone(orig);
10120                 return nativeResponseValue;
10121         }
10122         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
10123         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
10124                 if(!isWasmInitialized) {
10125                         throw new Error("initializeWasm() must be awaited first!");
10126                 }
10127                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_ok(encodeUint8Array(o));
10128                 return nativeResponseValue;
10129         }
10130         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
10131         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
10132                 if(!isWasmInitialized) {
10133                         throw new Error("initializeWasm() must be awaited first!");
10134                 }
10135                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_err(e);
10136                 return nativeResponseValue;
10137         }
10138         // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
10139         export function CResult_PaymentSecretAPIErrorZ_is_ok(o: number): boolean {
10140                 if(!isWasmInitialized) {
10141                         throw new Error("initializeWasm() must be awaited first!");
10142                 }
10143                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_is_ok(o);
10144                 return nativeResponseValue;
10145         }
10146         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
10147         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
10148                 if(!isWasmInitialized) {
10149                         throw new Error("initializeWasm() must be awaited first!");
10150                 }
10151                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_free(_res);
10152                 // debug statements here
10153         }
10154         // uint64_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
10155         export function CResult_PaymentSecretAPIErrorZ_clone_ptr(arg: number): number {
10156                 if(!isWasmInitialized) {
10157                         throw new Error("initializeWasm() must be awaited first!");
10158                 }
10159                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone_ptr(arg);
10160                 return nativeResponseValue;
10161         }
10162         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
10163         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
10164                 if(!isWasmInitialized) {
10165                         throw new Error("initializeWasm() must be awaited first!");
10166                 }
10167                 const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone(orig);
10168                 return nativeResponseValue;
10169         }
10170         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
10171         export function CResult_PaymentPreimageAPIErrorZ_ok(o: Uint8Array): number {
10172                 if(!isWasmInitialized) {
10173                         throw new Error("initializeWasm() must be awaited first!");
10174                 }
10175                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_ok(encodeUint8Array(o));
10176                 return nativeResponseValue;
10177         }
10178         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
10179         export function CResult_PaymentPreimageAPIErrorZ_err(e: number): number {
10180                 if(!isWasmInitialized) {
10181                         throw new Error("initializeWasm() must be awaited first!");
10182                 }
10183                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_err(e);
10184                 return nativeResponseValue;
10185         }
10186         // bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
10187         export function CResult_PaymentPreimageAPIErrorZ_is_ok(o: number): boolean {
10188                 if(!isWasmInitialized) {
10189                         throw new Error("initializeWasm() must be awaited first!");
10190                 }
10191                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_is_ok(o);
10192                 return nativeResponseValue;
10193         }
10194         // void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
10195         export function CResult_PaymentPreimageAPIErrorZ_free(_res: number): void {
10196                 if(!isWasmInitialized) {
10197                         throw new Error("initializeWasm() must be awaited first!");
10198                 }
10199                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_free(_res);
10200                 // debug statements here
10201         }
10202         // uint64_t CResult_PaymentPreimageAPIErrorZ_clone_ptr(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR arg);
10203         export function CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg: number): number {
10204                 if(!isWasmInitialized) {
10205                         throw new Error("initializeWasm() must be awaited first!");
10206                 }
10207                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg);
10208                 return nativeResponseValue;
10209         }
10210         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
10211         export function CResult_PaymentPreimageAPIErrorZ_clone(orig: number): number {
10212                 if(!isWasmInitialized) {
10213                         throw new Error("initializeWasm() must be awaited first!");
10214                 }
10215                 const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone(orig);
10216                 return nativeResponseValue;
10217         }
10218         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
10219         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
10220                 if(!isWasmInitialized) {
10221                         throw new Error("initializeWasm() must be awaited first!");
10222                 }
10223                 const nativeResponseValue = wasm.TS_CVec_ChannelMonitorZ_free(_res);
10224                 // debug statements here
10225         }
10226         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
10227         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
10228                 if(!isWasmInitialized) {
10229                         throw new Error("initializeWasm() must be awaited first!");
10230                 }
10231                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_new(encodeUint8Array(a), b);
10232                 return nativeResponseValue;
10233         }
10234         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
10235         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
10236                 if(!isWasmInitialized) {
10237                         throw new Error("initializeWasm() must be awaited first!");
10238                 }
10239                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_free(_res);
10240                 // debug statements here
10241         }
10242         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
10243         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
10244                 if(!isWasmInitialized) {
10245                         throw new Error("initializeWasm() must be awaited first!");
10246                 }
10247                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
10248                 return nativeResponseValue;
10249         }
10250         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
10251         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
10252                 if(!isWasmInitialized) {
10253                         throw new Error("initializeWasm() must be awaited first!");
10254                 }
10255                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
10256                 return nativeResponseValue;
10257         }
10258         // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
10259         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o: number): boolean {
10260                 if(!isWasmInitialized) {
10261                         throw new Error("initializeWasm() must be awaited first!");
10262                 }
10263                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o);
10264                 return nativeResponseValue;
10265         }
10266         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
10267         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
10268                 if(!isWasmInitialized) {
10269                         throw new Error("initializeWasm() must be awaited first!");
10270                 }
10271                 const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
10272                 // debug statements here
10273         }
10274         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
10275         export function PaymentPurpose_free(this_ptr: number): void {
10276                 if(!isWasmInitialized) {
10277                         throw new Error("initializeWasm() must be awaited first!");
10278                 }
10279                 const nativeResponseValue = wasm.TS_PaymentPurpose_free(this_ptr);
10280                 // debug statements here
10281         }
10282         // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
10283         export function PaymentPurpose_clone_ptr(arg: number): number {
10284                 if(!isWasmInitialized) {
10285                         throw new Error("initializeWasm() must be awaited first!");
10286                 }
10287                 const nativeResponseValue = wasm.TS_PaymentPurpose_clone_ptr(arg);
10288                 return nativeResponseValue;
10289         }
10290         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
10291         export function PaymentPurpose_clone(orig: number): number {
10292                 if(!isWasmInitialized) {
10293                         throw new Error("initializeWasm() must be awaited first!");
10294                 }
10295                 const nativeResponseValue = wasm.TS_PaymentPurpose_clone(orig);
10296                 return nativeResponseValue;
10297         }
10298         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret);
10299         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array): number {
10300                 if(!isWasmInitialized) {
10301                         throw new Error("initializeWasm() must be awaited first!");
10302                 }
10303                 const nativeResponseValue = wasm.TS_PaymentPurpose_invoice_payment(encodeUint8Array(payment_preimage), encodeUint8Array(payment_secret));
10304                 return nativeResponseValue;
10305         }
10306         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
10307         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
10308                 if(!isWasmInitialized) {
10309                         throw new Error("initializeWasm() must be awaited first!");
10310                 }
10311                 const nativeResponseValue = wasm.TS_PaymentPurpose_spontaneous_payment(encodeUint8Array(a));
10312                 return nativeResponseValue;
10313         }
10314         // void ClosureReason_free(struct LDKClosureReason this_ptr);
10315         export function ClosureReason_free(this_ptr: number): void {
10316                 if(!isWasmInitialized) {
10317                         throw new Error("initializeWasm() must be awaited first!");
10318                 }
10319                 const nativeResponseValue = wasm.TS_ClosureReason_free(this_ptr);
10320                 // debug statements here
10321         }
10322         // uint64_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
10323         export function ClosureReason_clone_ptr(arg: number): number {
10324                 if(!isWasmInitialized) {
10325                         throw new Error("initializeWasm() must be awaited first!");
10326                 }
10327                 const nativeResponseValue = wasm.TS_ClosureReason_clone_ptr(arg);
10328                 return nativeResponseValue;
10329         }
10330         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
10331         export function ClosureReason_clone(orig: number): number {
10332                 if(!isWasmInitialized) {
10333                         throw new Error("initializeWasm() must be awaited first!");
10334                 }
10335                 const nativeResponseValue = wasm.TS_ClosureReason_clone(orig);
10336                 return nativeResponseValue;
10337         }
10338         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
10339         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
10340                 if(!isWasmInitialized) {
10341                         throw new Error("initializeWasm() must be awaited first!");
10342                 }
10343                 const nativeResponseValue = wasm.TS_ClosureReason_counterparty_force_closed(peer_msg);
10344                 return nativeResponseValue;
10345         }
10346         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
10347         export function ClosureReason_holder_force_closed(): number {
10348                 if(!isWasmInitialized) {
10349                         throw new Error("initializeWasm() must be awaited first!");
10350                 }
10351                 const nativeResponseValue = wasm.TS_ClosureReason_holder_force_closed();
10352                 return nativeResponseValue;
10353         }
10354         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
10355         export function ClosureReason_cooperative_closure(): number {
10356                 if(!isWasmInitialized) {
10357                         throw new Error("initializeWasm() must be awaited first!");
10358                 }
10359                 const nativeResponseValue = wasm.TS_ClosureReason_cooperative_closure();
10360                 return nativeResponseValue;
10361         }
10362         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
10363         export function ClosureReason_commitment_tx_confirmed(): number {
10364                 if(!isWasmInitialized) {
10365                         throw new Error("initializeWasm() must be awaited first!");
10366                 }
10367                 const nativeResponseValue = wasm.TS_ClosureReason_commitment_tx_confirmed();
10368                 return nativeResponseValue;
10369         }
10370         // struct LDKClosureReason ClosureReason_funding_timed_out(void);
10371         export function ClosureReason_funding_timed_out(): number {
10372                 if(!isWasmInitialized) {
10373                         throw new Error("initializeWasm() must be awaited first!");
10374                 }
10375                 const nativeResponseValue = wasm.TS_ClosureReason_funding_timed_out();
10376                 return nativeResponseValue;
10377         }
10378         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
10379         export function ClosureReason_processing_error(err: String): number {
10380                 if(!isWasmInitialized) {
10381                         throw new Error("initializeWasm() must be awaited first!");
10382                 }
10383                 const nativeResponseValue = wasm.TS_ClosureReason_processing_error(err);
10384                 return nativeResponseValue;
10385         }
10386         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
10387         export function ClosureReason_disconnected_peer(): number {
10388                 if(!isWasmInitialized) {
10389                         throw new Error("initializeWasm() must be awaited first!");
10390                 }
10391                 const nativeResponseValue = wasm.TS_ClosureReason_disconnected_peer();
10392                 return nativeResponseValue;
10393         }
10394         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
10395         export function ClosureReason_outdated_channel_manager(): number {
10396                 if(!isWasmInitialized) {
10397                         throw new Error("initializeWasm() must be awaited first!");
10398                 }
10399                 const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
10400                 return nativeResponseValue;
10401         }
10402         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
10403         export function ClosureReason_write(obj: number): Uint8Array {
10404                 if(!isWasmInitialized) {
10405                         throw new Error("initializeWasm() must be awaited first!");
10406                 }
10407                 const nativeResponseValue = wasm.TS_ClosureReason_write(obj);
10408                 return decodeUint8Array(nativeResponseValue);
10409         }
10410         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
10411         export function ClosureReason_read(ser: Uint8Array): number {
10412                 if(!isWasmInitialized) {
10413                         throw new Error("initializeWasm() must be awaited first!");
10414                 }
10415                 const nativeResponseValue = wasm.TS_ClosureReason_read(encodeUint8Array(ser));
10416                 return nativeResponseValue;
10417         }
10418         // void Event_free(struct LDKEvent this_ptr);
10419         export function Event_free(this_ptr: number): void {
10420                 if(!isWasmInitialized) {
10421                         throw new Error("initializeWasm() must be awaited first!");
10422                 }
10423                 const nativeResponseValue = wasm.TS_Event_free(this_ptr);
10424                 // debug statements here
10425         }
10426         // uint64_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
10427         export function Event_clone_ptr(arg: number): number {
10428                 if(!isWasmInitialized) {
10429                         throw new Error("initializeWasm() must be awaited first!");
10430                 }
10431                 const nativeResponseValue = wasm.TS_Event_clone_ptr(arg);
10432                 return nativeResponseValue;
10433         }
10434         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
10435         export function Event_clone(orig: number): number {
10436                 if(!isWasmInitialized) {
10437                         throw new Error("initializeWasm() must be awaited first!");
10438                 }
10439                 const nativeResponseValue = wasm.TS_Event_clone(orig);
10440                 return nativeResponseValue;
10441         }
10442         // 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);
10443         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
10444                 if(!isWasmInitialized) {
10445                         throw new Error("initializeWasm() must be awaited first!");
10446                 }
10447                 const nativeResponseValue = wasm.TS_Event_funding_generation_ready(encodeUint8Array(temporary_channel_id), channel_value_satoshis, encodeUint8Array(output_script), user_channel_id);
10448                 return nativeResponseValue;
10449         }
10450         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
10451         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
10452                 if(!isWasmInitialized) {
10453                         throw new Error("initializeWasm() must be awaited first!");
10454                 }
10455                 const nativeResponseValue = wasm.TS_Event_payment_received(encodeUint8Array(payment_hash), amt, purpose);
10456                 return nativeResponseValue;
10457         }
10458         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
10459         export function Event_payment_sent(payment_id: Uint8Array, payment_preimage: Uint8Array, payment_hash: Uint8Array, fee_paid_msat: number): number {
10460                 if(!isWasmInitialized) {
10461                         throw new Error("initializeWasm() must be awaited first!");
10462                 }
10463                 const nativeResponseValue = wasm.TS_Event_payment_sent(encodeUint8Array(payment_id), encodeUint8Array(payment_preimage), encodeUint8Array(payment_hash), fee_paid_msat);
10464                 return nativeResponseValue;
10465         }
10466         // 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);
10467         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 {
10468                 if(!isWasmInitialized) {
10469                         throw new Error("initializeWasm() must be awaited first!");
10470                 }
10471                 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);
10472                 return nativeResponseValue;
10473         }
10474         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
10475         export function Event_payment_failed(payment_id: Uint8Array, payment_hash: Uint8Array): number {
10476                 if(!isWasmInitialized) {
10477                         throw new Error("initializeWasm() must be awaited first!");
10478                 }
10479                 const nativeResponseValue = wasm.TS_Event_payment_failed(encodeUint8Array(payment_id), encodeUint8Array(payment_hash));
10480                 return nativeResponseValue;
10481         }
10482         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
10483         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
10484                 if(!isWasmInitialized) {
10485                         throw new Error("initializeWasm() must be awaited first!");
10486                 }
10487                 const nativeResponseValue = wasm.TS_Event_pending_htlcs_forwardable(time_forwardable);
10488                 return nativeResponseValue;
10489         }
10490         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
10491         export function Event_spendable_outputs(outputs: number[]): number {
10492                 if(!isWasmInitialized) {
10493                         throw new Error("initializeWasm() must be awaited first!");
10494                 }
10495                 const nativeResponseValue = wasm.TS_Event_spendable_outputs(outputs);
10496                 return nativeResponseValue;
10497         }
10498         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
10499         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
10500                 if(!isWasmInitialized) {
10501                         throw new Error("initializeWasm() must be awaited first!");
10502                 }
10503                 const nativeResponseValue = wasm.TS_Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
10504                 return nativeResponseValue;
10505         }
10506         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
10507         export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
10508                 if(!isWasmInitialized) {
10509                         throw new Error("initializeWasm() must be awaited first!");
10510                 }
10511                 const nativeResponseValue = wasm.TS_Event_channel_closed(encodeUint8Array(channel_id), user_channel_id, reason);
10512                 return nativeResponseValue;
10513         }
10514         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
10515         export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
10516                 if(!isWasmInitialized) {
10517                         throw new Error("initializeWasm() must be awaited first!");
10518                 }
10519                 const nativeResponseValue = wasm.TS_Event_discard_funding(encodeUint8Array(channel_id), encodeUint8Array(transaction));
10520                 return nativeResponseValue;
10521         }
10522         // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
10523         export function Event_payment_path_successful(payment_id: Uint8Array, payment_hash: Uint8Array, path: number[]): number {
10524                 if(!isWasmInitialized) {
10525                         throw new Error("initializeWasm() must be awaited first!");
10526                 }
10527                 const nativeResponseValue = wasm.TS_Event_payment_path_successful(encodeUint8Array(payment_id), encodeUint8Array(payment_hash), path);
10528                 return nativeResponseValue;
10529         }
10530         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
10531         export function Event_write(obj: number): Uint8Array {
10532                 if(!isWasmInitialized) {
10533                         throw new Error("initializeWasm() must be awaited first!");
10534                 }
10535                 const nativeResponseValue = wasm.TS_Event_write(obj);
10536                 return decodeUint8Array(nativeResponseValue);
10537         }
10538         // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
10539         export function Event_read(ser: Uint8Array): number {
10540                 if(!isWasmInitialized) {
10541                         throw new Error("initializeWasm() must be awaited first!");
10542                 }
10543                 const nativeResponseValue = wasm.TS_Event_read(encodeUint8Array(ser));
10544                 return nativeResponseValue;
10545         }
10546         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
10547         export function MessageSendEvent_free(this_ptr: number): void {
10548                 if(!isWasmInitialized) {
10549                         throw new Error("initializeWasm() must be awaited first!");
10550                 }
10551                 const nativeResponseValue = wasm.TS_MessageSendEvent_free(this_ptr);
10552                 // debug statements here
10553         }
10554         // uint64_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
10555         export function MessageSendEvent_clone_ptr(arg: number): number {
10556                 if(!isWasmInitialized) {
10557                         throw new Error("initializeWasm() must be awaited first!");
10558                 }
10559                 const nativeResponseValue = wasm.TS_MessageSendEvent_clone_ptr(arg);
10560                 return nativeResponseValue;
10561         }
10562         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
10563         export function MessageSendEvent_clone(orig: number): number {
10564                 if(!isWasmInitialized) {
10565                         throw new Error("initializeWasm() must be awaited first!");
10566                 }
10567                 const nativeResponseValue = wasm.TS_MessageSendEvent_clone(orig);
10568                 return nativeResponseValue;
10569         }
10570         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
10571         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
10572                 if(!isWasmInitialized) {
10573                         throw new Error("initializeWasm() must be awaited first!");
10574                 }
10575                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_accept_channel(encodeUint8Array(node_id), msg);
10576                 return nativeResponseValue;
10577         }
10578         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
10579         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
10580                 if(!isWasmInitialized) {
10581                         throw new Error("initializeWasm() must be awaited first!");
10582                 }
10583                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_open_channel(encodeUint8Array(node_id), msg);
10584                 return nativeResponseValue;
10585         }
10586         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
10587         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
10588                 if(!isWasmInitialized) {
10589                         throw new Error("initializeWasm() must be awaited first!");
10590                 }
10591                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_created(encodeUint8Array(node_id), msg);
10592                 return nativeResponseValue;
10593         }
10594         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
10595         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
10596                 if(!isWasmInitialized) {
10597                         throw new Error("initializeWasm() must be awaited first!");
10598                 }
10599                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_signed(encodeUint8Array(node_id), msg);
10600                 return nativeResponseValue;
10601         }
10602         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
10603         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
10604                 if(!isWasmInitialized) {
10605                         throw new Error("initializeWasm() must be awaited first!");
10606                 }
10607                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_locked(encodeUint8Array(node_id), msg);
10608                 return nativeResponseValue;
10609         }
10610         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
10611         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
10612                 if(!isWasmInitialized) {
10613                         throw new Error("initializeWasm() must be awaited first!");
10614                 }
10615                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_announcement_signatures(encodeUint8Array(node_id), msg);
10616                 return nativeResponseValue;
10617         }
10618         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
10619         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
10620                 if(!isWasmInitialized) {
10621                         throw new Error("initializeWasm() must be awaited first!");
10622                 }
10623                 const nativeResponseValue = wasm.TS_MessageSendEvent_update_htlcs(encodeUint8Array(node_id), updates);
10624                 return nativeResponseValue;
10625         }
10626         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
10627         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
10628                 if(!isWasmInitialized) {
10629                         throw new Error("initializeWasm() must be awaited first!");
10630                 }
10631                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_revoke_and_ack(encodeUint8Array(node_id), msg);
10632                 return nativeResponseValue;
10633         }
10634         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
10635         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
10636                 if(!isWasmInitialized) {
10637                         throw new Error("initializeWasm() must be awaited first!");
10638                 }
10639                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_closing_signed(encodeUint8Array(node_id), msg);
10640                 return nativeResponseValue;
10641         }
10642         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
10643         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
10644                 if(!isWasmInitialized) {
10645                         throw new Error("initializeWasm() must be awaited first!");
10646                 }
10647                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_shutdown(encodeUint8Array(node_id), msg);
10648                 return nativeResponseValue;
10649         }
10650         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
10651         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
10652                 if(!isWasmInitialized) {
10653                         throw new Error("initializeWasm() must be awaited first!");
10654                 }
10655                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_reestablish(encodeUint8Array(node_id), msg);
10656                 return nativeResponseValue;
10657         }
10658         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
10659         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
10660                 if(!isWasmInitialized) {
10661                         throw new Error("initializeWasm() must be awaited first!");
10662                 }
10663                 const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
10664                 return nativeResponseValue;
10665         }
10666         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
10667         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
10668                 if(!isWasmInitialized) {
10669                         throw new Error("initializeWasm() must be awaited first!");
10670                 }
10671                 const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_node_announcement(msg);
10672                 return nativeResponseValue;
10673         }
10674         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
10675         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
10676                 if(!isWasmInitialized) {
10677                         throw new Error("initializeWasm() must be awaited first!");
10678                 }
10679                 const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_update(msg);
10680                 return nativeResponseValue;
10681         }
10682         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
10683         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
10684                 if(!isWasmInitialized) {
10685                         throw new Error("initializeWasm() must be awaited first!");
10686                 }
10687                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_update(encodeUint8Array(node_id), msg);
10688                 return nativeResponseValue;
10689         }
10690         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
10691         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
10692                 if(!isWasmInitialized) {
10693                         throw new Error("initializeWasm() must be awaited first!");
10694                 }
10695                 const nativeResponseValue = wasm.TS_MessageSendEvent_handle_error(encodeUint8Array(node_id), action);
10696                 return nativeResponseValue;
10697         }
10698         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
10699         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
10700                 if(!isWasmInitialized) {
10701                         throw new Error("initializeWasm() must be awaited first!");
10702                 }
10703                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_range_query(encodeUint8Array(node_id), msg);
10704                 return nativeResponseValue;
10705         }
10706         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
10707         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
10708                 if(!isWasmInitialized) {
10709                         throw new Error("initializeWasm() must be awaited first!");
10710                 }
10711                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_short_ids_query(encodeUint8Array(node_id), msg);
10712                 return nativeResponseValue;
10713         }
10714         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
10715         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
10716                 if(!isWasmInitialized) {
10717                         throw new Error("initializeWasm() must be awaited first!");
10718                 }
10719                 const nativeResponseValue = wasm.TS_MessageSendEvent_send_reply_channel_range(encodeUint8Array(node_id), msg);
10720                 return nativeResponseValue;
10721         }
10722         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
10723         export function MessageSendEventsProvider_free(this_ptr: number): void {
10724                 if(!isWasmInitialized) {
10725                         throw new Error("initializeWasm() must be awaited first!");
10726                 }
10727                 const nativeResponseValue = wasm.TS_MessageSendEventsProvider_free(this_ptr);
10728                 // debug statements here
10729         }
10730         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
10731         export function EventsProvider_free(this_ptr: number): void {
10732                 if(!isWasmInitialized) {
10733                         throw new Error("initializeWasm() must be awaited first!");
10734                 }
10735                 const nativeResponseValue = wasm.TS_EventsProvider_free(this_ptr);
10736                 // debug statements here
10737         }
10738         // void EventHandler_free(struct LDKEventHandler this_ptr);
10739         export function EventHandler_free(this_ptr: number): void {
10740                 if(!isWasmInitialized) {
10741                         throw new Error("initializeWasm() must be awaited first!");
10742                 }
10743                 const nativeResponseValue = wasm.TS_EventHandler_free(this_ptr);
10744                 // debug statements here
10745         }
10746         // void APIError_free(struct LDKAPIError this_ptr);
10747         export function APIError_free(this_ptr: number): void {
10748                 if(!isWasmInitialized) {
10749                         throw new Error("initializeWasm() must be awaited first!");
10750                 }
10751                 const nativeResponseValue = wasm.TS_APIError_free(this_ptr);
10752                 // debug statements here
10753         }
10754         // uint64_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
10755         export function APIError_clone_ptr(arg: number): number {
10756                 if(!isWasmInitialized) {
10757                         throw new Error("initializeWasm() must be awaited first!");
10758                 }
10759                 const nativeResponseValue = wasm.TS_APIError_clone_ptr(arg);
10760                 return nativeResponseValue;
10761         }
10762         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
10763         export function APIError_clone(orig: number): number {
10764                 if(!isWasmInitialized) {
10765                         throw new Error("initializeWasm() must be awaited first!");
10766                 }
10767                 const nativeResponseValue = wasm.TS_APIError_clone(orig);
10768                 return nativeResponseValue;
10769         }
10770         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
10771         export function APIError_apimisuse_error(err: String): number {
10772                 if(!isWasmInitialized) {
10773                         throw new Error("initializeWasm() must be awaited first!");
10774                 }
10775                 const nativeResponseValue = wasm.TS_APIError_apimisuse_error(err);
10776                 return nativeResponseValue;
10777         }
10778         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
10779         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
10780                 if(!isWasmInitialized) {
10781                         throw new Error("initializeWasm() must be awaited first!");
10782                 }
10783                 const nativeResponseValue = wasm.TS_APIError_fee_rate_too_high(err, feerate);
10784                 return nativeResponseValue;
10785         }
10786         // struct LDKAPIError APIError_route_error(struct LDKStr err);
10787         export function APIError_route_error(err: String): number {
10788                 if(!isWasmInitialized) {
10789                         throw new Error("initializeWasm() must be awaited first!");
10790                 }
10791                 const nativeResponseValue = wasm.TS_APIError_route_error(err);
10792                 return nativeResponseValue;
10793         }
10794         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
10795         export function APIError_channel_unavailable(err: String): number {
10796                 if(!isWasmInitialized) {
10797                         throw new Error("initializeWasm() must be awaited first!");
10798                 }
10799                 const nativeResponseValue = wasm.TS_APIError_channel_unavailable(err);
10800                 return nativeResponseValue;
10801         }
10802         // struct LDKAPIError APIError_monitor_update_failed(void);
10803         export function APIError_monitor_update_failed(): number {
10804                 if(!isWasmInitialized) {
10805                         throw new Error("initializeWasm() must be awaited first!");
10806                 }
10807                 const nativeResponseValue = wasm.TS_APIError_monitor_update_failed();
10808                 return nativeResponseValue;
10809         }
10810         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
10811         export function APIError_incompatible_shutdown_script(script: number): number {
10812                 if(!isWasmInitialized) {
10813                         throw new Error("initializeWasm() must be awaited first!");
10814                 }
10815                 const nativeResponseValue = wasm.TS_APIError_incompatible_shutdown_script(script);
10816                 return nativeResponseValue;
10817         }
10818         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
10819         export function sign(msg: Uint8Array, sk: Uint8Array): number {
10820                 if(!isWasmInitialized) {
10821                         throw new Error("initializeWasm() must be awaited first!");
10822                 }
10823                 const nativeResponseValue = wasm.TS_sign(encodeUint8Array(msg), encodeUint8Array(sk));
10824                 return nativeResponseValue;
10825         }
10826         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
10827         export function recover_pk(msg: Uint8Array, sig: String): number {
10828                 if(!isWasmInitialized) {
10829                         throw new Error("initializeWasm() must be awaited first!");
10830                 }
10831                 const nativeResponseValue = wasm.TS_recover_pk(encodeUint8Array(msg), sig);
10832                 return nativeResponseValue;
10833         }
10834         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
10835         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
10836                 if(!isWasmInitialized) {
10837                         throw new Error("initializeWasm() must be awaited first!");
10838                 }
10839                 const nativeResponseValue = wasm.TS_verify(encodeUint8Array(msg), sig, encodeUint8Array(pk));
10840                 return nativeResponseValue;
10841         }
10842         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
10843         export function Level_clone(orig: number): Level {
10844                 if(!isWasmInitialized) {
10845                         throw new Error("initializeWasm() must be awaited first!");
10846                 }
10847                 const nativeResponseValue = wasm.TS_Level_clone(orig);
10848                 return nativeResponseValue;
10849         }
10850         // enum LDKLevel Level_gossip(void);
10851         export function Level_gossip(): Level {
10852                 if(!isWasmInitialized) {
10853                         throw new Error("initializeWasm() must be awaited first!");
10854                 }
10855                 const nativeResponseValue = wasm.TS_Level_gossip();
10856                 return nativeResponseValue;
10857         }
10858         // enum LDKLevel Level_trace(void);
10859         export function Level_trace(): Level {
10860                 if(!isWasmInitialized) {
10861                         throw new Error("initializeWasm() must be awaited first!");
10862                 }
10863                 const nativeResponseValue = wasm.TS_Level_trace();
10864                 return nativeResponseValue;
10865         }
10866         // enum LDKLevel Level_debug(void);
10867         export function Level_debug(): Level {
10868                 if(!isWasmInitialized) {
10869                         throw new Error("initializeWasm() must be awaited first!");
10870                 }
10871                 const nativeResponseValue = wasm.TS_Level_debug();
10872                 return nativeResponseValue;
10873         }
10874         // enum LDKLevel Level_info(void);
10875         export function Level_info(): Level {
10876                 if(!isWasmInitialized) {
10877                         throw new Error("initializeWasm() must be awaited first!");
10878                 }
10879                 const nativeResponseValue = wasm.TS_Level_info();
10880                 return nativeResponseValue;
10881         }
10882         // enum LDKLevel Level_warn(void);
10883         export function Level_warn(): Level {
10884                 if(!isWasmInitialized) {
10885                         throw new Error("initializeWasm() must be awaited first!");
10886                 }
10887                 const nativeResponseValue = wasm.TS_Level_warn();
10888                 return nativeResponseValue;
10889         }
10890         // enum LDKLevel Level_error(void);
10891         export function Level_error(): Level {
10892                 if(!isWasmInitialized) {
10893                         throw new Error("initializeWasm() must be awaited first!");
10894                 }
10895                 const nativeResponseValue = wasm.TS_Level_error();
10896                 return nativeResponseValue;
10897         }
10898         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
10899         export function Level_eq(a: number, b: number): boolean {
10900                 if(!isWasmInitialized) {
10901                         throw new Error("initializeWasm() must be awaited first!");
10902                 }
10903                 const nativeResponseValue = wasm.TS_Level_eq(a, b);
10904                 return nativeResponseValue;
10905         }
10906         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
10907         export function Level_hash(o: number): number {
10908                 if(!isWasmInitialized) {
10909                         throw new Error("initializeWasm() must be awaited first!");
10910                 }
10911                 const nativeResponseValue = wasm.TS_Level_hash(o);
10912                 return nativeResponseValue;
10913         }
10914         // MUST_USE_RES enum LDKLevel Level_max(void);
10915         export function Level_max(): Level {
10916                 if(!isWasmInitialized) {
10917                         throw new Error("initializeWasm() must be awaited first!");
10918                 }
10919                 const nativeResponseValue = wasm.TS_Level_max();
10920                 return nativeResponseValue;
10921         }
10922         // void Record_free(struct LDKRecord this_obj);
10923         export function Record_free(this_obj: number): void {
10924                 if(!isWasmInitialized) {
10925                         throw new Error("initializeWasm() must be awaited first!");
10926                 }
10927                 const nativeResponseValue = wasm.TS_Record_free(this_obj);
10928                 // debug statements here
10929         }
10930         // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
10931         export function Record_get_level(this_ptr: number): Level {
10932                 if(!isWasmInitialized) {
10933                         throw new Error("initializeWasm() must be awaited first!");
10934                 }
10935                 const nativeResponseValue = wasm.TS_Record_get_level(this_ptr);
10936                 return nativeResponseValue;
10937         }
10938         // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
10939         export function Record_set_level(this_ptr: number, val: Level): void {
10940                 if(!isWasmInitialized) {
10941                         throw new Error("initializeWasm() must be awaited first!");
10942                 }
10943                 const nativeResponseValue = wasm.TS_Record_set_level(this_ptr, val);
10944                 // debug statements here
10945         }
10946         // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
10947         export function Record_get_args(this_ptr: number): String {
10948                 if(!isWasmInitialized) {
10949                         throw new Error("initializeWasm() must be awaited first!");
10950                 }
10951                 const nativeResponseValue = wasm.TS_Record_get_args(this_ptr);
10952                 return nativeResponseValue;
10953         }
10954         // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10955         export function Record_set_args(this_ptr: number, val: String): void {
10956                 if(!isWasmInitialized) {
10957                         throw new Error("initializeWasm() must be awaited first!");
10958                 }
10959                 const nativeResponseValue = wasm.TS_Record_set_args(this_ptr, val);
10960                 // debug statements here
10961         }
10962         // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
10963         export function Record_get_module_path(this_ptr: number): String {
10964                 if(!isWasmInitialized) {
10965                         throw new Error("initializeWasm() must be awaited first!");
10966                 }
10967                 const nativeResponseValue = wasm.TS_Record_get_module_path(this_ptr);
10968                 return nativeResponseValue;
10969         }
10970         // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10971         export function Record_set_module_path(this_ptr: number, val: String): void {
10972                 if(!isWasmInitialized) {
10973                         throw new Error("initializeWasm() must be awaited first!");
10974                 }
10975                 const nativeResponseValue = wasm.TS_Record_set_module_path(this_ptr, val);
10976                 // debug statements here
10977         }
10978         // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
10979         export function Record_get_file(this_ptr: number): String {
10980                 if(!isWasmInitialized) {
10981                         throw new Error("initializeWasm() must be awaited first!");
10982                 }
10983                 const nativeResponseValue = wasm.TS_Record_get_file(this_ptr);
10984                 return nativeResponseValue;
10985         }
10986         // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
10987         export function Record_set_file(this_ptr: number, val: String): void {
10988                 if(!isWasmInitialized) {
10989                         throw new Error("initializeWasm() must be awaited first!");
10990                 }
10991                 const nativeResponseValue = wasm.TS_Record_set_file(this_ptr, val);
10992                 // debug statements here
10993         }
10994         // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
10995         export function Record_get_line(this_ptr: number): number {
10996                 if(!isWasmInitialized) {
10997                         throw new Error("initializeWasm() must be awaited first!");
10998                 }
10999                 const nativeResponseValue = wasm.TS_Record_get_line(this_ptr);
11000                 return nativeResponseValue;
11001         }
11002         // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
11003         export function Record_set_line(this_ptr: number, val: number): void {
11004                 if(!isWasmInitialized) {
11005                         throw new Error("initializeWasm() must be awaited first!");
11006                 }
11007                 const nativeResponseValue = wasm.TS_Record_set_line(this_ptr, val);
11008                 // debug statements here
11009         }
11010         // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
11011         export function Record_clone_ptr(arg: number): number {
11012                 if(!isWasmInitialized) {
11013                         throw new Error("initializeWasm() must be awaited first!");
11014                 }
11015                 const nativeResponseValue = wasm.TS_Record_clone_ptr(arg);
11016                 return nativeResponseValue;
11017         }
11018         // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
11019         export function Record_clone(orig: number): number {
11020                 if(!isWasmInitialized) {
11021                         throw new Error("initializeWasm() must be awaited first!");
11022                 }
11023                 const nativeResponseValue = wasm.TS_Record_clone(orig);
11024                 return nativeResponseValue;
11025         }
11026         // void Logger_free(struct LDKLogger this_ptr);
11027         export function Logger_free(this_ptr: number): void {
11028                 if(!isWasmInitialized) {
11029                         throw new Error("initializeWasm() must be awaited first!");
11030                 }
11031                 const nativeResponseValue = wasm.TS_Logger_free(this_ptr);
11032                 // debug statements here
11033         }
11034         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
11035         export function ChannelHandshakeConfig_free(this_obj: number): void {
11036                 if(!isWasmInitialized) {
11037                         throw new Error("initializeWasm() must be awaited first!");
11038                 }
11039                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_free(this_obj);
11040                 // debug statements here
11041         }
11042         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11043         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
11044                 if(!isWasmInitialized) {
11045                         throw new Error("initializeWasm() must be awaited first!");
11046                 }
11047                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_minimum_depth(this_ptr);
11048                 return nativeResponseValue;
11049         }
11050         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
11051         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
11052                 if(!isWasmInitialized) {
11053                         throw new Error("initializeWasm() must be awaited first!");
11054                 }
11055                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
11056                 // debug statements here
11057         }
11058         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11059         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
11060                 if(!isWasmInitialized) {
11061                         throw new Error("initializeWasm() must be awaited first!");
11062                 }
11063                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
11064                 return nativeResponseValue;
11065         }
11066         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
11067         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
11068                 if(!isWasmInitialized) {
11069                         throw new Error("initializeWasm() must be awaited first!");
11070                 }
11071                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
11072                 // debug statements here
11073         }
11074         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11075         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
11076                 if(!isWasmInitialized) {
11077                         throw new Error("initializeWasm() must be awaited first!");
11078                 }
11079                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
11080                 return nativeResponseValue;
11081         }
11082         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
11083         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
11084                 if(!isWasmInitialized) {
11085                         throw new Error("initializeWasm() must be awaited first!");
11086                 }
11087                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
11088                 // debug statements here
11089         }
11090         // 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);
11091         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
11092                 if(!isWasmInitialized) {
11093                         throw new Error("initializeWasm() must be awaited first!");
11094                 }
11095                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
11096                 return nativeResponseValue;
11097         }
11098         // uint64_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
11099         export function ChannelHandshakeConfig_clone_ptr(arg: number): number {
11100                 if(!isWasmInitialized) {
11101                         throw new Error("initializeWasm() must be awaited first!");
11102                 }
11103                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone_ptr(arg);
11104                 return nativeResponseValue;
11105         }
11106         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
11107         export function ChannelHandshakeConfig_clone(orig: number): number {
11108                 if(!isWasmInitialized) {
11109                         throw new Error("initializeWasm() must be awaited first!");
11110                 }
11111                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone(orig);
11112                 return nativeResponseValue;
11113         }
11114         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
11115         export function ChannelHandshakeConfig_default(): number {
11116                 if(!isWasmInitialized) {
11117                         throw new Error("initializeWasm() must be awaited first!");
11118                 }
11119                 const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_default();
11120                 return nativeResponseValue;
11121         }
11122         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
11123         export function ChannelHandshakeLimits_free(this_obj: number): void {
11124                 if(!isWasmInitialized) {
11125                         throw new Error("initializeWasm() must be awaited first!");
11126                 }
11127                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_free(this_obj);
11128                 // debug statements here
11129         }
11130         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11131         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
11132                 if(!isWasmInitialized) {
11133                         throw new Error("initializeWasm() must be awaited first!");
11134                 }
11135                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
11136                 return nativeResponseValue;
11137         }
11138         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11139         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
11140                 if(!isWasmInitialized) {
11141                         throw new Error("initializeWasm() must be awaited first!");
11142                 }
11143                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
11144                 // debug statements here
11145         }
11146         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11147         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
11148                 if(!isWasmInitialized) {
11149                         throw new Error("initializeWasm() must be awaited first!");
11150                 }
11151                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
11152                 return nativeResponseValue;
11153         }
11154         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11155         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
11156                 if(!isWasmInitialized) {
11157                         throw new Error("initializeWasm() must be awaited first!");
11158                 }
11159                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
11160                 // debug statements here
11161         }
11162         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11163         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
11164                 if(!isWasmInitialized) {
11165                         throw new Error("initializeWasm() must be awaited first!");
11166                 }
11167                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
11168                 return nativeResponseValue;
11169         }
11170         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11171         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
11172                 if(!isWasmInitialized) {
11173                         throw new Error("initializeWasm() must be awaited first!");
11174                 }
11175                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
11176                 // debug statements here
11177         }
11178         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11179         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
11180                 if(!isWasmInitialized) {
11181                         throw new Error("initializeWasm() must be awaited first!");
11182                 }
11183                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
11184                 return nativeResponseValue;
11185         }
11186         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11187         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
11188                 if(!isWasmInitialized) {
11189                         throw new Error("initializeWasm() must be awaited first!");
11190                 }
11191                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
11192                 // debug statements here
11193         }
11194         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11195         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
11196                 if(!isWasmInitialized) {
11197                         throw new Error("initializeWasm() must be awaited first!");
11198                 }
11199                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
11200                 return nativeResponseValue;
11201         }
11202         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
11203         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
11204                 if(!isWasmInitialized) {
11205                         throw new Error("initializeWasm() must be awaited first!");
11206                 }
11207                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
11208                 // debug statements here
11209         }
11210         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11211         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
11212                 if(!isWasmInitialized) {
11213                         throw new Error("initializeWasm() must be awaited first!");
11214                 }
11215                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
11216                 return nativeResponseValue;
11217         }
11218         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
11219         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
11220                 if(!isWasmInitialized) {
11221                         throw new Error("initializeWasm() must be awaited first!");
11222                 }
11223                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
11224                 // debug statements here
11225         }
11226         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11227         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
11228                 if(!isWasmInitialized) {
11229                         throw new Error("initializeWasm() must be awaited first!");
11230                 }
11231                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
11232                 return nativeResponseValue;
11233         }
11234         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
11235         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
11236                 if(!isWasmInitialized) {
11237                         throw new Error("initializeWasm() must be awaited first!");
11238                 }
11239                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
11240                 // debug statements here
11241         }
11242         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11243         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
11244                 if(!isWasmInitialized) {
11245                         throw new Error("initializeWasm() must be awaited first!");
11246                 }
11247                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
11248                 return nativeResponseValue;
11249         }
11250         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
11251         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
11252                 if(!isWasmInitialized) {
11253                         throw new Error("initializeWasm() must be awaited first!");
11254                 }
11255                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
11256                 // debug statements here
11257         }
11258         // 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);
11259         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 {
11260                 if(!isWasmInitialized) {
11261                         throw new Error("initializeWasm() must be awaited first!");
11262                 }
11263                 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);
11264                 return nativeResponseValue;
11265         }
11266         // uint64_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
11267         export function ChannelHandshakeLimits_clone_ptr(arg: number): number {
11268                 if(!isWasmInitialized) {
11269                         throw new Error("initializeWasm() must be awaited first!");
11270                 }
11271                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone_ptr(arg);
11272                 return nativeResponseValue;
11273         }
11274         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
11275         export function ChannelHandshakeLimits_clone(orig: number): number {
11276                 if(!isWasmInitialized) {
11277                         throw new Error("initializeWasm() must be awaited first!");
11278                 }
11279                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone(orig);
11280                 return nativeResponseValue;
11281         }
11282         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
11283         export function ChannelHandshakeLimits_default(): number {
11284                 if(!isWasmInitialized) {
11285                         throw new Error("initializeWasm() must be awaited first!");
11286                 }
11287                 const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_default();
11288                 return nativeResponseValue;
11289         }
11290         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
11291         export function ChannelConfig_free(this_obj: number): void {
11292                 if(!isWasmInitialized) {
11293                         throw new Error("initializeWasm() must be awaited first!");
11294                 }
11295                 const nativeResponseValue = wasm.TS_ChannelConfig_free(this_obj);
11296                 // debug statements here
11297         }
11298         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11299         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
11300                 if(!isWasmInitialized) {
11301                         throw new Error("initializeWasm() must be awaited first!");
11302                 }
11303                 const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
11304                 return nativeResponseValue;
11305         }
11306         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
11307         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
11308                 if(!isWasmInitialized) {
11309                         throw new Error("initializeWasm() must be awaited first!");
11310                 }
11311                 const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
11312                 // debug statements here
11313         }
11314         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11315         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
11316                 if(!isWasmInitialized) {
11317                         throw new Error("initializeWasm() must be awaited first!");
11318                 }
11319                 const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
11320                 return nativeResponseValue;
11321         }
11322         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
11323         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
11324                 if(!isWasmInitialized) {
11325                         throw new Error("initializeWasm() must be awaited first!");
11326                 }
11327                 const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
11328                 // debug statements here
11329         }
11330         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11331         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
11332                 if(!isWasmInitialized) {
11333                         throw new Error("initializeWasm() must be awaited first!");
11334                 }
11335                 const nativeResponseValue = wasm.TS_ChannelConfig_get_cltv_expiry_delta(this_ptr);
11336                 return nativeResponseValue;
11337         }
11338         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
11339         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11340                 if(!isWasmInitialized) {
11341                         throw new Error("initializeWasm() must be awaited first!");
11342                 }
11343                 const nativeResponseValue = wasm.TS_ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
11344                 // debug statements here
11345         }
11346         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11347         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
11348                 if(!isWasmInitialized) {
11349                         throw new Error("initializeWasm() must be awaited first!");
11350                 }
11351                 const nativeResponseValue = wasm.TS_ChannelConfig_get_announced_channel(this_ptr);
11352                 return nativeResponseValue;
11353         }
11354         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
11355         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
11356                 if(!isWasmInitialized) {
11357                         throw new Error("initializeWasm() must be awaited first!");
11358                 }
11359                 const nativeResponseValue = wasm.TS_ChannelConfig_set_announced_channel(this_ptr, val);
11360                 // debug statements here
11361         }
11362         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11363         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
11364                 if(!isWasmInitialized) {
11365                         throw new Error("initializeWasm() must be awaited first!");
11366                 }
11367                 const nativeResponseValue = wasm.TS_ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
11368                 return nativeResponseValue;
11369         }
11370         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
11371         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
11372                 if(!isWasmInitialized) {
11373                         throw new Error("initializeWasm() must be awaited first!");
11374                 }
11375                 const nativeResponseValue = wasm.TS_ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
11376                 // debug statements here
11377         }
11378         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11379         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
11380                 if(!isWasmInitialized) {
11381                         throw new Error("initializeWasm() must be awaited first!");
11382                 }
11383                 const nativeResponseValue = wasm.TS_ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
11384                 return nativeResponseValue;
11385         }
11386         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
11387         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
11388                 if(!isWasmInitialized) {
11389                         throw new Error("initializeWasm() must be awaited first!");
11390                 }
11391                 const nativeResponseValue = wasm.TS_ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
11392                 // debug statements here
11393         }
11394         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
11395         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
11396                 if(!isWasmInitialized) {
11397                         throw new Error("initializeWasm() must be awaited first!");
11398                 }
11399                 const nativeResponseValue = wasm.TS_ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
11400                 return nativeResponseValue;
11401         }
11402         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
11403         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
11404                 if(!isWasmInitialized) {
11405                         throw new Error("initializeWasm() must be awaited first!");
11406                 }
11407                 const nativeResponseValue = wasm.TS_ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
11408                 // debug statements here
11409         }
11410         // 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);
11411         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 {
11412                 if(!isWasmInitialized) {
11413                         throw new Error("initializeWasm() must be awaited first!");
11414                 }
11415                 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);
11416                 return nativeResponseValue;
11417         }
11418         // uint64_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
11419         export function ChannelConfig_clone_ptr(arg: number): number {
11420                 if(!isWasmInitialized) {
11421                         throw new Error("initializeWasm() must be awaited first!");
11422                 }
11423                 const nativeResponseValue = wasm.TS_ChannelConfig_clone_ptr(arg);
11424                 return nativeResponseValue;
11425         }
11426         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
11427         export function ChannelConfig_clone(orig: number): number {
11428                 if(!isWasmInitialized) {
11429                         throw new Error("initializeWasm() must be awaited first!");
11430                 }
11431                 const nativeResponseValue = wasm.TS_ChannelConfig_clone(orig);
11432                 return nativeResponseValue;
11433         }
11434         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
11435         export function ChannelConfig_default(): number {
11436                 if(!isWasmInitialized) {
11437                         throw new Error("initializeWasm() must be awaited first!");
11438                 }
11439                 const nativeResponseValue = wasm.TS_ChannelConfig_default();
11440                 return nativeResponseValue;
11441         }
11442         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
11443         export function ChannelConfig_write(obj: number): Uint8Array {
11444                 if(!isWasmInitialized) {
11445                         throw new Error("initializeWasm() must be awaited first!");
11446                 }
11447                 const nativeResponseValue = wasm.TS_ChannelConfig_write(obj);
11448                 return decodeUint8Array(nativeResponseValue);
11449         }
11450         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
11451         export function ChannelConfig_read(ser: Uint8Array): number {
11452                 if(!isWasmInitialized) {
11453                         throw new Error("initializeWasm() must be awaited first!");
11454                 }
11455                 const nativeResponseValue = wasm.TS_ChannelConfig_read(encodeUint8Array(ser));
11456                 return nativeResponseValue;
11457         }
11458         // void UserConfig_free(struct LDKUserConfig this_obj);
11459         export function UserConfig_free(this_obj: number): void {
11460                 if(!isWasmInitialized) {
11461                         throw new Error("initializeWasm() must be awaited first!");
11462                 }
11463                 const nativeResponseValue = wasm.TS_UserConfig_free(this_obj);
11464                 // debug statements here
11465         }
11466         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11467         export function UserConfig_get_own_channel_config(this_ptr: number): number {
11468                 if(!isWasmInitialized) {
11469                         throw new Error("initializeWasm() must be awaited first!");
11470                 }
11471                 const nativeResponseValue = wasm.TS_UserConfig_get_own_channel_config(this_ptr);
11472                 return nativeResponseValue;
11473         }
11474         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
11475         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
11476                 if(!isWasmInitialized) {
11477                         throw new Error("initializeWasm() must be awaited first!");
11478                 }
11479                 const nativeResponseValue = wasm.TS_UserConfig_set_own_channel_config(this_ptr, val);
11480                 // debug statements here
11481         }
11482         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11483         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
11484                 if(!isWasmInitialized) {
11485                         throw new Error("initializeWasm() must be awaited first!");
11486                 }
11487                 const nativeResponseValue = wasm.TS_UserConfig_get_peer_channel_config_limits(this_ptr);
11488                 return nativeResponseValue;
11489         }
11490         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
11491         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
11492                 if(!isWasmInitialized) {
11493                         throw new Error("initializeWasm() must be awaited first!");
11494                 }
11495                 const nativeResponseValue = wasm.TS_UserConfig_set_peer_channel_config_limits(this_ptr, val);
11496                 // debug statements here
11497         }
11498         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11499         export function UserConfig_get_channel_options(this_ptr: number): number {
11500                 if(!isWasmInitialized) {
11501                         throw new Error("initializeWasm() must be awaited first!");
11502                 }
11503                 const nativeResponseValue = wasm.TS_UserConfig_get_channel_options(this_ptr);
11504                 return nativeResponseValue;
11505         }
11506         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
11507         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
11508                 if(!isWasmInitialized) {
11509                         throw new Error("initializeWasm() must be awaited first!");
11510                 }
11511                 const nativeResponseValue = wasm.TS_UserConfig_set_channel_options(this_ptr, val);
11512                 // debug statements here
11513         }
11514         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11515         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
11516                 if(!isWasmInitialized) {
11517                         throw new Error("initializeWasm() must be awaited first!");
11518                 }
11519                 const nativeResponseValue = wasm.TS_UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
11520                 return nativeResponseValue;
11521         }
11522         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
11523         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
11524                 if(!isWasmInitialized) {
11525                         throw new Error("initializeWasm() must be awaited first!");
11526                 }
11527                 const nativeResponseValue = wasm.TS_UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
11528                 // debug statements here
11529         }
11530         // bool UserConfig_get_accept_inbound_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
11531         export function UserConfig_get_accept_inbound_channels(this_ptr: number): boolean {
11532                 if(!isWasmInitialized) {
11533                         throw new Error("initializeWasm() must be awaited first!");
11534                 }
11535                 const nativeResponseValue = wasm.TS_UserConfig_get_accept_inbound_channels(this_ptr);
11536                 return nativeResponseValue;
11537         }
11538         // void UserConfig_set_accept_inbound_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
11539         export function UserConfig_set_accept_inbound_channels(this_ptr: number, val: boolean): void {
11540                 if(!isWasmInitialized) {
11541                         throw new Error("initializeWasm() must be awaited first!");
11542                 }
11543                 const nativeResponseValue = wasm.TS_UserConfig_set_accept_inbound_channels(this_ptr, val);
11544                 // debug statements here
11545         }
11546         // 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);
11547         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 {
11548                 if(!isWasmInitialized) {
11549                         throw new Error("initializeWasm() must be awaited first!");
11550                 }
11551                 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);
11552                 return nativeResponseValue;
11553         }
11554         // uint64_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
11555         export function UserConfig_clone_ptr(arg: number): number {
11556                 if(!isWasmInitialized) {
11557                         throw new Error("initializeWasm() must be awaited first!");
11558                 }
11559                 const nativeResponseValue = wasm.TS_UserConfig_clone_ptr(arg);
11560                 return nativeResponseValue;
11561         }
11562         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
11563         export function UserConfig_clone(orig: number): number {
11564                 if(!isWasmInitialized) {
11565                         throw new Error("initializeWasm() must be awaited first!");
11566                 }
11567                 const nativeResponseValue = wasm.TS_UserConfig_clone(orig);
11568                 return nativeResponseValue;
11569         }
11570         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
11571         export function UserConfig_default(): number {
11572                 if(!isWasmInitialized) {
11573                         throw new Error("initializeWasm() must be awaited first!");
11574                 }
11575                 const nativeResponseValue = wasm.TS_UserConfig_default();
11576                 return nativeResponseValue;
11577         }
11578         // void BestBlock_free(struct LDKBestBlock this_obj);
11579         export function BestBlock_free(this_obj: number): void {
11580                 if(!isWasmInitialized) {
11581                         throw new Error("initializeWasm() must be awaited first!");
11582                 }
11583                 const nativeResponseValue = wasm.TS_BestBlock_free(this_obj);
11584                 // debug statements here
11585         }
11586         // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
11587         export function BestBlock_clone_ptr(arg: number): number {
11588                 if(!isWasmInitialized) {
11589                         throw new Error("initializeWasm() must be awaited first!");
11590                 }
11591                 const nativeResponseValue = wasm.TS_BestBlock_clone_ptr(arg);
11592                 return nativeResponseValue;
11593         }
11594         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
11595         export function BestBlock_clone(orig: number): number {
11596                 if(!isWasmInitialized) {
11597                         throw new Error("initializeWasm() must be awaited first!");
11598                 }
11599                 const nativeResponseValue = wasm.TS_BestBlock_clone(orig);
11600                 return nativeResponseValue;
11601         }
11602         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
11603         export function BestBlock_from_genesis(network: Network): number {
11604                 if(!isWasmInitialized) {
11605                         throw new Error("initializeWasm() must be awaited first!");
11606                 }
11607                 const nativeResponseValue = wasm.TS_BestBlock_from_genesis(network);
11608                 return nativeResponseValue;
11609         }
11610         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
11611         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
11612                 if(!isWasmInitialized) {
11613                         throw new Error("initializeWasm() must be awaited first!");
11614                 }
11615                 const nativeResponseValue = wasm.TS_BestBlock_new(encodeUint8Array(block_hash), height);
11616                 return nativeResponseValue;
11617         }
11618         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
11619         export function BestBlock_block_hash(this_arg: number): Uint8Array {
11620                 if(!isWasmInitialized) {
11621                         throw new Error("initializeWasm() must be awaited first!");
11622                 }
11623                 const nativeResponseValue = wasm.TS_BestBlock_block_hash(this_arg);
11624                 return decodeUint8Array(nativeResponseValue);
11625         }
11626         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
11627         export function BestBlock_height(this_arg: number): number {
11628                 if(!isWasmInitialized) {
11629                         throw new Error("initializeWasm() must be awaited first!");
11630                 }
11631                 const nativeResponseValue = wasm.TS_BestBlock_height(this_arg);
11632                 return nativeResponseValue;
11633         }
11634         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
11635         export function AccessError_clone(orig: number): AccessError {
11636                 if(!isWasmInitialized) {
11637                         throw new Error("initializeWasm() must be awaited first!");
11638                 }
11639                 const nativeResponseValue = wasm.TS_AccessError_clone(orig);
11640                 return nativeResponseValue;
11641         }
11642         // enum LDKAccessError AccessError_unknown_chain(void);
11643         export function AccessError_unknown_chain(): AccessError {
11644                 if(!isWasmInitialized) {
11645                         throw new Error("initializeWasm() must be awaited first!");
11646                 }
11647                 const nativeResponseValue = wasm.TS_AccessError_unknown_chain();
11648                 return nativeResponseValue;
11649         }
11650         // enum LDKAccessError AccessError_unknown_tx(void);
11651         export function AccessError_unknown_tx(): AccessError {
11652                 if(!isWasmInitialized) {
11653                         throw new Error("initializeWasm() must be awaited first!");
11654                 }
11655                 const nativeResponseValue = wasm.TS_AccessError_unknown_tx();
11656                 return nativeResponseValue;
11657         }
11658         // void Access_free(struct LDKAccess this_ptr);
11659         export function Access_free(this_ptr: number): void {
11660                 if(!isWasmInitialized) {
11661                         throw new Error("initializeWasm() must be awaited first!");
11662                 }
11663                 const nativeResponseValue = wasm.TS_Access_free(this_ptr);
11664                 // debug statements here
11665         }
11666         // void Listen_free(struct LDKListen this_ptr);
11667         export function Listen_free(this_ptr: number): void {
11668                 if(!isWasmInitialized) {
11669                         throw new Error("initializeWasm() must be awaited first!");
11670                 }
11671                 const nativeResponseValue = wasm.TS_Listen_free(this_ptr);
11672                 // debug statements here
11673         }
11674         // void Confirm_free(struct LDKConfirm this_ptr);
11675         export function Confirm_free(this_ptr: number): void {
11676                 if(!isWasmInitialized) {
11677                         throw new Error("initializeWasm() must be awaited first!");
11678                 }
11679                 const nativeResponseValue = wasm.TS_Confirm_free(this_ptr);
11680                 // debug statements here
11681         }
11682         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
11683         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
11684                 if(!isWasmInitialized) {
11685                         throw new Error("initializeWasm() must be awaited first!");
11686                 }
11687                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_clone(orig);
11688                 return nativeResponseValue;
11689         }
11690         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
11691         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
11692                 if(!isWasmInitialized) {
11693                         throw new Error("initializeWasm() must be awaited first!");
11694                 }
11695                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_temporary_failure();
11696                 return nativeResponseValue;
11697         }
11698         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
11699         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
11700                 if(!isWasmInitialized) {
11701                         throw new Error("initializeWasm() must be awaited first!");
11702                 }
11703                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_permanent_failure();
11704                 return nativeResponseValue;
11705         }
11706         // void Watch_free(struct LDKWatch this_ptr);
11707         export function Watch_free(this_ptr: number): void {
11708                 if(!isWasmInitialized) {
11709                         throw new Error("initializeWasm() must be awaited first!");
11710                 }
11711                 const nativeResponseValue = wasm.TS_Watch_free(this_ptr);
11712                 // debug statements here
11713         }
11714         // void Filter_free(struct LDKFilter this_ptr);
11715         export function Filter_free(this_ptr: number): void {
11716                 if(!isWasmInitialized) {
11717                         throw new Error("initializeWasm() must be awaited first!");
11718                 }
11719                 const nativeResponseValue = wasm.TS_Filter_free(this_ptr);
11720                 // debug statements here
11721         }
11722         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
11723         export function WatchedOutput_free(this_obj: number): void {
11724                 if(!isWasmInitialized) {
11725                         throw new Error("initializeWasm() must be awaited first!");
11726                 }
11727                 const nativeResponseValue = wasm.TS_WatchedOutput_free(this_obj);
11728                 // debug statements here
11729         }
11730         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11731         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
11732                 if(!isWasmInitialized) {
11733                         throw new Error("initializeWasm() must be awaited first!");
11734                 }
11735                 const nativeResponseValue = wasm.TS_WatchedOutput_get_block_hash(this_ptr);
11736                 return decodeUint8Array(nativeResponseValue);
11737         }
11738         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11739         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
11740                 if(!isWasmInitialized) {
11741                         throw new Error("initializeWasm() must be awaited first!");
11742                 }
11743                 const nativeResponseValue = wasm.TS_WatchedOutput_set_block_hash(this_ptr, encodeUint8Array(val));
11744                 // debug statements here
11745         }
11746         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11747         export function WatchedOutput_get_outpoint(this_ptr: number): number {
11748                 if(!isWasmInitialized) {
11749                         throw new Error("initializeWasm() must be awaited first!");
11750                 }
11751                 const nativeResponseValue = wasm.TS_WatchedOutput_get_outpoint(this_ptr);
11752                 return nativeResponseValue;
11753         }
11754         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11755         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
11756                 if(!isWasmInitialized) {
11757                         throw new Error("initializeWasm() must be awaited first!");
11758                 }
11759                 const nativeResponseValue = wasm.TS_WatchedOutput_set_outpoint(this_ptr, val);
11760                 // debug statements here
11761         }
11762         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
11763         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
11764                 if(!isWasmInitialized) {
11765                         throw new Error("initializeWasm() must be awaited first!");
11766                 }
11767                 const nativeResponseValue = wasm.TS_WatchedOutput_get_script_pubkey(this_ptr);
11768                 return decodeUint8Array(nativeResponseValue);
11769         }
11770         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
11771         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
11772                 if(!isWasmInitialized) {
11773                         throw new Error("initializeWasm() must be awaited first!");
11774                 }
11775                 const nativeResponseValue = wasm.TS_WatchedOutput_set_script_pubkey(this_ptr, encodeUint8Array(val));
11776                 // debug statements here
11777         }
11778         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
11779         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
11780                 if(!isWasmInitialized) {
11781                         throw new Error("initializeWasm() must be awaited first!");
11782                 }
11783                 const nativeResponseValue = wasm.TS_WatchedOutput_new(encodeUint8Array(block_hash_arg), outpoint_arg, encodeUint8Array(script_pubkey_arg));
11784                 return nativeResponseValue;
11785         }
11786         // uint64_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
11787         export function WatchedOutput_clone_ptr(arg: number): number {
11788                 if(!isWasmInitialized) {
11789                         throw new Error("initializeWasm() must be awaited first!");
11790                 }
11791                 const nativeResponseValue = wasm.TS_WatchedOutput_clone_ptr(arg);
11792                 return nativeResponseValue;
11793         }
11794         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
11795         export function WatchedOutput_clone(orig: number): number {
11796                 if(!isWasmInitialized) {
11797                         throw new Error("initializeWasm() must be awaited first!");
11798                 }
11799                 const nativeResponseValue = wasm.TS_WatchedOutput_clone(orig);
11800                 return nativeResponseValue;
11801         }
11802         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
11803         export function WatchedOutput_hash(o: number): number {
11804                 if(!isWasmInitialized) {
11805                         throw new Error("initializeWasm() must be awaited first!");
11806                 }
11807                 const nativeResponseValue = wasm.TS_WatchedOutput_hash(o);
11808                 return nativeResponseValue;
11809         }
11810         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
11811         export function BroadcasterInterface_free(this_ptr: number): void {
11812                 if(!isWasmInitialized) {
11813                         throw new Error("initializeWasm() must be awaited first!");
11814                 }
11815                 const nativeResponseValue = wasm.TS_BroadcasterInterface_free(this_ptr);
11816                 // debug statements here
11817         }
11818         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
11819         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
11820                 if(!isWasmInitialized) {
11821                         throw new Error("initializeWasm() must be awaited first!");
11822                 }
11823                 const nativeResponseValue = wasm.TS_ConfirmationTarget_clone(orig);
11824                 return nativeResponseValue;
11825         }
11826         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
11827         export function ConfirmationTarget_background(): ConfirmationTarget {
11828                 if(!isWasmInitialized) {
11829                         throw new Error("initializeWasm() must be awaited first!");
11830                 }
11831                 const nativeResponseValue = wasm.TS_ConfirmationTarget_background();
11832                 return nativeResponseValue;
11833         }
11834         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
11835         export function ConfirmationTarget_normal(): ConfirmationTarget {
11836                 if(!isWasmInitialized) {
11837                         throw new Error("initializeWasm() must be awaited first!");
11838                 }
11839                 const nativeResponseValue = wasm.TS_ConfirmationTarget_normal();
11840                 return nativeResponseValue;
11841         }
11842         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
11843         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
11844                 if(!isWasmInitialized) {
11845                         throw new Error("initializeWasm() must be awaited first!");
11846                 }
11847                 const nativeResponseValue = wasm.TS_ConfirmationTarget_high_priority();
11848                 return nativeResponseValue;
11849         }
11850         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
11851         export function ConfirmationTarget_eq(a: number, b: number): boolean {
11852                 if(!isWasmInitialized) {
11853                         throw new Error("initializeWasm() must be awaited first!");
11854                 }
11855                 const nativeResponseValue = wasm.TS_ConfirmationTarget_eq(a, b);
11856                 return nativeResponseValue;
11857         }
11858         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
11859         export function FeeEstimator_free(this_ptr: number): void {
11860                 if(!isWasmInitialized) {
11861                         throw new Error("initializeWasm() must be awaited first!");
11862                 }
11863                 const nativeResponseValue = wasm.TS_FeeEstimator_free(this_ptr);
11864                 // debug statements here
11865         }
11866         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
11867         export function MonitorUpdateId_free(this_obj: number): void {
11868                 if(!isWasmInitialized) {
11869                         throw new Error("initializeWasm() must be awaited first!");
11870                 }
11871                 const nativeResponseValue = wasm.TS_MonitorUpdateId_free(this_obj);
11872                 // debug statements here
11873         }
11874         // uint64_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
11875         export function MonitorUpdateId_clone_ptr(arg: number): number {
11876                 if(!isWasmInitialized) {
11877                         throw new Error("initializeWasm() must be awaited first!");
11878                 }
11879                 const nativeResponseValue = wasm.TS_MonitorUpdateId_clone_ptr(arg);
11880                 return nativeResponseValue;
11881         }
11882         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
11883         export function MonitorUpdateId_clone(orig: number): number {
11884                 if(!isWasmInitialized) {
11885                         throw new Error("initializeWasm() must be awaited first!");
11886                 }
11887                 const nativeResponseValue = wasm.TS_MonitorUpdateId_clone(orig);
11888                 return nativeResponseValue;
11889         }
11890         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
11891         export function MonitorUpdateId_hash(o: number): number {
11892                 if(!isWasmInitialized) {
11893                         throw new Error("initializeWasm() must be awaited first!");
11894                 }
11895                 const nativeResponseValue = wasm.TS_MonitorUpdateId_hash(o);
11896                 return nativeResponseValue;
11897         }
11898         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
11899         export function MonitorUpdateId_eq(a: number, b: number): boolean {
11900                 if(!isWasmInitialized) {
11901                         throw new Error("initializeWasm() must be awaited first!");
11902                 }
11903                 const nativeResponseValue = wasm.TS_MonitorUpdateId_eq(a, b);
11904                 return nativeResponseValue;
11905         }
11906         // void Persist_free(struct LDKPersist this_ptr);
11907         export function Persist_free(this_ptr: number): void {
11908                 if(!isWasmInitialized) {
11909                         throw new Error("initializeWasm() must be awaited first!");
11910                 }
11911                 const nativeResponseValue = wasm.TS_Persist_free(this_ptr);
11912                 // debug statements here
11913         }
11914         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
11915         export function LockedChannelMonitor_free(this_obj: number): void {
11916                 if(!isWasmInitialized) {
11917                         throw new Error("initializeWasm() must be awaited first!");
11918                 }
11919                 const nativeResponseValue = wasm.TS_LockedChannelMonitor_free(this_obj);
11920                 // debug statements here
11921         }
11922         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
11923         export function ChainMonitor_free(this_obj: number): void {
11924                 if(!isWasmInitialized) {
11925                         throw new Error("initializeWasm() must be awaited first!");
11926                 }
11927                 const nativeResponseValue = wasm.TS_ChainMonitor_free(this_obj);
11928                 // debug statements here
11929         }
11930         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
11931         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
11932                 if(!isWasmInitialized) {
11933                         throw new Error("initializeWasm() must be awaited first!");
11934                 }
11935                 const nativeResponseValue = wasm.TS_ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
11936                 return nativeResponseValue;
11937         }
11938         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
11939         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
11940                 if(!isWasmInitialized) {
11941                         throw new Error("initializeWasm() must be awaited first!");
11942                 }
11943                 const nativeResponseValue = wasm.TS_ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
11944                 return nativeResponseValue;
11945         }
11946         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
11947         export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
11948                 if(!isWasmInitialized) {
11949                         throw new Error("initializeWasm() must be awaited first!");
11950                 }
11951                 const nativeResponseValue = wasm.TS_ChainMonitor_get_monitor(this_arg, funding_txo);
11952                 return nativeResponseValue;
11953         }
11954         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11955         export function ChainMonitor_list_monitors(this_arg: number): number[] {
11956                 if(!isWasmInitialized) {
11957                         throw new Error("initializeWasm() must be awaited first!");
11958                 }
11959                 const nativeResponseValue = wasm.TS_ChainMonitor_list_monitors(this_arg);
11960                 return nativeResponseValue;
11961         }
11962         // 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);
11963         export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
11964                 if(!isWasmInitialized) {
11965                         throw new Error("initializeWasm() must be awaited first!");
11966                 }
11967                 const nativeResponseValue = wasm.TS_ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
11968                 return nativeResponseValue;
11969         }
11970         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11971         export function ChainMonitor_as_Listen(this_arg: number): number {
11972                 if(!isWasmInitialized) {
11973                         throw new Error("initializeWasm() must be awaited first!");
11974                 }
11975                 const nativeResponseValue = wasm.TS_ChainMonitor_as_Listen(this_arg);
11976                 return nativeResponseValue;
11977         }
11978         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11979         export function ChainMonitor_as_Confirm(this_arg: number): number {
11980                 if(!isWasmInitialized) {
11981                         throw new Error("initializeWasm() must be awaited first!");
11982                 }
11983                 const nativeResponseValue = wasm.TS_ChainMonitor_as_Confirm(this_arg);
11984                 return nativeResponseValue;
11985         }
11986         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11987         export function ChainMonitor_as_Watch(this_arg: number): number {
11988                 if(!isWasmInitialized) {
11989                         throw new Error("initializeWasm() must be awaited first!");
11990                 }
11991                 const nativeResponseValue = wasm.TS_ChainMonitor_as_Watch(this_arg);
11992                 return nativeResponseValue;
11993         }
11994         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
11995         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
11996                 if(!isWasmInitialized) {
11997                         throw new Error("initializeWasm() must be awaited first!");
11998                 }
11999                 const nativeResponseValue = wasm.TS_ChainMonitor_as_EventsProvider(this_arg);
12000                 return nativeResponseValue;
12001         }
12002         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
12003         export function ChannelMonitorUpdate_free(this_obj: number): void {
12004                 if(!isWasmInitialized) {
12005                         throw new Error("initializeWasm() must be awaited first!");
12006                 }
12007                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_free(this_obj);
12008                 // debug statements here
12009         }
12010         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
12011         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
12012                 if(!isWasmInitialized) {
12013                         throw new Error("initializeWasm() must be awaited first!");
12014                 }
12015                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_get_update_id(this_ptr);
12016                 return nativeResponseValue;
12017         }
12018         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
12019         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
12020                 if(!isWasmInitialized) {
12021                         throw new Error("initializeWasm() must be awaited first!");
12022                 }
12023                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_set_update_id(this_ptr, val);
12024                 // debug statements here
12025         }
12026         // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
12027         export function ChannelMonitorUpdate_clone_ptr(arg: number): number {
12028                 if(!isWasmInitialized) {
12029                         throw new Error("initializeWasm() must be awaited first!");
12030                 }
12031                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone_ptr(arg);
12032                 return nativeResponseValue;
12033         }
12034         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
12035         export function ChannelMonitorUpdate_clone(orig: number): number {
12036                 if(!isWasmInitialized) {
12037                         throw new Error("initializeWasm() must be awaited first!");
12038                 }
12039                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone(orig);
12040                 return nativeResponseValue;
12041         }
12042         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
12043         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
12044                 if(!isWasmInitialized) {
12045                         throw new Error("initializeWasm() must be awaited first!");
12046                 }
12047                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_write(obj);
12048                 return decodeUint8Array(nativeResponseValue);
12049         }
12050         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
12051         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
12052                 if(!isWasmInitialized) {
12053                         throw new Error("initializeWasm() must be awaited first!");
12054                 }
12055                 const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_read(encodeUint8Array(ser));
12056                 return nativeResponseValue;
12057         }
12058         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
12059         export function MonitorEvent_free(this_ptr: number): void {
12060                 if(!isWasmInitialized) {
12061                         throw new Error("initializeWasm() must be awaited first!");
12062                 }
12063                 const nativeResponseValue = wasm.TS_MonitorEvent_free(this_ptr);
12064                 // debug statements here
12065         }
12066         // uint64_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
12067         export function MonitorEvent_clone_ptr(arg: number): number {
12068                 if(!isWasmInitialized) {
12069                         throw new Error("initializeWasm() must be awaited first!");
12070                 }
12071                 const nativeResponseValue = wasm.TS_MonitorEvent_clone_ptr(arg);
12072                 return nativeResponseValue;
12073         }
12074         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
12075         export function MonitorEvent_clone(orig: number): number {
12076                 if(!isWasmInitialized) {
12077                         throw new Error("initializeWasm() must be awaited first!");
12078                 }
12079                 const nativeResponseValue = wasm.TS_MonitorEvent_clone(orig);
12080                 return nativeResponseValue;
12081         }
12082         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
12083         export function MonitorEvent_htlcevent(a: number): number {
12084                 if(!isWasmInitialized) {
12085                         throw new Error("initializeWasm() must be awaited first!");
12086                 }
12087                 const nativeResponseValue = wasm.TS_MonitorEvent_htlcevent(a);
12088                 return nativeResponseValue;
12089         }
12090         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
12091         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
12092                 if(!isWasmInitialized) {
12093                         throw new Error("initializeWasm() must be awaited first!");
12094                 }
12095                 const nativeResponseValue = wasm.TS_MonitorEvent_commitment_tx_confirmed(a);
12096                 return nativeResponseValue;
12097         }
12098         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
12099         export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: number): number {
12100                 if(!isWasmInitialized) {
12101                         throw new Error("initializeWasm() must be awaited first!");
12102                 }
12103                 const nativeResponseValue = wasm.TS_MonitorEvent_update_completed(funding_txo, monitor_update_id);
12104                 return nativeResponseValue;
12105         }
12106         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
12107         export function MonitorEvent_update_failed(a: number): number {
12108                 if(!isWasmInitialized) {
12109                         throw new Error("initializeWasm() must be awaited first!");
12110                 }
12111                 const nativeResponseValue = wasm.TS_MonitorEvent_update_failed(a);
12112                 return nativeResponseValue;
12113         }
12114         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
12115         export function MonitorEvent_write(obj: number): Uint8Array {
12116                 if(!isWasmInitialized) {
12117                         throw new Error("initializeWasm() must be awaited first!");
12118                 }
12119                 const nativeResponseValue = wasm.TS_MonitorEvent_write(obj);
12120                 return decodeUint8Array(nativeResponseValue);
12121         }
12122         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
12123         export function MonitorEvent_read(ser: Uint8Array): number {
12124                 if(!isWasmInitialized) {
12125                         throw new Error("initializeWasm() must be awaited first!");
12126                 }
12127                 const nativeResponseValue = wasm.TS_MonitorEvent_read(encodeUint8Array(ser));
12128                 return nativeResponseValue;
12129         }
12130         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
12131         export function HTLCUpdate_free(this_obj: number): void {
12132                 if(!isWasmInitialized) {
12133                         throw new Error("initializeWasm() must be awaited first!");
12134                 }
12135                 const nativeResponseValue = wasm.TS_HTLCUpdate_free(this_obj);
12136                 // debug statements here
12137         }
12138         // uint64_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
12139         export function HTLCUpdate_clone_ptr(arg: number): number {
12140                 if(!isWasmInitialized) {
12141                         throw new Error("initializeWasm() must be awaited first!");
12142                 }
12143                 const nativeResponseValue = wasm.TS_HTLCUpdate_clone_ptr(arg);
12144                 return nativeResponseValue;
12145         }
12146         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
12147         export function HTLCUpdate_clone(orig: number): number {
12148                 if(!isWasmInitialized) {
12149                         throw new Error("initializeWasm() must be awaited first!");
12150                 }
12151                 const nativeResponseValue = wasm.TS_HTLCUpdate_clone(orig);
12152                 return nativeResponseValue;
12153         }
12154         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
12155         export function HTLCUpdate_write(obj: number): Uint8Array {
12156                 if(!isWasmInitialized) {
12157                         throw new Error("initializeWasm() must be awaited first!");
12158                 }
12159                 const nativeResponseValue = wasm.TS_HTLCUpdate_write(obj);
12160                 return decodeUint8Array(nativeResponseValue);
12161         }
12162         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
12163         export function HTLCUpdate_read(ser: Uint8Array): number {
12164                 if(!isWasmInitialized) {
12165                         throw new Error("initializeWasm() must be awaited first!");
12166                 }
12167                 const nativeResponseValue = wasm.TS_HTLCUpdate_read(encodeUint8Array(ser));
12168                 return nativeResponseValue;
12169         }
12170         // void Balance_free(struct LDKBalance this_ptr);
12171         export function Balance_free(this_ptr: number): void {
12172                 if(!isWasmInitialized) {
12173                         throw new Error("initializeWasm() must be awaited first!");
12174                 }
12175                 const nativeResponseValue = wasm.TS_Balance_free(this_ptr);
12176                 // debug statements here
12177         }
12178         // uint64_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
12179         export function Balance_clone_ptr(arg: number): number {
12180                 if(!isWasmInitialized) {
12181                         throw new Error("initializeWasm() must be awaited first!");
12182                 }
12183                 const nativeResponseValue = wasm.TS_Balance_clone_ptr(arg);
12184                 return nativeResponseValue;
12185         }
12186         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
12187         export function Balance_clone(orig: number): number {
12188                 if(!isWasmInitialized) {
12189                         throw new Error("initializeWasm() must be awaited first!");
12190                 }
12191                 const nativeResponseValue = wasm.TS_Balance_clone(orig);
12192                 return nativeResponseValue;
12193         }
12194         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
12195         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
12196                 if(!isWasmInitialized) {
12197                         throw new Error("initializeWasm() must be awaited first!");
12198                 }
12199                 const nativeResponseValue = wasm.TS_Balance_claimable_on_channel_close(claimable_amount_satoshis);
12200                 return nativeResponseValue;
12201         }
12202         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
12203         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
12204                 if(!isWasmInitialized) {
12205                         throw new Error("initializeWasm() must be awaited first!");
12206                 }
12207                 const nativeResponseValue = wasm.TS_Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
12208                 return nativeResponseValue;
12209         }
12210         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
12211         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
12212                 if(!isWasmInitialized) {
12213                         throw new Error("initializeWasm() must be awaited first!");
12214                 }
12215                 const nativeResponseValue = wasm.TS_Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
12216                 return nativeResponseValue;
12217         }
12218         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
12219         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
12220                 if(!isWasmInitialized) {
12221                         throw new Error("initializeWasm() must be awaited first!");
12222                 }
12223                 const nativeResponseValue = wasm.TS_Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
12224                 return nativeResponseValue;
12225         }
12226         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
12227         export function Balance_eq(a: number, b: number): boolean {
12228                 if(!isWasmInitialized) {
12229                         throw new Error("initializeWasm() must be awaited first!");
12230                 }
12231                 const nativeResponseValue = wasm.TS_Balance_eq(a, b);
12232                 return nativeResponseValue;
12233         }
12234         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
12235         export function ChannelMonitor_free(this_obj: number): void {
12236                 if(!isWasmInitialized) {
12237                         throw new Error("initializeWasm() must be awaited first!");
12238                 }
12239                 const nativeResponseValue = wasm.TS_ChannelMonitor_free(this_obj);
12240                 // debug statements here
12241         }
12242         // uint64_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
12243         export function ChannelMonitor_clone_ptr(arg: number): number {
12244                 if(!isWasmInitialized) {
12245                         throw new Error("initializeWasm() must be awaited first!");
12246                 }
12247                 const nativeResponseValue = wasm.TS_ChannelMonitor_clone_ptr(arg);
12248                 return nativeResponseValue;
12249         }
12250         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
12251         export function ChannelMonitor_clone(orig: number): number {
12252                 if(!isWasmInitialized) {
12253                         throw new Error("initializeWasm() must be awaited first!");
12254                 }
12255                 const nativeResponseValue = wasm.TS_ChannelMonitor_clone(orig);
12256                 return nativeResponseValue;
12257         }
12258         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
12259         export function ChannelMonitor_write(obj: number): Uint8Array {
12260                 if(!isWasmInitialized) {
12261                         throw new Error("initializeWasm() must be awaited first!");
12262                 }
12263                 const nativeResponseValue = wasm.TS_ChannelMonitor_write(obj);
12264                 return decodeUint8Array(nativeResponseValue);
12265         }
12266         // 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);
12267         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
12268                 if(!isWasmInitialized) {
12269                         throw new Error("initializeWasm() must be awaited first!");
12270                 }
12271                 const nativeResponseValue = wasm.TS_ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
12272                 return nativeResponseValue;
12273         }
12274         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12275         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
12276                 if(!isWasmInitialized) {
12277                         throw new Error("initializeWasm() must be awaited first!");
12278                 }
12279                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_update_id(this_arg);
12280                 return nativeResponseValue;
12281         }
12282         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12283         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
12284                 if(!isWasmInitialized) {
12285                         throw new Error("initializeWasm() must be awaited first!");
12286                 }
12287                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_funding_txo(this_arg);
12288                 return nativeResponseValue;
12289         }
12290         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12291         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
12292                 if(!isWasmInitialized) {
12293                         throw new Error("initializeWasm() must be awaited first!");
12294                 }
12295                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_outputs_to_watch(this_arg);
12296                 return nativeResponseValue;
12297         }
12298         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
12299         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
12300                 if(!isWasmInitialized) {
12301                         throw new Error("initializeWasm() must be awaited first!");
12302                 }
12303                 const nativeResponseValue = wasm.TS_ChannelMonitor_load_outputs_to_watch(this_arg, filter);
12304                 // debug statements here
12305         }
12306         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12307         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
12308                 if(!isWasmInitialized) {
12309                         throw new Error("initializeWasm() must be awaited first!");
12310                 }
12311                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
12312                 return nativeResponseValue;
12313         }
12314         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12315         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
12316                 if(!isWasmInitialized) {
12317                         throw new Error("initializeWasm() must be awaited first!");
12318                 }
12319                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_events(this_arg);
12320                 return nativeResponseValue;
12321         }
12322         // 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);
12323         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
12324                 if(!isWasmInitialized) {
12325                         throw new Error("initializeWasm() must be awaited first!");
12326                 }
12327                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
12328                 return nativeResponseValue;
12329         }
12330         // 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);
12331         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
12332                 if(!isWasmInitialized) {
12333                         throw new Error("initializeWasm() must be awaited first!");
12334                 }
12335                 const nativeResponseValue = wasm.TS_ChannelMonitor_block_connected(this_arg, encodeUint8Array(header), txdata, height, broadcaster, fee_estimator, logger);
12336                 return nativeResponseValue;
12337         }
12338         // 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);
12339         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
12340                 if(!isWasmInitialized) {
12341                         throw new Error("initializeWasm() must be awaited first!");
12342                 }
12343                 const nativeResponseValue = wasm.TS_ChannelMonitor_block_disconnected(this_arg, encodeUint8Array(header), height, broadcaster, fee_estimator, logger);
12344                 // debug statements here
12345         }
12346         // 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);
12347         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
12348                 if(!isWasmInitialized) {
12349                         throw new Error("initializeWasm() must be awaited first!");
12350                 }
12351                 const nativeResponseValue = wasm.TS_ChannelMonitor_transactions_confirmed(this_arg, encodeUint8Array(header), txdata, height, broadcaster, fee_estimator, logger);
12352                 return nativeResponseValue;
12353         }
12354         // 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);
12355         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
12356                 if(!isWasmInitialized) {
12357                         throw new Error("initializeWasm() must be awaited first!");
12358                 }
12359                 const nativeResponseValue = wasm.TS_ChannelMonitor_transaction_unconfirmed(this_arg, encodeUint8Array(txid), broadcaster, fee_estimator, logger);
12360                 // debug statements here
12361         }
12362         // 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);
12363         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
12364                 if(!isWasmInitialized) {
12365                         throw new Error("initializeWasm() must be awaited first!");
12366                 }
12367                 const nativeResponseValue = wasm.TS_ChannelMonitor_best_block_updated(this_arg, encodeUint8Array(header), height, broadcaster, fee_estimator, logger);
12368                 return nativeResponseValue;
12369         }
12370         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12371         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
12372                 if(!isWasmInitialized) {
12373                         throw new Error("initializeWasm() must be awaited first!");
12374                 }
12375                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_relevant_txids(this_arg);
12376                 return nativeResponseValue;
12377         }
12378         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12379         export function ChannelMonitor_current_best_block(this_arg: number): number {
12380                 if(!isWasmInitialized) {
12381                         throw new Error("initializeWasm() must be awaited first!");
12382                 }
12383                 const nativeResponseValue = wasm.TS_ChannelMonitor_current_best_block(this_arg);
12384                 return nativeResponseValue;
12385         }
12386         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
12387         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
12388                 if(!isWasmInitialized) {
12389                         throw new Error("initializeWasm() must be awaited first!");
12390                 }
12391                 const nativeResponseValue = wasm.TS_ChannelMonitor_get_claimable_balances(this_arg);
12392                 return nativeResponseValue;
12393         }
12394         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
12395         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
12396                 if(!isWasmInitialized) {
12397                         throw new Error("initializeWasm() must be awaited first!");
12398                 }
12399                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_read(encodeUint8Array(ser), arg);
12400                 return nativeResponseValue;
12401         }
12402         // void OutPoint_free(struct LDKOutPoint this_obj);
12403         export function OutPoint_free(this_obj: number): void {
12404                 if(!isWasmInitialized) {
12405                         throw new Error("initializeWasm() must be awaited first!");
12406                 }
12407                 const nativeResponseValue = wasm.TS_OutPoint_free(this_obj);
12408                 // debug statements here
12409         }
12410         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
12411         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
12412                 if(!isWasmInitialized) {
12413                         throw new Error("initializeWasm() must be awaited first!");
12414                 }
12415                 const nativeResponseValue = wasm.TS_OutPoint_get_txid(this_ptr);
12416                 return decodeUint8Array(nativeResponseValue);
12417         }
12418         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12419         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
12420                 if(!isWasmInitialized) {
12421                         throw new Error("initializeWasm() must be awaited first!");
12422                 }
12423                 const nativeResponseValue = wasm.TS_OutPoint_set_txid(this_ptr, encodeUint8Array(val));
12424                 // debug statements here
12425         }
12426         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
12427         export function OutPoint_get_index(this_ptr: number): number {
12428                 if(!isWasmInitialized) {
12429                         throw new Error("initializeWasm() must be awaited first!");
12430                 }
12431                 const nativeResponseValue = wasm.TS_OutPoint_get_index(this_ptr);
12432                 return nativeResponseValue;
12433         }
12434         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
12435         export function OutPoint_set_index(this_ptr: number, val: number): void {
12436                 if(!isWasmInitialized) {
12437                         throw new Error("initializeWasm() must be awaited first!");
12438                 }
12439                 const nativeResponseValue = wasm.TS_OutPoint_set_index(this_ptr, val);
12440                 // debug statements here
12441         }
12442         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
12443         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
12444                 if(!isWasmInitialized) {
12445                         throw new Error("initializeWasm() must be awaited first!");
12446                 }
12447                 const nativeResponseValue = wasm.TS_OutPoint_new(encodeUint8Array(txid_arg), index_arg);
12448                 return nativeResponseValue;
12449         }
12450         // uint64_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
12451         export function OutPoint_clone_ptr(arg: number): number {
12452                 if(!isWasmInitialized) {
12453                         throw new Error("initializeWasm() must be awaited first!");
12454                 }
12455                 const nativeResponseValue = wasm.TS_OutPoint_clone_ptr(arg);
12456                 return nativeResponseValue;
12457         }
12458         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
12459         export function OutPoint_clone(orig: number): number {
12460                 if(!isWasmInitialized) {
12461                         throw new Error("initializeWasm() must be awaited first!");
12462                 }
12463                 const nativeResponseValue = wasm.TS_OutPoint_clone(orig);
12464                 return nativeResponseValue;
12465         }
12466         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
12467         export function OutPoint_eq(a: number, b: number): boolean {
12468                 if(!isWasmInitialized) {
12469                         throw new Error("initializeWasm() must be awaited first!");
12470                 }
12471                 const nativeResponseValue = wasm.TS_OutPoint_eq(a, b);
12472                 return nativeResponseValue;
12473         }
12474         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
12475         export function OutPoint_hash(o: number): number {
12476                 if(!isWasmInitialized) {
12477                         throw new Error("initializeWasm() must be awaited first!");
12478                 }
12479                 const nativeResponseValue = wasm.TS_OutPoint_hash(o);
12480                 return nativeResponseValue;
12481         }
12482         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
12483         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
12484                 if(!isWasmInitialized) {
12485                         throw new Error("initializeWasm() must be awaited first!");
12486                 }
12487                 const nativeResponseValue = wasm.TS_OutPoint_to_channel_id(this_arg);
12488                 return decodeUint8Array(nativeResponseValue);
12489         }
12490         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
12491         export function OutPoint_write(obj: number): Uint8Array {
12492                 if(!isWasmInitialized) {
12493                         throw new Error("initializeWasm() must be awaited first!");
12494                 }
12495                 const nativeResponseValue = wasm.TS_OutPoint_write(obj);
12496                 return decodeUint8Array(nativeResponseValue);
12497         }
12498         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
12499         export function OutPoint_read(ser: Uint8Array): number {
12500                 if(!isWasmInitialized) {
12501                         throw new Error("initializeWasm() must be awaited first!");
12502                 }
12503                 const nativeResponseValue = wasm.TS_OutPoint_read(encodeUint8Array(ser));
12504                 return nativeResponseValue;
12505         }
12506         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
12507         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
12508                 if(!isWasmInitialized) {
12509                         throw new Error("initializeWasm() must be awaited first!");
12510                 }
12511                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_free(this_obj);
12512                 // debug statements here
12513         }
12514         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12515         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
12516                 if(!isWasmInitialized) {
12517                         throw new Error("initializeWasm() must be awaited first!");
12518                 }
12519                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
12520                 return nativeResponseValue;
12521         }
12522         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12523         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
12524                 if(!isWasmInitialized) {
12525                         throw new Error("initializeWasm() must be awaited first!");
12526                 }
12527                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
12528                 // debug statements here
12529         }
12530         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12531         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
12532                 if(!isWasmInitialized) {
12533                         throw new Error("initializeWasm() must be awaited first!");
12534                 }
12535                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
12536                 return decodeUint8Array(nativeResponseValue);
12537         }
12538         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12539         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12540                 if(!isWasmInitialized) {
12541                         throw new Error("initializeWasm() must be awaited first!");
12542                 }
12543                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeUint8Array(val));
12544                 // debug statements here
12545         }
12546         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12547         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
12548                 if(!isWasmInitialized) {
12549                         throw new Error("initializeWasm() must be awaited first!");
12550                 }
12551                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
12552                 return nativeResponseValue;
12553         }
12554         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
12555         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
12556                 if(!isWasmInitialized) {
12557                         throw new Error("initializeWasm() must be awaited first!");
12558                 }
12559                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
12560                 // debug statements here
12561         }
12562         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
12563         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
12564                 if(!isWasmInitialized) {
12565                         throw new Error("initializeWasm() must be awaited first!");
12566                 }
12567                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
12568                 // debug statements here
12569         }
12570         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12571         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
12572                 if(!isWasmInitialized) {
12573                         throw new Error("initializeWasm() must be awaited first!");
12574                 }
12575                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
12576                 return decodeUint8Array(nativeResponseValue);
12577         }
12578         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12579         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
12580                 if(!isWasmInitialized) {
12581                         throw new Error("initializeWasm() must be awaited first!");
12582                 }
12583                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeUint8Array(val));
12584                 // debug statements here
12585         }
12586         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
12587         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
12588                 if(!isWasmInitialized) {
12589                         throw new Error("initializeWasm() must be awaited first!");
12590                 }
12591                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
12592                 return decodeUint8Array(nativeResponseValue);
12593         }
12594         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12595         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
12596                 if(!isWasmInitialized) {
12597                         throw new Error("initializeWasm() must be awaited first!");
12598                 }
12599                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeUint8Array(val));
12600                 // debug statements here
12601         }
12602         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12603         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
12604                 if(!isWasmInitialized) {
12605                         throw new Error("initializeWasm() must be awaited first!");
12606                 }
12607                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
12608                 return nativeResponseValue;
12609         }
12610         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
12611         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
12612                 if(!isWasmInitialized) {
12613                         throw new Error("initializeWasm() must be awaited first!");
12614                 }
12615                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
12616                 // debug statements here
12617         }
12618         // 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);
12619         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 {
12620                 if(!isWasmInitialized) {
12621                         throw new Error("initializeWasm() must be awaited first!");
12622                 }
12623                 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);
12624                 return nativeResponseValue;
12625         }
12626         // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
12627         export function DelayedPaymentOutputDescriptor_clone_ptr(arg: number): number {
12628                 if(!isWasmInitialized) {
12629                         throw new Error("initializeWasm() must be awaited first!");
12630                 }
12631                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone_ptr(arg);
12632                 return nativeResponseValue;
12633         }
12634         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
12635         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
12636                 if(!isWasmInitialized) {
12637                         throw new Error("initializeWasm() must be awaited first!");
12638                 }
12639                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone(orig);
12640                 return nativeResponseValue;
12641         }
12642         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
12643         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
12644                 if(!isWasmInitialized) {
12645                         throw new Error("initializeWasm() must be awaited first!");
12646                 }
12647                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_write(obj);
12648                 return decodeUint8Array(nativeResponseValue);
12649         }
12650         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
12651         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
12652                 if(!isWasmInitialized) {
12653                         throw new Error("initializeWasm() must be awaited first!");
12654                 }
12655                 const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_read(encodeUint8Array(ser));
12656                 return nativeResponseValue;
12657         }
12658         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
12659         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
12660                 if(!isWasmInitialized) {
12661                         throw new Error("initializeWasm() must be awaited first!");
12662                 }
12663                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_free(this_obj);
12664                 // debug statements here
12665         }
12666         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12667         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
12668                 if(!isWasmInitialized) {
12669                         throw new Error("initializeWasm() must be awaited first!");
12670                 }
12671                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
12672                 return nativeResponseValue;
12673         }
12674         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12675         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
12676                 if(!isWasmInitialized) {
12677                         throw new Error("initializeWasm() must be awaited first!");
12678                 }
12679                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
12680                 // debug statements here
12681         }
12682         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
12683         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
12684                 if(!isWasmInitialized) {
12685                         throw new Error("initializeWasm() must be awaited first!");
12686                 }
12687                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_output(this_ptr, val);
12688                 // debug statements here
12689         }
12690         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
12691         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
12692                 if(!isWasmInitialized) {
12693                         throw new Error("initializeWasm() must be awaited first!");
12694                 }
12695                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
12696                 return decodeUint8Array(nativeResponseValue);
12697         }
12698         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12699         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
12700                 if(!isWasmInitialized) {
12701                         throw new Error("initializeWasm() must be awaited first!");
12702                 }
12703                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeUint8Array(val));
12704                 // debug statements here
12705         }
12706         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
12707         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
12708                 if(!isWasmInitialized) {
12709                         throw new Error("initializeWasm() must be awaited first!");
12710                 }
12711                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
12712                 return nativeResponseValue;
12713         }
12714         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
12715         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
12716                 if(!isWasmInitialized) {
12717                         throw new Error("initializeWasm() must be awaited first!");
12718                 }
12719                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
12720                 // debug statements here
12721         }
12722         // 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);
12723         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
12724                 if(!isWasmInitialized) {
12725                         throw new Error("initializeWasm() must be awaited first!");
12726                 }
12727                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeUint8Array(channel_keys_id_arg), channel_value_satoshis_arg);
12728                 return nativeResponseValue;
12729         }
12730         // uint64_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
12731         export function StaticPaymentOutputDescriptor_clone_ptr(arg: number): number {
12732                 if(!isWasmInitialized) {
12733                         throw new Error("initializeWasm() must be awaited first!");
12734                 }
12735                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone_ptr(arg);
12736                 return nativeResponseValue;
12737         }
12738         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
12739         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
12740                 if(!isWasmInitialized) {
12741                         throw new Error("initializeWasm() must be awaited first!");
12742                 }
12743                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone(orig);
12744                 return nativeResponseValue;
12745         }
12746         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
12747         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
12748                 if(!isWasmInitialized) {
12749                         throw new Error("initializeWasm() must be awaited first!");
12750                 }
12751                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_write(obj);
12752                 return decodeUint8Array(nativeResponseValue);
12753         }
12754         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
12755         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
12756                 if(!isWasmInitialized) {
12757                         throw new Error("initializeWasm() must be awaited first!");
12758                 }
12759                 const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_read(encodeUint8Array(ser));
12760                 return nativeResponseValue;
12761         }
12762         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
12763         export function SpendableOutputDescriptor_free(this_ptr: number): void {
12764                 if(!isWasmInitialized) {
12765                         throw new Error("initializeWasm() must be awaited first!");
12766                 }
12767                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_free(this_ptr);
12768                 // debug statements here
12769         }
12770         // uint64_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
12771         export function SpendableOutputDescriptor_clone_ptr(arg: number): number {
12772                 if(!isWasmInitialized) {
12773                         throw new Error("initializeWasm() must be awaited first!");
12774                 }
12775                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone_ptr(arg);
12776                 return nativeResponseValue;
12777         }
12778         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
12779         export function SpendableOutputDescriptor_clone(orig: number): number {
12780                 if(!isWasmInitialized) {
12781                         throw new Error("initializeWasm() must be awaited first!");
12782                 }
12783                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone(orig);
12784                 return nativeResponseValue;
12785         }
12786         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
12787         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
12788                 if(!isWasmInitialized) {
12789                         throw new Error("initializeWasm() must be awaited first!");
12790                 }
12791                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_output(outpoint, output);
12792                 return nativeResponseValue;
12793         }
12794         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
12795         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
12796                 if(!isWasmInitialized) {
12797                         throw new Error("initializeWasm() must be awaited first!");
12798                 }
12799                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_delayed_payment_output(a);
12800                 return nativeResponseValue;
12801         }
12802         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
12803         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
12804                 if(!isWasmInitialized) {
12805                         throw new Error("initializeWasm() must be awaited first!");
12806                 }
12807                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_payment_output(a);
12808                 return nativeResponseValue;
12809         }
12810         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
12811         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
12812                 if(!isWasmInitialized) {
12813                         throw new Error("initializeWasm() must be awaited first!");
12814                 }
12815                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_write(obj);
12816                 return decodeUint8Array(nativeResponseValue);
12817         }
12818         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
12819         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
12820                 if(!isWasmInitialized) {
12821                         throw new Error("initializeWasm() must be awaited first!");
12822                 }
12823                 const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_read(encodeUint8Array(ser));
12824                 return nativeResponseValue;
12825         }
12826         // void BaseSign_free(struct LDKBaseSign this_ptr);
12827         export function BaseSign_free(this_ptr: number): void {
12828                 if(!isWasmInitialized) {
12829                         throw new Error("initializeWasm() must be awaited first!");
12830                 }
12831                 const nativeResponseValue = wasm.TS_BaseSign_free(this_ptr);
12832                 // debug statements here
12833         }
12834         // uint64_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
12835         export function Sign_clone_ptr(arg: number): number {
12836                 if(!isWasmInitialized) {
12837                         throw new Error("initializeWasm() must be awaited first!");
12838                 }
12839                 const nativeResponseValue = wasm.TS_Sign_clone_ptr(arg);
12840                 return nativeResponseValue;
12841         }
12842         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
12843         export function Sign_clone(orig: number): number {
12844                 if(!isWasmInitialized) {
12845                         throw new Error("initializeWasm() must be awaited first!");
12846                 }
12847                 const nativeResponseValue = wasm.TS_Sign_clone(orig);
12848                 return nativeResponseValue;
12849         }
12850         // void Sign_free(struct LDKSign this_ptr);
12851         export function Sign_free(this_ptr: number): void {
12852                 if(!isWasmInitialized) {
12853                         throw new Error("initializeWasm() must be awaited first!");
12854                 }
12855                 const nativeResponseValue = wasm.TS_Sign_free(this_ptr);
12856                 // debug statements here
12857         }
12858         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
12859         export function KeysInterface_free(this_ptr: number): void {
12860                 if(!isWasmInitialized) {
12861                         throw new Error("initializeWasm() must be awaited first!");
12862                 }
12863                 const nativeResponseValue = wasm.TS_KeysInterface_free(this_ptr);
12864                 // debug statements here
12865         }
12866         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
12867         export function InMemorySigner_free(this_obj: number): void {
12868                 if(!isWasmInitialized) {
12869                         throw new Error("initializeWasm() must be awaited first!");
12870                 }
12871                 const nativeResponseValue = wasm.TS_InMemorySigner_free(this_obj);
12872                 // debug statements here
12873         }
12874         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12875         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
12876                 if(!isWasmInitialized) {
12877                         throw new Error("initializeWasm() must be awaited first!");
12878                 }
12879                 const nativeResponseValue = wasm.TS_InMemorySigner_get_funding_key(this_ptr);
12880                 return decodeUint8Array(nativeResponseValue);
12881         }
12882         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12883         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
12884                 if(!isWasmInitialized) {
12885                         throw new Error("initializeWasm() must be awaited first!");
12886                 }
12887                 const nativeResponseValue = wasm.TS_InMemorySigner_set_funding_key(this_ptr, encodeUint8Array(val));
12888                 // debug statements here
12889         }
12890         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12891         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
12892                 if(!isWasmInitialized) {
12893                         throw new Error("initializeWasm() must be awaited first!");
12894                 }
12895                 const nativeResponseValue = wasm.TS_InMemorySigner_get_revocation_base_key(this_ptr);
12896                 return decodeUint8Array(nativeResponseValue);
12897         }
12898         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12899         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
12900                 if(!isWasmInitialized) {
12901                         throw new Error("initializeWasm() must be awaited first!");
12902                 }
12903                 const nativeResponseValue = wasm.TS_InMemorySigner_set_revocation_base_key(this_ptr, encodeUint8Array(val));
12904                 // debug statements here
12905         }
12906         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12907         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
12908                 if(!isWasmInitialized) {
12909                         throw new Error("initializeWasm() must be awaited first!");
12910                 }
12911                 const nativeResponseValue = wasm.TS_InMemorySigner_get_payment_key(this_ptr);
12912                 return decodeUint8Array(nativeResponseValue);
12913         }
12914         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12915         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
12916                 if(!isWasmInitialized) {
12917                         throw new Error("initializeWasm() must be awaited first!");
12918                 }
12919                 const nativeResponseValue = wasm.TS_InMemorySigner_set_payment_key(this_ptr, encodeUint8Array(val));
12920                 // debug statements here
12921         }
12922         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12923         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
12924                 if(!isWasmInitialized) {
12925                         throw new Error("initializeWasm() must be awaited first!");
12926                 }
12927                 const nativeResponseValue = wasm.TS_InMemorySigner_get_delayed_payment_base_key(this_ptr);
12928                 return decodeUint8Array(nativeResponseValue);
12929         }
12930         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12931         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
12932                 if(!isWasmInitialized) {
12933                         throw new Error("initializeWasm() must be awaited first!");
12934                 }
12935                 const nativeResponseValue = wasm.TS_InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeUint8Array(val));
12936                 // debug statements here
12937         }
12938         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12939         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
12940                 if(!isWasmInitialized) {
12941                         throw new Error("initializeWasm() must be awaited first!");
12942                 }
12943                 const nativeResponseValue = wasm.TS_InMemorySigner_get_htlc_base_key(this_ptr);
12944                 return decodeUint8Array(nativeResponseValue);
12945         }
12946         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
12947         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
12948                 if(!isWasmInitialized) {
12949                         throw new Error("initializeWasm() must be awaited first!");
12950                 }
12951                 const nativeResponseValue = wasm.TS_InMemorySigner_set_htlc_base_key(this_ptr, encodeUint8Array(val));
12952                 // debug statements here
12953         }
12954         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
12955         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
12956                 if(!isWasmInitialized) {
12957                         throw new Error("initializeWasm() must be awaited first!");
12958                 }
12959                 const nativeResponseValue = wasm.TS_InMemorySigner_get_commitment_seed(this_ptr);
12960                 return decodeUint8Array(nativeResponseValue);
12961         }
12962         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12963         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
12964                 if(!isWasmInitialized) {
12965                         throw new Error("initializeWasm() must be awaited first!");
12966                 }
12967                 const nativeResponseValue = wasm.TS_InMemorySigner_set_commitment_seed(this_ptr, encodeUint8Array(val));
12968                 // debug statements here
12969         }
12970         // uint64_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
12971         export function InMemorySigner_clone_ptr(arg: number): number {
12972                 if(!isWasmInitialized) {
12973                         throw new Error("initializeWasm() must be awaited first!");
12974                 }
12975                 const nativeResponseValue = wasm.TS_InMemorySigner_clone_ptr(arg);
12976                 return nativeResponseValue;
12977         }
12978         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
12979         export function InMemorySigner_clone(orig: number): number {
12980                 if(!isWasmInitialized) {
12981                         throw new Error("initializeWasm() must be awaited first!");
12982                 }
12983                 const nativeResponseValue = wasm.TS_InMemorySigner_clone(orig);
12984                 return nativeResponseValue;
12985         }
12986         // 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);
12987         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 {
12988                 if(!isWasmInitialized) {
12989                         throw new Error("initializeWasm() must be awaited first!");
12990                 }
12991                 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));
12992                 return nativeResponseValue;
12993         }
12994         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12995         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
12996                 if(!isWasmInitialized) {
12997                         throw new Error("initializeWasm() must be awaited first!");
12998                 }
12999                 const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_pubkeys(this_arg);
13000                 return nativeResponseValue;
13001         }
13002         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13003         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
13004                 if(!isWasmInitialized) {
13005                         throw new Error("initializeWasm() must be awaited first!");
13006                 }
13007                 const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_selected_contest_delay(this_arg);
13008                 return nativeResponseValue;
13009         }
13010         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13011         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
13012                 if(!isWasmInitialized) {
13013                         throw new Error("initializeWasm() must be awaited first!");
13014                 }
13015                 const nativeResponseValue = wasm.TS_InMemorySigner_holder_selected_contest_delay(this_arg);
13016                 return nativeResponseValue;
13017         }
13018         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13019         export function InMemorySigner_is_outbound(this_arg: number): boolean {
13020                 if(!isWasmInitialized) {
13021                         throw new Error("initializeWasm() must be awaited first!");
13022                 }
13023                 const nativeResponseValue = wasm.TS_InMemorySigner_is_outbound(this_arg);
13024                 return nativeResponseValue;
13025         }
13026         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13027         export function InMemorySigner_funding_outpoint(this_arg: number): number {
13028                 if(!isWasmInitialized) {
13029                         throw new Error("initializeWasm() must be awaited first!");
13030                 }
13031                 const nativeResponseValue = wasm.TS_InMemorySigner_funding_outpoint(this_arg);
13032                 return nativeResponseValue;
13033         }
13034         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13035         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
13036                 if(!isWasmInitialized) {
13037                         throw new Error("initializeWasm() must be awaited first!");
13038                 }
13039                 const nativeResponseValue = wasm.TS_InMemorySigner_get_channel_parameters(this_arg);
13040                 return nativeResponseValue;
13041         }
13042         // MUST_USE_RES bool InMemorySigner_opt_anchors(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13043         export function InMemorySigner_opt_anchors(this_arg: number): boolean {
13044                 if(!isWasmInitialized) {
13045                         throw new Error("initializeWasm() must be awaited first!");
13046                 }
13047                 const nativeResponseValue = wasm.TS_InMemorySigner_opt_anchors(this_arg);
13048                 return nativeResponseValue;
13049         }
13050         // 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);
13051         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
13052                 if(!isWasmInitialized) {
13053                         throw new Error("initializeWasm() must be awaited first!");
13054                 }
13055                 const nativeResponseValue = wasm.TS_InMemorySigner_sign_counterparty_payment_input(this_arg, encodeUint8Array(spend_tx), input_idx, descriptor);
13056                 return nativeResponseValue;
13057         }
13058         // 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);
13059         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
13060                 if(!isWasmInitialized) {
13061                         throw new Error("initializeWasm() must be awaited first!");
13062                 }
13063                 const nativeResponseValue = wasm.TS_InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeUint8Array(spend_tx), input_idx, descriptor);
13064                 return nativeResponseValue;
13065         }
13066         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13067         export function InMemorySigner_as_BaseSign(this_arg: number): number {
13068                 if(!isWasmInitialized) {
13069                         throw new Error("initializeWasm() must be awaited first!");
13070                 }
13071                 const nativeResponseValue = wasm.TS_InMemorySigner_as_BaseSign(this_arg);
13072                 return nativeResponseValue;
13073         }
13074         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13075         export function InMemorySigner_as_Sign(this_arg: number): number {
13076                 if(!isWasmInitialized) {
13077                         throw new Error("initializeWasm() must be awaited first!");
13078                 }
13079                 const nativeResponseValue = wasm.TS_InMemorySigner_as_Sign(this_arg);
13080                 return nativeResponseValue;
13081         }
13082         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
13083         export function InMemorySigner_write(obj: number): Uint8Array {
13084                 if(!isWasmInitialized) {
13085                         throw new Error("initializeWasm() must be awaited first!");
13086                 }
13087                 const nativeResponseValue = wasm.TS_InMemorySigner_write(obj);
13088                 return decodeUint8Array(nativeResponseValue);
13089         }
13090         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
13091         export function InMemorySigner_read(ser: Uint8Array): number {
13092                 if(!isWasmInitialized) {
13093                         throw new Error("initializeWasm() must be awaited first!");
13094                 }
13095                 const nativeResponseValue = wasm.TS_InMemorySigner_read(encodeUint8Array(ser));
13096                 return nativeResponseValue;
13097         }
13098         // void KeysManager_free(struct LDKKeysManager this_obj);
13099         export function KeysManager_free(this_obj: number): void {
13100                 if(!isWasmInitialized) {
13101                         throw new Error("initializeWasm() must be awaited first!");
13102                 }
13103                 const nativeResponseValue = wasm.TS_KeysManager_free(this_obj);
13104                 // debug statements here
13105         }
13106         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
13107         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
13108                 if(!isWasmInitialized) {
13109                         throw new Error("initializeWasm() must be awaited first!");
13110                 }
13111                 const nativeResponseValue = wasm.TS_KeysManager_new(encodeUint8Array(seed), starting_time_secs, starting_time_nanos);
13112                 return nativeResponseValue;
13113         }
13114         // 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]);
13115         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
13116                 if(!isWasmInitialized) {
13117                         throw new Error("initializeWasm() must be awaited first!");
13118                 }
13119                 const nativeResponseValue = wasm.TS_KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeUint8Array(params));
13120                 return nativeResponseValue;
13121         }
13122         // 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);
13123         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
13124                 if(!isWasmInitialized) {
13125                         throw new Error("initializeWasm() must be awaited first!");
13126                 }
13127                 const nativeResponseValue = wasm.TS_KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeUint8Array(change_destination_script), feerate_sat_per_1000_weight);
13128                 return nativeResponseValue;
13129         }
13130         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
13131         export function KeysManager_as_KeysInterface(this_arg: number): number {
13132                 if(!isWasmInitialized) {
13133                         throw new Error("initializeWasm() must be awaited first!");
13134                 }
13135                 const nativeResponseValue = wasm.TS_KeysManager_as_KeysInterface(this_arg);
13136                 return nativeResponseValue;
13137         }
13138         // void ChannelManager_free(struct LDKChannelManager this_obj);
13139         export function ChannelManager_free(this_obj: number): void {
13140                 if(!isWasmInitialized) {
13141                         throw new Error("initializeWasm() must be awaited first!");
13142                 }
13143                 const nativeResponseValue = wasm.TS_ChannelManager_free(this_obj);
13144                 // debug statements here
13145         }
13146         // void ChainParameters_free(struct LDKChainParameters this_obj);
13147         export function ChainParameters_free(this_obj: number): void {
13148                 if(!isWasmInitialized) {
13149                         throw new Error("initializeWasm() must be awaited first!");
13150                 }
13151                 const nativeResponseValue = wasm.TS_ChainParameters_free(this_obj);
13152                 // debug statements here
13153         }
13154         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
13155         export function ChainParameters_get_network(this_ptr: number): Network {
13156                 if(!isWasmInitialized) {
13157                         throw new Error("initializeWasm() must be awaited first!");
13158                 }
13159                 const nativeResponseValue = wasm.TS_ChainParameters_get_network(this_ptr);
13160                 return nativeResponseValue;
13161         }
13162         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
13163         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
13164                 if(!isWasmInitialized) {
13165                         throw new Error("initializeWasm() must be awaited first!");
13166                 }
13167                 const nativeResponseValue = wasm.TS_ChainParameters_set_network(this_ptr, val);
13168                 // debug statements here
13169         }
13170         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
13171         export function ChainParameters_get_best_block(this_ptr: number): number {
13172                 if(!isWasmInitialized) {
13173                         throw new Error("initializeWasm() must be awaited first!");
13174                 }
13175                 const nativeResponseValue = wasm.TS_ChainParameters_get_best_block(this_ptr);
13176                 return nativeResponseValue;
13177         }
13178         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
13179         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
13180                 if(!isWasmInitialized) {
13181                         throw new Error("initializeWasm() must be awaited first!");
13182                 }
13183                 const nativeResponseValue = wasm.TS_ChainParameters_set_best_block(this_ptr, val);
13184                 // debug statements here
13185         }
13186         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
13187         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
13188                 if(!isWasmInitialized) {
13189                         throw new Error("initializeWasm() must be awaited first!");
13190                 }
13191                 const nativeResponseValue = wasm.TS_ChainParameters_new(network_arg, best_block_arg);
13192                 return nativeResponseValue;
13193         }
13194         // uint64_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
13195         export function ChainParameters_clone_ptr(arg: number): number {
13196                 if(!isWasmInitialized) {
13197                         throw new Error("initializeWasm() must be awaited first!");
13198                 }
13199                 const nativeResponseValue = wasm.TS_ChainParameters_clone_ptr(arg);
13200                 return nativeResponseValue;
13201         }
13202         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
13203         export function ChainParameters_clone(orig: number): number {
13204                 if(!isWasmInitialized) {
13205                         throw new Error("initializeWasm() must be awaited first!");
13206                 }
13207                 const nativeResponseValue = wasm.TS_ChainParameters_clone(orig);
13208                 return nativeResponseValue;
13209         }
13210         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
13211         export function CounterpartyForwardingInfo_free(this_obj: number): void {
13212                 if(!isWasmInitialized) {
13213                         throw new Error("initializeWasm() must be awaited first!");
13214                 }
13215                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_free(this_obj);
13216                 // debug statements here
13217         }
13218         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
13219         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
13220                 if(!isWasmInitialized) {
13221                         throw new Error("initializeWasm() must be awaited first!");
13222                 }
13223                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
13224                 return nativeResponseValue;
13225         }
13226         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
13227         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
13228                 if(!isWasmInitialized) {
13229                         throw new Error("initializeWasm() must be awaited first!");
13230                 }
13231                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
13232                 // debug statements here
13233         }
13234         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
13235         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
13236                 if(!isWasmInitialized) {
13237                         throw new Error("initializeWasm() must be awaited first!");
13238                 }
13239                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
13240                 return nativeResponseValue;
13241         }
13242         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
13243         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
13244                 if(!isWasmInitialized) {
13245                         throw new Error("initializeWasm() must be awaited first!");
13246                 }
13247                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
13248                 // debug statements here
13249         }
13250         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
13251         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
13252                 if(!isWasmInitialized) {
13253                         throw new Error("initializeWasm() must be awaited first!");
13254                 }
13255                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
13256                 return nativeResponseValue;
13257         }
13258         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
13259         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13260                 if(!isWasmInitialized) {
13261                         throw new Error("initializeWasm() must be awaited first!");
13262                 }
13263                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
13264                 // debug statements here
13265         }
13266         // 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);
13267         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
13268                 if(!isWasmInitialized) {
13269                         throw new Error("initializeWasm() must be awaited first!");
13270                 }
13271                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
13272                 return nativeResponseValue;
13273         }
13274         // uint64_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
13275         export function CounterpartyForwardingInfo_clone_ptr(arg: number): number {
13276                 if(!isWasmInitialized) {
13277                         throw new Error("initializeWasm() must be awaited first!");
13278                 }
13279                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone_ptr(arg);
13280                 return nativeResponseValue;
13281         }
13282         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
13283         export function CounterpartyForwardingInfo_clone(orig: number): number {
13284                 if(!isWasmInitialized) {
13285                         throw new Error("initializeWasm() must be awaited first!");
13286                 }
13287                 const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone(orig);
13288                 return nativeResponseValue;
13289         }
13290         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
13291         export function ChannelCounterparty_free(this_obj: number): void {
13292                 if(!isWasmInitialized) {
13293                         throw new Error("initializeWasm() must be awaited first!");
13294                 }
13295                 const nativeResponseValue = wasm.TS_ChannelCounterparty_free(this_obj);
13296                 // debug statements here
13297         }
13298         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13299         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
13300                 if(!isWasmInitialized) {
13301                         throw new Error("initializeWasm() must be awaited first!");
13302                 }
13303                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_node_id(this_ptr);
13304                 return decodeUint8Array(nativeResponseValue);
13305         }
13306         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13307         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
13308                 if(!isWasmInitialized) {
13309                         throw new Error("initializeWasm() must be awaited first!");
13310                 }
13311                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_node_id(this_ptr, encodeUint8Array(val));
13312                 // debug statements here
13313         }
13314         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13315         export function ChannelCounterparty_get_features(this_ptr: number): number {
13316                 if(!isWasmInitialized) {
13317                         throw new Error("initializeWasm() must be awaited first!");
13318                 }
13319                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_features(this_ptr);
13320                 return nativeResponseValue;
13321         }
13322         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
13323         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
13324                 if(!isWasmInitialized) {
13325                         throw new Error("initializeWasm() must be awaited first!");
13326                 }
13327                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_features(this_ptr, val);
13328                 // debug statements here
13329         }
13330         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13331         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
13332                 if(!isWasmInitialized) {
13333                         throw new Error("initializeWasm() must be awaited first!");
13334                 }
13335                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
13336                 return nativeResponseValue;
13337         }
13338         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
13339         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
13340                 if(!isWasmInitialized) {
13341                         throw new Error("initializeWasm() must be awaited first!");
13342                 }
13343                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
13344                 // debug statements here
13345         }
13346         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
13347         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
13348                 if(!isWasmInitialized) {
13349                         throw new Error("initializeWasm() must be awaited first!");
13350                 }
13351                 const nativeResponseValue = wasm.TS_ChannelCounterparty_get_forwarding_info(this_ptr);
13352                 return nativeResponseValue;
13353         }
13354         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
13355         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
13356                 if(!isWasmInitialized) {
13357                         throw new Error("initializeWasm() must be awaited first!");
13358                 }
13359                 const nativeResponseValue = wasm.TS_ChannelCounterparty_set_forwarding_info(this_ptr, val);
13360                 // debug statements here
13361         }
13362         // 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);
13363         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
13364                 if(!isWasmInitialized) {
13365                         throw new Error("initializeWasm() must be awaited first!");
13366                 }
13367                 const nativeResponseValue = wasm.TS_ChannelCounterparty_new(encodeUint8Array(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
13368                 return nativeResponseValue;
13369         }
13370         // uint64_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
13371         export function ChannelCounterparty_clone_ptr(arg: number): number {
13372                 if(!isWasmInitialized) {
13373                         throw new Error("initializeWasm() must be awaited first!");
13374                 }
13375                 const nativeResponseValue = wasm.TS_ChannelCounterparty_clone_ptr(arg);
13376                 return nativeResponseValue;
13377         }
13378         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
13379         export function ChannelCounterparty_clone(orig: number): number {
13380                 if(!isWasmInitialized) {
13381                         throw new Error("initializeWasm() must be awaited first!");
13382                 }
13383                 const nativeResponseValue = wasm.TS_ChannelCounterparty_clone(orig);
13384                 return nativeResponseValue;
13385         }
13386         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
13387         export function ChannelDetails_free(this_obj: number): void {
13388                 if(!isWasmInitialized) {
13389                         throw new Error("initializeWasm() must be awaited first!");
13390                 }
13391                 const nativeResponseValue = wasm.TS_ChannelDetails_free(this_obj);
13392                 // debug statements here
13393         }
13394         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
13395         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
13396                 if(!isWasmInitialized) {
13397                         throw new Error("initializeWasm() must be awaited first!");
13398                 }
13399                 const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_id(this_ptr);
13400                 return decodeUint8Array(nativeResponseValue);
13401         }
13402         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13403         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
13404                 if(!isWasmInitialized) {
13405                         throw new Error("initializeWasm() must be awaited first!");
13406                 }
13407                 const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_id(this_ptr, encodeUint8Array(val));
13408                 // debug statements here
13409         }
13410         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13411         export function ChannelDetails_get_counterparty(this_ptr: number): number {
13412                 if(!isWasmInitialized) {
13413                         throw new Error("initializeWasm() must be awaited first!");
13414                 }
13415                 const nativeResponseValue = wasm.TS_ChannelDetails_get_counterparty(this_ptr);
13416                 return nativeResponseValue;
13417         }
13418         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
13419         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
13420                 if(!isWasmInitialized) {
13421                         throw new Error("initializeWasm() must be awaited first!");
13422                 }
13423                 const nativeResponseValue = wasm.TS_ChannelDetails_set_counterparty(this_ptr, val);
13424                 // debug statements here
13425         }
13426         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13427         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
13428                 if(!isWasmInitialized) {
13429                         throw new Error("initializeWasm() must be awaited first!");
13430                 }
13431                 const nativeResponseValue = wasm.TS_ChannelDetails_get_funding_txo(this_ptr);
13432                 return nativeResponseValue;
13433         }
13434         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13435         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
13436                 if(!isWasmInitialized) {
13437                         throw new Error("initializeWasm() must be awaited first!");
13438                 }
13439                 const nativeResponseValue = wasm.TS_ChannelDetails_set_funding_txo(this_ptr, val);
13440                 // debug statements here
13441         }
13442         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13443         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
13444                 if(!isWasmInitialized) {
13445                         throw new Error("initializeWasm() must be awaited first!");
13446                 }
13447                 const nativeResponseValue = wasm.TS_ChannelDetails_get_short_channel_id(this_ptr);
13448                 return nativeResponseValue;
13449         }
13450         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13451         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
13452                 if(!isWasmInitialized) {
13453                         throw new Error("initializeWasm() must be awaited first!");
13454                 }
13455                 const nativeResponseValue = wasm.TS_ChannelDetails_set_short_channel_id(this_ptr, val);
13456                 // debug statements here
13457         }
13458         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13459         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
13460                 if(!isWasmInitialized) {
13461                         throw new Error("initializeWasm() must be awaited first!");
13462                 }
13463                 const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_value_satoshis(this_ptr);
13464                 return nativeResponseValue;
13465         }
13466         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13467         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
13468                 if(!isWasmInitialized) {
13469                         throw new Error("initializeWasm() must be awaited first!");
13470                 }
13471                 const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_value_satoshis(this_ptr, val);
13472                 // debug statements here
13473         }
13474         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13475         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
13476                 if(!isWasmInitialized) {
13477                         throw new Error("initializeWasm() must be awaited first!");
13478                 }
13479                 const nativeResponseValue = wasm.TS_ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
13480                 return nativeResponseValue;
13481         }
13482         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13483         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
13484                 if(!isWasmInitialized) {
13485                         throw new Error("initializeWasm() must be awaited first!");
13486                 }
13487                 const nativeResponseValue = wasm.TS_ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
13488                 // debug statements here
13489         }
13490         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13491         export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
13492                 if(!isWasmInitialized) {
13493                         throw new Error("initializeWasm() must be awaited first!");
13494                 }
13495                 const nativeResponseValue = wasm.TS_ChannelDetails_get_user_channel_id(this_ptr);
13496                 return nativeResponseValue;
13497         }
13498         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13499         export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
13500                 if(!isWasmInitialized) {
13501                         throw new Error("initializeWasm() must be awaited first!");
13502                 }
13503                 const nativeResponseValue = wasm.TS_ChannelDetails_set_user_channel_id(this_ptr, val);
13504                 // debug statements here
13505         }
13506         // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13507         export function ChannelDetails_get_balance_msat(this_ptr: number): number {
13508                 if(!isWasmInitialized) {
13509                         throw new Error("initializeWasm() must be awaited first!");
13510                 }
13511                 const nativeResponseValue = wasm.TS_ChannelDetails_get_balance_msat(this_ptr);
13512                 return nativeResponseValue;
13513         }
13514         // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13515         export function ChannelDetails_set_balance_msat(this_ptr: number, val: number): void {
13516                 if(!isWasmInitialized) {
13517                         throw new Error("initializeWasm() must be awaited first!");
13518                 }
13519                 const nativeResponseValue = wasm.TS_ChannelDetails_set_balance_msat(this_ptr, val);
13520                 // debug statements here
13521         }
13522         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13523         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
13524                 if(!isWasmInitialized) {
13525                         throw new Error("initializeWasm() must be awaited first!");
13526                 }
13527                 const nativeResponseValue = wasm.TS_ChannelDetails_get_outbound_capacity_msat(this_ptr);
13528                 return nativeResponseValue;
13529         }
13530         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13531         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
13532                 if(!isWasmInitialized) {
13533                         throw new Error("initializeWasm() must be awaited first!");
13534                 }
13535                 const nativeResponseValue = wasm.TS_ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
13536                 // debug statements here
13537         }
13538         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13539         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
13540                 if(!isWasmInitialized) {
13541                         throw new Error("initializeWasm() must be awaited first!");
13542                 }
13543                 const nativeResponseValue = wasm.TS_ChannelDetails_get_inbound_capacity_msat(this_ptr);
13544                 return nativeResponseValue;
13545         }
13546         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
13547         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
13548                 if(!isWasmInitialized) {
13549                         throw new Error("initializeWasm() must be awaited first!");
13550                 }
13551                 const nativeResponseValue = wasm.TS_ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
13552                 // debug statements here
13553         }
13554         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13555         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
13556                 if(!isWasmInitialized) {
13557                         throw new Error("initializeWasm() must be awaited first!");
13558                 }
13559                 const nativeResponseValue = wasm.TS_ChannelDetails_get_confirmations_required(this_ptr);
13560                 return nativeResponseValue;
13561         }
13562         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
13563         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
13564                 if(!isWasmInitialized) {
13565                         throw new Error("initializeWasm() must be awaited first!");
13566                 }
13567                 const nativeResponseValue = wasm.TS_ChannelDetails_set_confirmations_required(this_ptr, val);
13568                 // debug statements here
13569         }
13570         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13571         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
13572                 if(!isWasmInitialized) {
13573                         throw new Error("initializeWasm() must be awaited first!");
13574                 }
13575                 const nativeResponseValue = wasm.TS_ChannelDetails_get_force_close_spend_delay(this_ptr);
13576                 return nativeResponseValue;
13577         }
13578         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
13579         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
13580                 if(!isWasmInitialized) {
13581                         throw new Error("initializeWasm() must be awaited first!");
13582                 }
13583                 const nativeResponseValue = wasm.TS_ChannelDetails_set_force_close_spend_delay(this_ptr, val);
13584                 // debug statements here
13585         }
13586         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13587         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
13588                 if(!isWasmInitialized) {
13589                         throw new Error("initializeWasm() must be awaited first!");
13590                 }
13591                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_outbound(this_ptr);
13592                 return nativeResponseValue;
13593         }
13594         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13595         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
13596                 if(!isWasmInitialized) {
13597                         throw new Error("initializeWasm() must be awaited first!");
13598                 }
13599                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_outbound(this_ptr, val);
13600                 // debug statements here
13601         }
13602         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13603         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
13604                 if(!isWasmInitialized) {
13605                         throw new Error("initializeWasm() must be awaited first!");
13606                 }
13607                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_funding_locked(this_ptr);
13608                 return nativeResponseValue;
13609         }
13610         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13611         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
13612                 if(!isWasmInitialized) {
13613                         throw new Error("initializeWasm() must be awaited first!");
13614                 }
13615                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_funding_locked(this_ptr, val);
13616                 // debug statements here
13617         }
13618         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13619         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
13620                 if(!isWasmInitialized) {
13621                         throw new Error("initializeWasm() must be awaited first!");
13622                 }
13623                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_usable(this_ptr);
13624                 return nativeResponseValue;
13625         }
13626         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13627         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
13628                 if(!isWasmInitialized) {
13629                         throw new Error("initializeWasm() must be awaited first!");
13630                 }
13631                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_usable(this_ptr, val);
13632                 // debug statements here
13633         }
13634         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
13635         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
13636                 if(!isWasmInitialized) {
13637                         throw new Error("initializeWasm() must be awaited first!");
13638                 }
13639                 const nativeResponseValue = wasm.TS_ChannelDetails_get_is_public(this_ptr);
13640                 return nativeResponseValue;
13641         }
13642         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
13643         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
13644                 if(!isWasmInitialized) {
13645                         throw new Error("initializeWasm() must be awaited first!");
13646                 }
13647                 const nativeResponseValue = wasm.TS_ChannelDetails_set_is_public(this_ptr, val);
13648                 // debug statements here
13649         }
13650         // 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);
13651         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 {
13652                 if(!isWasmInitialized) {
13653                         throw new Error("initializeWasm() must be awaited first!");
13654                 }
13655                 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);
13656                 return nativeResponseValue;
13657         }
13658         // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
13659         export function ChannelDetails_clone_ptr(arg: number): number {
13660                 if(!isWasmInitialized) {
13661                         throw new Error("initializeWasm() must be awaited first!");
13662                 }
13663                 const nativeResponseValue = wasm.TS_ChannelDetails_clone_ptr(arg);
13664                 return nativeResponseValue;
13665         }
13666         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
13667         export function ChannelDetails_clone(orig: number): number {
13668                 if(!isWasmInitialized) {
13669                         throw new Error("initializeWasm() must be awaited first!");
13670                 }
13671                 const nativeResponseValue = wasm.TS_ChannelDetails_clone(orig);
13672                 return nativeResponseValue;
13673         }
13674         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
13675         export function PaymentSendFailure_free(this_ptr: number): void {
13676                 if(!isWasmInitialized) {
13677                         throw new Error("initializeWasm() must be awaited first!");
13678                 }
13679                 const nativeResponseValue = wasm.TS_PaymentSendFailure_free(this_ptr);
13680                 // debug statements here
13681         }
13682         // uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
13683         export function PaymentSendFailure_clone_ptr(arg: number): number {
13684                 if(!isWasmInitialized) {
13685                         throw new Error("initializeWasm() must be awaited first!");
13686                 }
13687                 const nativeResponseValue = wasm.TS_PaymentSendFailure_clone_ptr(arg);
13688                 return nativeResponseValue;
13689         }
13690         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
13691         export function PaymentSendFailure_clone(orig: number): number {
13692                 if(!isWasmInitialized) {
13693                         throw new Error("initializeWasm() must be awaited first!");
13694                 }
13695                 const nativeResponseValue = wasm.TS_PaymentSendFailure_clone(orig);
13696                 return nativeResponseValue;
13697         }
13698         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
13699         export function PaymentSendFailure_parameter_error(a: number): number {
13700                 if(!isWasmInitialized) {
13701                         throw new Error("initializeWasm() must be awaited first!");
13702                 }
13703                 const nativeResponseValue = wasm.TS_PaymentSendFailure_parameter_error(a);
13704                 return nativeResponseValue;
13705         }
13706         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
13707         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
13708                 if(!isWasmInitialized) {
13709                         throw new Error("initializeWasm() must be awaited first!");
13710                 }
13711                 const nativeResponseValue = wasm.TS_PaymentSendFailure_path_parameter_error(a);
13712                 return nativeResponseValue;
13713         }
13714         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
13715         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
13716                 if(!isWasmInitialized) {
13717                         throw new Error("initializeWasm() must be awaited first!");
13718                 }
13719                 const nativeResponseValue = wasm.TS_PaymentSendFailure_all_failed_retry_safe(a);
13720                 return nativeResponseValue;
13721         }
13722         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
13723         export function PaymentSendFailure_partial_failure(results: number[], failed_paths_retry: number, payment_id: Uint8Array): number {
13724                 if(!isWasmInitialized) {
13725                         throw new Error("initializeWasm() must be awaited first!");
13726                 }
13727                 const nativeResponseValue = wasm.TS_PaymentSendFailure_partial_failure(results, failed_paths_retry, encodeUint8Array(payment_id));
13728                 return nativeResponseValue;
13729         }
13730         // 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);
13731         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
13732                 if(!isWasmInitialized) {
13733                         throw new Error("initializeWasm() must be awaited first!");
13734                 }
13735                 const nativeResponseValue = wasm.TS_ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
13736                 return nativeResponseValue;
13737         }
13738         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
13739         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
13740                 if(!isWasmInitialized) {
13741                         throw new Error("initializeWasm() must be awaited first!");
13742                 }
13743                 const nativeResponseValue = wasm.TS_ChannelManager_get_current_default_configuration(this_arg);
13744                 return nativeResponseValue;
13745         }
13746         // 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);
13747         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 {
13748                 if(!isWasmInitialized) {
13749                         throw new Error("initializeWasm() must be awaited first!");
13750                 }
13751                 const nativeResponseValue = wasm.TS_ChannelManager_create_channel(this_arg, encodeUint8Array(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
13752                 return nativeResponseValue;
13753         }
13754         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13755         export function ChannelManager_list_channels(this_arg: number): number[] {
13756                 if(!isWasmInitialized) {
13757                         throw new Error("initializeWasm() must be awaited first!");
13758                 }
13759                 const nativeResponseValue = wasm.TS_ChannelManager_list_channels(this_arg);
13760                 return nativeResponseValue;
13761         }
13762         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13763         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
13764                 if(!isWasmInitialized) {
13765                         throw new Error("initializeWasm() must be awaited first!");
13766                 }
13767                 const nativeResponseValue = wasm.TS_ChannelManager_list_usable_channels(this_arg);
13768                 return nativeResponseValue;
13769         }
13770         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
13771         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
13772                 if(!isWasmInitialized) {
13773                         throw new Error("initializeWasm() must be awaited first!");
13774                 }
13775                 const nativeResponseValue = wasm.TS_ChannelManager_close_channel(this_arg, encodeUint8Array(channel_id));
13776                 return nativeResponseValue;
13777         }
13778         // 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);
13779         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
13780                 if(!isWasmInitialized) {
13781                         throw new Error("initializeWasm() must be awaited first!");
13782                 }
13783                 const nativeResponseValue = wasm.TS_ChannelManager_close_channel_with_target_feerate(this_arg, encodeUint8Array(channel_id), target_feerate_sats_per_1000_weight);
13784                 return nativeResponseValue;
13785         }
13786         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
13787         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
13788                 if(!isWasmInitialized) {
13789                         throw new Error("initializeWasm() must be awaited first!");
13790                 }
13791                 const nativeResponseValue = wasm.TS_ChannelManager_force_close_channel(this_arg, encodeUint8Array(channel_id));
13792                 return nativeResponseValue;
13793         }
13794         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
13795         export function ChannelManager_force_close_all_channels(this_arg: number): void {
13796                 if(!isWasmInitialized) {
13797                         throw new Error("initializeWasm() must be awaited first!");
13798                 }
13799                 const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels(this_arg);
13800                 // debug statements here
13801         }
13802         // 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);
13803         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
13804                 if(!isWasmInitialized) {
13805                         throw new Error("initializeWasm() must be awaited first!");
13806                 }
13807                 const nativeResponseValue = wasm.TS_ChannelManager_send_payment(this_arg, route, encodeUint8Array(payment_hash), encodeUint8Array(payment_secret));
13808                 return nativeResponseValue;
13809         }
13810         // 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);
13811         export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
13812                 if(!isWasmInitialized) {
13813                         throw new Error("initializeWasm() must be awaited first!");
13814                 }
13815                 const nativeResponseValue = wasm.TS_ChannelManager_retry_payment(this_arg, route, encodeUint8Array(payment_id));
13816                 return nativeResponseValue;
13817         }
13818         // void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
13819         export function ChannelManager_abandon_payment(this_arg: number, payment_id: Uint8Array): void {
13820                 if(!isWasmInitialized) {
13821                         throw new Error("initializeWasm() must be awaited first!");
13822                 }
13823                 const nativeResponseValue = wasm.TS_ChannelManager_abandon_payment(this_arg, encodeUint8Array(payment_id));
13824                 // debug statements here
13825         }
13826         // 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);
13827         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
13828                 if(!isWasmInitialized) {
13829                         throw new Error("initializeWasm() must be awaited first!");
13830                 }
13831                 const nativeResponseValue = wasm.TS_ChannelManager_send_spontaneous_payment(this_arg, route, encodeUint8Array(payment_preimage));
13832                 return nativeResponseValue;
13833         }
13834         // 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);
13835         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
13836                 if(!isWasmInitialized) {
13837                         throw new Error("initializeWasm() must be awaited first!");
13838                 }
13839                 const nativeResponseValue = wasm.TS_ChannelManager_funding_transaction_generated(this_arg, encodeUint8Array(temporary_channel_id), encodeUint8Array(funding_transaction));
13840                 return nativeResponseValue;
13841         }
13842         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
13843         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
13844                 if(!isWasmInitialized) {
13845                         throw new Error("initializeWasm() must be awaited first!");
13846                 }
13847                 const nativeResponseValue = wasm.TS_ChannelManager_broadcast_node_announcement(this_arg, encodeUint8Array(rgb), encodeUint8Array(alias), addresses);
13848                 // debug statements here
13849         }
13850         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
13851         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
13852                 if(!isWasmInitialized) {
13853                         throw new Error("initializeWasm() must be awaited first!");
13854                 }
13855                 const nativeResponseValue = wasm.TS_ChannelManager_process_pending_htlc_forwards(this_arg);
13856                 // debug statements here
13857         }
13858         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
13859         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
13860                 if(!isWasmInitialized) {
13861                         throw new Error("initializeWasm() must be awaited first!");
13862                 }
13863                 const nativeResponseValue = wasm.TS_ChannelManager_timer_tick_occurred(this_arg);
13864                 // debug statements here
13865         }
13866         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
13867         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
13868                 if(!isWasmInitialized) {
13869                         throw new Error("initializeWasm() must be awaited first!");
13870                 }
13871                 const nativeResponseValue = wasm.TS_ChannelManager_fail_htlc_backwards(this_arg, encodeUint8Array(payment_hash));
13872                 return nativeResponseValue;
13873         }
13874         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
13875         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
13876                 if(!isWasmInitialized) {
13877                         throw new Error("initializeWasm() must be awaited first!");
13878                 }
13879                 const nativeResponseValue = wasm.TS_ChannelManager_claim_funds(this_arg, encodeUint8Array(payment_preimage));
13880                 return nativeResponseValue;
13881         }
13882         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
13883         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
13884                 if(!isWasmInitialized) {
13885                         throw new Error("initializeWasm() must be awaited first!");
13886                 }
13887                 const nativeResponseValue = wasm.TS_ChannelManager_get_our_node_id(this_arg);
13888                 return decodeUint8Array(nativeResponseValue);
13889         }
13890         // 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);
13891         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13892                 if(!isWasmInitialized) {
13893                         throw new Error("initializeWasm() must be awaited first!");
13894                 }
13895                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs);
13896                 return nativeResponseValue;
13897         }
13898         // 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);
13899         export function ChannelManager_create_inbound_payment_legacy(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13900                 if(!isWasmInitialized) {
13901                         throw new Error("initializeWasm() must be awaited first!");
13902                 }
13903                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_legacy(this_arg, min_value_msat, invoice_expiry_delta_secs);
13904                 return nativeResponseValue;
13905         }
13906         // 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);
13907         export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number): number {
13908                 if(!isWasmInitialized) {
13909                         throw new Error("initializeWasm() must be awaited first!");
13910                 }
13911                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash(this_arg, encodeUint8Array(payment_hash), min_value_msat, invoice_expiry_delta_secs);
13912                 return nativeResponseValue;
13913         }
13914         // 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);
13915         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 {
13916                 if(!isWasmInitialized) {
13917                         throw new Error("initializeWasm() must be awaited first!");
13918                 }
13919                 const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash_legacy(this_arg, encodeUint8Array(payment_hash), min_value_msat, invoice_expiry_delta_secs);
13920                 return nativeResponseValue;
13921         }
13922         // 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);
13923         export function ChannelManager_get_payment_preimage(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
13924                 if(!isWasmInitialized) {
13925                         throw new Error("initializeWasm() must be awaited first!");
13926                 }
13927                 const nativeResponseValue = wasm.TS_ChannelManager_get_payment_preimage(this_arg, encodeUint8Array(payment_hash), encodeUint8Array(payment_secret));
13928                 return nativeResponseValue;
13929         }
13930         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
13931         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
13932                 if(!isWasmInitialized) {
13933                         throw new Error("initializeWasm() must be awaited first!");
13934                 }
13935                 const nativeResponseValue = wasm.TS_ChannelManager_as_MessageSendEventsProvider(this_arg);
13936                 return nativeResponseValue;
13937         }
13938         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
13939         export function ChannelManager_as_EventsProvider(this_arg: number): number {
13940                 if(!isWasmInitialized) {
13941                         throw new Error("initializeWasm() must be awaited first!");
13942                 }
13943                 const nativeResponseValue = wasm.TS_ChannelManager_as_EventsProvider(this_arg);
13944                 return nativeResponseValue;
13945         }
13946         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
13947         export function ChannelManager_as_Listen(this_arg: number): number {
13948                 if(!isWasmInitialized) {
13949                         throw new Error("initializeWasm() must be awaited first!");
13950                 }
13951                 const nativeResponseValue = wasm.TS_ChannelManager_as_Listen(this_arg);
13952                 return nativeResponseValue;
13953         }
13954         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
13955         export function ChannelManager_as_Confirm(this_arg: number): number {
13956                 if(!isWasmInitialized) {
13957                         throw new Error("initializeWasm() must be awaited first!");
13958                 }
13959                 const nativeResponseValue = wasm.TS_ChannelManager_as_Confirm(this_arg);
13960                 return nativeResponseValue;
13961         }
13962         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
13963         export function ChannelManager_await_persistable_update(this_arg: number): void {
13964                 if(!isWasmInitialized) {
13965                         throw new Error("initializeWasm() must be awaited first!");
13966                 }
13967                 const nativeResponseValue = wasm.TS_ChannelManager_await_persistable_update(this_arg);
13968                 // debug statements here
13969         }
13970         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
13971         export function ChannelManager_current_best_block(this_arg: number): number {
13972                 if(!isWasmInitialized) {
13973                         throw new Error("initializeWasm() must be awaited first!");
13974                 }
13975                 const nativeResponseValue = wasm.TS_ChannelManager_current_best_block(this_arg);
13976                 return nativeResponseValue;
13977         }
13978         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
13979         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
13980                 if(!isWasmInitialized) {
13981                         throw new Error("initializeWasm() must be awaited first!");
13982                 }
13983                 const nativeResponseValue = wasm.TS_ChannelManager_as_ChannelMessageHandler(this_arg);
13984                 return nativeResponseValue;
13985         }
13986         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
13987         export function ChannelManager_write(obj: number): Uint8Array {
13988                 if(!isWasmInitialized) {
13989                         throw new Error("initializeWasm() must be awaited first!");
13990                 }
13991                 const nativeResponseValue = wasm.TS_ChannelManager_write(obj);
13992                 return decodeUint8Array(nativeResponseValue);
13993         }
13994         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
13995         export function ChannelManagerReadArgs_free(this_obj: number): void {
13996                 if(!isWasmInitialized) {
13997                         throw new Error("initializeWasm() must be awaited first!");
13998                 }
13999                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_free(this_obj);
14000                 // debug statements here
14001         }
14002         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14003         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
14004                 if(!isWasmInitialized) {
14005                         throw new Error("initializeWasm() must be awaited first!");
14006                 }
14007                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_keys_manager(this_ptr);
14008                 return nativeResponseValue;
14009         }
14010         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
14011         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
14012                 if(!isWasmInitialized) {
14013                         throw new Error("initializeWasm() must be awaited first!");
14014                 }
14015                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
14016                 // debug statements here
14017         }
14018         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14019         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
14020                 if(!isWasmInitialized) {
14021                         throw new Error("initializeWasm() must be awaited first!");
14022                 }
14023                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_fee_estimator(this_ptr);
14024                 return nativeResponseValue;
14025         }
14026         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
14027         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
14028                 if(!isWasmInitialized) {
14029                         throw new Error("initializeWasm() must be awaited first!");
14030                 }
14031                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
14032                 // debug statements here
14033         }
14034         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14035         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
14036                 if(!isWasmInitialized) {
14037                         throw new Error("initializeWasm() must be awaited first!");
14038                 }
14039                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_chain_monitor(this_ptr);
14040                 return nativeResponseValue;
14041         }
14042         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
14043         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
14044                 if(!isWasmInitialized) {
14045                         throw new Error("initializeWasm() must be awaited first!");
14046                 }
14047                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
14048                 // debug statements here
14049         }
14050         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14051         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
14052                 if(!isWasmInitialized) {
14053                         throw new Error("initializeWasm() must be awaited first!");
14054                 }
14055                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
14056                 return nativeResponseValue;
14057         }
14058         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
14059         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
14060                 if(!isWasmInitialized) {
14061                         throw new Error("initializeWasm() must be awaited first!");
14062                 }
14063                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
14064                 // debug statements here
14065         }
14066         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14067         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
14068                 if(!isWasmInitialized) {
14069                         throw new Error("initializeWasm() must be awaited first!");
14070                 }
14071                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_logger(this_ptr);
14072                 return nativeResponseValue;
14073         }
14074         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
14075         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
14076                 if(!isWasmInitialized) {
14077                         throw new Error("initializeWasm() must be awaited first!");
14078                 }
14079                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_logger(this_ptr, val);
14080                 // debug statements here
14081         }
14082         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14083         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
14084                 if(!isWasmInitialized) {
14085                         throw new Error("initializeWasm() must be awaited first!");
14086                 }
14087                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_default_config(this_ptr);
14088                 return nativeResponseValue;
14089         }
14090         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
14091         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
14092                 if(!isWasmInitialized) {
14093                         throw new Error("initializeWasm() must be awaited first!");
14094                 }
14095                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_default_config(this_ptr, val);
14096                 // debug statements here
14097         }
14098         // 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);
14099         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 {
14100                 if(!isWasmInitialized) {
14101                         throw new Error("initializeWasm() must be awaited first!");
14102                 }
14103                 const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
14104                 return nativeResponseValue;
14105         }
14106         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
14107         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
14108                 if(!isWasmInitialized) {
14109                         throw new Error("initializeWasm() must be awaited first!");
14110                 }
14111                 const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_read(encodeUint8Array(ser), arg);
14112                 return nativeResponseValue;
14113         }
14114         // void DecodeError_free(struct LDKDecodeError this_obj);
14115         export function DecodeError_free(this_obj: number): void {
14116                 if(!isWasmInitialized) {
14117                         throw new Error("initializeWasm() must be awaited first!");
14118                 }
14119                 const nativeResponseValue = wasm.TS_DecodeError_free(this_obj);
14120                 // debug statements here
14121         }
14122         // uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
14123         export function DecodeError_clone_ptr(arg: number): number {
14124                 if(!isWasmInitialized) {
14125                         throw new Error("initializeWasm() must be awaited first!");
14126                 }
14127                 const nativeResponseValue = wasm.TS_DecodeError_clone_ptr(arg);
14128                 return nativeResponseValue;
14129         }
14130         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
14131         export function DecodeError_clone(orig: number): number {
14132                 if(!isWasmInitialized) {
14133                         throw new Error("initializeWasm() must be awaited first!");
14134                 }
14135                 const nativeResponseValue = wasm.TS_DecodeError_clone(orig);
14136                 return nativeResponseValue;
14137         }
14138         // void Init_free(struct LDKInit this_obj);
14139         export function Init_free(this_obj: number): void {
14140                 if(!isWasmInitialized) {
14141                         throw new Error("initializeWasm() must be awaited first!");
14142                 }
14143                 const nativeResponseValue = wasm.TS_Init_free(this_obj);
14144                 // debug statements here
14145         }
14146         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
14147         export function Init_get_features(this_ptr: number): number {
14148                 if(!isWasmInitialized) {
14149                         throw new Error("initializeWasm() must be awaited first!");
14150                 }
14151                 const nativeResponseValue = wasm.TS_Init_get_features(this_ptr);
14152                 return nativeResponseValue;
14153         }
14154         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
14155         export function Init_set_features(this_ptr: number, val: number): void {
14156                 if(!isWasmInitialized) {
14157                         throw new Error("initializeWasm() must be awaited first!");
14158                 }
14159                 const nativeResponseValue = wasm.TS_Init_set_features(this_ptr, val);
14160                 // debug statements here
14161         }
14162         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
14163         export function Init_new(features_arg: number): number {
14164                 if(!isWasmInitialized) {
14165                         throw new Error("initializeWasm() must be awaited first!");
14166                 }
14167                 const nativeResponseValue = wasm.TS_Init_new(features_arg);
14168                 return nativeResponseValue;
14169         }
14170         // uint64_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
14171         export function Init_clone_ptr(arg: number): number {
14172                 if(!isWasmInitialized) {
14173                         throw new Error("initializeWasm() must be awaited first!");
14174                 }
14175                 const nativeResponseValue = wasm.TS_Init_clone_ptr(arg);
14176                 return nativeResponseValue;
14177         }
14178         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
14179         export function Init_clone(orig: number): number {
14180                 if(!isWasmInitialized) {
14181                         throw new Error("initializeWasm() must be awaited first!");
14182                 }
14183                 const nativeResponseValue = wasm.TS_Init_clone(orig);
14184                 return nativeResponseValue;
14185         }
14186         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
14187         export function ErrorMessage_free(this_obj: number): void {
14188                 if(!isWasmInitialized) {
14189                         throw new Error("initializeWasm() must be awaited first!");
14190                 }
14191                 const nativeResponseValue = wasm.TS_ErrorMessage_free(this_obj);
14192                 // debug statements here
14193         }
14194         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
14195         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
14196                 if(!isWasmInitialized) {
14197                         throw new Error("initializeWasm() must be awaited first!");
14198                 }
14199                 const nativeResponseValue = wasm.TS_ErrorMessage_get_channel_id(this_ptr);
14200                 return decodeUint8Array(nativeResponseValue);
14201         }
14202         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14203         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
14204                 if(!isWasmInitialized) {
14205                         throw new Error("initializeWasm() must be awaited first!");
14206                 }
14207                 const nativeResponseValue = wasm.TS_ErrorMessage_set_channel_id(this_ptr, encodeUint8Array(val));
14208                 // debug statements here
14209         }
14210         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
14211         export function ErrorMessage_get_data(this_ptr: number): String {
14212                 if(!isWasmInitialized) {
14213                         throw new Error("initializeWasm() must be awaited first!");
14214                 }
14215                 const nativeResponseValue = wasm.TS_ErrorMessage_get_data(this_ptr);
14216                 return nativeResponseValue;
14217         }
14218         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
14219         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
14220                 if(!isWasmInitialized) {
14221                         throw new Error("initializeWasm() must be awaited first!");
14222                 }
14223                 const nativeResponseValue = wasm.TS_ErrorMessage_set_data(this_ptr, val);
14224                 // debug statements here
14225         }
14226         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
14227         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
14228                 if(!isWasmInitialized) {
14229                         throw new Error("initializeWasm() must be awaited first!");
14230                 }
14231                 const nativeResponseValue = wasm.TS_ErrorMessage_new(encodeUint8Array(channel_id_arg), data_arg);
14232                 return nativeResponseValue;
14233         }
14234         // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
14235         export function ErrorMessage_clone_ptr(arg: number): number {
14236                 if(!isWasmInitialized) {
14237                         throw new Error("initializeWasm() must be awaited first!");
14238                 }
14239                 const nativeResponseValue = wasm.TS_ErrorMessage_clone_ptr(arg);
14240                 return nativeResponseValue;
14241         }
14242         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
14243         export function ErrorMessage_clone(orig: number): number {
14244                 if(!isWasmInitialized) {
14245                         throw new Error("initializeWasm() must be awaited first!");
14246                 }
14247                 const nativeResponseValue = wasm.TS_ErrorMessage_clone(orig);
14248                 return nativeResponseValue;
14249         }
14250         // void Ping_free(struct LDKPing this_obj);
14251         export function Ping_free(this_obj: number): void {
14252                 if(!isWasmInitialized) {
14253                         throw new Error("initializeWasm() must be awaited first!");
14254                 }
14255                 const nativeResponseValue = wasm.TS_Ping_free(this_obj);
14256                 // debug statements here
14257         }
14258         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
14259         export function Ping_get_ponglen(this_ptr: number): number {
14260                 if(!isWasmInitialized) {
14261                         throw new Error("initializeWasm() must be awaited first!");
14262                 }
14263                 const nativeResponseValue = wasm.TS_Ping_get_ponglen(this_ptr);
14264                 return nativeResponseValue;
14265         }
14266         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
14267         export function Ping_set_ponglen(this_ptr: number, val: number): void {
14268                 if(!isWasmInitialized) {
14269                         throw new Error("initializeWasm() must be awaited first!");
14270                 }
14271                 const nativeResponseValue = wasm.TS_Ping_set_ponglen(this_ptr, val);
14272                 // debug statements here
14273         }
14274         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
14275         export function Ping_get_byteslen(this_ptr: number): number {
14276                 if(!isWasmInitialized) {
14277                         throw new Error("initializeWasm() must be awaited first!");
14278                 }
14279                 const nativeResponseValue = wasm.TS_Ping_get_byteslen(this_ptr);
14280                 return nativeResponseValue;
14281         }
14282         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
14283         export function Ping_set_byteslen(this_ptr: number, val: number): void {
14284                 if(!isWasmInitialized) {
14285                         throw new Error("initializeWasm() must be awaited first!");
14286                 }
14287                 const nativeResponseValue = wasm.TS_Ping_set_byteslen(this_ptr, val);
14288                 // debug statements here
14289         }
14290         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
14291         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
14292                 if(!isWasmInitialized) {
14293                         throw new Error("initializeWasm() must be awaited first!");
14294                 }
14295                 const nativeResponseValue = wasm.TS_Ping_new(ponglen_arg, byteslen_arg);
14296                 return nativeResponseValue;
14297         }
14298         // uint64_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
14299         export function Ping_clone_ptr(arg: number): number {
14300                 if(!isWasmInitialized) {
14301                         throw new Error("initializeWasm() must be awaited first!");
14302                 }
14303                 const nativeResponseValue = wasm.TS_Ping_clone_ptr(arg);
14304                 return nativeResponseValue;
14305         }
14306         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
14307         export function Ping_clone(orig: number): number {
14308                 if(!isWasmInitialized) {
14309                         throw new Error("initializeWasm() must be awaited first!");
14310                 }
14311                 const nativeResponseValue = wasm.TS_Ping_clone(orig);
14312                 return nativeResponseValue;
14313         }
14314         // void Pong_free(struct LDKPong this_obj);
14315         export function Pong_free(this_obj: number): void {
14316                 if(!isWasmInitialized) {
14317                         throw new Error("initializeWasm() must be awaited first!");
14318                 }
14319                 const nativeResponseValue = wasm.TS_Pong_free(this_obj);
14320                 // debug statements here
14321         }
14322         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
14323         export function Pong_get_byteslen(this_ptr: number): number {
14324                 if(!isWasmInitialized) {
14325                         throw new Error("initializeWasm() must be awaited first!");
14326                 }
14327                 const nativeResponseValue = wasm.TS_Pong_get_byteslen(this_ptr);
14328                 return nativeResponseValue;
14329         }
14330         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
14331         export function Pong_set_byteslen(this_ptr: number, val: number): void {
14332                 if(!isWasmInitialized) {
14333                         throw new Error("initializeWasm() must be awaited first!");
14334                 }
14335                 const nativeResponseValue = wasm.TS_Pong_set_byteslen(this_ptr, val);
14336                 // debug statements here
14337         }
14338         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
14339         export function Pong_new(byteslen_arg: number): number {
14340                 if(!isWasmInitialized) {
14341                         throw new Error("initializeWasm() must be awaited first!");
14342                 }
14343                 const nativeResponseValue = wasm.TS_Pong_new(byteslen_arg);
14344                 return nativeResponseValue;
14345         }
14346         // uint64_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
14347         export function Pong_clone_ptr(arg: number): number {
14348                 if(!isWasmInitialized) {
14349                         throw new Error("initializeWasm() must be awaited first!");
14350                 }
14351                 const nativeResponseValue = wasm.TS_Pong_clone_ptr(arg);
14352                 return nativeResponseValue;
14353         }
14354         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
14355         export function Pong_clone(orig: number): number {
14356                 if(!isWasmInitialized) {
14357                         throw new Error("initializeWasm() must be awaited first!");
14358                 }
14359                 const nativeResponseValue = wasm.TS_Pong_clone(orig);
14360                 return nativeResponseValue;
14361         }
14362         // void OpenChannel_free(struct LDKOpenChannel this_obj);
14363         export function OpenChannel_free(this_obj: number): void {
14364                 if(!isWasmInitialized) {
14365                         throw new Error("initializeWasm() must be awaited first!");
14366                 }
14367                 const nativeResponseValue = wasm.TS_OpenChannel_free(this_obj);
14368                 // debug statements here
14369         }
14370         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
14371         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
14372                 if(!isWasmInitialized) {
14373                         throw new Error("initializeWasm() must be awaited first!");
14374                 }
14375                 const nativeResponseValue = wasm.TS_OpenChannel_get_chain_hash(this_ptr);
14376                 return decodeUint8Array(nativeResponseValue);
14377         }
14378         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14379         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
14380                 if(!isWasmInitialized) {
14381                         throw new Error("initializeWasm() must be awaited first!");
14382                 }
14383                 const nativeResponseValue = wasm.TS_OpenChannel_set_chain_hash(this_ptr, encodeUint8Array(val));
14384                 // debug statements here
14385         }
14386         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
14387         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
14388                 if(!isWasmInitialized) {
14389                         throw new Error("initializeWasm() must be awaited first!");
14390                 }
14391                 const nativeResponseValue = wasm.TS_OpenChannel_get_temporary_channel_id(this_ptr);
14392                 return decodeUint8Array(nativeResponseValue);
14393         }
14394         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14395         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14396                 if(!isWasmInitialized) {
14397                         throw new Error("initializeWasm() must be awaited first!");
14398                 }
14399                 const nativeResponseValue = wasm.TS_OpenChannel_set_temporary_channel_id(this_ptr, encodeUint8Array(val));
14400                 // debug statements here
14401         }
14402         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14403         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
14404                 if(!isWasmInitialized) {
14405                         throw new Error("initializeWasm() must be awaited first!");
14406                 }
14407                 const nativeResponseValue = wasm.TS_OpenChannel_get_funding_satoshis(this_ptr);
14408                 return nativeResponseValue;
14409         }
14410         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14411         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
14412                 if(!isWasmInitialized) {
14413                         throw new Error("initializeWasm() must be awaited first!");
14414                 }
14415                 const nativeResponseValue = wasm.TS_OpenChannel_set_funding_satoshis(this_ptr, val);
14416                 // debug statements here
14417         }
14418         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14419         export function OpenChannel_get_push_msat(this_ptr: number): number {
14420                 if(!isWasmInitialized) {
14421                         throw new Error("initializeWasm() must be awaited first!");
14422                 }
14423                 const nativeResponseValue = wasm.TS_OpenChannel_get_push_msat(this_ptr);
14424                 return nativeResponseValue;
14425         }
14426         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14427         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
14428                 if(!isWasmInitialized) {
14429                         throw new Error("initializeWasm() must be awaited first!");
14430                 }
14431                 const nativeResponseValue = wasm.TS_OpenChannel_set_push_msat(this_ptr, val);
14432                 // debug statements here
14433         }
14434         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14435         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
14436                 if(!isWasmInitialized) {
14437                         throw new Error("initializeWasm() must be awaited first!");
14438                 }
14439                 const nativeResponseValue = wasm.TS_OpenChannel_get_dust_limit_satoshis(this_ptr);
14440                 return nativeResponseValue;
14441         }
14442         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14443         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
14444                 if(!isWasmInitialized) {
14445                         throw new Error("initializeWasm() must be awaited first!");
14446                 }
14447                 const nativeResponseValue = wasm.TS_OpenChannel_set_dust_limit_satoshis(this_ptr, val);
14448                 // debug statements here
14449         }
14450         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14451         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
14452                 if(!isWasmInitialized) {
14453                         throw new Error("initializeWasm() must be awaited first!");
14454                 }
14455                 const nativeResponseValue = wasm.TS_OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
14456                 return nativeResponseValue;
14457         }
14458         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14459         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
14460                 if(!isWasmInitialized) {
14461                         throw new Error("initializeWasm() must be awaited first!");
14462                 }
14463                 const nativeResponseValue = wasm.TS_OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
14464                 // debug statements here
14465         }
14466         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14467         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
14468                 if(!isWasmInitialized) {
14469                         throw new Error("initializeWasm() must be awaited first!");
14470                 }
14471                 const nativeResponseValue = wasm.TS_OpenChannel_get_channel_reserve_satoshis(this_ptr);
14472                 return nativeResponseValue;
14473         }
14474         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14475         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
14476                 if(!isWasmInitialized) {
14477                         throw new Error("initializeWasm() must be awaited first!");
14478                 }
14479                 const nativeResponseValue = wasm.TS_OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
14480                 // debug statements here
14481         }
14482         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14483         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
14484                 if(!isWasmInitialized) {
14485                         throw new Error("initializeWasm() must be awaited first!");
14486                 }
14487                 const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_minimum_msat(this_ptr);
14488                 return nativeResponseValue;
14489         }
14490         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
14491         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14492                 if(!isWasmInitialized) {
14493                         throw new Error("initializeWasm() must be awaited first!");
14494                 }
14495                 const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_minimum_msat(this_ptr, val);
14496                 // debug statements here
14497         }
14498         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14499         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
14500                 if(!isWasmInitialized) {
14501                         throw new Error("initializeWasm() must be awaited first!");
14502                 }
14503                 const nativeResponseValue = wasm.TS_OpenChannel_get_feerate_per_kw(this_ptr);
14504                 return nativeResponseValue;
14505         }
14506         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
14507         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
14508                 if(!isWasmInitialized) {
14509                         throw new Error("initializeWasm() must be awaited first!");
14510                 }
14511                 const nativeResponseValue = wasm.TS_OpenChannel_set_feerate_per_kw(this_ptr, val);
14512                 // debug statements here
14513         }
14514         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14515         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
14516                 if(!isWasmInitialized) {
14517                         throw new Error("initializeWasm() must be awaited first!");
14518                 }
14519                 const nativeResponseValue = wasm.TS_OpenChannel_get_to_self_delay(this_ptr);
14520                 return nativeResponseValue;
14521         }
14522         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
14523         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
14524                 if(!isWasmInitialized) {
14525                         throw new Error("initializeWasm() must be awaited first!");
14526                 }
14527                 const nativeResponseValue = wasm.TS_OpenChannel_set_to_self_delay(this_ptr, val);
14528                 // debug statements here
14529         }
14530         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14531         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
14532                 if(!isWasmInitialized) {
14533                         throw new Error("initializeWasm() must be awaited first!");
14534                 }
14535                 const nativeResponseValue = wasm.TS_OpenChannel_get_max_accepted_htlcs(this_ptr);
14536                 return nativeResponseValue;
14537         }
14538         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
14539         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
14540                 if(!isWasmInitialized) {
14541                         throw new Error("initializeWasm() must be awaited first!");
14542                 }
14543                 const nativeResponseValue = wasm.TS_OpenChannel_set_max_accepted_htlcs(this_ptr, val);
14544                 // debug statements here
14545         }
14546         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14547         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
14548                 if(!isWasmInitialized) {
14549                         throw new Error("initializeWasm() must be awaited first!");
14550                 }
14551                 const nativeResponseValue = wasm.TS_OpenChannel_get_funding_pubkey(this_ptr);
14552                 return decodeUint8Array(nativeResponseValue);
14553         }
14554         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14555         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14556                 if(!isWasmInitialized) {
14557                         throw new Error("initializeWasm() must be awaited first!");
14558                 }
14559                 const nativeResponseValue = wasm.TS_OpenChannel_set_funding_pubkey(this_ptr, encodeUint8Array(val));
14560                 // debug statements here
14561         }
14562         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14563         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
14564                 if(!isWasmInitialized) {
14565                         throw new Error("initializeWasm() must be awaited first!");
14566                 }
14567                 const nativeResponseValue = wasm.TS_OpenChannel_get_revocation_basepoint(this_ptr);
14568                 return decodeUint8Array(nativeResponseValue);
14569         }
14570         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14571         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14572                 if(!isWasmInitialized) {
14573                         throw new Error("initializeWasm() must be awaited first!");
14574                 }
14575                 const nativeResponseValue = wasm.TS_OpenChannel_set_revocation_basepoint(this_ptr, encodeUint8Array(val));
14576                 // debug statements here
14577         }
14578         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14579         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
14580                 if(!isWasmInitialized) {
14581                         throw new Error("initializeWasm() must be awaited first!");
14582                 }
14583                 const nativeResponseValue = wasm.TS_OpenChannel_get_payment_point(this_ptr);
14584                 return decodeUint8Array(nativeResponseValue);
14585         }
14586         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14587         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
14588                 if(!isWasmInitialized) {
14589                         throw new Error("initializeWasm() must be awaited first!");
14590                 }
14591                 const nativeResponseValue = wasm.TS_OpenChannel_set_payment_point(this_ptr, encodeUint8Array(val));
14592                 // debug statements here
14593         }
14594         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14595         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14596                 if(!isWasmInitialized) {
14597                         throw new Error("initializeWasm() must be awaited first!");
14598                 }
14599                 const nativeResponseValue = wasm.TS_OpenChannel_get_delayed_payment_basepoint(this_ptr);
14600                 return decodeUint8Array(nativeResponseValue);
14601         }
14602         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14603         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14604                 if(!isWasmInitialized) {
14605                         throw new Error("initializeWasm() must be awaited first!");
14606                 }
14607                 const nativeResponseValue = wasm.TS_OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeUint8Array(val));
14608                 // debug statements here
14609         }
14610         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14611         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
14612                 if(!isWasmInitialized) {
14613                         throw new Error("initializeWasm() must be awaited first!");
14614                 }
14615                 const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_basepoint(this_ptr);
14616                 return decodeUint8Array(nativeResponseValue);
14617         }
14618         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14619         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14620                 if(!isWasmInitialized) {
14621                         throw new Error("initializeWasm() must be awaited first!");
14622                 }
14623                 const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_basepoint(this_ptr, encodeUint8Array(val));
14624                 // debug statements here
14625         }
14626         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14627         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
14628                 if(!isWasmInitialized) {
14629                         throw new Error("initializeWasm() must be awaited first!");
14630                 }
14631                 const nativeResponseValue = wasm.TS_OpenChannel_get_first_per_commitment_point(this_ptr);
14632                 return decodeUint8Array(nativeResponseValue);
14633         }
14634         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14635         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14636                 if(!isWasmInitialized) {
14637                         throw new Error("initializeWasm() must be awaited first!");
14638                 }
14639                 const nativeResponseValue = wasm.TS_OpenChannel_set_first_per_commitment_point(this_ptr, encodeUint8Array(val));
14640                 // debug statements here
14641         }
14642         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14643         export function OpenChannel_get_channel_flags(this_ptr: number): number {
14644                 if(!isWasmInitialized) {
14645                         throw new Error("initializeWasm() must be awaited first!");
14646                 }
14647                 const nativeResponseValue = wasm.TS_OpenChannel_get_channel_flags(this_ptr);
14648                 return nativeResponseValue;
14649         }
14650         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
14651         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
14652                 if(!isWasmInitialized) {
14653                         throw new Error("initializeWasm() must be awaited first!");
14654                 }
14655                 const nativeResponseValue = wasm.TS_OpenChannel_set_channel_flags(this_ptr, val);
14656                 // debug statements here
14657         }
14658         // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
14659         export function OpenChannel_get_channel_type(this_ptr: number): number {
14660                 if(!isWasmInitialized) {
14661                         throw new Error("initializeWasm() must be awaited first!");
14662                 }
14663                 const nativeResponseValue = wasm.TS_OpenChannel_get_channel_type(this_ptr);
14664                 return nativeResponseValue;
14665         }
14666         // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
14667         export function OpenChannel_set_channel_type(this_ptr: number, val: number): void {
14668                 if(!isWasmInitialized) {
14669                         throw new Error("initializeWasm() must be awaited first!");
14670                 }
14671                 const nativeResponseValue = wasm.TS_OpenChannel_set_channel_type(this_ptr, val);
14672                 // debug statements here
14673         }
14674         // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
14675         export function OpenChannel_clone_ptr(arg: number): number {
14676                 if(!isWasmInitialized) {
14677                         throw new Error("initializeWasm() must be awaited first!");
14678                 }
14679                 const nativeResponseValue = wasm.TS_OpenChannel_clone_ptr(arg);
14680                 return nativeResponseValue;
14681         }
14682         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
14683         export function OpenChannel_clone(orig: number): number {
14684                 if(!isWasmInitialized) {
14685                         throw new Error("initializeWasm() must be awaited first!");
14686                 }
14687                 const nativeResponseValue = wasm.TS_OpenChannel_clone(orig);
14688                 return nativeResponseValue;
14689         }
14690         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
14691         export function AcceptChannel_free(this_obj: number): void {
14692                 if(!isWasmInitialized) {
14693                         throw new Error("initializeWasm() must be awaited first!");
14694                 }
14695                 const nativeResponseValue = wasm.TS_AcceptChannel_free(this_obj);
14696                 // debug statements here
14697         }
14698         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
14699         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
14700                 if(!isWasmInitialized) {
14701                         throw new Error("initializeWasm() must be awaited first!");
14702                 }
14703                 const nativeResponseValue = wasm.TS_AcceptChannel_get_temporary_channel_id(this_ptr);
14704                 return decodeUint8Array(nativeResponseValue);
14705         }
14706         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14707         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14708                 if(!isWasmInitialized) {
14709                         throw new Error("initializeWasm() must be awaited first!");
14710                 }
14711                 const nativeResponseValue = wasm.TS_AcceptChannel_set_temporary_channel_id(this_ptr, encodeUint8Array(val));
14712                 // debug statements here
14713         }
14714         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14715         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
14716                 if(!isWasmInitialized) {
14717                         throw new Error("initializeWasm() must be awaited first!");
14718                 }
14719                 const nativeResponseValue = wasm.TS_AcceptChannel_get_dust_limit_satoshis(this_ptr);
14720                 return nativeResponseValue;
14721         }
14722         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14723         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
14724                 if(!isWasmInitialized) {
14725                         throw new Error("initializeWasm() must be awaited first!");
14726                 }
14727                 const nativeResponseValue = wasm.TS_AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
14728                 // debug statements here
14729         }
14730         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14731         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
14732                 if(!isWasmInitialized) {
14733                         throw new Error("initializeWasm() must be awaited first!");
14734                 }
14735                 const nativeResponseValue = wasm.TS_AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
14736                 return nativeResponseValue;
14737         }
14738         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14739         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
14740                 if(!isWasmInitialized) {
14741                         throw new Error("initializeWasm() must be awaited first!");
14742                 }
14743                 const nativeResponseValue = wasm.TS_AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
14744                 // debug statements here
14745         }
14746         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14747         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
14748                 if(!isWasmInitialized) {
14749                         throw new Error("initializeWasm() must be awaited first!");
14750                 }
14751                 const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_reserve_satoshis(this_ptr);
14752                 return nativeResponseValue;
14753         }
14754         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14755         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
14756                 if(!isWasmInitialized) {
14757                         throw new Error("initializeWasm() must be awaited first!");
14758                 }
14759                 const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
14760                 // debug statements here
14761         }
14762         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14763         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
14764                 if(!isWasmInitialized) {
14765                         throw new Error("initializeWasm() must be awaited first!");
14766                 }
14767                 const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_minimum_msat(this_ptr);
14768                 return nativeResponseValue;
14769         }
14770         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
14771         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14772                 if(!isWasmInitialized) {
14773                         throw new Error("initializeWasm() must be awaited first!");
14774                 }
14775                 const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
14776                 // debug statements here
14777         }
14778         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14779         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
14780                 if(!isWasmInitialized) {
14781                         throw new Error("initializeWasm() must be awaited first!");
14782                 }
14783                 const nativeResponseValue = wasm.TS_AcceptChannel_get_minimum_depth(this_ptr);
14784                 return nativeResponseValue;
14785         }
14786         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
14787         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
14788                 if(!isWasmInitialized) {
14789                         throw new Error("initializeWasm() must be awaited first!");
14790                 }
14791                 const nativeResponseValue = wasm.TS_AcceptChannel_set_minimum_depth(this_ptr, val);
14792                 // debug statements here
14793         }
14794         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14795         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
14796                 if(!isWasmInitialized) {
14797                         throw new Error("initializeWasm() must be awaited first!");
14798                 }
14799                 const nativeResponseValue = wasm.TS_AcceptChannel_get_to_self_delay(this_ptr);
14800                 return nativeResponseValue;
14801         }
14802         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
14803         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
14804                 if(!isWasmInitialized) {
14805                         throw new Error("initializeWasm() must be awaited first!");
14806                 }
14807                 const nativeResponseValue = wasm.TS_AcceptChannel_set_to_self_delay(this_ptr, val);
14808                 // debug statements here
14809         }
14810         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14811         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
14812                 if(!isWasmInitialized) {
14813                         throw new Error("initializeWasm() must be awaited first!");
14814                 }
14815                 const nativeResponseValue = wasm.TS_AcceptChannel_get_max_accepted_htlcs(this_ptr);
14816                 return nativeResponseValue;
14817         }
14818         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
14819         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
14820                 if(!isWasmInitialized) {
14821                         throw new Error("initializeWasm() must be awaited first!");
14822                 }
14823                 const nativeResponseValue = wasm.TS_AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
14824                 // debug statements here
14825         }
14826         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14827         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
14828                 if(!isWasmInitialized) {
14829                         throw new Error("initializeWasm() must be awaited first!");
14830                 }
14831                 const nativeResponseValue = wasm.TS_AcceptChannel_get_funding_pubkey(this_ptr);
14832                 return decodeUint8Array(nativeResponseValue);
14833         }
14834         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14835         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14836                 if(!isWasmInitialized) {
14837                         throw new Error("initializeWasm() must be awaited first!");
14838                 }
14839                 const nativeResponseValue = wasm.TS_AcceptChannel_set_funding_pubkey(this_ptr, encodeUint8Array(val));
14840                 // debug statements here
14841         }
14842         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14843         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
14844                 if(!isWasmInitialized) {
14845                         throw new Error("initializeWasm() must be awaited first!");
14846                 }
14847                 const nativeResponseValue = wasm.TS_AcceptChannel_get_revocation_basepoint(this_ptr);
14848                 return decodeUint8Array(nativeResponseValue);
14849         }
14850         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14851         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14852                 if(!isWasmInitialized) {
14853                         throw new Error("initializeWasm() must be awaited first!");
14854                 }
14855                 const nativeResponseValue = wasm.TS_AcceptChannel_set_revocation_basepoint(this_ptr, encodeUint8Array(val));
14856                 // debug statements here
14857         }
14858         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14859         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
14860                 if(!isWasmInitialized) {
14861                         throw new Error("initializeWasm() must be awaited first!");
14862                 }
14863                 const nativeResponseValue = wasm.TS_AcceptChannel_get_payment_point(this_ptr);
14864                 return decodeUint8Array(nativeResponseValue);
14865         }
14866         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14867         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
14868                 if(!isWasmInitialized) {
14869                         throw new Error("initializeWasm() must be awaited first!");
14870                 }
14871                 const nativeResponseValue = wasm.TS_AcceptChannel_set_payment_point(this_ptr, encodeUint8Array(val));
14872                 // debug statements here
14873         }
14874         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14875         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14876                 if(!isWasmInitialized) {
14877                         throw new Error("initializeWasm() must be awaited first!");
14878                 }
14879                 const nativeResponseValue = wasm.TS_AcceptChannel_get_delayed_payment_basepoint(this_ptr);
14880                 return decodeUint8Array(nativeResponseValue);
14881         }
14882         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14883         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14884                 if(!isWasmInitialized) {
14885                         throw new Error("initializeWasm() must be awaited first!");
14886                 }
14887                 const nativeResponseValue = wasm.TS_AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeUint8Array(val));
14888                 // debug statements here
14889         }
14890         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14891         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
14892                 if(!isWasmInitialized) {
14893                         throw new Error("initializeWasm() must be awaited first!");
14894                 }
14895                 const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_basepoint(this_ptr);
14896                 return decodeUint8Array(nativeResponseValue);
14897         }
14898         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14899         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14900                 if(!isWasmInitialized) {
14901                         throw new Error("initializeWasm() must be awaited first!");
14902                 }
14903                 const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_basepoint(this_ptr, encodeUint8Array(val));
14904                 // debug statements here
14905         }
14906         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
14907         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
14908                 if(!isWasmInitialized) {
14909                         throw new Error("initializeWasm() must be awaited first!");
14910                 }
14911                 const nativeResponseValue = wasm.TS_AcceptChannel_get_first_per_commitment_point(this_ptr);
14912                 return decodeUint8Array(nativeResponseValue);
14913         }
14914         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14915         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14916                 if(!isWasmInitialized) {
14917                         throw new Error("initializeWasm() must be awaited first!");
14918                 }
14919                 const nativeResponseValue = wasm.TS_AcceptChannel_set_first_per_commitment_point(this_ptr, encodeUint8Array(val));
14920                 // debug statements here
14921         }
14922         // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
14923         export function AcceptChannel_clone_ptr(arg: number): number {
14924                 if(!isWasmInitialized) {
14925                         throw new Error("initializeWasm() must be awaited first!");
14926                 }
14927                 const nativeResponseValue = wasm.TS_AcceptChannel_clone_ptr(arg);
14928                 return nativeResponseValue;
14929         }
14930         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
14931         export function AcceptChannel_clone(orig: number): number {
14932                 if(!isWasmInitialized) {
14933                         throw new Error("initializeWasm() must be awaited first!");
14934                 }
14935                 const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig);
14936                 return nativeResponseValue;
14937         }
14938         // void FundingCreated_free(struct LDKFundingCreated this_obj);
14939         export function FundingCreated_free(this_obj: number): void {
14940                 if(!isWasmInitialized) {
14941                         throw new Error("initializeWasm() must be awaited first!");
14942                 }
14943                 const nativeResponseValue = wasm.TS_FundingCreated_free(this_obj);
14944                 // debug statements here
14945         }
14946         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
14947         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
14948                 if(!isWasmInitialized) {
14949                         throw new Error("initializeWasm() must be awaited first!");
14950                 }
14951                 const nativeResponseValue = wasm.TS_FundingCreated_get_temporary_channel_id(this_ptr);
14952                 return decodeUint8Array(nativeResponseValue);
14953         }
14954         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14955         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
14956                 if(!isWasmInitialized) {
14957                         throw new Error("initializeWasm() must be awaited first!");
14958                 }
14959                 const nativeResponseValue = wasm.TS_FundingCreated_set_temporary_channel_id(this_ptr, encodeUint8Array(val));
14960                 // debug statements here
14961         }
14962         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
14963         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
14964                 if(!isWasmInitialized) {
14965                         throw new Error("initializeWasm() must be awaited first!");
14966                 }
14967                 const nativeResponseValue = wasm.TS_FundingCreated_get_funding_txid(this_ptr);
14968                 return decodeUint8Array(nativeResponseValue);
14969         }
14970         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14971         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
14972                 if(!isWasmInitialized) {
14973                         throw new Error("initializeWasm() must be awaited first!");
14974                 }
14975                 const nativeResponseValue = wasm.TS_FundingCreated_set_funding_txid(this_ptr, encodeUint8Array(val));
14976                 // debug statements here
14977         }
14978         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
14979         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
14980                 if(!isWasmInitialized) {
14981                         throw new Error("initializeWasm() must be awaited first!");
14982                 }
14983                 const nativeResponseValue = wasm.TS_FundingCreated_get_funding_output_index(this_ptr);
14984                 return nativeResponseValue;
14985         }
14986         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
14987         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
14988                 if(!isWasmInitialized) {
14989                         throw new Error("initializeWasm() must be awaited first!");
14990                 }
14991                 const nativeResponseValue = wasm.TS_FundingCreated_set_funding_output_index(this_ptr, val);
14992                 // debug statements here
14993         }
14994         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
14995         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
14996                 if(!isWasmInitialized) {
14997                         throw new Error("initializeWasm() must be awaited first!");
14998                 }
14999                 const nativeResponseValue = wasm.TS_FundingCreated_get_signature(this_ptr);
15000                 return decodeUint8Array(nativeResponseValue);
15001         }
15002         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
15003         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
15004                 if(!isWasmInitialized) {
15005                         throw new Error("initializeWasm() must be awaited first!");
15006                 }
15007                 const nativeResponseValue = wasm.TS_FundingCreated_set_signature(this_ptr, encodeUint8Array(val));
15008                 // debug statements here
15009         }
15010         // 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);
15011         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
15012                 if(!isWasmInitialized) {
15013                         throw new Error("initializeWasm() must be awaited first!");
15014                 }
15015                 const nativeResponseValue = wasm.TS_FundingCreated_new(encodeUint8Array(temporary_channel_id_arg), encodeUint8Array(funding_txid_arg), funding_output_index_arg, encodeUint8Array(signature_arg));
15016                 return nativeResponseValue;
15017         }
15018         // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
15019         export function FundingCreated_clone_ptr(arg: number): number {
15020                 if(!isWasmInitialized) {
15021                         throw new Error("initializeWasm() must be awaited first!");
15022                 }
15023                 const nativeResponseValue = wasm.TS_FundingCreated_clone_ptr(arg);
15024                 return nativeResponseValue;
15025         }
15026         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
15027         export function FundingCreated_clone(orig: number): number {
15028                 if(!isWasmInitialized) {
15029                         throw new Error("initializeWasm() must be awaited first!");
15030                 }
15031                 const nativeResponseValue = wasm.TS_FundingCreated_clone(orig);
15032                 return nativeResponseValue;
15033         }
15034         // void FundingSigned_free(struct LDKFundingSigned this_obj);
15035         export function FundingSigned_free(this_obj: number): void {
15036                 if(!isWasmInitialized) {
15037                         throw new Error("initializeWasm() must be awaited first!");
15038                 }
15039                 const nativeResponseValue = wasm.TS_FundingSigned_free(this_obj);
15040                 // debug statements here
15041         }
15042         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
15043         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
15044                 if(!isWasmInitialized) {
15045                         throw new Error("initializeWasm() must be awaited first!");
15046                 }
15047                 const nativeResponseValue = wasm.TS_FundingSigned_get_channel_id(this_ptr);
15048                 return decodeUint8Array(nativeResponseValue);
15049         }
15050         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15051         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15052                 if(!isWasmInitialized) {
15053                         throw new Error("initializeWasm() must be awaited first!");
15054                 }
15055                 const nativeResponseValue = wasm.TS_FundingSigned_set_channel_id(this_ptr, encodeUint8Array(val));
15056                 // debug statements here
15057         }
15058         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
15059         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
15060                 if(!isWasmInitialized) {
15061                         throw new Error("initializeWasm() must be awaited first!");
15062                 }
15063                 const nativeResponseValue = wasm.TS_FundingSigned_get_signature(this_ptr);
15064                 return decodeUint8Array(nativeResponseValue);
15065         }
15066         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15067         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15068                 if(!isWasmInitialized) {
15069                         throw new Error("initializeWasm() must be awaited first!");
15070                 }
15071                 const nativeResponseValue = wasm.TS_FundingSigned_set_signature(this_ptr, encodeUint8Array(val));
15072                 // debug statements here
15073         }
15074         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
15075         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
15076                 if(!isWasmInitialized) {
15077                         throw new Error("initializeWasm() must be awaited first!");
15078                 }
15079                 const nativeResponseValue = wasm.TS_FundingSigned_new(encodeUint8Array(channel_id_arg), encodeUint8Array(signature_arg));
15080                 return nativeResponseValue;
15081         }
15082         // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
15083         export function FundingSigned_clone_ptr(arg: number): number {
15084                 if(!isWasmInitialized) {
15085                         throw new Error("initializeWasm() must be awaited first!");
15086                 }
15087                 const nativeResponseValue = wasm.TS_FundingSigned_clone_ptr(arg);
15088                 return nativeResponseValue;
15089         }
15090         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
15091         export function FundingSigned_clone(orig: number): number {
15092                 if(!isWasmInitialized) {
15093                         throw new Error("initializeWasm() must be awaited first!");
15094                 }
15095                 const nativeResponseValue = wasm.TS_FundingSigned_clone(orig);
15096                 return nativeResponseValue;
15097         }
15098         // void FundingLocked_free(struct LDKFundingLocked this_obj);
15099         export function FundingLocked_free(this_obj: number): void {
15100                 if(!isWasmInitialized) {
15101                         throw new Error("initializeWasm() must be awaited first!");
15102                 }
15103                 const nativeResponseValue = wasm.TS_FundingLocked_free(this_obj);
15104                 // debug statements here
15105         }
15106         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
15107         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
15108                 if(!isWasmInitialized) {
15109                         throw new Error("initializeWasm() must be awaited first!");
15110                 }
15111                 const nativeResponseValue = wasm.TS_FundingLocked_get_channel_id(this_ptr);
15112                 return decodeUint8Array(nativeResponseValue);
15113         }
15114         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15115         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
15116                 if(!isWasmInitialized) {
15117                         throw new Error("initializeWasm() must be awaited first!");
15118                 }
15119                 const nativeResponseValue = wasm.TS_FundingLocked_set_channel_id(this_ptr, encodeUint8Array(val));
15120                 // debug statements here
15121         }
15122         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
15123         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
15124                 if(!isWasmInitialized) {
15125                         throw new Error("initializeWasm() must be awaited first!");
15126                 }
15127                 const nativeResponseValue = wasm.TS_FundingLocked_get_next_per_commitment_point(this_ptr);
15128                 return decodeUint8Array(nativeResponseValue);
15129         }
15130         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15131         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15132                 if(!isWasmInitialized) {
15133                         throw new Error("initializeWasm() must be awaited first!");
15134                 }
15135                 const nativeResponseValue = wasm.TS_FundingLocked_set_next_per_commitment_point(this_ptr, encodeUint8Array(val));
15136                 // debug statements here
15137         }
15138         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
15139         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
15140                 if(!isWasmInitialized) {
15141                         throw new Error("initializeWasm() must be awaited first!");
15142                 }
15143                 const nativeResponseValue = wasm.TS_FundingLocked_new(encodeUint8Array(channel_id_arg), encodeUint8Array(next_per_commitment_point_arg));
15144                 return nativeResponseValue;
15145         }
15146         // uint64_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
15147         export function FundingLocked_clone_ptr(arg: number): number {
15148                 if(!isWasmInitialized) {
15149                         throw new Error("initializeWasm() must be awaited first!");
15150                 }
15151                 const nativeResponseValue = wasm.TS_FundingLocked_clone_ptr(arg);
15152                 return nativeResponseValue;
15153         }
15154         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
15155         export function FundingLocked_clone(orig: number): number {
15156                 if(!isWasmInitialized) {
15157                         throw new Error("initializeWasm() must be awaited first!");
15158                 }
15159                 const nativeResponseValue = wasm.TS_FundingLocked_clone(orig);
15160                 return nativeResponseValue;
15161         }
15162         // void Shutdown_free(struct LDKShutdown this_obj);
15163         export function Shutdown_free(this_obj: number): void {
15164                 if(!isWasmInitialized) {
15165                         throw new Error("initializeWasm() must be awaited first!");
15166                 }
15167                 const nativeResponseValue = wasm.TS_Shutdown_free(this_obj);
15168                 // debug statements here
15169         }
15170         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
15171         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
15172                 if(!isWasmInitialized) {
15173                         throw new Error("initializeWasm() must be awaited first!");
15174                 }
15175                 const nativeResponseValue = wasm.TS_Shutdown_get_channel_id(this_ptr);
15176                 return decodeUint8Array(nativeResponseValue);
15177         }
15178         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15179         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
15180                 if(!isWasmInitialized) {
15181                         throw new Error("initializeWasm() must be awaited first!");
15182                 }
15183                 const nativeResponseValue = wasm.TS_Shutdown_set_channel_id(this_ptr, encodeUint8Array(val));
15184                 // debug statements here
15185         }
15186         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
15187         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
15188                 if(!isWasmInitialized) {
15189                         throw new Error("initializeWasm() must be awaited first!");
15190                 }
15191                 const nativeResponseValue = wasm.TS_Shutdown_get_scriptpubkey(this_ptr);
15192                 return decodeUint8Array(nativeResponseValue);
15193         }
15194         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15195         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
15196                 if(!isWasmInitialized) {
15197                         throw new Error("initializeWasm() must be awaited first!");
15198                 }
15199                 const nativeResponseValue = wasm.TS_Shutdown_set_scriptpubkey(this_ptr, encodeUint8Array(val));
15200                 // debug statements here
15201         }
15202         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
15203         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
15204                 if(!isWasmInitialized) {
15205                         throw new Error("initializeWasm() must be awaited first!");
15206                 }
15207                 const nativeResponseValue = wasm.TS_Shutdown_new(encodeUint8Array(channel_id_arg), encodeUint8Array(scriptpubkey_arg));
15208                 return nativeResponseValue;
15209         }
15210         // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
15211         export function Shutdown_clone_ptr(arg: number): number {
15212                 if(!isWasmInitialized) {
15213                         throw new Error("initializeWasm() must be awaited first!");
15214                 }
15215                 const nativeResponseValue = wasm.TS_Shutdown_clone_ptr(arg);
15216                 return nativeResponseValue;
15217         }
15218         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
15219         export function Shutdown_clone(orig: number): number {
15220                 if(!isWasmInitialized) {
15221                         throw new Error("initializeWasm() must be awaited first!");
15222                 }
15223                 const nativeResponseValue = wasm.TS_Shutdown_clone(orig);
15224                 return nativeResponseValue;
15225         }
15226         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
15227         export function ClosingSignedFeeRange_free(this_obj: number): void {
15228                 if(!isWasmInitialized) {
15229                         throw new Error("initializeWasm() must be awaited first!");
15230                 }
15231                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_free(this_obj);
15232                 // debug statements here
15233         }
15234         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
15235         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
15236                 if(!isWasmInitialized) {
15237                         throw new Error("initializeWasm() must be awaited first!");
15238                 }
15239                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
15240                 return nativeResponseValue;
15241         }
15242         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
15243         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
15244                 if(!isWasmInitialized) {
15245                         throw new Error("initializeWasm() must be awaited first!");
15246                 }
15247                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
15248                 // debug statements here
15249         }
15250         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
15251         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
15252                 if(!isWasmInitialized) {
15253                         throw new Error("initializeWasm() must be awaited first!");
15254                 }
15255                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
15256                 return nativeResponseValue;
15257         }
15258         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
15259         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
15260                 if(!isWasmInitialized) {
15261                         throw new Error("initializeWasm() must be awaited first!");
15262                 }
15263                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
15264                 // debug statements here
15265         }
15266         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
15267         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
15268                 if(!isWasmInitialized) {
15269                         throw new Error("initializeWasm() must be awaited first!");
15270                 }
15271                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
15272                 return nativeResponseValue;
15273         }
15274         // uint64_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
15275         export function ClosingSignedFeeRange_clone_ptr(arg: number): number {
15276                 if(!isWasmInitialized) {
15277                         throw new Error("initializeWasm() must be awaited first!");
15278                 }
15279                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone_ptr(arg);
15280                 return nativeResponseValue;
15281         }
15282         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
15283         export function ClosingSignedFeeRange_clone(orig: number): number {
15284                 if(!isWasmInitialized) {
15285                         throw new Error("initializeWasm() must be awaited first!");
15286                 }
15287                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone(orig);
15288                 return nativeResponseValue;
15289         }
15290         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
15291         export function ClosingSigned_free(this_obj: number): void {
15292                 if(!isWasmInitialized) {
15293                         throw new Error("initializeWasm() must be awaited first!");
15294                 }
15295                 const nativeResponseValue = wasm.TS_ClosingSigned_free(this_obj);
15296                 // debug statements here
15297         }
15298         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
15299         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
15300                 if(!isWasmInitialized) {
15301                         throw new Error("initializeWasm() must be awaited first!");
15302                 }
15303                 const nativeResponseValue = wasm.TS_ClosingSigned_get_channel_id(this_ptr);
15304                 return decodeUint8Array(nativeResponseValue);
15305         }
15306         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15307         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15308                 if(!isWasmInitialized) {
15309                         throw new Error("initializeWasm() must be awaited first!");
15310                 }
15311                 const nativeResponseValue = wasm.TS_ClosingSigned_set_channel_id(this_ptr, encodeUint8Array(val));
15312                 // debug statements here
15313         }
15314         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
15315         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
15316                 if(!isWasmInitialized) {
15317                         throw new Error("initializeWasm() must be awaited first!");
15318                 }
15319                 const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_satoshis(this_ptr);
15320                 return nativeResponseValue;
15321         }
15322         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
15323         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
15324                 if(!isWasmInitialized) {
15325                         throw new Error("initializeWasm() must be awaited first!");
15326                 }
15327                 const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_satoshis(this_ptr, val);
15328                 // debug statements here
15329         }
15330         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
15331         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
15332                 if(!isWasmInitialized) {
15333                         throw new Error("initializeWasm() must be awaited first!");
15334                 }
15335                 const nativeResponseValue = wasm.TS_ClosingSigned_get_signature(this_ptr);
15336                 return decodeUint8Array(nativeResponseValue);
15337         }
15338         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15339         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15340                 if(!isWasmInitialized) {
15341                         throw new Error("initializeWasm() must be awaited first!");
15342                 }
15343                 const nativeResponseValue = wasm.TS_ClosingSigned_set_signature(this_ptr, encodeUint8Array(val));
15344                 // debug statements here
15345         }
15346         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
15347         export function ClosingSigned_get_fee_range(this_ptr: number): number {
15348                 if(!isWasmInitialized) {
15349                         throw new Error("initializeWasm() must be awaited first!");
15350                 }
15351                 const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_range(this_ptr);
15352                 return nativeResponseValue;
15353         }
15354         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
15355         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
15356                 if(!isWasmInitialized) {
15357                         throw new Error("initializeWasm() must be awaited first!");
15358                 }
15359                 const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_range(this_ptr, val);
15360                 // debug statements here
15361         }
15362         // 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);
15363         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
15364                 if(!isWasmInitialized) {
15365                         throw new Error("initializeWasm() must be awaited first!");
15366                 }
15367                 const nativeResponseValue = wasm.TS_ClosingSigned_new(encodeUint8Array(channel_id_arg), fee_satoshis_arg, encodeUint8Array(signature_arg), fee_range_arg);
15368                 return nativeResponseValue;
15369         }
15370         // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
15371         export function ClosingSigned_clone_ptr(arg: number): number {
15372                 if(!isWasmInitialized) {
15373                         throw new Error("initializeWasm() must be awaited first!");
15374                 }
15375                 const nativeResponseValue = wasm.TS_ClosingSigned_clone_ptr(arg);
15376                 return nativeResponseValue;
15377         }
15378         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
15379         export function ClosingSigned_clone(orig: number): number {
15380                 if(!isWasmInitialized) {
15381                         throw new Error("initializeWasm() must be awaited first!");
15382                 }
15383                 const nativeResponseValue = wasm.TS_ClosingSigned_clone(orig);
15384                 return nativeResponseValue;
15385         }
15386         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
15387         export function UpdateAddHTLC_free(this_obj: number): void {
15388                 if(!isWasmInitialized) {
15389                         throw new Error("initializeWasm() must be awaited first!");
15390                 }
15391                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_free(this_obj);
15392                 // debug statements here
15393         }
15394         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
15395         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
15396                 if(!isWasmInitialized) {
15397                         throw new Error("initializeWasm() must be awaited first!");
15398                 }
15399                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_channel_id(this_ptr);
15400                 return decodeUint8Array(nativeResponseValue);
15401         }
15402         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15403         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15404                 if(!isWasmInitialized) {
15405                         throw new Error("initializeWasm() must be awaited first!");
15406                 }
15407                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15408                 // debug statements here
15409         }
15410         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
15411         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
15412                 if(!isWasmInitialized) {
15413                         throw new Error("initializeWasm() must be awaited first!");
15414                 }
15415                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_htlc_id(this_ptr);
15416                 return nativeResponseValue;
15417         }
15418         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
15419         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
15420                 if(!isWasmInitialized) {
15421                         throw new Error("initializeWasm() must be awaited first!");
15422                 }
15423                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_htlc_id(this_ptr, val);
15424                 // debug statements here
15425         }
15426         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
15427         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
15428                 if(!isWasmInitialized) {
15429                         throw new Error("initializeWasm() must be awaited first!");
15430                 }
15431                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_amount_msat(this_ptr);
15432                 return nativeResponseValue;
15433         }
15434         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
15435         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
15436                 if(!isWasmInitialized) {
15437                         throw new Error("initializeWasm() must be awaited first!");
15438                 }
15439                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_amount_msat(this_ptr, val);
15440                 // debug statements here
15441         }
15442         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
15443         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
15444                 if(!isWasmInitialized) {
15445                         throw new Error("initializeWasm() must be awaited first!");
15446                 }
15447                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_payment_hash(this_ptr);
15448                 return decodeUint8Array(nativeResponseValue);
15449         }
15450         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15451         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
15452                 if(!isWasmInitialized) {
15453                         throw new Error("initializeWasm() must be awaited first!");
15454                 }
15455                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_payment_hash(this_ptr, encodeUint8Array(val));
15456                 // debug statements here
15457         }
15458         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
15459         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
15460                 if(!isWasmInitialized) {
15461                         throw new Error("initializeWasm() must be awaited first!");
15462                 }
15463                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_cltv_expiry(this_ptr);
15464                 return nativeResponseValue;
15465         }
15466         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
15467         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
15468                 if(!isWasmInitialized) {
15469                         throw new Error("initializeWasm() must be awaited first!");
15470                 }
15471                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
15472                 // debug statements here
15473         }
15474         // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
15475         export function UpdateAddHTLC_clone_ptr(arg: number): number {
15476                 if(!isWasmInitialized) {
15477                         throw new Error("initializeWasm() must be awaited first!");
15478                 }
15479                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone_ptr(arg);
15480                 return nativeResponseValue;
15481         }
15482         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
15483         export function UpdateAddHTLC_clone(orig: number): number {
15484                 if(!isWasmInitialized) {
15485                         throw new Error("initializeWasm() must be awaited first!");
15486                 }
15487                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone(orig);
15488                 return nativeResponseValue;
15489         }
15490         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
15491         export function UpdateFulfillHTLC_free(this_obj: number): void {
15492                 if(!isWasmInitialized) {
15493                         throw new Error("initializeWasm() must be awaited first!");
15494                 }
15495                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_free(this_obj);
15496                 // debug statements here
15497         }
15498         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
15499         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
15500                 if(!isWasmInitialized) {
15501                         throw new Error("initializeWasm() must be awaited first!");
15502                 }
15503                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_channel_id(this_ptr);
15504                 return decodeUint8Array(nativeResponseValue);
15505         }
15506         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15507         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15508                 if(!isWasmInitialized) {
15509                         throw new Error("initializeWasm() must be awaited first!");
15510                 }
15511                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15512                 // debug statements here
15513         }
15514         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
15515         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
15516                 if(!isWasmInitialized) {
15517                         throw new Error("initializeWasm() must be awaited first!");
15518                 }
15519                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_htlc_id(this_ptr);
15520                 return nativeResponseValue;
15521         }
15522         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
15523         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
15524                 if(!isWasmInitialized) {
15525                         throw new Error("initializeWasm() must be awaited first!");
15526                 }
15527                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
15528                 // debug statements here
15529         }
15530         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
15531         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
15532                 if(!isWasmInitialized) {
15533                         throw new Error("initializeWasm() must be awaited first!");
15534                 }
15535                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_payment_preimage(this_ptr);
15536                 return decodeUint8Array(nativeResponseValue);
15537         }
15538         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15539         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
15540                 if(!isWasmInitialized) {
15541                         throw new Error("initializeWasm() must be awaited first!");
15542                 }
15543                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeUint8Array(val));
15544                 // debug statements here
15545         }
15546         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
15547         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
15548                 if(!isWasmInitialized) {
15549                         throw new Error("initializeWasm() must be awaited first!");
15550                 }
15551                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_new(encodeUint8Array(channel_id_arg), htlc_id_arg, encodeUint8Array(payment_preimage_arg));
15552                 return nativeResponseValue;
15553         }
15554         // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
15555         export function UpdateFulfillHTLC_clone_ptr(arg: number): number {
15556                 if(!isWasmInitialized) {
15557                         throw new Error("initializeWasm() must be awaited first!");
15558                 }
15559                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone_ptr(arg);
15560                 return nativeResponseValue;
15561         }
15562         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
15563         export function UpdateFulfillHTLC_clone(orig: number): number {
15564                 if(!isWasmInitialized) {
15565                         throw new Error("initializeWasm() must be awaited first!");
15566                 }
15567                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone(orig);
15568                 return nativeResponseValue;
15569         }
15570         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
15571         export function UpdateFailHTLC_free(this_obj: number): void {
15572                 if(!isWasmInitialized) {
15573                         throw new Error("initializeWasm() must be awaited first!");
15574                 }
15575                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_free(this_obj);
15576                 // debug statements here
15577         }
15578         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
15579         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
15580                 if(!isWasmInitialized) {
15581                         throw new Error("initializeWasm() must be awaited first!");
15582                 }
15583                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_channel_id(this_ptr);
15584                 return decodeUint8Array(nativeResponseValue);
15585         }
15586         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15587         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15588                 if(!isWasmInitialized) {
15589                         throw new Error("initializeWasm() must be awaited first!");
15590                 }
15591                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15592                 // debug statements here
15593         }
15594         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
15595         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
15596                 if(!isWasmInitialized) {
15597                         throw new Error("initializeWasm() must be awaited first!");
15598                 }
15599                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_htlc_id(this_ptr);
15600                 return nativeResponseValue;
15601         }
15602         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
15603         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
15604                 if(!isWasmInitialized) {
15605                         throw new Error("initializeWasm() must be awaited first!");
15606                 }
15607                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_htlc_id(this_ptr, val);
15608                 // debug statements here
15609         }
15610         // uint64_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
15611         export function UpdateFailHTLC_clone_ptr(arg: number): number {
15612                 if(!isWasmInitialized) {
15613                         throw new Error("initializeWasm() must be awaited first!");
15614                 }
15615                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone_ptr(arg);
15616                 return nativeResponseValue;
15617         }
15618         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
15619         export function UpdateFailHTLC_clone(orig: number): number {
15620                 if(!isWasmInitialized) {
15621                         throw new Error("initializeWasm() must be awaited first!");
15622                 }
15623                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone(orig);
15624                 return nativeResponseValue;
15625         }
15626         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
15627         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
15628                 if(!isWasmInitialized) {
15629                         throw new Error("initializeWasm() must be awaited first!");
15630                 }
15631                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_free(this_obj);
15632                 // debug statements here
15633         }
15634         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
15635         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
15636                 if(!isWasmInitialized) {
15637                         throw new Error("initializeWasm() must be awaited first!");
15638                 }
15639                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_channel_id(this_ptr);
15640                 return decodeUint8Array(nativeResponseValue);
15641         }
15642         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15643         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
15644                 if(!isWasmInitialized) {
15645                         throw new Error("initializeWasm() must be awaited first!");
15646                 }
15647                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeUint8Array(val));
15648                 // debug statements here
15649         }
15650         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
15651         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
15652                 if(!isWasmInitialized) {
15653                         throw new Error("initializeWasm() must be awaited first!");
15654                 }
15655                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
15656                 return nativeResponseValue;
15657         }
15658         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
15659         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
15660                 if(!isWasmInitialized) {
15661                         throw new Error("initializeWasm() must be awaited first!");
15662                 }
15663                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
15664                 // debug statements here
15665         }
15666         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
15667         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
15668                 if(!isWasmInitialized) {
15669                         throw new Error("initializeWasm() must be awaited first!");
15670                 }
15671                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_failure_code(this_ptr);
15672                 return nativeResponseValue;
15673         }
15674         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
15675         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
15676                 if(!isWasmInitialized) {
15677                         throw new Error("initializeWasm() must be awaited first!");
15678                 }
15679                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
15680                 // debug statements here
15681         }
15682         // uint64_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
15683         export function UpdateFailMalformedHTLC_clone_ptr(arg: number): number {
15684                 if(!isWasmInitialized) {
15685                         throw new Error("initializeWasm() must be awaited first!");
15686                 }
15687                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone_ptr(arg);
15688                 return nativeResponseValue;
15689         }
15690         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
15691         export function UpdateFailMalformedHTLC_clone(orig: number): number {
15692                 if(!isWasmInitialized) {
15693                         throw new Error("initializeWasm() must be awaited first!");
15694                 }
15695                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone(orig);
15696                 return nativeResponseValue;
15697         }
15698         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
15699         export function CommitmentSigned_free(this_obj: number): void {
15700                 if(!isWasmInitialized) {
15701                         throw new Error("initializeWasm() must be awaited first!");
15702                 }
15703                 const nativeResponseValue = wasm.TS_CommitmentSigned_free(this_obj);
15704                 // debug statements here
15705         }
15706         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
15707         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
15708                 if(!isWasmInitialized) {
15709                         throw new Error("initializeWasm() must be awaited first!");
15710                 }
15711                 const nativeResponseValue = wasm.TS_CommitmentSigned_get_channel_id(this_ptr);
15712                 return decodeUint8Array(nativeResponseValue);
15713         }
15714         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15715         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
15716                 if(!isWasmInitialized) {
15717                         throw new Error("initializeWasm() must be awaited first!");
15718                 }
15719                 const nativeResponseValue = wasm.TS_CommitmentSigned_set_channel_id(this_ptr, encodeUint8Array(val));
15720                 // debug statements here
15721         }
15722         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
15723         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
15724                 if(!isWasmInitialized) {
15725                         throw new Error("initializeWasm() must be awaited first!");
15726                 }
15727                 const nativeResponseValue = wasm.TS_CommitmentSigned_get_signature(this_ptr);
15728                 return decodeUint8Array(nativeResponseValue);
15729         }
15730         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15731         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
15732                 if(!isWasmInitialized) {
15733                         throw new Error("initializeWasm() must be awaited first!");
15734                 }
15735                 const nativeResponseValue = wasm.TS_CommitmentSigned_set_signature(this_ptr, encodeUint8Array(val));
15736                 // debug statements here
15737         }
15738         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
15739         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
15740                 if(!isWasmInitialized) {
15741                         throw new Error("initializeWasm() must be awaited first!");
15742                 }
15743                 const nativeResponseValue = wasm.TS_CommitmentSigned_set_htlc_signatures(this_ptr, val);
15744                 // debug statements here
15745         }
15746         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
15747         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
15748                 if(!isWasmInitialized) {
15749                         throw new Error("initializeWasm() must be awaited first!");
15750                 }
15751                 const nativeResponseValue = wasm.TS_CommitmentSigned_new(encodeUint8Array(channel_id_arg), encodeUint8Array(signature_arg), htlc_signatures_arg);
15752                 return nativeResponseValue;
15753         }
15754         // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
15755         export function CommitmentSigned_clone_ptr(arg: number): number {
15756                 if(!isWasmInitialized) {
15757                         throw new Error("initializeWasm() must be awaited first!");
15758                 }
15759                 const nativeResponseValue = wasm.TS_CommitmentSigned_clone_ptr(arg);
15760                 return nativeResponseValue;
15761         }
15762         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
15763         export function CommitmentSigned_clone(orig: number): number {
15764                 if(!isWasmInitialized) {
15765                         throw new Error("initializeWasm() must be awaited first!");
15766                 }
15767                 const nativeResponseValue = wasm.TS_CommitmentSigned_clone(orig);
15768                 return nativeResponseValue;
15769         }
15770         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
15771         export function RevokeAndACK_free(this_obj: number): void {
15772                 if(!isWasmInitialized) {
15773                         throw new Error("initializeWasm() must be awaited first!");
15774                 }
15775                 const nativeResponseValue = wasm.TS_RevokeAndACK_free(this_obj);
15776                 // debug statements here
15777         }
15778         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
15779         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
15780                 if(!isWasmInitialized) {
15781                         throw new Error("initializeWasm() must be awaited first!");
15782                 }
15783                 const nativeResponseValue = wasm.TS_RevokeAndACK_get_channel_id(this_ptr);
15784                 return decodeUint8Array(nativeResponseValue);
15785         }
15786         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15787         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
15788                 if(!isWasmInitialized) {
15789                         throw new Error("initializeWasm() must be awaited first!");
15790                 }
15791                 const nativeResponseValue = wasm.TS_RevokeAndACK_set_channel_id(this_ptr, encodeUint8Array(val));
15792                 // debug statements here
15793         }
15794         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
15795         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
15796                 if(!isWasmInitialized) {
15797                         throw new Error("initializeWasm() must be awaited first!");
15798                 }
15799                 const nativeResponseValue = wasm.TS_RevokeAndACK_get_per_commitment_secret(this_ptr);
15800                 return decodeUint8Array(nativeResponseValue);
15801         }
15802         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15803         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
15804                 if(!isWasmInitialized) {
15805                         throw new Error("initializeWasm() must be awaited first!");
15806                 }
15807                 const nativeResponseValue = wasm.TS_RevokeAndACK_set_per_commitment_secret(this_ptr, encodeUint8Array(val));
15808                 // debug statements here
15809         }
15810         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
15811         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
15812                 if(!isWasmInitialized) {
15813                         throw new Error("initializeWasm() must be awaited first!");
15814                 }
15815                 const nativeResponseValue = wasm.TS_RevokeAndACK_get_next_per_commitment_point(this_ptr);
15816                 return decodeUint8Array(nativeResponseValue);
15817         }
15818         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15819         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15820                 if(!isWasmInitialized) {
15821                         throw new Error("initializeWasm() must be awaited first!");
15822                 }
15823                 const nativeResponseValue = wasm.TS_RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeUint8Array(val));
15824                 // debug statements here
15825         }
15826         // 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);
15827         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
15828                 if(!isWasmInitialized) {
15829                         throw new Error("initializeWasm() must be awaited first!");
15830                 }
15831                 const nativeResponseValue = wasm.TS_RevokeAndACK_new(encodeUint8Array(channel_id_arg), encodeUint8Array(per_commitment_secret_arg), encodeUint8Array(next_per_commitment_point_arg));
15832                 return nativeResponseValue;
15833         }
15834         // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
15835         export function RevokeAndACK_clone_ptr(arg: number): number {
15836                 if(!isWasmInitialized) {
15837                         throw new Error("initializeWasm() must be awaited first!");
15838                 }
15839                 const nativeResponseValue = wasm.TS_RevokeAndACK_clone_ptr(arg);
15840                 return nativeResponseValue;
15841         }
15842         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
15843         export function RevokeAndACK_clone(orig: number): number {
15844                 if(!isWasmInitialized) {
15845                         throw new Error("initializeWasm() must be awaited first!");
15846                 }
15847                 const nativeResponseValue = wasm.TS_RevokeAndACK_clone(orig);
15848                 return nativeResponseValue;
15849         }
15850         // void UpdateFee_free(struct LDKUpdateFee this_obj);
15851         export function UpdateFee_free(this_obj: number): void {
15852                 if(!isWasmInitialized) {
15853                         throw new Error("initializeWasm() must be awaited first!");
15854                 }
15855                 const nativeResponseValue = wasm.TS_UpdateFee_free(this_obj);
15856                 // debug statements here
15857         }
15858         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
15859         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
15860                 if(!isWasmInitialized) {
15861                         throw new Error("initializeWasm() must be awaited first!");
15862                 }
15863                 const nativeResponseValue = wasm.TS_UpdateFee_get_channel_id(this_ptr);
15864                 return decodeUint8Array(nativeResponseValue);
15865         }
15866         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15867         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
15868                 if(!isWasmInitialized) {
15869                         throw new Error("initializeWasm() must be awaited first!");
15870                 }
15871                 const nativeResponseValue = wasm.TS_UpdateFee_set_channel_id(this_ptr, encodeUint8Array(val));
15872                 // debug statements here
15873         }
15874         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
15875         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
15876                 if(!isWasmInitialized) {
15877                         throw new Error("initializeWasm() must be awaited first!");
15878                 }
15879                 const nativeResponseValue = wasm.TS_UpdateFee_get_feerate_per_kw(this_ptr);
15880                 return nativeResponseValue;
15881         }
15882         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
15883         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
15884                 if(!isWasmInitialized) {
15885                         throw new Error("initializeWasm() must be awaited first!");
15886                 }
15887                 const nativeResponseValue = wasm.TS_UpdateFee_set_feerate_per_kw(this_ptr, val);
15888                 // debug statements here
15889         }
15890         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
15891         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
15892                 if(!isWasmInitialized) {
15893                         throw new Error("initializeWasm() must be awaited first!");
15894                 }
15895                 const nativeResponseValue = wasm.TS_UpdateFee_new(encodeUint8Array(channel_id_arg), feerate_per_kw_arg);
15896                 return nativeResponseValue;
15897         }
15898         // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
15899         export function UpdateFee_clone_ptr(arg: number): number {
15900                 if(!isWasmInitialized) {
15901                         throw new Error("initializeWasm() must be awaited first!");
15902                 }
15903                 const nativeResponseValue = wasm.TS_UpdateFee_clone_ptr(arg);
15904                 return nativeResponseValue;
15905         }
15906         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
15907         export function UpdateFee_clone(orig: number): number {
15908                 if(!isWasmInitialized) {
15909                         throw new Error("initializeWasm() must be awaited first!");
15910                 }
15911                 const nativeResponseValue = wasm.TS_UpdateFee_clone(orig);
15912                 return nativeResponseValue;
15913         }
15914         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
15915         export function DataLossProtect_free(this_obj: number): void {
15916                 if(!isWasmInitialized) {
15917                         throw new Error("initializeWasm() must be awaited first!");
15918                 }
15919                 const nativeResponseValue = wasm.TS_DataLossProtect_free(this_obj);
15920                 // debug statements here
15921         }
15922         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
15923         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
15924                 if(!isWasmInitialized) {
15925                         throw new Error("initializeWasm() must be awaited first!");
15926                 }
15927                 const nativeResponseValue = wasm.TS_DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
15928                 return decodeUint8Array(nativeResponseValue);
15929         }
15930         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15931         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
15932                 if(!isWasmInitialized) {
15933                         throw new Error("initializeWasm() must be awaited first!");
15934                 }
15935                 const nativeResponseValue = wasm.TS_DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeUint8Array(val));
15936                 // debug statements here
15937         }
15938         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
15939         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
15940                 if(!isWasmInitialized) {
15941                         throw new Error("initializeWasm() must be awaited first!");
15942                 }
15943                 const nativeResponseValue = wasm.TS_DataLossProtect_get_my_current_per_commitment_point(this_ptr);
15944                 return decodeUint8Array(nativeResponseValue);
15945         }
15946         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15947         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
15948                 if(!isWasmInitialized) {
15949                         throw new Error("initializeWasm() must be awaited first!");
15950                 }
15951                 const nativeResponseValue = wasm.TS_DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeUint8Array(val));
15952                 // debug statements here
15953         }
15954         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
15955         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
15956                 if(!isWasmInitialized) {
15957                         throw new Error("initializeWasm() must be awaited first!");
15958                 }
15959                 const nativeResponseValue = wasm.TS_DataLossProtect_new(encodeUint8Array(your_last_per_commitment_secret_arg), encodeUint8Array(my_current_per_commitment_point_arg));
15960                 return nativeResponseValue;
15961         }
15962         // uint64_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
15963         export function DataLossProtect_clone_ptr(arg: number): number {
15964                 if(!isWasmInitialized) {
15965                         throw new Error("initializeWasm() must be awaited first!");
15966                 }
15967                 const nativeResponseValue = wasm.TS_DataLossProtect_clone_ptr(arg);
15968                 return nativeResponseValue;
15969         }
15970         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
15971         export function DataLossProtect_clone(orig: number): number {
15972                 if(!isWasmInitialized) {
15973                         throw new Error("initializeWasm() must be awaited first!");
15974                 }
15975                 const nativeResponseValue = wasm.TS_DataLossProtect_clone(orig);
15976                 return nativeResponseValue;
15977         }
15978         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
15979         export function ChannelReestablish_free(this_obj: number): void {
15980                 if(!isWasmInitialized) {
15981                         throw new Error("initializeWasm() must be awaited first!");
15982                 }
15983                 const nativeResponseValue = wasm.TS_ChannelReestablish_free(this_obj);
15984                 // debug statements here
15985         }
15986         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
15987         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
15988                 if(!isWasmInitialized) {
15989                         throw new Error("initializeWasm() must be awaited first!");
15990                 }
15991                 const nativeResponseValue = wasm.TS_ChannelReestablish_get_channel_id(this_ptr);
15992                 return decodeUint8Array(nativeResponseValue);
15993         }
15994         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15995         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
15996                 if(!isWasmInitialized) {
15997                         throw new Error("initializeWasm() must be awaited first!");
15998                 }
15999                 const nativeResponseValue = wasm.TS_ChannelReestablish_set_channel_id(this_ptr, encodeUint8Array(val));
16000                 // debug statements here
16001         }
16002         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
16003         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
16004                 if(!isWasmInitialized) {
16005                         throw new Error("initializeWasm() must be awaited first!");
16006                 }
16007                 const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_local_commitment_number(this_ptr);
16008                 return nativeResponseValue;
16009         }
16010         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
16011         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
16012                 if(!isWasmInitialized) {
16013                         throw new Error("initializeWasm() must be awaited first!");
16014                 }
16015                 const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
16016                 // debug statements here
16017         }
16018         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
16019         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
16020                 if(!isWasmInitialized) {
16021                         throw new Error("initializeWasm() must be awaited first!");
16022                 }
16023                 const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_remote_commitment_number(this_ptr);
16024                 return nativeResponseValue;
16025         }
16026         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
16027         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
16028                 if(!isWasmInitialized) {
16029                         throw new Error("initializeWasm() must be awaited first!");
16030                 }
16031                 const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
16032                 // debug statements here
16033         }
16034         // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
16035         export function ChannelReestablish_clone_ptr(arg: number): number {
16036                 if(!isWasmInitialized) {
16037                         throw new Error("initializeWasm() must be awaited first!");
16038                 }
16039                 const nativeResponseValue = wasm.TS_ChannelReestablish_clone_ptr(arg);
16040                 return nativeResponseValue;
16041         }
16042         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
16043         export function ChannelReestablish_clone(orig: number): number {
16044                 if(!isWasmInitialized) {
16045                         throw new Error("initializeWasm() must be awaited first!");
16046                 }
16047                 const nativeResponseValue = wasm.TS_ChannelReestablish_clone(orig);
16048                 return nativeResponseValue;
16049         }
16050         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
16051         export function AnnouncementSignatures_free(this_obj: number): void {
16052                 if(!isWasmInitialized) {
16053                         throw new Error("initializeWasm() must be awaited first!");
16054                 }
16055                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_free(this_obj);
16056                 // debug statements here
16057         }
16058         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
16059         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
16060                 if(!isWasmInitialized) {
16061                         throw new Error("initializeWasm() must be awaited first!");
16062                 }
16063                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_channel_id(this_ptr);
16064                 return decodeUint8Array(nativeResponseValue);
16065         }
16066         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16067         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
16068                 if(!isWasmInitialized) {
16069                         throw new Error("initializeWasm() must be awaited first!");
16070                 }
16071                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_channel_id(this_ptr, encodeUint8Array(val));
16072                 // debug statements here
16073         }
16074         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16075         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
16076                 if(!isWasmInitialized) {
16077                         throw new Error("initializeWasm() must be awaited first!");
16078                 }
16079                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_short_channel_id(this_ptr);
16080                 return nativeResponseValue;
16081         }
16082         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
16083         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
16084                 if(!isWasmInitialized) {
16085                         throw new Error("initializeWasm() must be awaited first!");
16086                 }
16087                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_short_channel_id(this_ptr, val);
16088                 // debug statements here
16089         }
16090         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16091         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
16092                 if(!isWasmInitialized) {
16093                         throw new Error("initializeWasm() must be awaited first!");
16094                 }
16095                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_node_signature(this_ptr);
16096                 return decodeUint8Array(nativeResponseValue);
16097         }
16098         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
16099         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
16100                 if(!isWasmInitialized) {
16101                         throw new Error("initializeWasm() must be awaited first!");
16102                 }
16103                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_node_signature(this_ptr, encodeUint8Array(val));
16104                 // debug statements here
16105         }
16106         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16107         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
16108                 if(!isWasmInitialized) {
16109                         throw new Error("initializeWasm() must be awaited first!");
16110                 }
16111                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_bitcoin_signature(this_ptr);
16112                 return decodeUint8Array(nativeResponseValue);
16113         }
16114         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
16115         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
16116                 if(!isWasmInitialized) {
16117                         throw new Error("initializeWasm() must be awaited first!");
16118                 }
16119                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeUint8Array(val));
16120                 // debug statements here
16121         }
16122         // 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);
16123         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
16124                 if(!isWasmInitialized) {
16125                         throw new Error("initializeWasm() must be awaited first!");
16126                 }
16127                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_new(encodeUint8Array(channel_id_arg), short_channel_id_arg, encodeUint8Array(node_signature_arg), encodeUint8Array(bitcoin_signature_arg));
16128                 return nativeResponseValue;
16129         }
16130         // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
16131         export function AnnouncementSignatures_clone_ptr(arg: number): number {
16132                 if(!isWasmInitialized) {
16133                         throw new Error("initializeWasm() must be awaited first!");
16134                 }
16135                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone_ptr(arg);
16136                 return nativeResponseValue;
16137         }
16138         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
16139         export function AnnouncementSignatures_clone(orig: number): number {
16140                 if(!isWasmInitialized) {
16141                         throw new Error("initializeWasm() must be awaited first!");
16142                 }
16143                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone(orig);
16144                 return nativeResponseValue;
16145         }
16146         // void NetAddress_free(struct LDKNetAddress this_ptr);
16147         export function NetAddress_free(this_ptr: number): void {
16148                 if(!isWasmInitialized) {
16149                         throw new Error("initializeWasm() must be awaited first!");
16150                 }
16151                 const nativeResponseValue = wasm.TS_NetAddress_free(this_ptr);
16152                 // debug statements here
16153         }
16154         // uint64_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
16155         export function NetAddress_clone_ptr(arg: number): number {
16156                 if(!isWasmInitialized) {
16157                         throw new Error("initializeWasm() must be awaited first!");
16158                 }
16159                 const nativeResponseValue = wasm.TS_NetAddress_clone_ptr(arg);
16160                 return nativeResponseValue;
16161         }
16162         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
16163         export function NetAddress_clone(orig: number): number {
16164                 if(!isWasmInitialized) {
16165                         throw new Error("initializeWasm() must be awaited first!");
16166                 }
16167                 const nativeResponseValue = wasm.TS_NetAddress_clone(orig);
16168                 return nativeResponseValue;
16169         }
16170         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
16171         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
16172                 if(!isWasmInitialized) {
16173                         throw new Error("initializeWasm() must be awaited first!");
16174                 }
16175                 const nativeResponseValue = wasm.TS_NetAddress_ipv4(encodeUint8Array(addr), port);
16176                 return nativeResponseValue;
16177         }
16178         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
16179         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
16180                 if(!isWasmInitialized) {
16181                         throw new Error("initializeWasm() must be awaited first!");
16182                 }
16183                 const nativeResponseValue = wasm.TS_NetAddress_ipv6(encodeUint8Array(addr), port);
16184                 return nativeResponseValue;
16185         }
16186         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
16187         export function NetAddress_onion_v2(a: Uint8Array): number {
16188                 if(!isWasmInitialized) {
16189                         throw new Error("initializeWasm() must be awaited first!");
16190                 }
16191                 const nativeResponseValue = wasm.TS_NetAddress_onion_v2(encodeUint8Array(a));
16192                 return nativeResponseValue;
16193         }
16194         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
16195         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
16196                 if(!isWasmInitialized) {
16197                         throw new Error("initializeWasm() must be awaited first!");
16198                 }
16199                 const nativeResponseValue = wasm.TS_NetAddress_onion_v3(encodeUint8Array(ed25519_pubkey), checksum, version, port);
16200                 return nativeResponseValue;
16201         }
16202         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
16203         export function NetAddress_write(obj: number): Uint8Array {
16204                 if(!isWasmInitialized) {
16205                         throw new Error("initializeWasm() must be awaited first!");
16206                 }
16207                 const nativeResponseValue = wasm.TS_NetAddress_write(obj);
16208                 return decodeUint8Array(nativeResponseValue);
16209         }
16210         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
16211         export function NetAddress_read(ser: Uint8Array): number {
16212                 if(!isWasmInitialized) {
16213                         throw new Error("initializeWasm() must be awaited first!");
16214                 }
16215                 const nativeResponseValue = wasm.TS_NetAddress_read(encodeUint8Array(ser));
16216                 return nativeResponseValue;
16217         }
16218         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
16219         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
16220                 if(!isWasmInitialized) {
16221                         throw new Error("initializeWasm() must be awaited first!");
16222                 }
16223                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_free(this_obj);
16224                 // debug statements here
16225         }
16226         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
16227         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
16228                 if(!isWasmInitialized) {
16229                         throw new Error("initializeWasm() must be awaited first!");
16230                 }
16231                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_features(this_ptr);
16232                 return nativeResponseValue;
16233         }
16234         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16235         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
16236                 if(!isWasmInitialized) {
16237                         throw new Error("initializeWasm() must be awaited first!");
16238                 }
16239                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_features(this_ptr, val);
16240                 // debug statements here
16241         }
16242         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
16243         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
16244                 if(!isWasmInitialized) {
16245                         throw new Error("initializeWasm() must be awaited first!");
16246                 }
16247                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_timestamp(this_ptr);
16248                 return nativeResponseValue;
16249         }
16250         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
16251         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
16252                 if(!isWasmInitialized) {
16253                         throw new Error("initializeWasm() must be awaited first!");
16254                 }
16255                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
16256                 // debug statements here
16257         }
16258         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
16259         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
16260                 if(!isWasmInitialized) {
16261                         throw new Error("initializeWasm() must be awaited first!");
16262                 }
16263                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_node_id(this_ptr);
16264                 return decodeUint8Array(nativeResponseValue);
16265         }
16266         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16267         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
16268                 if(!isWasmInitialized) {
16269                         throw new Error("initializeWasm() must be awaited first!");
16270                 }
16271                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeUint8Array(val));
16272                 // debug statements here
16273         }
16274         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
16275         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
16276                 if(!isWasmInitialized) {
16277                         throw new Error("initializeWasm() must be awaited first!");
16278                 }
16279                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_rgb(this_ptr);
16280                 return decodeUint8Array(nativeResponseValue);
16281         }
16282         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16283         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
16284                 if(!isWasmInitialized) {
16285                         throw new Error("initializeWasm() must be awaited first!");
16286                 }
16287                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeUint8Array(val));
16288                 // debug statements here
16289         }
16290         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
16291         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
16292                 if(!isWasmInitialized) {
16293                         throw new Error("initializeWasm() must be awaited first!");
16294                 }
16295                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_alias(this_ptr);
16296                 return decodeUint8Array(nativeResponseValue);
16297         }
16298         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16299         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
16300                 if(!isWasmInitialized) {
16301                         throw new Error("initializeWasm() must be awaited first!");
16302                 }
16303                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_alias(this_ptr, encodeUint8Array(val));
16304                 // debug statements here
16305         }
16306         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16307         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
16308                 if(!isWasmInitialized) {
16309                         throw new Error("initializeWasm() must be awaited first!");
16310                 }
16311                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
16312                 // debug statements here
16313         }
16314         // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
16315         export function UnsignedNodeAnnouncement_clone_ptr(arg: number): number {
16316                 if(!isWasmInitialized) {
16317                         throw new Error("initializeWasm() must be awaited first!");
16318                 }
16319                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone_ptr(arg);
16320                 return nativeResponseValue;
16321         }
16322         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
16323         export function UnsignedNodeAnnouncement_clone(orig: number): number {
16324                 if(!isWasmInitialized) {
16325                         throw new Error("initializeWasm() must be awaited first!");
16326                 }
16327                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone(orig);
16328                 return nativeResponseValue;
16329         }
16330         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
16331         export function NodeAnnouncement_free(this_obj: number): void {
16332                 if(!isWasmInitialized) {
16333                         throw new Error("initializeWasm() must be awaited first!");
16334                 }
16335                 const nativeResponseValue = wasm.TS_NodeAnnouncement_free(this_obj);
16336                 // debug statements here
16337         }
16338         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
16339         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
16340                 if(!isWasmInitialized) {
16341                         throw new Error("initializeWasm() must be awaited first!");
16342                 }
16343                 const nativeResponseValue = wasm.TS_NodeAnnouncement_get_signature(this_ptr);
16344                 return decodeUint8Array(nativeResponseValue);
16345         }
16346         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16347         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
16348                 if(!isWasmInitialized) {
16349                         throw new Error("initializeWasm() must be awaited first!");
16350                 }
16351                 const nativeResponseValue = wasm.TS_NodeAnnouncement_set_signature(this_ptr, encodeUint8Array(val));
16352                 // debug statements here
16353         }
16354         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
16355         export function NodeAnnouncement_get_contents(this_ptr: number): number {
16356                 if(!isWasmInitialized) {
16357                         throw new Error("initializeWasm() must be awaited first!");
16358                 }
16359                 const nativeResponseValue = wasm.TS_NodeAnnouncement_get_contents(this_ptr);
16360                 return nativeResponseValue;
16361         }
16362         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
16363         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
16364                 if(!isWasmInitialized) {
16365                         throw new Error("initializeWasm() must be awaited first!");
16366                 }
16367                 const nativeResponseValue = wasm.TS_NodeAnnouncement_set_contents(this_ptr, val);
16368                 // debug statements here
16369         }
16370         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
16371         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
16372                 if(!isWasmInitialized) {
16373                         throw new Error("initializeWasm() must be awaited first!");
16374                 }
16375                 const nativeResponseValue = wasm.TS_NodeAnnouncement_new(encodeUint8Array(signature_arg), contents_arg);
16376                 return nativeResponseValue;
16377         }
16378         // uint64_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
16379         export function NodeAnnouncement_clone_ptr(arg: number): number {
16380                 if(!isWasmInitialized) {
16381                         throw new Error("initializeWasm() must be awaited first!");
16382                 }
16383                 const nativeResponseValue = wasm.TS_NodeAnnouncement_clone_ptr(arg);
16384                 return nativeResponseValue;
16385         }
16386         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
16387         export function NodeAnnouncement_clone(orig: number): number {
16388                 if(!isWasmInitialized) {
16389                         throw new Error("initializeWasm() must be awaited first!");
16390                 }
16391                 const nativeResponseValue = wasm.TS_NodeAnnouncement_clone(orig);
16392                 return nativeResponseValue;
16393         }
16394         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
16395         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
16396                 if(!isWasmInitialized) {
16397                         throw new Error("initializeWasm() must be awaited first!");
16398                 }
16399                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_free(this_obj);
16400                 // debug statements here
16401         }
16402         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16403         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
16404                 if(!isWasmInitialized) {
16405                         throw new Error("initializeWasm() must be awaited first!");
16406                 }
16407                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_features(this_ptr);
16408                 return nativeResponseValue;
16409         }
16410         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16411         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
16412                 if(!isWasmInitialized) {
16413                         throw new Error("initializeWasm() must be awaited first!");
16414                 }
16415                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_features(this_ptr, val);
16416                 // debug statements here
16417         }
16418         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
16419         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
16420                 if(!isWasmInitialized) {
16421                         throw new Error("initializeWasm() must be awaited first!");
16422                 }
16423                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
16424                 return decodeUint8Array(nativeResponseValue);
16425         }
16426         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16427         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16428                 if(!isWasmInitialized) {
16429                         throw new Error("initializeWasm() must be awaited first!");
16430                 }
16431                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeUint8Array(val));
16432                 // debug statements here
16433         }
16434         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16435         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
16436                 if(!isWasmInitialized) {
16437                         throw new Error("initializeWasm() must be awaited first!");
16438                 }
16439                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
16440                 return nativeResponseValue;
16441         }
16442         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
16443         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
16444                 if(!isWasmInitialized) {
16445                         throw new Error("initializeWasm() must be awaited first!");
16446                 }
16447                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
16448                 // debug statements here
16449         }
16450         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16451         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
16452                 if(!isWasmInitialized) {
16453                         throw new Error("initializeWasm() must be awaited first!");
16454                 }
16455                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
16456                 return decodeUint8Array(nativeResponseValue);
16457         }
16458         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16459         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
16460                 if(!isWasmInitialized) {
16461                         throw new Error("initializeWasm() must be awaited first!");
16462                 }
16463                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeUint8Array(val));
16464                 // debug statements here
16465         }
16466         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16467         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
16468                 if(!isWasmInitialized) {
16469                         throw new Error("initializeWasm() must be awaited first!");
16470                 }
16471                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
16472                 return decodeUint8Array(nativeResponseValue);
16473         }
16474         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16475         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
16476                 if(!isWasmInitialized) {
16477                         throw new Error("initializeWasm() must be awaited first!");
16478                 }
16479                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeUint8Array(val));
16480                 // debug statements here
16481         }
16482         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16483         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
16484                 if(!isWasmInitialized) {
16485                         throw new Error("initializeWasm() must be awaited first!");
16486                 }
16487                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
16488                 return decodeUint8Array(nativeResponseValue);
16489         }
16490         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16491         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
16492                 if(!isWasmInitialized) {
16493                         throw new Error("initializeWasm() must be awaited first!");
16494                 }
16495                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeUint8Array(val));
16496                 // debug statements here
16497         }
16498         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
16499         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
16500                 if(!isWasmInitialized) {
16501                         throw new Error("initializeWasm() must be awaited first!");
16502                 }
16503                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
16504                 return decodeUint8Array(nativeResponseValue);
16505         }
16506         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16507         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
16508                 if(!isWasmInitialized) {
16509                         throw new Error("initializeWasm() must be awaited first!");
16510                 }
16511                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeUint8Array(val));
16512                 // debug statements here
16513         }
16514         // uint64_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
16515         export function UnsignedChannelAnnouncement_clone_ptr(arg: number): number {
16516                 if(!isWasmInitialized) {
16517                         throw new Error("initializeWasm() must be awaited first!");
16518                 }
16519                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone_ptr(arg);
16520                 return nativeResponseValue;
16521         }
16522         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
16523         export function UnsignedChannelAnnouncement_clone(orig: number): number {
16524                 if(!isWasmInitialized) {
16525                         throw new Error("initializeWasm() must be awaited first!");
16526                 }
16527                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone(orig);
16528                 return nativeResponseValue;
16529         }
16530         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
16531         export function ChannelAnnouncement_free(this_obj: number): void {
16532                 if(!isWasmInitialized) {
16533                         throw new Error("initializeWasm() must be awaited first!");
16534                 }
16535                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_free(this_obj);
16536                 // debug statements here
16537         }
16538         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16539         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
16540                 if(!isWasmInitialized) {
16541                         throw new Error("initializeWasm() must be awaited first!");
16542                 }
16543                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_1(this_ptr);
16544                 return decodeUint8Array(nativeResponseValue);
16545         }
16546         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16547         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
16548                 if(!isWasmInitialized) {
16549                         throw new Error("initializeWasm() must be awaited first!");
16550                 }
16551                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_1(this_ptr, encodeUint8Array(val));
16552                 // debug statements here
16553         }
16554         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16555         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
16556                 if(!isWasmInitialized) {
16557                         throw new Error("initializeWasm() must be awaited first!");
16558                 }
16559                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_2(this_ptr);
16560                 return decodeUint8Array(nativeResponseValue);
16561         }
16562         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16563         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
16564                 if(!isWasmInitialized) {
16565                         throw new Error("initializeWasm() must be awaited first!");
16566                 }
16567                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_2(this_ptr, encodeUint8Array(val));
16568                 // debug statements here
16569         }
16570         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16571         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
16572                 if(!isWasmInitialized) {
16573                         throw new Error("initializeWasm() must be awaited first!");
16574                 }
16575                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
16576                 return decodeUint8Array(nativeResponseValue);
16577         }
16578         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16579         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
16580                 if(!isWasmInitialized) {
16581                         throw new Error("initializeWasm() must be awaited first!");
16582                 }
16583                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeUint8Array(val));
16584                 // debug statements here
16585         }
16586         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16587         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
16588                 if(!isWasmInitialized) {
16589                         throw new Error("initializeWasm() must be awaited first!");
16590                 }
16591                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
16592                 return decodeUint8Array(nativeResponseValue);
16593         }
16594         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
16595         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
16596                 if(!isWasmInitialized) {
16597                         throw new Error("initializeWasm() must be awaited first!");
16598                 }
16599                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeUint8Array(val));
16600                 // debug statements here
16601         }
16602         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
16603         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
16604                 if(!isWasmInitialized) {
16605                         throw new Error("initializeWasm() must be awaited first!");
16606                 }
16607                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_contents(this_ptr);
16608                 return nativeResponseValue;
16609         }
16610         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
16611         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
16612                 if(!isWasmInitialized) {
16613                         throw new Error("initializeWasm() must be awaited first!");
16614                 }
16615                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_contents(this_ptr, val);
16616                 // debug statements here
16617         }
16618         // 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);
16619         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 {
16620                 if(!isWasmInitialized) {
16621                         throw new Error("initializeWasm() must be awaited first!");
16622                 }
16623                 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);
16624                 return nativeResponseValue;
16625         }
16626         // uint64_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
16627         export function ChannelAnnouncement_clone_ptr(arg: number): number {
16628                 if(!isWasmInitialized) {
16629                         throw new Error("initializeWasm() must be awaited first!");
16630                 }
16631                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone_ptr(arg);
16632                 return nativeResponseValue;
16633         }
16634         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
16635         export function ChannelAnnouncement_clone(orig: number): number {
16636                 if(!isWasmInitialized) {
16637                         throw new Error("initializeWasm() must be awaited first!");
16638                 }
16639                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone(orig);
16640                 return nativeResponseValue;
16641         }
16642         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
16643         export function UnsignedChannelUpdate_free(this_obj: number): void {
16644                 if(!isWasmInitialized) {
16645                         throw new Error("initializeWasm() must be awaited first!");
16646                 }
16647                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_free(this_obj);
16648                 // debug statements here
16649         }
16650         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
16651         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
16652                 if(!isWasmInitialized) {
16653                         throw new Error("initializeWasm() must be awaited first!");
16654                 }
16655                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_chain_hash(this_ptr);
16656                 return decodeUint8Array(nativeResponseValue);
16657         }
16658         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16659         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16660                 if(!isWasmInitialized) {
16661                         throw new Error("initializeWasm() must be awaited first!");
16662                 }
16663                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeUint8Array(val));
16664                 // debug statements here
16665         }
16666         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16667         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
16668                 if(!isWasmInitialized) {
16669                         throw new Error("initializeWasm() must be awaited first!");
16670                 }
16671                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_short_channel_id(this_ptr);
16672                 return nativeResponseValue;
16673         }
16674         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
16675         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
16676                 if(!isWasmInitialized) {
16677                         throw new Error("initializeWasm() must be awaited first!");
16678                 }
16679                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
16680                 // debug statements here
16681         }
16682         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16683         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
16684                 if(!isWasmInitialized) {
16685                         throw new Error("initializeWasm() must be awaited first!");
16686                 }
16687                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_timestamp(this_ptr);
16688                 return nativeResponseValue;
16689         }
16690         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16691         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
16692                 if(!isWasmInitialized) {
16693                         throw new Error("initializeWasm() must be awaited first!");
16694                 }
16695                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_timestamp(this_ptr, val);
16696                 // debug statements here
16697         }
16698         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16699         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
16700                 if(!isWasmInitialized) {
16701                         throw new Error("initializeWasm() must be awaited first!");
16702                 }
16703                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_flags(this_ptr);
16704                 return nativeResponseValue;
16705         }
16706         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
16707         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
16708                 if(!isWasmInitialized) {
16709                         throw new Error("initializeWasm() must be awaited first!");
16710                 }
16711                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_flags(this_ptr, val);
16712                 // debug statements here
16713         }
16714         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16715         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
16716                 if(!isWasmInitialized) {
16717                         throw new Error("initializeWasm() must be awaited first!");
16718                 }
16719                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
16720                 return nativeResponseValue;
16721         }
16722         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
16723         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16724                 if(!isWasmInitialized) {
16725                         throw new Error("initializeWasm() must be awaited first!");
16726                 }
16727                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
16728                 // debug statements here
16729         }
16730         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16731         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
16732                 if(!isWasmInitialized) {
16733                         throw new Error("initializeWasm() must be awaited first!");
16734                 }
16735                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
16736                 return nativeResponseValue;
16737         }
16738         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
16739         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
16740                 if(!isWasmInitialized) {
16741                         throw new Error("initializeWasm() must be awaited first!");
16742                 }
16743                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
16744                 // debug statements here
16745         }
16746         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16747         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
16748                 if(!isWasmInitialized) {
16749                         throw new Error("initializeWasm() must be awaited first!");
16750                 }
16751                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
16752                 return nativeResponseValue;
16753         }
16754         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16755         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
16756                 if(!isWasmInitialized) {
16757                         throw new Error("initializeWasm() must be awaited first!");
16758                 }
16759                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
16760                 // debug statements here
16761         }
16762         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
16763         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
16764                 if(!isWasmInitialized) {
16765                         throw new Error("initializeWasm() must be awaited first!");
16766                 }
16767                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
16768                 return nativeResponseValue;
16769         }
16770         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
16771         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
16772                 if(!isWasmInitialized) {
16773                         throw new Error("initializeWasm() must be awaited first!");
16774                 }
16775                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
16776                 // debug statements here
16777         }
16778         // uint64_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
16779         export function UnsignedChannelUpdate_clone_ptr(arg: number): number {
16780                 if(!isWasmInitialized) {
16781                         throw new Error("initializeWasm() must be awaited first!");
16782                 }
16783                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone_ptr(arg);
16784                 return nativeResponseValue;
16785         }
16786         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
16787         export function UnsignedChannelUpdate_clone(orig: number): number {
16788                 if(!isWasmInitialized) {
16789                         throw new Error("initializeWasm() must be awaited first!");
16790                 }
16791                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone(orig);
16792                 return nativeResponseValue;
16793         }
16794         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
16795         export function ChannelUpdate_free(this_obj: number): void {
16796                 if(!isWasmInitialized) {
16797                         throw new Error("initializeWasm() must be awaited first!");
16798                 }
16799                 const nativeResponseValue = wasm.TS_ChannelUpdate_free(this_obj);
16800                 // debug statements here
16801         }
16802         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
16803         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
16804                 if(!isWasmInitialized) {
16805                         throw new Error("initializeWasm() must be awaited first!");
16806                 }
16807                 const nativeResponseValue = wasm.TS_ChannelUpdate_get_signature(this_ptr);
16808                 return decodeUint8Array(nativeResponseValue);
16809         }
16810         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
16811         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
16812                 if(!isWasmInitialized) {
16813                         throw new Error("initializeWasm() must be awaited first!");
16814                 }
16815                 const nativeResponseValue = wasm.TS_ChannelUpdate_set_signature(this_ptr, encodeUint8Array(val));
16816                 // debug statements here
16817         }
16818         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
16819         export function ChannelUpdate_get_contents(this_ptr: number): number {
16820                 if(!isWasmInitialized) {
16821                         throw new Error("initializeWasm() must be awaited first!");
16822                 }
16823                 const nativeResponseValue = wasm.TS_ChannelUpdate_get_contents(this_ptr);
16824                 return nativeResponseValue;
16825         }
16826         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
16827         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
16828                 if(!isWasmInitialized) {
16829                         throw new Error("initializeWasm() must be awaited first!");
16830                 }
16831                 const nativeResponseValue = wasm.TS_ChannelUpdate_set_contents(this_ptr, val);
16832                 // debug statements here
16833         }
16834         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
16835         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
16836                 if(!isWasmInitialized) {
16837                         throw new Error("initializeWasm() must be awaited first!");
16838                 }
16839                 const nativeResponseValue = wasm.TS_ChannelUpdate_new(encodeUint8Array(signature_arg), contents_arg);
16840                 return nativeResponseValue;
16841         }
16842         // uint64_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
16843         export function ChannelUpdate_clone_ptr(arg: number): number {
16844                 if(!isWasmInitialized) {
16845                         throw new Error("initializeWasm() must be awaited first!");
16846                 }
16847                 const nativeResponseValue = wasm.TS_ChannelUpdate_clone_ptr(arg);
16848                 return nativeResponseValue;
16849         }
16850         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
16851         export function ChannelUpdate_clone(orig: number): number {
16852                 if(!isWasmInitialized) {
16853                         throw new Error("initializeWasm() must be awaited first!");
16854                 }
16855                 const nativeResponseValue = wasm.TS_ChannelUpdate_clone(orig);
16856                 return nativeResponseValue;
16857         }
16858         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
16859         export function QueryChannelRange_free(this_obj: number): void {
16860                 if(!isWasmInitialized) {
16861                         throw new Error("initializeWasm() must be awaited first!");
16862                 }
16863                 const nativeResponseValue = wasm.TS_QueryChannelRange_free(this_obj);
16864                 // debug statements here
16865         }
16866         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
16867         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
16868                 if(!isWasmInitialized) {
16869                         throw new Error("initializeWasm() must be awaited first!");
16870                 }
16871                 const nativeResponseValue = wasm.TS_QueryChannelRange_get_chain_hash(this_ptr);
16872                 return decodeUint8Array(nativeResponseValue);
16873         }
16874         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16875         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16876                 if(!isWasmInitialized) {
16877                         throw new Error("initializeWasm() must be awaited first!");
16878                 }
16879                 const nativeResponseValue = wasm.TS_QueryChannelRange_set_chain_hash(this_ptr, encodeUint8Array(val));
16880                 // debug statements here
16881         }
16882         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
16883         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
16884                 if(!isWasmInitialized) {
16885                         throw new Error("initializeWasm() must be awaited first!");
16886                 }
16887                 const nativeResponseValue = wasm.TS_QueryChannelRange_get_first_blocknum(this_ptr);
16888                 return nativeResponseValue;
16889         }
16890         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16891         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
16892                 if(!isWasmInitialized) {
16893                         throw new Error("initializeWasm() must be awaited first!");
16894                 }
16895                 const nativeResponseValue = wasm.TS_QueryChannelRange_set_first_blocknum(this_ptr, val);
16896                 // debug statements here
16897         }
16898         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
16899         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
16900                 if(!isWasmInitialized) {
16901                         throw new Error("initializeWasm() must be awaited first!");
16902                 }
16903                 const nativeResponseValue = wasm.TS_QueryChannelRange_get_number_of_blocks(this_ptr);
16904                 return nativeResponseValue;
16905         }
16906         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16907         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
16908                 if(!isWasmInitialized) {
16909                         throw new Error("initializeWasm() must be awaited first!");
16910                 }
16911                 const nativeResponseValue = wasm.TS_QueryChannelRange_set_number_of_blocks(this_ptr, val);
16912                 // debug statements here
16913         }
16914         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
16915         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
16916                 if(!isWasmInitialized) {
16917                         throw new Error("initializeWasm() must be awaited first!");
16918                 }
16919                 const nativeResponseValue = wasm.TS_QueryChannelRange_new(encodeUint8Array(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
16920                 return nativeResponseValue;
16921         }
16922         // uint64_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
16923         export function QueryChannelRange_clone_ptr(arg: number): number {
16924                 if(!isWasmInitialized) {
16925                         throw new Error("initializeWasm() must be awaited first!");
16926                 }
16927                 const nativeResponseValue = wasm.TS_QueryChannelRange_clone_ptr(arg);
16928                 return nativeResponseValue;
16929         }
16930         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
16931         export function QueryChannelRange_clone(orig: number): number {
16932                 if(!isWasmInitialized) {
16933                         throw new Error("initializeWasm() must be awaited first!");
16934                 }
16935                 const nativeResponseValue = wasm.TS_QueryChannelRange_clone(orig);
16936                 return nativeResponseValue;
16937         }
16938         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
16939         export function ReplyChannelRange_free(this_obj: number): void {
16940                 if(!isWasmInitialized) {
16941                         throw new Error("initializeWasm() must be awaited first!");
16942                 }
16943                 const nativeResponseValue = wasm.TS_ReplyChannelRange_free(this_obj);
16944                 // debug statements here
16945         }
16946         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
16947         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
16948                 if(!isWasmInitialized) {
16949                         throw new Error("initializeWasm() must be awaited first!");
16950                 }
16951                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_chain_hash(this_ptr);
16952                 return decodeUint8Array(nativeResponseValue);
16953         }
16954         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16955         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16956                 if(!isWasmInitialized) {
16957                         throw new Error("initializeWasm() must be awaited first!");
16958                 }
16959                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_chain_hash(this_ptr, encodeUint8Array(val));
16960                 // debug statements here
16961         }
16962         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16963         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
16964                 if(!isWasmInitialized) {
16965                         throw new Error("initializeWasm() must be awaited first!");
16966                 }
16967                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_first_blocknum(this_ptr);
16968                 return nativeResponseValue;
16969         }
16970         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16971         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
16972                 if(!isWasmInitialized) {
16973                         throw new Error("initializeWasm() must be awaited first!");
16974                 }
16975                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_first_blocknum(this_ptr, val);
16976                 // debug statements here
16977         }
16978         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16979         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
16980                 if(!isWasmInitialized) {
16981                         throw new Error("initializeWasm() must be awaited first!");
16982                 }
16983                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_number_of_blocks(this_ptr);
16984                 return nativeResponseValue;
16985         }
16986         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
16987         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
16988                 if(!isWasmInitialized) {
16989                         throw new Error("initializeWasm() must be awaited first!");
16990                 }
16991                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_number_of_blocks(this_ptr, val);
16992                 // debug statements here
16993         }
16994         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
16995         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
16996                 if(!isWasmInitialized) {
16997                         throw new Error("initializeWasm() must be awaited first!");
16998                 }
16999                 const nativeResponseValue = wasm.TS_ReplyChannelRange_get_sync_complete(this_ptr);
17000                 return nativeResponseValue;
17001         }
17002         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
17003         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
17004                 if(!isWasmInitialized) {
17005                         throw new Error("initializeWasm() must be awaited first!");
17006                 }
17007                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_sync_complete(this_ptr, val);
17008                 // debug statements here
17009         }
17010         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
17011         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
17012                 if(!isWasmInitialized) {
17013                         throw new Error("initializeWasm() must be awaited first!");
17014                 }
17015                 const nativeResponseValue = wasm.TS_ReplyChannelRange_set_short_channel_ids(this_ptr, val);
17016                 // debug statements here
17017         }
17018         // 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);
17019         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 {
17020                 if(!isWasmInitialized) {
17021                         throw new Error("initializeWasm() must be awaited first!");
17022                 }
17023                 const nativeResponseValue = wasm.TS_ReplyChannelRange_new(encodeUint8Array(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
17024                 return nativeResponseValue;
17025         }
17026         // uint64_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
17027         export function ReplyChannelRange_clone_ptr(arg: number): number {
17028                 if(!isWasmInitialized) {
17029                         throw new Error("initializeWasm() must be awaited first!");
17030                 }
17031                 const nativeResponseValue = wasm.TS_ReplyChannelRange_clone_ptr(arg);
17032                 return nativeResponseValue;
17033         }
17034         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
17035         export function ReplyChannelRange_clone(orig: number): number {
17036                 if(!isWasmInitialized) {
17037                         throw new Error("initializeWasm() must be awaited first!");
17038                 }
17039                 const nativeResponseValue = wasm.TS_ReplyChannelRange_clone(orig);
17040                 return nativeResponseValue;
17041         }
17042         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
17043         export function QueryShortChannelIds_free(this_obj: number): void {
17044                 if(!isWasmInitialized) {
17045                         throw new Error("initializeWasm() must be awaited first!");
17046                 }
17047                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_free(this_obj);
17048                 // debug statements here
17049         }
17050         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
17051         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
17052                 if(!isWasmInitialized) {
17053                         throw new Error("initializeWasm() must be awaited first!");
17054                 }
17055                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_get_chain_hash(this_ptr);
17056                 return decodeUint8Array(nativeResponseValue);
17057         }
17058         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17059         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
17060                 if(!isWasmInitialized) {
17061                         throw new Error("initializeWasm() must be awaited first!");
17062                 }
17063                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_chain_hash(this_ptr, encodeUint8Array(val));
17064                 // debug statements here
17065         }
17066         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
17067         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
17068                 if(!isWasmInitialized) {
17069                         throw new Error("initializeWasm() must be awaited first!");
17070                 }
17071                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
17072                 // debug statements here
17073         }
17074         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
17075         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
17076                 if(!isWasmInitialized) {
17077                         throw new Error("initializeWasm() must be awaited first!");
17078                 }
17079                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_new(encodeUint8Array(chain_hash_arg), short_channel_ids_arg);
17080                 return nativeResponseValue;
17081         }
17082         // uint64_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
17083         export function QueryShortChannelIds_clone_ptr(arg: number): number {
17084                 if(!isWasmInitialized) {
17085                         throw new Error("initializeWasm() must be awaited first!");
17086                 }
17087                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone_ptr(arg);
17088                 return nativeResponseValue;
17089         }
17090         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
17091         export function QueryShortChannelIds_clone(orig: number): number {
17092                 if(!isWasmInitialized) {
17093                         throw new Error("initializeWasm() must be awaited first!");
17094                 }
17095                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone(orig);
17096                 return nativeResponseValue;
17097         }
17098         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
17099         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
17100                 if(!isWasmInitialized) {
17101                         throw new Error("initializeWasm() must be awaited first!");
17102                 }
17103                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_free(this_obj);
17104                 // debug statements here
17105         }
17106         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
17107         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
17108                 if(!isWasmInitialized) {
17109                         throw new Error("initializeWasm() must be awaited first!");
17110                 }
17111                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
17112                 return decodeUint8Array(nativeResponseValue);
17113         }
17114         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17115         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
17116                 if(!isWasmInitialized) {
17117                         throw new Error("initializeWasm() must be awaited first!");
17118                 }
17119                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeUint8Array(val));
17120                 // debug statements here
17121         }
17122         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
17123         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
17124                 if(!isWasmInitialized) {
17125                         throw new Error("initializeWasm() must be awaited first!");
17126                 }
17127                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_full_information(this_ptr);
17128                 return nativeResponseValue;
17129         }
17130         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
17131         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
17132                 if(!isWasmInitialized) {
17133                         throw new Error("initializeWasm() must be awaited first!");
17134                 }
17135                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
17136                 // debug statements here
17137         }
17138         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
17139         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
17140                 if(!isWasmInitialized) {
17141                         throw new Error("initializeWasm() must be awaited first!");
17142                 }
17143                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_new(encodeUint8Array(chain_hash_arg), full_information_arg);
17144                 return nativeResponseValue;
17145         }
17146         // uint64_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
17147         export function ReplyShortChannelIdsEnd_clone_ptr(arg: number): number {
17148                 if(!isWasmInitialized) {
17149                         throw new Error("initializeWasm() must be awaited first!");
17150                 }
17151                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone_ptr(arg);
17152                 return nativeResponseValue;
17153         }
17154         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
17155         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
17156                 if(!isWasmInitialized) {
17157                         throw new Error("initializeWasm() must be awaited first!");
17158                 }
17159                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone(orig);
17160                 return nativeResponseValue;
17161         }
17162         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
17163         export function GossipTimestampFilter_free(this_obj: number): void {
17164                 if(!isWasmInitialized) {
17165                         throw new Error("initializeWasm() must be awaited first!");
17166                 }
17167                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_free(this_obj);
17168                 // debug statements here
17169         }
17170         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
17171         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
17172                 if(!isWasmInitialized) {
17173                         throw new Error("initializeWasm() must be awaited first!");
17174                 }
17175                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_chain_hash(this_ptr);
17176                 return decodeUint8Array(nativeResponseValue);
17177         }
17178         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17179         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
17180                 if(!isWasmInitialized) {
17181                         throw new Error("initializeWasm() must be awaited first!");
17182                 }
17183                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_chain_hash(this_ptr, encodeUint8Array(val));
17184                 // debug statements here
17185         }
17186         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
17187         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
17188                 if(!isWasmInitialized) {
17189                         throw new Error("initializeWasm() must be awaited first!");
17190                 }
17191                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_first_timestamp(this_ptr);
17192                 return nativeResponseValue;
17193         }
17194         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
17195         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
17196                 if(!isWasmInitialized) {
17197                         throw new Error("initializeWasm() must be awaited first!");
17198                 }
17199                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_first_timestamp(this_ptr, val);
17200                 // debug statements here
17201         }
17202         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
17203         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
17204                 if(!isWasmInitialized) {
17205                         throw new Error("initializeWasm() must be awaited first!");
17206                 }
17207                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_timestamp_range(this_ptr);
17208                 return nativeResponseValue;
17209         }
17210         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
17211         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
17212                 if(!isWasmInitialized) {
17213                         throw new Error("initializeWasm() must be awaited first!");
17214                 }
17215                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_timestamp_range(this_ptr, val);
17216                 // debug statements here
17217         }
17218         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
17219         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
17220                 if(!isWasmInitialized) {
17221                         throw new Error("initializeWasm() must be awaited first!");
17222                 }
17223                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_new(encodeUint8Array(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
17224                 return nativeResponseValue;
17225         }
17226         // uint64_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
17227         export function GossipTimestampFilter_clone_ptr(arg: number): number {
17228                 if(!isWasmInitialized) {
17229                         throw new Error("initializeWasm() must be awaited first!");
17230                 }
17231                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone_ptr(arg);
17232                 return nativeResponseValue;
17233         }
17234         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
17235         export function GossipTimestampFilter_clone(orig: number): number {
17236                 if(!isWasmInitialized) {
17237                         throw new Error("initializeWasm() must be awaited first!");
17238                 }
17239                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone(orig);
17240                 return nativeResponseValue;
17241         }
17242         // void ErrorAction_free(struct LDKErrorAction this_ptr);
17243         export function ErrorAction_free(this_ptr: number): void {
17244                 if(!isWasmInitialized) {
17245                         throw new Error("initializeWasm() must be awaited first!");
17246                 }
17247                 const nativeResponseValue = wasm.TS_ErrorAction_free(this_ptr);
17248                 // debug statements here
17249         }
17250         // uint64_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
17251         export function ErrorAction_clone_ptr(arg: number): number {
17252                 if(!isWasmInitialized) {
17253                         throw new Error("initializeWasm() must be awaited first!");
17254                 }
17255                 const nativeResponseValue = wasm.TS_ErrorAction_clone_ptr(arg);
17256                 return nativeResponseValue;
17257         }
17258         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
17259         export function ErrorAction_clone(orig: number): number {
17260                 if(!isWasmInitialized) {
17261                         throw new Error("initializeWasm() must be awaited first!");
17262                 }
17263                 const nativeResponseValue = wasm.TS_ErrorAction_clone(orig);
17264                 return nativeResponseValue;
17265         }
17266         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
17267         export function ErrorAction_disconnect_peer(msg: number): number {
17268                 if(!isWasmInitialized) {
17269                         throw new Error("initializeWasm() must be awaited first!");
17270                 }
17271                 const nativeResponseValue = wasm.TS_ErrorAction_disconnect_peer(msg);
17272                 return nativeResponseValue;
17273         }
17274         // struct LDKErrorAction ErrorAction_ignore_error(void);
17275         export function ErrorAction_ignore_error(): number {
17276                 if(!isWasmInitialized) {
17277                         throw new Error("initializeWasm() must be awaited first!");
17278                 }
17279                 const nativeResponseValue = wasm.TS_ErrorAction_ignore_error();
17280                 return nativeResponseValue;
17281         }
17282         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
17283         export function ErrorAction_ignore_and_log(a: Level): number {
17284                 if(!isWasmInitialized) {
17285                         throw new Error("initializeWasm() must be awaited first!");
17286                 }
17287                 const nativeResponseValue = wasm.TS_ErrorAction_ignore_and_log(a);
17288                 return nativeResponseValue;
17289         }
17290         // struct LDKErrorAction ErrorAction_ignore_duplicate_gossip(void);
17291         export function ErrorAction_ignore_duplicate_gossip(): number {
17292                 if(!isWasmInitialized) {
17293                         throw new Error("initializeWasm() must be awaited first!");
17294                 }
17295                 const nativeResponseValue = wasm.TS_ErrorAction_ignore_duplicate_gossip();
17296                 return nativeResponseValue;
17297         }
17298         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
17299         export function ErrorAction_send_error_message(msg: number): number {
17300                 if(!isWasmInitialized) {
17301                         throw new Error("initializeWasm() must be awaited first!");
17302                 }
17303                 const nativeResponseValue = wasm.TS_ErrorAction_send_error_message(msg);
17304                 return nativeResponseValue;
17305         }
17306         // void LightningError_free(struct LDKLightningError this_obj);
17307         export function LightningError_free(this_obj: number): void {
17308                 if(!isWasmInitialized) {
17309                         throw new Error("initializeWasm() must be awaited first!");
17310                 }
17311                 const nativeResponseValue = wasm.TS_LightningError_free(this_obj);
17312                 // debug statements here
17313         }
17314         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
17315         export function LightningError_get_err(this_ptr: number): String {
17316                 if(!isWasmInitialized) {
17317                         throw new Error("initializeWasm() must be awaited first!");
17318                 }
17319                 const nativeResponseValue = wasm.TS_LightningError_get_err(this_ptr);
17320                 return nativeResponseValue;
17321         }
17322         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
17323         export function LightningError_set_err(this_ptr: number, val: String): void {
17324                 if(!isWasmInitialized) {
17325                         throw new Error("initializeWasm() must be awaited first!");
17326                 }
17327                 const nativeResponseValue = wasm.TS_LightningError_set_err(this_ptr, val);
17328                 // debug statements here
17329         }
17330         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
17331         export function LightningError_get_action(this_ptr: number): number {
17332                 if(!isWasmInitialized) {
17333                         throw new Error("initializeWasm() must be awaited first!");
17334                 }
17335                 const nativeResponseValue = wasm.TS_LightningError_get_action(this_ptr);
17336                 return nativeResponseValue;
17337         }
17338         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
17339         export function LightningError_set_action(this_ptr: number, val: number): void {
17340                 if(!isWasmInitialized) {
17341                         throw new Error("initializeWasm() must be awaited first!");
17342                 }
17343                 const nativeResponseValue = wasm.TS_LightningError_set_action(this_ptr, val);
17344                 // debug statements here
17345         }
17346         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
17347         export function LightningError_new(err_arg: String, action_arg: number): number {
17348                 if(!isWasmInitialized) {
17349                         throw new Error("initializeWasm() must be awaited first!");
17350                 }
17351                 const nativeResponseValue = wasm.TS_LightningError_new(err_arg, action_arg);
17352                 return nativeResponseValue;
17353         }
17354         // uint64_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
17355         export function LightningError_clone_ptr(arg: number): number {
17356                 if(!isWasmInitialized) {
17357                         throw new Error("initializeWasm() must be awaited first!");
17358                 }
17359                 const nativeResponseValue = wasm.TS_LightningError_clone_ptr(arg);
17360                 return nativeResponseValue;
17361         }
17362         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
17363         export function LightningError_clone(orig: number): number {
17364                 if(!isWasmInitialized) {
17365                         throw new Error("initializeWasm() must be awaited first!");
17366                 }
17367                 const nativeResponseValue = wasm.TS_LightningError_clone(orig);
17368                 return nativeResponseValue;
17369         }
17370         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
17371         export function CommitmentUpdate_free(this_obj: number): void {
17372                 if(!isWasmInitialized) {
17373                         throw new Error("initializeWasm() must be awaited first!");
17374                 }
17375                 const nativeResponseValue = wasm.TS_CommitmentUpdate_free(this_obj);
17376                 // debug statements here
17377         }
17378         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17379         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
17380                 if(!isWasmInitialized) {
17381                         throw new Error("initializeWasm() must be awaited first!");
17382                 }
17383                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_add_htlcs(this_ptr);
17384                 return nativeResponseValue;
17385         }
17386         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
17387         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
17388                 if(!isWasmInitialized) {
17389                         throw new Error("initializeWasm() must be awaited first!");
17390                 }
17391                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
17392                 // debug statements here
17393         }
17394         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17395         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
17396                 if(!isWasmInitialized) {
17397                         throw new Error("initializeWasm() must be awaited first!");
17398                 }
17399                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
17400                 return nativeResponseValue;
17401         }
17402         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
17403         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
17404                 if(!isWasmInitialized) {
17405                         throw new Error("initializeWasm() must be awaited first!");
17406                 }
17407                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
17408                 // debug statements here
17409         }
17410         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17411         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
17412                 if(!isWasmInitialized) {
17413                         throw new Error("initializeWasm() must be awaited first!");
17414                 }
17415                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_htlcs(this_ptr);
17416                 return nativeResponseValue;
17417         }
17418         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
17419         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
17420                 if(!isWasmInitialized) {
17421                         throw new Error("initializeWasm() must be awaited first!");
17422                 }
17423                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
17424                 // debug statements here
17425         }
17426         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17427         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
17428                 if(!isWasmInitialized) {
17429                         throw new Error("initializeWasm() must be awaited first!");
17430                 }
17431                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
17432                 return nativeResponseValue;
17433         }
17434         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
17435         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
17436                 if(!isWasmInitialized) {
17437                         throw new Error("initializeWasm() must be awaited first!");
17438                 }
17439                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
17440                 // debug statements here
17441         }
17442         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17443         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
17444                 if(!isWasmInitialized) {
17445                         throw new Error("initializeWasm() must be awaited first!");
17446                 }
17447                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fee(this_ptr);
17448                 return nativeResponseValue;
17449         }
17450         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
17451         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
17452                 if(!isWasmInitialized) {
17453                         throw new Error("initializeWasm() must be awaited first!");
17454                 }
17455                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fee(this_ptr, val);
17456                 // debug statements here
17457         }
17458         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
17459         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
17460                 if(!isWasmInitialized) {
17461                         throw new Error("initializeWasm() must be awaited first!");
17462                 }
17463                 const nativeResponseValue = wasm.TS_CommitmentUpdate_get_commitment_signed(this_ptr);
17464                 return nativeResponseValue;
17465         }
17466         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
17467         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
17468                 if(!isWasmInitialized) {
17469                         throw new Error("initializeWasm() must be awaited first!");
17470                 }
17471                 const nativeResponseValue = wasm.TS_CommitmentUpdate_set_commitment_signed(this_ptr, val);
17472                 // debug statements here
17473         }
17474         // 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);
17475         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 {
17476                 if(!isWasmInitialized) {
17477                         throw new Error("initializeWasm() must be awaited first!");
17478                 }
17479                 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);
17480                 return nativeResponseValue;
17481         }
17482         // uint64_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
17483         export function CommitmentUpdate_clone_ptr(arg: number): number {
17484                 if(!isWasmInitialized) {
17485                         throw new Error("initializeWasm() must be awaited first!");
17486                 }
17487                 const nativeResponseValue = wasm.TS_CommitmentUpdate_clone_ptr(arg);
17488                 return nativeResponseValue;
17489         }
17490         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
17491         export function CommitmentUpdate_clone(orig: number): number {
17492                 if(!isWasmInitialized) {
17493                         throw new Error("initializeWasm() must be awaited first!");
17494                 }
17495                 const nativeResponseValue = wasm.TS_CommitmentUpdate_clone(orig);
17496                 return nativeResponseValue;
17497         }
17498         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
17499         export function ChannelMessageHandler_free(this_ptr: number): void {
17500                 if(!isWasmInitialized) {
17501                         throw new Error("initializeWasm() must be awaited first!");
17502                 }
17503                 const nativeResponseValue = wasm.TS_ChannelMessageHandler_free(this_ptr);
17504                 // debug statements here
17505         }
17506         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
17507         export function RoutingMessageHandler_free(this_ptr: number): void {
17508                 if(!isWasmInitialized) {
17509                         throw new Error("initializeWasm() must be awaited first!");
17510                 }
17511                 const nativeResponseValue = wasm.TS_RoutingMessageHandler_free(this_ptr);
17512                 // debug statements here
17513         }
17514         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
17515         export function AcceptChannel_write(obj: number): Uint8Array {
17516                 if(!isWasmInitialized) {
17517                         throw new Error("initializeWasm() must be awaited first!");
17518                 }
17519                 const nativeResponseValue = wasm.TS_AcceptChannel_write(obj);
17520                 return decodeUint8Array(nativeResponseValue);
17521         }
17522         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
17523         export function AcceptChannel_read(ser: Uint8Array): number {
17524                 if(!isWasmInitialized) {
17525                         throw new Error("initializeWasm() must be awaited first!");
17526                 }
17527                 const nativeResponseValue = wasm.TS_AcceptChannel_read(encodeUint8Array(ser));
17528                 return nativeResponseValue;
17529         }
17530         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
17531         export function AnnouncementSignatures_write(obj: number): Uint8Array {
17532                 if(!isWasmInitialized) {
17533                         throw new Error("initializeWasm() must be awaited first!");
17534                 }
17535                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_write(obj);
17536                 return decodeUint8Array(nativeResponseValue);
17537         }
17538         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
17539         export function AnnouncementSignatures_read(ser: Uint8Array): number {
17540                 if(!isWasmInitialized) {
17541                         throw new Error("initializeWasm() must be awaited first!");
17542                 }
17543                 const nativeResponseValue = wasm.TS_AnnouncementSignatures_read(encodeUint8Array(ser));
17544                 return nativeResponseValue;
17545         }
17546         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
17547         export function ChannelReestablish_write(obj: number): Uint8Array {
17548                 if(!isWasmInitialized) {
17549                         throw new Error("initializeWasm() must be awaited first!");
17550                 }
17551                 const nativeResponseValue = wasm.TS_ChannelReestablish_write(obj);
17552                 return decodeUint8Array(nativeResponseValue);
17553         }
17554         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
17555         export function ChannelReestablish_read(ser: Uint8Array): number {
17556                 if(!isWasmInitialized) {
17557                         throw new Error("initializeWasm() must be awaited first!");
17558                 }
17559                 const nativeResponseValue = wasm.TS_ChannelReestablish_read(encodeUint8Array(ser));
17560                 return nativeResponseValue;
17561         }
17562         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
17563         export function ClosingSigned_write(obj: number): Uint8Array {
17564                 if(!isWasmInitialized) {
17565                         throw new Error("initializeWasm() must be awaited first!");
17566                 }
17567                 const nativeResponseValue = wasm.TS_ClosingSigned_write(obj);
17568                 return decodeUint8Array(nativeResponseValue);
17569         }
17570         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
17571         export function ClosingSigned_read(ser: Uint8Array): number {
17572                 if(!isWasmInitialized) {
17573                         throw new Error("initializeWasm() must be awaited first!");
17574                 }
17575                 const nativeResponseValue = wasm.TS_ClosingSigned_read(encodeUint8Array(ser));
17576                 return nativeResponseValue;
17577         }
17578         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
17579         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
17580                 if(!isWasmInitialized) {
17581                         throw new Error("initializeWasm() must be awaited first!");
17582                 }
17583                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_write(obj);
17584                 return decodeUint8Array(nativeResponseValue);
17585         }
17586         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
17587         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
17588                 if(!isWasmInitialized) {
17589                         throw new Error("initializeWasm() must be awaited first!");
17590                 }
17591                 const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_read(encodeUint8Array(ser));
17592                 return nativeResponseValue;
17593         }
17594         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
17595         export function CommitmentSigned_write(obj: number): Uint8Array {
17596                 if(!isWasmInitialized) {
17597                         throw new Error("initializeWasm() must be awaited first!");
17598                 }
17599                 const nativeResponseValue = wasm.TS_CommitmentSigned_write(obj);
17600                 return decodeUint8Array(nativeResponseValue);
17601         }
17602         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
17603         export function CommitmentSigned_read(ser: Uint8Array): number {
17604                 if(!isWasmInitialized) {
17605                         throw new Error("initializeWasm() must be awaited first!");
17606                 }
17607                 const nativeResponseValue = wasm.TS_CommitmentSigned_read(encodeUint8Array(ser));
17608                 return nativeResponseValue;
17609         }
17610         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
17611         export function FundingCreated_write(obj: number): Uint8Array {
17612                 if(!isWasmInitialized) {
17613                         throw new Error("initializeWasm() must be awaited first!");
17614                 }
17615                 const nativeResponseValue = wasm.TS_FundingCreated_write(obj);
17616                 return decodeUint8Array(nativeResponseValue);
17617         }
17618         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
17619         export function FundingCreated_read(ser: Uint8Array): number {
17620                 if(!isWasmInitialized) {
17621                         throw new Error("initializeWasm() must be awaited first!");
17622                 }
17623                 const nativeResponseValue = wasm.TS_FundingCreated_read(encodeUint8Array(ser));
17624                 return nativeResponseValue;
17625         }
17626         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
17627         export function FundingSigned_write(obj: number): Uint8Array {
17628                 if(!isWasmInitialized) {
17629                         throw new Error("initializeWasm() must be awaited first!");
17630                 }
17631                 const nativeResponseValue = wasm.TS_FundingSigned_write(obj);
17632                 return decodeUint8Array(nativeResponseValue);
17633         }
17634         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
17635         export function FundingSigned_read(ser: Uint8Array): number {
17636                 if(!isWasmInitialized) {
17637                         throw new Error("initializeWasm() must be awaited first!");
17638                 }
17639                 const nativeResponseValue = wasm.TS_FundingSigned_read(encodeUint8Array(ser));
17640                 return nativeResponseValue;
17641         }
17642         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
17643         export function FundingLocked_write(obj: number): Uint8Array {
17644                 if(!isWasmInitialized) {
17645                         throw new Error("initializeWasm() must be awaited first!");
17646                 }
17647                 const nativeResponseValue = wasm.TS_FundingLocked_write(obj);
17648                 return decodeUint8Array(nativeResponseValue);
17649         }
17650         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
17651         export function FundingLocked_read(ser: Uint8Array): number {
17652                 if(!isWasmInitialized) {
17653                         throw new Error("initializeWasm() must be awaited first!");
17654                 }
17655                 const nativeResponseValue = wasm.TS_FundingLocked_read(encodeUint8Array(ser));
17656                 return nativeResponseValue;
17657         }
17658         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
17659         export function Init_write(obj: number): Uint8Array {
17660                 if(!isWasmInitialized) {
17661                         throw new Error("initializeWasm() must be awaited first!");
17662                 }
17663                 const nativeResponseValue = wasm.TS_Init_write(obj);
17664                 return decodeUint8Array(nativeResponseValue);
17665         }
17666         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
17667         export function Init_read(ser: Uint8Array): number {
17668                 if(!isWasmInitialized) {
17669                         throw new Error("initializeWasm() must be awaited first!");
17670                 }
17671                 const nativeResponseValue = wasm.TS_Init_read(encodeUint8Array(ser));
17672                 return nativeResponseValue;
17673         }
17674         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
17675         export function OpenChannel_write(obj: number): Uint8Array {
17676                 if(!isWasmInitialized) {
17677                         throw new Error("initializeWasm() must be awaited first!");
17678                 }
17679                 const nativeResponseValue = wasm.TS_OpenChannel_write(obj);
17680                 return decodeUint8Array(nativeResponseValue);
17681         }
17682         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
17683         export function OpenChannel_read(ser: Uint8Array): number {
17684                 if(!isWasmInitialized) {
17685                         throw new Error("initializeWasm() must be awaited first!");
17686                 }
17687                 const nativeResponseValue = wasm.TS_OpenChannel_read(encodeUint8Array(ser));
17688                 return nativeResponseValue;
17689         }
17690         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
17691         export function RevokeAndACK_write(obj: number): Uint8Array {
17692                 if(!isWasmInitialized) {
17693                         throw new Error("initializeWasm() must be awaited first!");
17694                 }
17695                 const nativeResponseValue = wasm.TS_RevokeAndACK_write(obj);
17696                 return decodeUint8Array(nativeResponseValue);
17697         }
17698         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
17699         export function RevokeAndACK_read(ser: Uint8Array): number {
17700                 if(!isWasmInitialized) {
17701                         throw new Error("initializeWasm() must be awaited first!");
17702                 }
17703                 const nativeResponseValue = wasm.TS_RevokeAndACK_read(encodeUint8Array(ser));
17704                 return nativeResponseValue;
17705         }
17706         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
17707         export function Shutdown_write(obj: number): Uint8Array {
17708                 if(!isWasmInitialized) {
17709                         throw new Error("initializeWasm() must be awaited first!");
17710                 }
17711                 const nativeResponseValue = wasm.TS_Shutdown_write(obj);
17712                 return decodeUint8Array(nativeResponseValue);
17713         }
17714         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
17715         export function Shutdown_read(ser: Uint8Array): number {
17716                 if(!isWasmInitialized) {
17717                         throw new Error("initializeWasm() must be awaited first!");
17718                 }
17719                 const nativeResponseValue = wasm.TS_Shutdown_read(encodeUint8Array(ser));
17720                 return nativeResponseValue;
17721         }
17722         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
17723         export function UpdateFailHTLC_write(obj: number): Uint8Array {
17724                 if(!isWasmInitialized) {
17725                         throw new Error("initializeWasm() must be awaited first!");
17726                 }
17727                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_write(obj);
17728                 return decodeUint8Array(nativeResponseValue);
17729         }
17730         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
17731         export function UpdateFailHTLC_read(ser: Uint8Array): number {
17732                 if(!isWasmInitialized) {
17733                         throw new Error("initializeWasm() must be awaited first!");
17734                 }
17735                 const nativeResponseValue = wasm.TS_UpdateFailHTLC_read(encodeUint8Array(ser));
17736                 return nativeResponseValue;
17737         }
17738         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
17739         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
17740                 if(!isWasmInitialized) {
17741                         throw new Error("initializeWasm() must be awaited first!");
17742                 }
17743                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_write(obj);
17744                 return decodeUint8Array(nativeResponseValue);
17745         }
17746         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
17747         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
17748                 if(!isWasmInitialized) {
17749                         throw new Error("initializeWasm() must be awaited first!");
17750                 }
17751                 const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_read(encodeUint8Array(ser));
17752                 return nativeResponseValue;
17753         }
17754         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
17755         export function UpdateFee_write(obj: number): Uint8Array {
17756                 if(!isWasmInitialized) {
17757                         throw new Error("initializeWasm() must be awaited first!");
17758                 }
17759                 const nativeResponseValue = wasm.TS_UpdateFee_write(obj);
17760                 return decodeUint8Array(nativeResponseValue);
17761         }
17762         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
17763         export function UpdateFee_read(ser: Uint8Array): number {
17764                 if(!isWasmInitialized) {
17765                         throw new Error("initializeWasm() must be awaited first!");
17766                 }
17767                 const nativeResponseValue = wasm.TS_UpdateFee_read(encodeUint8Array(ser));
17768                 return nativeResponseValue;
17769         }
17770         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
17771         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
17772                 if(!isWasmInitialized) {
17773                         throw new Error("initializeWasm() must be awaited first!");
17774                 }
17775                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_write(obj);
17776                 return decodeUint8Array(nativeResponseValue);
17777         }
17778         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
17779         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
17780                 if(!isWasmInitialized) {
17781                         throw new Error("initializeWasm() must be awaited first!");
17782                 }
17783                 const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_read(encodeUint8Array(ser));
17784                 return nativeResponseValue;
17785         }
17786         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
17787         export function UpdateAddHTLC_write(obj: number): Uint8Array {
17788                 if(!isWasmInitialized) {
17789                         throw new Error("initializeWasm() must be awaited first!");
17790                 }
17791                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_write(obj);
17792                 return decodeUint8Array(nativeResponseValue);
17793         }
17794         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
17795         export function UpdateAddHTLC_read(ser: Uint8Array): number {
17796                 if(!isWasmInitialized) {
17797                         throw new Error("initializeWasm() must be awaited first!");
17798                 }
17799                 const nativeResponseValue = wasm.TS_UpdateAddHTLC_read(encodeUint8Array(ser));
17800                 return nativeResponseValue;
17801         }
17802         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
17803         export function Ping_write(obj: number): Uint8Array {
17804                 if(!isWasmInitialized) {
17805                         throw new Error("initializeWasm() must be awaited first!");
17806                 }
17807                 const nativeResponseValue = wasm.TS_Ping_write(obj);
17808                 return decodeUint8Array(nativeResponseValue);
17809         }
17810         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
17811         export function Ping_read(ser: Uint8Array): number {
17812                 if(!isWasmInitialized) {
17813                         throw new Error("initializeWasm() must be awaited first!");
17814                 }
17815                 const nativeResponseValue = wasm.TS_Ping_read(encodeUint8Array(ser));
17816                 return nativeResponseValue;
17817         }
17818         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
17819         export function Pong_write(obj: number): Uint8Array {
17820                 if(!isWasmInitialized) {
17821                         throw new Error("initializeWasm() must be awaited first!");
17822                 }
17823                 const nativeResponseValue = wasm.TS_Pong_write(obj);
17824                 return decodeUint8Array(nativeResponseValue);
17825         }
17826         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
17827         export function Pong_read(ser: Uint8Array): number {
17828                 if(!isWasmInitialized) {
17829                         throw new Error("initializeWasm() must be awaited first!");
17830                 }
17831                 const nativeResponseValue = wasm.TS_Pong_read(encodeUint8Array(ser));
17832                 return nativeResponseValue;
17833         }
17834         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
17835         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
17836                 if(!isWasmInitialized) {
17837                         throw new Error("initializeWasm() must be awaited first!");
17838                 }
17839                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_write(obj);
17840                 return decodeUint8Array(nativeResponseValue);
17841         }
17842         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
17843         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
17844                 if(!isWasmInitialized) {
17845                         throw new Error("initializeWasm() must be awaited first!");
17846                 }
17847                 const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_read(encodeUint8Array(ser));
17848                 return nativeResponseValue;
17849         }
17850         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
17851         export function ChannelAnnouncement_write(obj: number): Uint8Array {
17852                 if(!isWasmInitialized) {
17853                         throw new Error("initializeWasm() must be awaited first!");
17854                 }
17855                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_write(obj);
17856                 return decodeUint8Array(nativeResponseValue);
17857         }
17858         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
17859         export function ChannelAnnouncement_read(ser: Uint8Array): number {
17860                 if(!isWasmInitialized) {
17861                         throw new Error("initializeWasm() must be awaited first!");
17862                 }
17863                 const nativeResponseValue = wasm.TS_ChannelAnnouncement_read(encodeUint8Array(ser));
17864                 return nativeResponseValue;
17865         }
17866         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
17867         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
17868                 if(!isWasmInitialized) {
17869                         throw new Error("initializeWasm() must be awaited first!");
17870                 }
17871                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_write(obj);
17872                 return decodeUint8Array(nativeResponseValue);
17873         }
17874         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
17875         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
17876                 if(!isWasmInitialized) {
17877                         throw new Error("initializeWasm() must be awaited first!");
17878                 }
17879                 const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_read(encodeUint8Array(ser));
17880                 return nativeResponseValue;
17881         }
17882         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
17883         export function ChannelUpdate_write(obj: number): Uint8Array {
17884                 if(!isWasmInitialized) {
17885                         throw new Error("initializeWasm() must be awaited first!");
17886                 }
17887                 const nativeResponseValue = wasm.TS_ChannelUpdate_write(obj);
17888                 return decodeUint8Array(nativeResponseValue);
17889         }
17890         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
17891         export function ChannelUpdate_read(ser: Uint8Array): number {
17892                 if(!isWasmInitialized) {
17893                         throw new Error("initializeWasm() must be awaited first!");
17894                 }
17895                 const nativeResponseValue = wasm.TS_ChannelUpdate_read(encodeUint8Array(ser));
17896                 return nativeResponseValue;
17897         }
17898         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
17899         export function ErrorMessage_write(obj: number): Uint8Array {
17900                 if(!isWasmInitialized) {
17901                         throw new Error("initializeWasm() must be awaited first!");
17902                 }
17903                 const nativeResponseValue = wasm.TS_ErrorMessage_write(obj);
17904                 return decodeUint8Array(nativeResponseValue);
17905         }
17906         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
17907         export function ErrorMessage_read(ser: Uint8Array): number {
17908                 if(!isWasmInitialized) {
17909                         throw new Error("initializeWasm() must be awaited first!");
17910                 }
17911                 const nativeResponseValue = wasm.TS_ErrorMessage_read(encodeUint8Array(ser));
17912                 return nativeResponseValue;
17913         }
17914         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
17915         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
17916                 if(!isWasmInitialized) {
17917                         throw new Error("initializeWasm() must be awaited first!");
17918                 }
17919                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_write(obj);
17920                 return decodeUint8Array(nativeResponseValue);
17921         }
17922         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
17923         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
17924                 if(!isWasmInitialized) {
17925                         throw new Error("initializeWasm() must be awaited first!");
17926                 }
17927                 const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_read(encodeUint8Array(ser));
17928                 return nativeResponseValue;
17929         }
17930         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
17931         export function NodeAnnouncement_write(obj: number): Uint8Array {
17932                 if(!isWasmInitialized) {
17933                         throw new Error("initializeWasm() must be awaited first!");
17934                 }
17935                 const nativeResponseValue = wasm.TS_NodeAnnouncement_write(obj);
17936                 return decodeUint8Array(nativeResponseValue);
17937         }
17938         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
17939         export function NodeAnnouncement_read(ser: Uint8Array): number {
17940                 if(!isWasmInitialized) {
17941                         throw new Error("initializeWasm() must be awaited first!");
17942                 }
17943                 const nativeResponseValue = wasm.TS_NodeAnnouncement_read(encodeUint8Array(ser));
17944                 return nativeResponseValue;
17945         }
17946         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
17947         export function QueryShortChannelIds_read(ser: Uint8Array): number {
17948                 if(!isWasmInitialized) {
17949                         throw new Error("initializeWasm() must be awaited first!");
17950                 }
17951                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_read(encodeUint8Array(ser));
17952                 return nativeResponseValue;
17953         }
17954         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
17955         export function QueryShortChannelIds_write(obj: number): Uint8Array {
17956                 if(!isWasmInitialized) {
17957                         throw new Error("initializeWasm() must be awaited first!");
17958                 }
17959                 const nativeResponseValue = wasm.TS_QueryShortChannelIds_write(obj);
17960                 return decodeUint8Array(nativeResponseValue);
17961         }
17962         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
17963         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
17964                 if(!isWasmInitialized) {
17965                         throw new Error("initializeWasm() must be awaited first!");
17966                 }
17967                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_write(obj);
17968                 return decodeUint8Array(nativeResponseValue);
17969         }
17970         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
17971         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
17972                 if(!isWasmInitialized) {
17973                         throw new Error("initializeWasm() must be awaited first!");
17974                 }
17975                 const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_read(encodeUint8Array(ser));
17976                 return nativeResponseValue;
17977         }
17978         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
17979         export function QueryChannelRange_end_blocknum(this_arg: number): number {
17980                 if(!isWasmInitialized) {
17981                         throw new Error("initializeWasm() must be awaited first!");
17982                 }
17983                 const nativeResponseValue = wasm.TS_QueryChannelRange_end_blocknum(this_arg);
17984                 return nativeResponseValue;
17985         }
17986         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
17987         export function QueryChannelRange_write(obj: number): Uint8Array {
17988                 if(!isWasmInitialized) {
17989                         throw new Error("initializeWasm() must be awaited first!");
17990                 }
17991                 const nativeResponseValue = wasm.TS_QueryChannelRange_write(obj);
17992                 return decodeUint8Array(nativeResponseValue);
17993         }
17994         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
17995         export function QueryChannelRange_read(ser: Uint8Array): number {
17996                 if(!isWasmInitialized) {
17997                         throw new Error("initializeWasm() must be awaited first!");
17998                 }
17999                 const nativeResponseValue = wasm.TS_QueryChannelRange_read(encodeUint8Array(ser));
18000                 return nativeResponseValue;
18001         }
18002         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
18003         export function ReplyChannelRange_read(ser: Uint8Array): number {
18004                 if(!isWasmInitialized) {
18005                         throw new Error("initializeWasm() must be awaited first!");
18006                 }
18007                 const nativeResponseValue = wasm.TS_ReplyChannelRange_read(encodeUint8Array(ser));
18008                 return nativeResponseValue;
18009         }
18010         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
18011         export function ReplyChannelRange_write(obj: number): Uint8Array {
18012                 if(!isWasmInitialized) {
18013                         throw new Error("initializeWasm() must be awaited first!");
18014                 }
18015                 const nativeResponseValue = wasm.TS_ReplyChannelRange_write(obj);
18016                 return decodeUint8Array(nativeResponseValue);
18017         }
18018         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
18019         export function GossipTimestampFilter_write(obj: number): Uint8Array {
18020                 if(!isWasmInitialized) {
18021                         throw new Error("initializeWasm() must be awaited first!");
18022                 }
18023                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_write(obj);
18024                 return decodeUint8Array(nativeResponseValue);
18025         }
18026         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
18027         export function GossipTimestampFilter_read(ser: Uint8Array): number {
18028                 if(!isWasmInitialized) {
18029                         throw new Error("initializeWasm() must be awaited first!");
18030                 }
18031                 const nativeResponseValue = wasm.TS_GossipTimestampFilter_read(encodeUint8Array(ser));
18032                 return nativeResponseValue;
18033         }
18034         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
18035         export function CustomMessageHandler_free(this_ptr: number): void {
18036                 if(!isWasmInitialized) {
18037                         throw new Error("initializeWasm() must be awaited first!");
18038                 }
18039                 const nativeResponseValue = wasm.TS_CustomMessageHandler_free(this_ptr);
18040                 // debug statements here
18041         }
18042         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
18043         export function IgnoringMessageHandler_free(this_obj: number): void {
18044                 if(!isWasmInitialized) {
18045                         throw new Error("initializeWasm() must be awaited first!");
18046                 }
18047                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_free(this_obj);
18048                 // debug statements here
18049         }
18050         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
18051         export function IgnoringMessageHandler_new(): number {
18052                 if(!isWasmInitialized) {
18053                         throw new Error("initializeWasm() must be awaited first!");
18054                 }
18055                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_new();
18056                 return nativeResponseValue;
18057         }
18058         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18059         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
18060                 if(!isWasmInitialized) {
18061                         throw new Error("initializeWasm() must be awaited first!");
18062                 }
18063                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
18064                 return nativeResponseValue;
18065         }
18066         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18067         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
18068                 if(!isWasmInitialized) {
18069                         throw new Error("initializeWasm() must be awaited first!");
18070                 }
18071                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
18072                 return nativeResponseValue;
18073         }
18074         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18075         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
18076                 if(!isWasmInitialized) {
18077                         throw new Error("initializeWasm() must be awaited first!");
18078                 }
18079                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageReader(this_arg);
18080                 return nativeResponseValue;
18081         }
18082         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18083         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
18084                 if(!isWasmInitialized) {
18085                         throw new Error("initializeWasm() must be awaited first!");
18086                 }
18087                 const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
18088                 return nativeResponseValue;
18089         }
18090         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
18091         export function ErroringMessageHandler_free(this_obj: number): void {
18092                 if(!isWasmInitialized) {
18093                         throw new Error("initializeWasm() must be awaited first!");
18094                 }
18095                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_free(this_obj);
18096                 // debug statements here
18097         }
18098         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
18099         export function ErroringMessageHandler_new(): number {
18100                 if(!isWasmInitialized) {
18101                         throw new Error("initializeWasm() must be awaited first!");
18102                 }
18103                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_new();
18104                 return nativeResponseValue;
18105         }
18106         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
18107         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
18108                 if(!isWasmInitialized) {
18109                         throw new Error("initializeWasm() must be awaited first!");
18110                 }
18111                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
18112                 return nativeResponseValue;
18113         }
18114         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
18115         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
18116                 if(!isWasmInitialized) {
18117                         throw new Error("initializeWasm() must be awaited first!");
18118                 }
18119                 const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
18120                 return nativeResponseValue;
18121         }
18122         // void MessageHandler_free(struct LDKMessageHandler this_obj);
18123         export function MessageHandler_free(this_obj: number): void {
18124                 if(!isWasmInitialized) {
18125                         throw new Error("initializeWasm() must be awaited first!");
18126                 }
18127                 const nativeResponseValue = wasm.TS_MessageHandler_free(this_obj);
18128                 // debug statements here
18129         }
18130         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
18131         export function MessageHandler_get_chan_handler(this_ptr: number): number {
18132                 if(!isWasmInitialized) {
18133                         throw new Error("initializeWasm() must be awaited first!");
18134                 }
18135                 const nativeResponseValue = wasm.TS_MessageHandler_get_chan_handler(this_ptr);
18136                 return nativeResponseValue;
18137         }
18138         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
18139         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
18140                 if(!isWasmInitialized) {
18141                         throw new Error("initializeWasm() must be awaited first!");
18142                 }
18143                 const nativeResponseValue = wasm.TS_MessageHandler_set_chan_handler(this_ptr, val);
18144                 // debug statements here
18145         }
18146         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
18147         export function MessageHandler_get_route_handler(this_ptr: number): number {
18148                 if(!isWasmInitialized) {
18149                         throw new Error("initializeWasm() must be awaited first!");
18150                 }
18151                 const nativeResponseValue = wasm.TS_MessageHandler_get_route_handler(this_ptr);
18152                 return nativeResponseValue;
18153         }
18154         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
18155         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
18156                 if(!isWasmInitialized) {
18157                         throw new Error("initializeWasm() must be awaited first!");
18158                 }
18159                 const nativeResponseValue = wasm.TS_MessageHandler_set_route_handler(this_ptr, val);
18160                 // debug statements here
18161         }
18162         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
18163         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
18164                 if(!isWasmInitialized) {
18165                         throw new Error("initializeWasm() must be awaited first!");
18166                 }
18167                 const nativeResponseValue = wasm.TS_MessageHandler_new(chan_handler_arg, route_handler_arg);
18168                 return nativeResponseValue;
18169         }
18170         // uint64_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
18171         export function SocketDescriptor_clone_ptr(arg: number): number {
18172                 if(!isWasmInitialized) {
18173                         throw new Error("initializeWasm() must be awaited first!");
18174                 }
18175                 const nativeResponseValue = wasm.TS_SocketDescriptor_clone_ptr(arg);
18176                 return nativeResponseValue;
18177         }
18178         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
18179         export function SocketDescriptor_clone(orig: number): number {
18180                 if(!isWasmInitialized) {
18181                         throw new Error("initializeWasm() must be awaited first!");
18182                 }
18183                 const nativeResponseValue = wasm.TS_SocketDescriptor_clone(orig);
18184                 return nativeResponseValue;
18185         }
18186         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
18187         export function SocketDescriptor_free(this_ptr: number): void {
18188                 if(!isWasmInitialized) {
18189                         throw new Error("initializeWasm() must be awaited first!");
18190                 }
18191                 const nativeResponseValue = wasm.TS_SocketDescriptor_free(this_ptr);
18192                 // debug statements here
18193         }
18194         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
18195         export function PeerHandleError_free(this_obj: number): void {
18196                 if(!isWasmInitialized) {
18197                         throw new Error("initializeWasm() must be awaited first!");
18198                 }
18199                 const nativeResponseValue = wasm.TS_PeerHandleError_free(this_obj);
18200                 // debug statements here
18201         }
18202         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
18203         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
18204                 if(!isWasmInitialized) {
18205                         throw new Error("initializeWasm() must be awaited first!");
18206                 }
18207                 const nativeResponseValue = wasm.TS_PeerHandleError_get_no_connection_possible(this_ptr);
18208                 return nativeResponseValue;
18209         }
18210         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
18211         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
18212                 if(!isWasmInitialized) {
18213                         throw new Error("initializeWasm() must be awaited first!");
18214                 }
18215                 const nativeResponseValue = wasm.TS_PeerHandleError_set_no_connection_possible(this_ptr, val);
18216                 // debug statements here
18217         }
18218         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
18219         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
18220                 if(!isWasmInitialized) {
18221                         throw new Error("initializeWasm() must be awaited first!");
18222                 }
18223                 const nativeResponseValue = wasm.TS_PeerHandleError_new(no_connection_possible_arg);
18224                 return nativeResponseValue;
18225         }
18226         // uint64_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
18227         export function PeerHandleError_clone_ptr(arg: number): number {
18228                 if(!isWasmInitialized) {
18229                         throw new Error("initializeWasm() must be awaited first!");
18230                 }
18231                 const nativeResponseValue = wasm.TS_PeerHandleError_clone_ptr(arg);
18232                 return nativeResponseValue;
18233         }
18234         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
18235         export function PeerHandleError_clone(orig: number): number {
18236                 if(!isWasmInitialized) {
18237                         throw new Error("initializeWasm() must be awaited first!");
18238                 }
18239                 const nativeResponseValue = wasm.TS_PeerHandleError_clone(orig);
18240                 return nativeResponseValue;
18241         }
18242         // void PeerManager_free(struct LDKPeerManager this_obj);
18243         export function PeerManager_free(this_obj: number): void {
18244                 if(!isWasmInitialized) {
18245                         throw new Error("initializeWasm() must be awaited first!");
18246                 }
18247                 const nativeResponseValue = wasm.TS_PeerManager_free(this_obj);
18248                 // debug statements here
18249         }
18250         // 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);
18251         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
18252                 if(!isWasmInitialized) {
18253                         throw new Error("initializeWasm() must be awaited first!");
18254                 }
18255                 const nativeResponseValue = wasm.TS_PeerManager_new(message_handler, encodeUint8Array(our_node_secret), encodeUint8Array(ephemeral_random_data), logger, custom_message_handler);
18256                 return nativeResponseValue;
18257         }
18258         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
18259         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
18260                 if(!isWasmInitialized) {
18261                         throw new Error("initializeWasm() must be awaited first!");
18262                 }
18263                 const nativeResponseValue = wasm.TS_PeerManager_get_peer_node_ids(this_arg);
18264                 return nativeResponseValue;
18265         }
18266         // 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);
18267         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
18268                 if(!isWasmInitialized) {
18269                         throw new Error("initializeWasm() must be awaited first!");
18270                 }
18271                 const nativeResponseValue = wasm.TS_PeerManager_new_outbound_connection(this_arg, encodeUint8Array(their_node_id), descriptor);
18272                 return nativeResponseValue;
18273         }
18274         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
18275         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
18276                 if(!isWasmInitialized) {
18277                         throw new Error("initializeWasm() must be awaited first!");
18278                 }
18279                 const nativeResponseValue = wasm.TS_PeerManager_new_inbound_connection(this_arg, descriptor);
18280                 return nativeResponseValue;
18281         }
18282         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
18283         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
18284                 if(!isWasmInitialized) {
18285                         throw new Error("initializeWasm() must be awaited first!");
18286                 }
18287                 const nativeResponseValue = wasm.TS_PeerManager_write_buffer_space_avail(this_arg, descriptor);
18288                 return nativeResponseValue;
18289         }
18290         // 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);
18291         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
18292                 if(!isWasmInitialized) {
18293                         throw new Error("initializeWasm() must be awaited first!");
18294                 }
18295                 const nativeResponseValue = wasm.TS_PeerManager_read_event(this_arg, peer_descriptor, encodeUint8Array(data));
18296                 return nativeResponseValue;
18297         }
18298         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
18299         export function PeerManager_process_events(this_arg: number): void {
18300                 if(!isWasmInitialized) {
18301                         throw new Error("initializeWasm() must be awaited first!");
18302                 }
18303                 const nativeResponseValue = wasm.TS_PeerManager_process_events(this_arg);
18304                 // debug statements here
18305         }
18306         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
18307         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
18308                 if(!isWasmInitialized) {
18309                         throw new Error("initializeWasm() must be awaited first!");
18310                 }
18311                 const nativeResponseValue = wasm.TS_PeerManager_socket_disconnected(this_arg, descriptor);
18312                 // debug statements here
18313         }
18314         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
18315         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
18316                 if(!isWasmInitialized) {
18317                         throw new Error("initializeWasm() must be awaited first!");
18318                 }
18319                 const nativeResponseValue = wasm.TS_PeerManager_disconnect_by_node_id(this_arg, encodeUint8Array(node_id), no_connection_possible);
18320                 // debug statements here
18321         }
18322         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
18323         export function PeerManager_disconnect_all_peers(this_arg: number): void {
18324                 if(!isWasmInitialized) {
18325                         throw new Error("initializeWasm() must be awaited first!");
18326                 }
18327                 const nativeResponseValue = wasm.TS_PeerManager_disconnect_all_peers(this_arg);
18328                 // debug statements here
18329         }
18330         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
18331         export function PeerManager_timer_tick_occurred(this_arg: number): void {
18332                 if(!isWasmInitialized) {
18333                         throw new Error("initializeWasm() must be awaited first!");
18334                 }
18335                 const nativeResponseValue = wasm.TS_PeerManager_timer_tick_occurred(this_arg);
18336                 // debug statements here
18337         }
18338         // uint64_t htlc_success_tx_weight(bool opt_anchors);
18339         export function htlc_success_tx_weight(opt_anchors: boolean): number {
18340                 if(!isWasmInitialized) {
18341                         throw new Error("initializeWasm() must be awaited first!");
18342                 }
18343                 const nativeResponseValue = wasm.TS_htlc_success_tx_weight(opt_anchors);
18344                 return nativeResponseValue;
18345         }
18346         // uint64_t htlc_timeout_tx_weight(bool opt_anchors);
18347         export function htlc_timeout_tx_weight(opt_anchors: boolean): number {
18348                 if(!isWasmInitialized) {
18349                         throw new Error("initializeWasm() must be awaited first!");
18350                 }
18351                 const nativeResponseValue = wasm.TS_htlc_timeout_tx_weight(opt_anchors);
18352                 return nativeResponseValue;
18353         }
18354         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
18355         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
18356                 if(!isWasmInitialized) {
18357                         throw new Error("initializeWasm() must be awaited first!");
18358                 }
18359                 const nativeResponseValue = wasm.TS_build_commitment_secret(encodeUint8Array(commitment_seed), idx);
18360                 return decodeUint8Array(nativeResponseValue);
18361         }
18362         // 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);
18363         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 {
18364                 if(!isWasmInitialized) {
18365                         throw new Error("initializeWasm() must be awaited first!");
18366                 }
18367                 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);
18368                 return decodeUint8Array(nativeResponseValue);
18369         }
18370         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
18371         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
18372                 if(!isWasmInitialized) {
18373                         throw new Error("initializeWasm() must be awaited first!");
18374                 }
18375                 const nativeResponseValue = wasm.TS_derive_private_key(encodeUint8Array(per_commitment_point), encodeUint8Array(base_secret));
18376                 return nativeResponseValue;
18377         }
18378         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
18379         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
18380                 if(!isWasmInitialized) {
18381                         throw new Error("initializeWasm() must be awaited first!");
18382                 }
18383                 const nativeResponseValue = wasm.TS_derive_public_key(encodeUint8Array(per_commitment_point), encodeUint8Array(base_point));
18384                 return nativeResponseValue;
18385         }
18386         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
18387         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
18388                 if(!isWasmInitialized) {
18389                         throw new Error("initializeWasm() must be awaited first!");
18390                 }
18391                 const nativeResponseValue = wasm.TS_derive_private_revocation_key(encodeUint8Array(per_commitment_secret), encodeUint8Array(countersignatory_revocation_base_secret));
18392                 return nativeResponseValue;
18393         }
18394         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
18395         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
18396                 if(!isWasmInitialized) {
18397                         throw new Error("initializeWasm() must be awaited first!");
18398                 }
18399                 const nativeResponseValue = wasm.TS_derive_public_revocation_key(encodeUint8Array(per_commitment_point), encodeUint8Array(countersignatory_revocation_base_point));
18400                 return nativeResponseValue;
18401         }
18402         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
18403         export function TxCreationKeys_free(this_obj: number): void {
18404                 if(!isWasmInitialized) {
18405                         throw new Error("initializeWasm() must be awaited first!");
18406                 }
18407                 const nativeResponseValue = wasm.TS_TxCreationKeys_free(this_obj);
18408                 // debug statements here
18409         }
18410         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18411         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
18412                 if(!isWasmInitialized) {
18413                         throw new Error("initializeWasm() must be awaited first!");
18414                 }
18415                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_per_commitment_point(this_ptr);
18416                 return decodeUint8Array(nativeResponseValue);
18417         }
18418         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18419         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
18420                 if(!isWasmInitialized) {
18421                         throw new Error("initializeWasm() must be awaited first!");
18422                 }
18423                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_per_commitment_point(this_ptr, encodeUint8Array(val));
18424                 // debug statements here
18425         }
18426         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18427         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
18428                 if(!isWasmInitialized) {
18429                         throw new Error("initializeWasm() must be awaited first!");
18430                 }
18431                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_revocation_key(this_ptr);
18432                 return decodeUint8Array(nativeResponseValue);
18433         }
18434         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18435         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
18436                 if(!isWasmInitialized) {
18437                         throw new Error("initializeWasm() must be awaited first!");
18438                 }
18439                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_revocation_key(this_ptr, encodeUint8Array(val));
18440                 // debug statements here
18441         }
18442         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18443         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
18444                 if(!isWasmInitialized) {
18445                         throw new Error("initializeWasm() must be awaited first!");
18446                 }
18447                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
18448                 return decodeUint8Array(nativeResponseValue);
18449         }
18450         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18451         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
18452                 if(!isWasmInitialized) {
18453                         throw new Error("initializeWasm() must be awaited first!");
18454                 }
18455                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeUint8Array(val));
18456                 // debug statements here
18457         }
18458         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18459         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
18460                 if(!isWasmInitialized) {
18461                         throw new Error("initializeWasm() must be awaited first!");
18462                 }
18463                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
18464                 return decodeUint8Array(nativeResponseValue);
18465         }
18466         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18467         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
18468                 if(!isWasmInitialized) {
18469                         throw new Error("initializeWasm() must be awaited first!");
18470                 }
18471                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeUint8Array(val));
18472                 // debug statements here
18473         }
18474         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
18475         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
18476                 if(!isWasmInitialized) {
18477                         throw new Error("initializeWasm() must be awaited first!");
18478                 }
18479                 const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
18480                 return decodeUint8Array(nativeResponseValue);
18481         }
18482         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18483         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
18484                 if(!isWasmInitialized) {
18485                         throw new Error("initializeWasm() must be awaited first!");
18486                 }
18487                 const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeUint8Array(val));
18488                 // debug statements here
18489         }
18490         // 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);
18491         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 {
18492                 if(!isWasmInitialized) {
18493                         throw new Error("initializeWasm() must be awaited first!");
18494                 }
18495                 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));
18496                 return nativeResponseValue;
18497         }
18498         // uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
18499         export function TxCreationKeys_clone_ptr(arg: number): number {
18500                 if(!isWasmInitialized) {
18501                         throw new Error("initializeWasm() must be awaited first!");
18502                 }
18503                 const nativeResponseValue = wasm.TS_TxCreationKeys_clone_ptr(arg);
18504                 return nativeResponseValue;
18505         }
18506         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
18507         export function TxCreationKeys_clone(orig: number): number {
18508                 if(!isWasmInitialized) {
18509                         throw new Error("initializeWasm() must be awaited first!");
18510                 }
18511                 const nativeResponseValue = wasm.TS_TxCreationKeys_clone(orig);
18512                 return nativeResponseValue;
18513         }
18514         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
18515         export function TxCreationKeys_write(obj: number): Uint8Array {
18516                 if(!isWasmInitialized) {
18517                         throw new Error("initializeWasm() must be awaited first!");
18518                 }
18519                 const nativeResponseValue = wasm.TS_TxCreationKeys_write(obj);
18520                 return decodeUint8Array(nativeResponseValue);
18521         }
18522         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
18523         export function TxCreationKeys_read(ser: Uint8Array): number {
18524                 if(!isWasmInitialized) {
18525                         throw new Error("initializeWasm() must be awaited first!");
18526                 }
18527                 const nativeResponseValue = wasm.TS_TxCreationKeys_read(encodeUint8Array(ser));
18528                 return nativeResponseValue;
18529         }
18530         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
18531         export function ChannelPublicKeys_free(this_obj: number): void {
18532                 if(!isWasmInitialized) {
18533                         throw new Error("initializeWasm() must be awaited first!");
18534                 }
18535                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_free(this_obj);
18536                 // debug statements here
18537         }
18538         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18539         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
18540                 if(!isWasmInitialized) {
18541                         throw new Error("initializeWasm() must be awaited first!");
18542                 }
18543                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_funding_pubkey(this_ptr);
18544                 return decodeUint8Array(nativeResponseValue);
18545         }
18546         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18547         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
18548                 if(!isWasmInitialized) {
18549                         throw new Error("initializeWasm() must be awaited first!");
18550                 }
18551                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeUint8Array(val));
18552                 // debug statements here
18553         }
18554         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18555         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
18556                 if(!isWasmInitialized) {
18557                         throw new Error("initializeWasm() must be awaited first!");
18558                 }
18559                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_revocation_basepoint(this_ptr);
18560                 return decodeUint8Array(nativeResponseValue);
18561         }
18562         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18563         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
18564                 if(!isWasmInitialized) {
18565                         throw new Error("initializeWasm() must be awaited first!");
18566                 }
18567                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeUint8Array(val));
18568                 // debug statements here
18569         }
18570         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18571         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
18572                 if(!isWasmInitialized) {
18573                         throw new Error("initializeWasm() must be awaited first!");
18574                 }
18575                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_payment_point(this_ptr);
18576                 return decodeUint8Array(nativeResponseValue);
18577         }
18578         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18579         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
18580                 if(!isWasmInitialized) {
18581                         throw new Error("initializeWasm() must be awaited first!");
18582                 }
18583                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_payment_point(this_ptr, encodeUint8Array(val));
18584                 // debug statements here
18585         }
18586         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18587         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
18588                 if(!isWasmInitialized) {
18589                         throw new Error("initializeWasm() must be awaited first!");
18590                 }
18591                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
18592                 return decodeUint8Array(nativeResponseValue);
18593         }
18594         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18595         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
18596                 if(!isWasmInitialized) {
18597                         throw new Error("initializeWasm() must be awaited first!");
18598                 }
18599                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeUint8Array(val));
18600                 // debug statements here
18601         }
18602         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
18603         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
18604                 if(!isWasmInitialized) {
18605                         throw new Error("initializeWasm() must be awaited first!");
18606                 }
18607                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_htlc_basepoint(this_ptr);
18608                 return decodeUint8Array(nativeResponseValue);
18609         }
18610         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18611         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
18612                 if(!isWasmInitialized) {
18613                         throw new Error("initializeWasm() must be awaited first!");
18614                 }
18615                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeUint8Array(val));
18616                 // debug statements here
18617         }
18618         // 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);
18619         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 {
18620                 if(!isWasmInitialized) {
18621                         throw new Error("initializeWasm() must be awaited first!");
18622                 }
18623                 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));
18624                 return nativeResponseValue;
18625         }
18626         // uint64_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
18627         export function ChannelPublicKeys_clone_ptr(arg: number): number {
18628                 if(!isWasmInitialized) {
18629                         throw new Error("initializeWasm() must be awaited first!");
18630                 }
18631                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone_ptr(arg);
18632                 return nativeResponseValue;
18633         }
18634         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
18635         export function ChannelPublicKeys_clone(orig: number): number {
18636                 if(!isWasmInitialized) {
18637                         throw new Error("initializeWasm() must be awaited first!");
18638                 }
18639                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone(orig);
18640                 return nativeResponseValue;
18641         }
18642         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
18643         export function ChannelPublicKeys_write(obj: number): Uint8Array {
18644                 if(!isWasmInitialized) {
18645                         throw new Error("initializeWasm() must be awaited first!");
18646                 }
18647                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_write(obj);
18648                 return decodeUint8Array(nativeResponseValue);
18649         }
18650         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
18651         export function ChannelPublicKeys_read(ser: Uint8Array): number {
18652                 if(!isWasmInitialized) {
18653                         throw new Error("initializeWasm() must be awaited first!");
18654                 }
18655                 const nativeResponseValue = wasm.TS_ChannelPublicKeys_read(encodeUint8Array(ser));
18656                 return nativeResponseValue;
18657         }
18658         // 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);
18659         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 {
18660                 if(!isWasmInitialized) {
18661                         throw new Error("initializeWasm() must be awaited first!");
18662                 }
18663                 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));
18664                 return nativeResponseValue;
18665         }
18666         // 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);
18667         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
18668                 if(!isWasmInitialized) {
18669                         throw new Error("initializeWasm() must be awaited first!");
18670                 }
18671                 const nativeResponseValue = wasm.TS_TxCreationKeys_from_channel_static_keys(encodeUint8Array(per_commitment_point), broadcaster_keys, countersignatory_keys);
18672                 return nativeResponseValue;
18673         }
18674         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
18675         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
18676                 if(!isWasmInitialized) {
18677                         throw new Error("initializeWasm() must be awaited first!");
18678                 }
18679                 const nativeResponseValue = wasm.TS_get_revokeable_redeemscript(encodeUint8Array(revocation_key), contest_delay, encodeUint8Array(broadcaster_delayed_payment_key));
18680                 return decodeUint8Array(nativeResponseValue);
18681         }
18682         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
18683         export function HTLCOutputInCommitment_free(this_obj: number): void {
18684                 if(!isWasmInitialized) {
18685                         throw new Error("initializeWasm() must be awaited first!");
18686                 }
18687                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_free(this_obj);
18688                 // debug statements here
18689         }
18690         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18691         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
18692                 if(!isWasmInitialized) {
18693                         throw new Error("initializeWasm() must be awaited first!");
18694                 }
18695                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_offered(this_ptr);
18696                 return nativeResponseValue;
18697         }
18698         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
18699         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
18700                 if(!isWasmInitialized) {
18701                         throw new Error("initializeWasm() must be awaited first!");
18702                 }
18703                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_offered(this_ptr, val);
18704                 // debug statements here
18705         }
18706         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18707         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
18708                 if(!isWasmInitialized) {
18709                         throw new Error("initializeWasm() must be awaited first!");
18710                 }
18711                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_amount_msat(this_ptr);
18712                 return nativeResponseValue;
18713         }
18714         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
18715         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
18716                 if(!isWasmInitialized) {
18717                         throw new Error("initializeWasm() must be awaited first!");
18718                 }
18719                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
18720                 // debug statements here
18721         }
18722         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18723         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
18724                 if(!isWasmInitialized) {
18725                         throw new Error("initializeWasm() must be awaited first!");
18726                 }
18727                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
18728                 return nativeResponseValue;
18729         }
18730         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
18731         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
18732                 if(!isWasmInitialized) {
18733                         throw new Error("initializeWasm() must be awaited first!");
18734                 }
18735                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
18736                 // debug statements here
18737         }
18738         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
18739         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
18740                 if(!isWasmInitialized) {
18741                         throw new Error("initializeWasm() must be awaited first!");
18742                 }
18743                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_payment_hash(this_ptr);
18744                 return decodeUint8Array(nativeResponseValue);
18745         }
18746         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18747         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
18748                 if(!isWasmInitialized) {
18749                         throw new Error("initializeWasm() must be awaited first!");
18750                 }
18751                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeUint8Array(val));
18752                 // debug statements here
18753         }
18754         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
18755         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
18756                 if(!isWasmInitialized) {
18757                         throw new Error("initializeWasm() must be awaited first!");
18758                 }
18759                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
18760                 return nativeResponseValue;
18761         }
18762         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
18763         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
18764                 if(!isWasmInitialized) {
18765                         throw new Error("initializeWasm() must be awaited first!");
18766                 }
18767                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
18768                 // debug statements here
18769         }
18770         // 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);
18771         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 {
18772                 if(!isWasmInitialized) {
18773                         throw new Error("initializeWasm() must be awaited first!");
18774                 }
18775                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeUint8Array(payment_hash_arg), transaction_output_index_arg);
18776                 return nativeResponseValue;
18777         }
18778         // uint64_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
18779         export function HTLCOutputInCommitment_clone_ptr(arg: number): number {
18780                 if(!isWasmInitialized) {
18781                         throw new Error("initializeWasm() must be awaited first!");
18782                 }
18783                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone_ptr(arg);
18784                 return nativeResponseValue;
18785         }
18786         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
18787         export function HTLCOutputInCommitment_clone(orig: number): number {
18788                 if(!isWasmInitialized) {
18789                         throw new Error("initializeWasm() must be awaited first!");
18790                 }
18791                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone(orig);
18792                 return nativeResponseValue;
18793         }
18794         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
18795         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
18796                 if(!isWasmInitialized) {
18797                         throw new Error("initializeWasm() must be awaited first!");
18798                 }
18799                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_write(obj);
18800                 return decodeUint8Array(nativeResponseValue);
18801         }
18802         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
18803         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
18804                 if(!isWasmInitialized) {
18805                         throw new Error("initializeWasm() must be awaited first!");
18806                 }
18807                 const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_read(encodeUint8Array(ser));
18808                 return nativeResponseValue;
18809         }
18810         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, const struct LDKTxCreationKeys *NONNULL_PTR keys);
18811         export function get_htlc_redeemscript(htlc: number, opt_anchors: boolean, keys: number): Uint8Array {
18812                 if(!isWasmInitialized) {
18813                         throw new Error("initializeWasm() must be awaited first!");
18814                 }
18815                 const nativeResponseValue = wasm.TS_get_htlc_redeemscript(htlc, opt_anchors, keys);
18816                 return decodeUint8Array(nativeResponseValue);
18817         }
18818         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
18819         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
18820                 if(!isWasmInitialized) {
18821                         throw new Error("initializeWasm() must be awaited first!");
18822                 }
18823                 const nativeResponseValue = wasm.TS_make_funding_redeemscript(encodeUint8Array(broadcaster), encodeUint8Array(countersignatory));
18824                 return decodeUint8Array(nativeResponseValue);
18825         }
18826         // 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);
18827         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 {
18828                 if(!isWasmInitialized) {
18829                         throw new Error("initializeWasm() must be awaited first!");
18830                 }
18831                 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));
18832                 return decodeUint8Array(nativeResponseValue);
18833         }
18834         // struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
18835         export function get_anchor_redeemscript(funding_pubkey: Uint8Array): Uint8Array {
18836                 if(!isWasmInitialized) {
18837                         throw new Error("initializeWasm() must be awaited first!");
18838                 }
18839                 const nativeResponseValue = wasm.TS_get_anchor_redeemscript(encodeUint8Array(funding_pubkey));
18840                 return decodeUint8Array(nativeResponseValue);
18841         }
18842         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
18843         export function ChannelTransactionParameters_free(this_obj: number): void {
18844                 if(!isWasmInitialized) {
18845                         throw new Error("initializeWasm() must be awaited first!");
18846                 }
18847                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_free(this_obj);
18848                 // debug statements here
18849         }
18850         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18851         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
18852                 if(!isWasmInitialized) {
18853                         throw new Error("initializeWasm() must be awaited first!");
18854                 }
18855                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
18856                 return nativeResponseValue;
18857         }
18858         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
18859         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
18860                 if(!isWasmInitialized) {
18861                         throw new Error("initializeWasm() must be awaited first!");
18862                 }
18863                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
18864                 // debug statements here
18865         }
18866         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18867         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
18868                 if(!isWasmInitialized) {
18869                         throw new Error("initializeWasm() must be awaited first!");
18870                 }
18871                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
18872                 return nativeResponseValue;
18873         }
18874         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
18875         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
18876                 if(!isWasmInitialized) {
18877                         throw new Error("initializeWasm() must be awaited first!");
18878                 }
18879                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
18880                 // debug statements here
18881         }
18882         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18883         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
18884                 if(!isWasmInitialized) {
18885                         throw new Error("initializeWasm() must be awaited first!");
18886                 }
18887                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
18888                 return nativeResponseValue;
18889         }
18890         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
18891         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
18892                 if(!isWasmInitialized) {
18893                         throw new Error("initializeWasm() must be awaited first!");
18894                 }
18895                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
18896                 // debug statements here
18897         }
18898         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18899         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
18900                 if(!isWasmInitialized) {
18901                         throw new Error("initializeWasm() must be awaited first!");
18902                 }
18903                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
18904                 return nativeResponseValue;
18905         }
18906         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
18907         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
18908                 if(!isWasmInitialized) {
18909                         throw new Error("initializeWasm() must be awaited first!");
18910                 }
18911                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
18912                 // debug statements here
18913         }
18914         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18915         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
18916                 if(!isWasmInitialized) {
18917                         throw new Error("initializeWasm() must be awaited first!");
18918                 }
18919                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_funding_outpoint(this_ptr);
18920                 return nativeResponseValue;
18921         }
18922         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
18923         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
18924                 if(!isWasmInitialized) {
18925                         throw new Error("initializeWasm() must be awaited first!");
18926                 }
18927                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
18928                 // debug statements here
18929         }
18930         // enum LDKCOption_NoneZ ChannelTransactionParameters_get_opt_anchors(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
18931         export function ChannelTransactionParameters_get_opt_anchors(this_ptr: number): COption_NoneZ {
18932                 if(!isWasmInitialized) {
18933                         throw new Error("initializeWasm() must be awaited first!");
18934                 }
18935                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_opt_anchors(this_ptr);
18936                 return nativeResponseValue;
18937         }
18938         // void ChannelTransactionParameters_set_opt_anchors(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
18939         export function ChannelTransactionParameters_set_opt_anchors(this_ptr: number, val: COption_NoneZ): void {
18940                 if(!isWasmInitialized) {
18941                         throw new Error("initializeWasm() must be awaited first!");
18942                 }
18943                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_opt_anchors(this_ptr, val);
18944                 // debug statements here
18945         }
18946         // 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);
18947         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 {
18948                 if(!isWasmInitialized) {
18949                         throw new Error("initializeWasm() must be awaited first!");
18950                 }
18951                 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);
18952                 return nativeResponseValue;
18953         }
18954         // uint64_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
18955         export function ChannelTransactionParameters_clone_ptr(arg: number): number {
18956                 if(!isWasmInitialized) {
18957                         throw new Error("initializeWasm() must be awaited first!");
18958                 }
18959                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone_ptr(arg);
18960                 return nativeResponseValue;
18961         }
18962         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
18963         export function ChannelTransactionParameters_clone(orig: number): number {
18964                 if(!isWasmInitialized) {
18965                         throw new Error("initializeWasm() must be awaited first!");
18966                 }
18967                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone(orig);
18968                 return nativeResponseValue;
18969         }
18970         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
18971         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
18972                 if(!isWasmInitialized) {
18973                         throw new Error("initializeWasm() must be awaited first!");
18974                 }
18975                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_free(this_obj);
18976                 // debug statements here
18977         }
18978         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
18979         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
18980                 if(!isWasmInitialized) {
18981                         throw new Error("initializeWasm() must be awaited first!");
18982                 }
18983                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
18984                 return nativeResponseValue;
18985         }
18986         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
18987         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
18988                 if(!isWasmInitialized) {
18989                         throw new Error("initializeWasm() must be awaited first!");
18990                 }
18991                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
18992                 // debug statements here
18993         }
18994         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
18995         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
18996                 if(!isWasmInitialized) {
18997                         throw new Error("initializeWasm() must be awaited first!");
18998                 }
18999                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
19000                 return nativeResponseValue;
19001         }
19002         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
19003         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
19004                 if(!isWasmInitialized) {
19005                         throw new Error("initializeWasm() must be awaited first!");
19006                 }
19007                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
19008                 // debug statements here
19009         }
19010         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
19011         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
19012                 if(!isWasmInitialized) {
19013                         throw new Error("initializeWasm() must be awaited first!");
19014                 }
19015                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
19016                 return nativeResponseValue;
19017         }
19018         // uint64_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
19019         export function CounterpartyChannelTransactionParameters_clone_ptr(arg: number): number {
19020                 if(!isWasmInitialized) {
19021                         throw new Error("initializeWasm() must be awaited first!");
19022                 }
19023                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone_ptr(arg);
19024                 return nativeResponseValue;
19025         }
19026         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
19027         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
19028                 if(!isWasmInitialized) {
19029                         throw new Error("initializeWasm() must be awaited first!");
19030                 }
19031                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone(orig);
19032                 return nativeResponseValue;
19033         }
19034         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19035         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
19036                 if(!isWasmInitialized) {
19037                         throw new Error("initializeWasm() must be awaited first!");
19038                 }
19039                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_is_populated(this_arg);
19040                 return nativeResponseValue;
19041         }
19042         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19043         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
19044                 if(!isWasmInitialized) {
19045                         throw new Error("initializeWasm() must be awaited first!");
19046                 }
19047                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_holder_broadcastable(this_arg);
19048                 return nativeResponseValue;
19049         }
19050         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19051         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
19052                 if(!isWasmInitialized) {
19053                         throw new Error("initializeWasm() must be awaited first!");
19054                 }
19055                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
19056                 return nativeResponseValue;
19057         }
19058         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
19059         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
19060                 if(!isWasmInitialized) {
19061                         throw new Error("initializeWasm() must be awaited first!");
19062                 }
19063                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_write(obj);
19064                 return decodeUint8Array(nativeResponseValue);
19065         }
19066         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
19067         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
19068                 if(!isWasmInitialized) {
19069                         throw new Error("initializeWasm() must be awaited first!");
19070                 }
19071                 const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_read(encodeUint8Array(ser));
19072                 return nativeResponseValue;
19073         }
19074         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
19075         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
19076                 if(!isWasmInitialized) {
19077                         throw new Error("initializeWasm() must be awaited first!");
19078                 }
19079                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_write(obj);
19080                 return decodeUint8Array(nativeResponseValue);
19081         }
19082         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
19083         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
19084                 if(!isWasmInitialized) {
19085                         throw new Error("initializeWasm() must be awaited first!");
19086                 }
19087                 const nativeResponseValue = wasm.TS_ChannelTransactionParameters_read(encodeUint8Array(ser));
19088                 return nativeResponseValue;
19089         }
19090         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
19091         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
19092                 if(!isWasmInitialized) {
19093                         throw new Error("initializeWasm() must be awaited first!");
19094                 }
19095                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_free(this_obj);
19096                 // debug statements here
19097         }
19098         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19099         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
19100                 if(!isWasmInitialized) {
19101                         throw new Error("initializeWasm() must be awaited first!");
19102                 }
19103                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
19104                 return nativeResponseValue;
19105         }
19106         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19107         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
19108                 if(!isWasmInitialized) {
19109                         throw new Error("initializeWasm() must be awaited first!");
19110                 }
19111                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
19112                 return nativeResponseValue;
19113         }
19114         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19115         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
19116                 if(!isWasmInitialized) {
19117                         throw new Error("initializeWasm() must be awaited first!");
19118                 }
19119                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_contest_delay(this_arg);
19120                 return nativeResponseValue;
19121         }
19122         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19123         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
19124                 if(!isWasmInitialized) {
19125                         throw new Error("initializeWasm() must be awaited first!");
19126                 }
19127                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_is_outbound(this_arg);
19128                 return nativeResponseValue;
19129         }
19130         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19131         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
19132                 if(!isWasmInitialized) {
19133                         throw new Error("initializeWasm() must be awaited first!");
19134                 }
19135                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_funding_outpoint(this_arg);
19136                 return nativeResponseValue;
19137         }
19138         // MUST_USE_RES bool DirectedChannelTransactionParameters_opt_anchors(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19139         export function DirectedChannelTransactionParameters_opt_anchors(this_arg: number): boolean {
19140                 if(!isWasmInitialized) {
19141                         throw new Error("initializeWasm() must be awaited first!");
19142                 }
19143                 const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_opt_anchors(this_arg);
19144                 return nativeResponseValue;
19145         }
19146         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
19147         export function HolderCommitmentTransaction_free(this_obj: number): void {
19148                 if(!isWasmInitialized) {
19149                         throw new Error("initializeWasm() must be awaited first!");
19150                 }
19151                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_free(this_obj);
19152                 // debug statements here
19153         }
19154         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
19155         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
19156                 if(!isWasmInitialized) {
19157                         throw new Error("initializeWasm() must be awaited first!");
19158                 }
19159                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
19160                 return decodeUint8Array(nativeResponseValue);
19161         }
19162         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
19163         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
19164                 if(!isWasmInitialized) {
19165                         throw new Error("initializeWasm() must be awaited first!");
19166                 }
19167                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeUint8Array(val));
19168                 // debug statements here
19169         }
19170         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
19171         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
19172                 if(!isWasmInitialized) {
19173                         throw new Error("initializeWasm() must be awaited first!");
19174                 }
19175                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
19176                 // debug statements here
19177         }
19178         // uint64_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
19179         export function HolderCommitmentTransaction_clone_ptr(arg: number): number {
19180                 if(!isWasmInitialized) {
19181                         throw new Error("initializeWasm() must be awaited first!");
19182                 }
19183                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone_ptr(arg);
19184                 return nativeResponseValue;
19185         }
19186         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
19187         export function HolderCommitmentTransaction_clone(orig: number): number {
19188                 if(!isWasmInitialized) {
19189                         throw new Error("initializeWasm() must be awaited first!");
19190                 }
19191                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone(orig);
19192                 return nativeResponseValue;
19193         }
19194         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
19195         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
19196                 if(!isWasmInitialized) {
19197                         throw new Error("initializeWasm() must be awaited first!");
19198                 }
19199                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_write(obj);
19200                 return decodeUint8Array(nativeResponseValue);
19201         }
19202         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
19203         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
19204                 if(!isWasmInitialized) {
19205                         throw new Error("initializeWasm() must be awaited first!");
19206                 }
19207                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_read(encodeUint8Array(ser));
19208                 return nativeResponseValue;
19209         }
19210         // 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);
19211         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
19212                 if(!isWasmInitialized) {
19213                         throw new Error("initializeWasm() must be awaited first!");
19214                 }
19215                 const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_new(commitment_tx, encodeUint8Array(counterparty_sig), counterparty_htlc_sigs, encodeUint8Array(holder_funding_key), encodeUint8Array(counterparty_funding_key));
19216                 return nativeResponseValue;
19217         }
19218         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
19219         export function BuiltCommitmentTransaction_free(this_obj: number): void {
19220                 if(!isWasmInitialized) {
19221                         throw new Error("initializeWasm() must be awaited first!");
19222                 }
19223                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_free(this_obj);
19224                 // debug statements here
19225         }
19226         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
19227         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
19228                 if(!isWasmInitialized) {
19229                         throw new Error("initializeWasm() must be awaited first!");
19230                 }
19231                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_transaction(this_ptr);
19232                 return decodeUint8Array(nativeResponseValue);
19233         }
19234         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
19235         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
19236                 if(!isWasmInitialized) {
19237                         throw new Error("initializeWasm() must be awaited first!");
19238                 }
19239                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_transaction(this_ptr, encodeUint8Array(val));
19240                 // debug statements here
19241         }
19242         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
19243         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
19244                 if(!isWasmInitialized) {
19245                         throw new Error("initializeWasm() must be awaited first!");
19246                 }
19247                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_txid(this_ptr);
19248                 return decodeUint8Array(nativeResponseValue);
19249         }
19250         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19251         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
19252                 if(!isWasmInitialized) {
19253                         throw new Error("initializeWasm() must be awaited first!");
19254                 }
19255                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_txid(this_ptr, encodeUint8Array(val));
19256                 // debug statements here
19257         }
19258         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
19259         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
19260                 if(!isWasmInitialized) {
19261                         throw new Error("initializeWasm() must be awaited first!");
19262                 }
19263                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_new(encodeUint8Array(transaction_arg), encodeUint8Array(txid_arg));
19264                 return nativeResponseValue;
19265         }
19266         // uint64_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
19267         export function BuiltCommitmentTransaction_clone_ptr(arg: number): number {
19268                 if(!isWasmInitialized) {
19269                         throw new Error("initializeWasm() must be awaited first!");
19270                 }
19271                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone_ptr(arg);
19272                 return nativeResponseValue;
19273         }
19274         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
19275         export function BuiltCommitmentTransaction_clone(orig: number): number {
19276                 if(!isWasmInitialized) {
19277                         throw new Error("initializeWasm() must be awaited first!");
19278                 }
19279                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone(orig);
19280                 return nativeResponseValue;
19281         }
19282         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
19283         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
19284                 if(!isWasmInitialized) {
19285                         throw new Error("initializeWasm() must be awaited first!");
19286                 }
19287                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_write(obj);
19288                 return decodeUint8Array(nativeResponseValue);
19289         }
19290         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
19291         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
19292                 if(!isWasmInitialized) {
19293                         throw new Error("initializeWasm() must be awaited first!");
19294                 }
19295                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_read(encodeUint8Array(ser));
19296                 return nativeResponseValue;
19297         }
19298         // 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);
19299         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19300                 if(!isWasmInitialized) {
19301                         throw new Error("initializeWasm() must be awaited first!");
19302                 }
19303                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19304                 return decodeUint8Array(nativeResponseValue);
19305         }
19306         // 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);
19307         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19308                 if(!isWasmInitialized) {
19309                         throw new Error("initializeWasm() must be awaited first!");
19310                 }
19311                 const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_sign(this_arg, encodeUint8Array(funding_key), encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19312                 return decodeUint8Array(nativeResponseValue);
19313         }
19314         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
19315         export function ClosingTransaction_free(this_obj: number): void {
19316                 if(!isWasmInitialized) {
19317                         throw new Error("initializeWasm() must be awaited first!");
19318                 }
19319                 const nativeResponseValue = wasm.TS_ClosingTransaction_free(this_obj);
19320                 // debug statements here
19321         }
19322         // uint64_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
19323         export function ClosingTransaction_clone_ptr(arg: number): number {
19324                 if(!isWasmInitialized) {
19325                         throw new Error("initializeWasm() must be awaited first!");
19326                 }
19327                 const nativeResponseValue = wasm.TS_ClosingTransaction_clone_ptr(arg);
19328                 return nativeResponseValue;
19329         }
19330         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
19331         export function ClosingTransaction_clone(orig: number): number {
19332                 if(!isWasmInitialized) {
19333                         throw new Error("initializeWasm() must be awaited first!");
19334                 }
19335                 const nativeResponseValue = wasm.TS_ClosingTransaction_clone(orig);
19336                 return nativeResponseValue;
19337         }
19338         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
19339         export function ClosingTransaction_hash(o: number): number {
19340                 if(!isWasmInitialized) {
19341                         throw new Error("initializeWasm() must be awaited first!");
19342                 }
19343                 const nativeResponseValue = wasm.TS_ClosingTransaction_hash(o);
19344                 return nativeResponseValue;
19345         }
19346         // 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);
19347         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 {
19348                 if(!isWasmInitialized) {
19349                         throw new Error("initializeWasm() must be awaited first!");
19350                 }
19351                 const nativeResponseValue = wasm.TS_ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeUint8Array(to_holder_script), encodeUint8Array(to_counterparty_script), funding_outpoint);
19352                 return nativeResponseValue;
19353         }
19354         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19355         export function ClosingTransaction_trust(this_arg: number): number {
19356                 if(!isWasmInitialized) {
19357                         throw new Error("initializeWasm() must be awaited first!");
19358                 }
19359                 const nativeResponseValue = wasm.TS_ClosingTransaction_trust(this_arg);
19360                 return nativeResponseValue;
19361         }
19362         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
19363         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
19364                 if(!isWasmInitialized) {
19365                         throw new Error("initializeWasm() must be awaited first!");
19366                 }
19367                 const nativeResponseValue = wasm.TS_ClosingTransaction_verify(this_arg, funding_outpoint);
19368                 return nativeResponseValue;
19369         }
19370         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19371         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
19372                 if(!isWasmInitialized) {
19373                         throw new Error("initializeWasm() must be awaited first!");
19374                 }
19375                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_value_sat(this_arg);
19376                 return nativeResponseValue;
19377         }
19378         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19379         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
19380                 if(!isWasmInitialized) {
19381                         throw new Error("initializeWasm() must be awaited first!");
19382                 }
19383                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_value_sat(this_arg);
19384                 return nativeResponseValue;
19385         }
19386         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19387         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
19388                 if(!isWasmInitialized) {
19389                         throw new Error("initializeWasm() must be awaited first!");
19390                 }
19391                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_script(this_arg);
19392                 return decodeUint8Array(nativeResponseValue);
19393         }
19394         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
19395         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
19396                 if(!isWasmInitialized) {
19397                         throw new Error("initializeWasm() must be awaited first!");
19398                 }
19399                 const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_script(this_arg);
19400                 return decodeUint8Array(nativeResponseValue);
19401         }
19402         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
19403         export function TrustedClosingTransaction_free(this_obj: number): void {
19404                 if(!isWasmInitialized) {
19405                         throw new Error("initializeWasm() must be awaited first!");
19406                 }
19407                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_free(this_obj);
19408                 // debug statements here
19409         }
19410         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
19411         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
19412                 if(!isWasmInitialized) {
19413                         throw new Error("initializeWasm() must be awaited first!");
19414                 }
19415                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_built_transaction(this_arg);
19416                 return decodeUint8Array(nativeResponseValue);
19417         }
19418         // 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);
19419         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19420                 if(!isWasmInitialized) {
19421                         throw new Error("initializeWasm() must be awaited first!");
19422                 }
19423                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_get_sighash_all(this_arg, encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19424                 return decodeUint8Array(nativeResponseValue);
19425         }
19426         // 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);
19427         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
19428                 if(!isWasmInitialized) {
19429                         throw new Error("initializeWasm() must be awaited first!");
19430                 }
19431                 const nativeResponseValue = wasm.TS_TrustedClosingTransaction_sign(this_arg, encodeUint8Array(funding_key), encodeUint8Array(funding_redeemscript), channel_value_satoshis);
19432                 return decodeUint8Array(nativeResponseValue);
19433         }
19434         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
19435         export function CommitmentTransaction_free(this_obj: number): void {
19436                 if(!isWasmInitialized) {
19437                         throw new Error("initializeWasm() must be awaited first!");
19438                 }
19439                 const nativeResponseValue = wasm.TS_CommitmentTransaction_free(this_obj);
19440                 // debug statements here
19441         }
19442         // uint64_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
19443         export function CommitmentTransaction_clone_ptr(arg: number): number {
19444                 if(!isWasmInitialized) {
19445                         throw new Error("initializeWasm() must be awaited first!");
19446                 }
19447                 const nativeResponseValue = wasm.TS_CommitmentTransaction_clone_ptr(arg);
19448                 return nativeResponseValue;
19449         }
19450         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
19451         export function CommitmentTransaction_clone(orig: number): number {
19452                 if(!isWasmInitialized) {
19453                         throw new Error("initializeWasm() must be awaited first!");
19454                 }
19455                 const nativeResponseValue = wasm.TS_CommitmentTransaction_clone(orig);
19456                 return nativeResponseValue;
19457         }
19458         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
19459         export function CommitmentTransaction_write(obj: number): Uint8Array {
19460                 if(!isWasmInitialized) {
19461                         throw new Error("initializeWasm() must be awaited first!");
19462                 }
19463                 const nativeResponseValue = wasm.TS_CommitmentTransaction_write(obj);
19464                 return decodeUint8Array(nativeResponseValue);
19465         }
19466         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
19467         export function CommitmentTransaction_read(ser: Uint8Array): number {
19468                 if(!isWasmInitialized) {
19469                         throw new Error("initializeWasm() must be awaited first!");
19470                 }
19471                 const nativeResponseValue = wasm.TS_CommitmentTransaction_read(encodeUint8Array(ser));
19472                 return nativeResponseValue;
19473         }
19474         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19475         export function CommitmentTransaction_commitment_number(this_arg: number): number {
19476                 if(!isWasmInitialized) {
19477                         throw new Error("initializeWasm() must be awaited first!");
19478                 }
19479                 const nativeResponseValue = wasm.TS_CommitmentTransaction_commitment_number(this_arg);
19480                 return nativeResponseValue;
19481         }
19482         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19483         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
19484                 if(!isWasmInitialized) {
19485                         throw new Error("initializeWasm() must be awaited first!");
19486                 }
19487                 const nativeResponseValue = wasm.TS_CommitmentTransaction_to_broadcaster_value_sat(this_arg);
19488                 return nativeResponseValue;
19489         }
19490         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19491         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
19492                 if(!isWasmInitialized) {
19493                         throw new Error("initializeWasm() must be awaited first!");
19494                 }
19495                 const nativeResponseValue = wasm.TS_CommitmentTransaction_to_countersignatory_value_sat(this_arg);
19496                 return nativeResponseValue;
19497         }
19498         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19499         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
19500                 if(!isWasmInitialized) {
19501                         throw new Error("initializeWasm() must be awaited first!");
19502                 }
19503                 const nativeResponseValue = wasm.TS_CommitmentTransaction_feerate_per_kw(this_arg);
19504                 return nativeResponseValue;
19505         }
19506         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
19507         export function CommitmentTransaction_trust(this_arg: number): number {
19508                 if(!isWasmInitialized) {
19509                         throw new Error("initializeWasm() must be awaited first!");
19510                 }
19511                 const nativeResponseValue = wasm.TS_CommitmentTransaction_trust(this_arg);
19512                 return nativeResponseValue;
19513         }
19514         // 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);
19515         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
19516                 if(!isWasmInitialized) {
19517                         throw new Error("initializeWasm() must be awaited first!");
19518                 }
19519                 const nativeResponseValue = wasm.TS_CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
19520                 return nativeResponseValue;
19521         }
19522         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
19523         export function TrustedCommitmentTransaction_free(this_obj: number): void {
19524                 if(!isWasmInitialized) {
19525                         throw new Error("initializeWasm() must be awaited first!");
19526                 }
19527                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_free(this_obj);
19528                 // debug statements here
19529         }
19530         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19531         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
19532                 if(!isWasmInitialized) {
19533                         throw new Error("initializeWasm() must be awaited first!");
19534                 }
19535                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_txid(this_arg);
19536                 return decodeUint8Array(nativeResponseValue);
19537         }
19538         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19539         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
19540                 if(!isWasmInitialized) {
19541                         throw new Error("initializeWasm() must be awaited first!");
19542                 }
19543                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_built_transaction(this_arg);
19544                 return nativeResponseValue;
19545         }
19546         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19547         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
19548                 if(!isWasmInitialized) {
19549                         throw new Error("initializeWasm() must be awaited first!");
19550                 }
19551                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_keys(this_arg);
19552                 return nativeResponseValue;
19553         }
19554         // MUST_USE_RES bool TrustedCommitmentTransaction_opt_anchors(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
19555         export function TrustedCommitmentTransaction_opt_anchors(this_arg: number): boolean {
19556                 if(!isWasmInitialized) {
19557                         throw new Error("initializeWasm() must be awaited first!");
19558                 }
19559                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_opt_anchors(this_arg);
19560                 return nativeResponseValue;
19561         }
19562         // 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);
19563         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
19564                 if(!isWasmInitialized) {
19565                         throw new Error("initializeWasm() must be awaited first!");
19566                 }
19567                 const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeUint8Array(htlc_base_key), channel_parameters);
19568                 return nativeResponseValue;
19569         }
19570         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
19571         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
19572                 if(!isWasmInitialized) {
19573                         throw new Error("initializeWasm() must be awaited first!");
19574                 }
19575                 const nativeResponseValue = wasm.TS_get_commitment_transaction_number_obscure_factor(encodeUint8Array(broadcaster_payment_basepoint), encodeUint8Array(countersignatory_payment_basepoint), outbound_from_broadcaster);
19576                 return nativeResponseValue;
19577         }
19578         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
19579         export function InitFeatures_eq(a: number, b: number): boolean {
19580                 if(!isWasmInitialized) {
19581                         throw new Error("initializeWasm() must be awaited first!");
19582                 }
19583                 const nativeResponseValue = wasm.TS_InitFeatures_eq(a, b);
19584                 return nativeResponseValue;
19585         }
19586         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
19587         export function NodeFeatures_eq(a: number, b: number): boolean {
19588                 if(!isWasmInitialized) {
19589                         throw new Error("initializeWasm() must be awaited first!");
19590                 }
19591                 const nativeResponseValue = wasm.TS_NodeFeatures_eq(a, b);
19592                 return nativeResponseValue;
19593         }
19594         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
19595         export function ChannelFeatures_eq(a: number, b: number): boolean {
19596                 if(!isWasmInitialized) {
19597                         throw new Error("initializeWasm() must be awaited first!");
19598                 }
19599                 const nativeResponseValue = wasm.TS_ChannelFeatures_eq(a, b);
19600                 return nativeResponseValue;
19601         }
19602         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
19603         export function InvoiceFeatures_eq(a: number, b: number): boolean {
19604                 if(!isWasmInitialized) {
19605                         throw new Error("initializeWasm() must be awaited first!");
19606                 }
19607                 const nativeResponseValue = wasm.TS_InvoiceFeatures_eq(a, b);
19608                 return nativeResponseValue;
19609         }
19610         // bool ChannelTypeFeatures_eq(const struct LDKChannelTypeFeatures *NONNULL_PTR a, const struct LDKChannelTypeFeatures *NONNULL_PTR b);
19611         export function ChannelTypeFeatures_eq(a: number, b: number): boolean {
19612                 if(!isWasmInitialized) {
19613                         throw new Error("initializeWasm() must be awaited first!");
19614                 }
19615                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_eq(a, b);
19616                 return nativeResponseValue;
19617         }
19618         // uint64_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
19619         export function InitFeatures_clone_ptr(arg: number): number {
19620                 if(!isWasmInitialized) {
19621                         throw new Error("initializeWasm() must be awaited first!");
19622                 }
19623                 const nativeResponseValue = wasm.TS_InitFeatures_clone_ptr(arg);
19624                 return nativeResponseValue;
19625         }
19626         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
19627         export function InitFeatures_clone(orig: number): number {
19628                 if(!isWasmInitialized) {
19629                         throw new Error("initializeWasm() must be awaited first!");
19630                 }
19631                 const nativeResponseValue = wasm.TS_InitFeatures_clone(orig);
19632                 return nativeResponseValue;
19633         }
19634         // uint64_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
19635         export function NodeFeatures_clone_ptr(arg: number): number {
19636                 if(!isWasmInitialized) {
19637                         throw new Error("initializeWasm() must be awaited first!");
19638                 }
19639                 const nativeResponseValue = wasm.TS_NodeFeatures_clone_ptr(arg);
19640                 return nativeResponseValue;
19641         }
19642         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
19643         export function NodeFeatures_clone(orig: number): number {
19644                 if(!isWasmInitialized) {
19645                         throw new Error("initializeWasm() must be awaited first!");
19646                 }
19647                 const nativeResponseValue = wasm.TS_NodeFeatures_clone(orig);
19648                 return nativeResponseValue;
19649         }
19650         // uint64_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
19651         export function ChannelFeatures_clone_ptr(arg: number): number {
19652                 if(!isWasmInitialized) {
19653                         throw new Error("initializeWasm() must be awaited first!");
19654                 }
19655                 const nativeResponseValue = wasm.TS_ChannelFeatures_clone_ptr(arg);
19656                 return nativeResponseValue;
19657         }
19658         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
19659         export function ChannelFeatures_clone(orig: number): number {
19660                 if(!isWasmInitialized) {
19661                         throw new Error("initializeWasm() must be awaited first!");
19662                 }
19663                 const nativeResponseValue = wasm.TS_ChannelFeatures_clone(orig);
19664                 return nativeResponseValue;
19665         }
19666         // uint64_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
19667         export function InvoiceFeatures_clone_ptr(arg: number): number {
19668                 if(!isWasmInitialized) {
19669                         throw new Error("initializeWasm() must be awaited first!");
19670                 }
19671                 const nativeResponseValue = wasm.TS_InvoiceFeatures_clone_ptr(arg);
19672                 return nativeResponseValue;
19673         }
19674         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
19675         export function InvoiceFeatures_clone(orig: number): number {
19676                 if(!isWasmInitialized) {
19677                         throw new Error("initializeWasm() must be awaited first!");
19678                 }
19679                 const nativeResponseValue = wasm.TS_InvoiceFeatures_clone(orig);
19680                 return nativeResponseValue;
19681         }
19682         // uint64_t ChannelTypeFeatures_clone_ptr(LDKChannelTypeFeatures *NONNULL_PTR arg);
19683         export function ChannelTypeFeatures_clone_ptr(arg: number): number {
19684                 if(!isWasmInitialized) {
19685                         throw new Error("initializeWasm() must be awaited first!");
19686                 }
19687                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone_ptr(arg);
19688                 return nativeResponseValue;
19689         }
19690         // struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
19691         export function ChannelTypeFeatures_clone(orig: number): number {
19692                 if(!isWasmInitialized) {
19693                         throw new Error("initializeWasm() must be awaited first!");
19694                 }
19695                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone(orig);
19696                 return nativeResponseValue;
19697         }
19698         // void InitFeatures_free(struct LDKInitFeatures this_obj);
19699         export function InitFeatures_free(this_obj: number): void {
19700                 if(!isWasmInitialized) {
19701                         throw new Error("initializeWasm() must be awaited first!");
19702                 }
19703                 const nativeResponseValue = wasm.TS_InitFeatures_free(this_obj);
19704                 // debug statements here
19705         }
19706         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
19707         export function NodeFeatures_free(this_obj: number): void {
19708                 if(!isWasmInitialized) {
19709                         throw new Error("initializeWasm() must be awaited first!");
19710                 }
19711                 const nativeResponseValue = wasm.TS_NodeFeatures_free(this_obj);
19712                 // debug statements here
19713         }
19714         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
19715         export function ChannelFeatures_free(this_obj: number): void {
19716                 if(!isWasmInitialized) {
19717                         throw new Error("initializeWasm() must be awaited first!");
19718                 }
19719                 const nativeResponseValue = wasm.TS_ChannelFeatures_free(this_obj);
19720                 // debug statements here
19721         }
19722         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
19723         export function InvoiceFeatures_free(this_obj: number): void {
19724                 if(!isWasmInitialized) {
19725                         throw new Error("initializeWasm() must be awaited first!");
19726                 }
19727                 const nativeResponseValue = wasm.TS_InvoiceFeatures_free(this_obj);
19728                 // debug statements here
19729         }
19730         // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
19731         export function ChannelTypeFeatures_free(this_obj: number): void {
19732                 if(!isWasmInitialized) {
19733                         throw new Error("initializeWasm() must be awaited first!");
19734                 }
19735                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_free(this_obj);
19736                 // debug statements here
19737         }
19738         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
19739         export function InitFeatures_empty(): number {
19740                 if(!isWasmInitialized) {
19741                         throw new Error("initializeWasm() must be awaited first!");
19742                 }
19743                 const nativeResponseValue = wasm.TS_InitFeatures_empty();
19744                 return nativeResponseValue;
19745         }
19746         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
19747         export function InitFeatures_known(): number {
19748                 if(!isWasmInitialized) {
19749                         throw new Error("initializeWasm() must be awaited first!");
19750                 }
19751                 const nativeResponseValue = wasm.TS_InitFeatures_known();
19752                 return nativeResponseValue;
19753         }
19754         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
19755         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
19756                 if(!isWasmInitialized) {
19757                         throw new Error("initializeWasm() must be awaited first!");
19758                 }
19759                 const nativeResponseValue = wasm.TS_InitFeatures_requires_unknown_bits(this_arg);
19760                 return nativeResponseValue;
19761         }
19762         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
19763         export function NodeFeatures_empty(): number {
19764                 if(!isWasmInitialized) {
19765                         throw new Error("initializeWasm() must be awaited first!");
19766                 }
19767                 const nativeResponseValue = wasm.TS_NodeFeatures_empty();
19768                 return nativeResponseValue;
19769         }
19770         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
19771         export function NodeFeatures_known(): number {
19772                 if(!isWasmInitialized) {
19773                         throw new Error("initializeWasm() must be awaited first!");
19774                 }
19775                 const nativeResponseValue = wasm.TS_NodeFeatures_known();
19776                 return nativeResponseValue;
19777         }
19778         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
19779         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
19780                 if(!isWasmInitialized) {
19781                         throw new Error("initializeWasm() must be awaited first!");
19782                 }
19783                 const nativeResponseValue = wasm.TS_NodeFeatures_requires_unknown_bits(this_arg);
19784                 return nativeResponseValue;
19785         }
19786         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
19787         export function ChannelFeatures_empty(): number {
19788                 if(!isWasmInitialized) {
19789                         throw new Error("initializeWasm() must be awaited first!");
19790                 }
19791                 const nativeResponseValue = wasm.TS_ChannelFeatures_empty();
19792                 return nativeResponseValue;
19793         }
19794         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
19795         export function ChannelFeatures_known(): number {
19796                 if(!isWasmInitialized) {
19797                         throw new Error("initializeWasm() must be awaited first!");
19798                 }
19799                 const nativeResponseValue = wasm.TS_ChannelFeatures_known();
19800                 return nativeResponseValue;
19801         }
19802         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
19803         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
19804                 if(!isWasmInitialized) {
19805                         throw new Error("initializeWasm() must be awaited first!");
19806                 }
19807                 const nativeResponseValue = wasm.TS_ChannelFeatures_requires_unknown_bits(this_arg);
19808                 return nativeResponseValue;
19809         }
19810         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
19811         export function InvoiceFeatures_empty(): number {
19812                 if(!isWasmInitialized) {
19813                         throw new Error("initializeWasm() must be awaited first!");
19814                 }
19815                 const nativeResponseValue = wasm.TS_InvoiceFeatures_empty();
19816                 return nativeResponseValue;
19817         }
19818         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
19819         export function InvoiceFeatures_known(): number {
19820                 if(!isWasmInitialized) {
19821                         throw new Error("initializeWasm() must be awaited first!");
19822                 }
19823                 const nativeResponseValue = wasm.TS_InvoiceFeatures_known();
19824                 return nativeResponseValue;
19825         }
19826         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
19827         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
19828                 if(!isWasmInitialized) {
19829                         throw new Error("initializeWasm() must be awaited first!");
19830                 }
19831                 const nativeResponseValue = wasm.TS_InvoiceFeatures_requires_unknown_bits(this_arg);
19832                 return nativeResponseValue;
19833         }
19834         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
19835         export function ChannelTypeFeatures_empty(): number {
19836                 if(!isWasmInitialized) {
19837                         throw new Error("initializeWasm() must be awaited first!");
19838                 }
19839                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_empty();
19840                 return nativeResponseValue;
19841         }
19842         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
19843         export function ChannelTypeFeatures_known(): number {
19844                 if(!isWasmInitialized) {
19845                         throw new Error("initializeWasm() must be awaited first!");
19846                 }
19847                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_known();
19848                 return nativeResponseValue;
19849         }
19850         // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
19851         export function ChannelTypeFeatures_requires_unknown_bits(this_arg: number): boolean {
19852                 if(!isWasmInitialized) {
19853                         throw new Error("initializeWasm() must be awaited first!");
19854                 }
19855                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_requires_unknown_bits(this_arg);
19856                 return nativeResponseValue;
19857         }
19858         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
19859         export function InitFeatures_write(obj: number): Uint8Array {
19860                 if(!isWasmInitialized) {
19861                         throw new Error("initializeWasm() must be awaited first!");
19862                 }
19863                 const nativeResponseValue = wasm.TS_InitFeatures_write(obj);
19864                 return decodeUint8Array(nativeResponseValue);
19865         }
19866         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
19867         export function InitFeatures_read(ser: Uint8Array): number {
19868                 if(!isWasmInitialized) {
19869                         throw new Error("initializeWasm() must be awaited first!");
19870                 }
19871                 const nativeResponseValue = wasm.TS_InitFeatures_read(encodeUint8Array(ser));
19872                 return nativeResponseValue;
19873         }
19874         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
19875         export function ChannelFeatures_write(obj: number): Uint8Array {
19876                 if(!isWasmInitialized) {
19877                         throw new Error("initializeWasm() must be awaited first!");
19878                 }
19879                 const nativeResponseValue = wasm.TS_ChannelFeatures_write(obj);
19880                 return decodeUint8Array(nativeResponseValue);
19881         }
19882         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
19883         export function ChannelFeatures_read(ser: Uint8Array): number {
19884                 if(!isWasmInitialized) {
19885                         throw new Error("initializeWasm() must be awaited first!");
19886                 }
19887                 const nativeResponseValue = wasm.TS_ChannelFeatures_read(encodeUint8Array(ser));
19888                 return nativeResponseValue;
19889         }
19890         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
19891         export function NodeFeatures_write(obj: number): Uint8Array {
19892                 if(!isWasmInitialized) {
19893                         throw new Error("initializeWasm() must be awaited first!");
19894                 }
19895                 const nativeResponseValue = wasm.TS_NodeFeatures_write(obj);
19896                 return decodeUint8Array(nativeResponseValue);
19897         }
19898         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
19899         export function NodeFeatures_read(ser: Uint8Array): number {
19900                 if(!isWasmInitialized) {
19901                         throw new Error("initializeWasm() must be awaited first!");
19902                 }
19903                 const nativeResponseValue = wasm.TS_NodeFeatures_read(encodeUint8Array(ser));
19904                 return nativeResponseValue;
19905         }
19906         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
19907         export function InvoiceFeatures_write(obj: number): Uint8Array {
19908                 if(!isWasmInitialized) {
19909                         throw new Error("initializeWasm() must be awaited first!");
19910                 }
19911                 const nativeResponseValue = wasm.TS_InvoiceFeatures_write(obj);
19912                 return decodeUint8Array(nativeResponseValue);
19913         }
19914         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
19915         export function InvoiceFeatures_read(ser: Uint8Array): number {
19916                 if(!isWasmInitialized) {
19917                         throw new Error("initializeWasm() must be awaited first!");
19918                 }
19919                 const nativeResponseValue = wasm.TS_InvoiceFeatures_read(encodeUint8Array(ser));
19920                 return nativeResponseValue;
19921         }
19922         // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
19923         export function ChannelTypeFeatures_write(obj: number): Uint8Array {
19924                 if(!isWasmInitialized) {
19925                         throw new Error("initializeWasm() must be awaited first!");
19926                 }
19927                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_write(obj);
19928                 return decodeUint8Array(nativeResponseValue);
19929         }
19930         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
19931         export function ChannelTypeFeatures_read(ser: Uint8Array): number {
19932                 if(!isWasmInitialized) {
19933                         throw new Error("initializeWasm() must be awaited first!");
19934                 }
19935                 const nativeResponseValue = wasm.TS_ChannelTypeFeatures_read(encodeUint8Array(ser));
19936                 return nativeResponseValue;
19937         }
19938         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
19939         export function ShutdownScript_free(this_obj: number): void {
19940                 if(!isWasmInitialized) {
19941                         throw new Error("initializeWasm() must be awaited first!");
19942                 }
19943                 const nativeResponseValue = wasm.TS_ShutdownScript_free(this_obj);
19944                 // debug statements here
19945         }
19946         // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
19947         export function ShutdownScript_clone_ptr(arg: number): number {
19948                 if(!isWasmInitialized) {
19949                         throw new Error("initializeWasm() must be awaited first!");
19950                 }
19951                 const nativeResponseValue = wasm.TS_ShutdownScript_clone_ptr(arg);
19952                 return nativeResponseValue;
19953         }
19954         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
19955         export function ShutdownScript_clone(orig: number): number {
19956                 if(!isWasmInitialized) {
19957                         throw new Error("initializeWasm() must be awaited first!");
19958                 }
19959                 const nativeResponseValue = wasm.TS_ShutdownScript_clone(orig);
19960                 return nativeResponseValue;
19961         }
19962         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
19963         export function InvalidShutdownScript_free(this_obj: number): void {
19964                 if(!isWasmInitialized) {
19965                         throw new Error("initializeWasm() must be awaited first!");
19966                 }
19967                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_free(this_obj);
19968                 // debug statements here
19969         }
19970         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
19971         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
19972                 if(!isWasmInitialized) {
19973                         throw new Error("initializeWasm() must be awaited first!");
19974                 }
19975                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_get_script(this_ptr);
19976                 return decodeUint8Array(nativeResponseValue);
19977         }
19978         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
19979         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
19980                 if(!isWasmInitialized) {
19981                         throw new Error("initializeWasm() must be awaited first!");
19982                 }
19983                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_set_script(this_ptr, encodeUint8Array(val));
19984                 // debug statements here
19985         }
19986         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
19987         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
19988                 if(!isWasmInitialized) {
19989                         throw new Error("initializeWasm() must be awaited first!");
19990                 }
19991                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_new(encodeUint8Array(script_arg));
19992                 return nativeResponseValue;
19993         }
19994         // uint64_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
19995         export function InvalidShutdownScript_clone_ptr(arg: number): number {
19996                 if(!isWasmInitialized) {
19997                         throw new Error("initializeWasm() must be awaited first!");
19998                 }
19999                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone_ptr(arg);
20000                 return nativeResponseValue;
20001         }
20002         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
20003         export function InvalidShutdownScript_clone(orig: number): number {
20004                 if(!isWasmInitialized) {
20005                         throw new Error("initializeWasm() must be awaited first!");
20006                 }
20007                 const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone(orig);
20008                 return nativeResponseValue;
20009         }
20010         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
20011         export function ShutdownScript_write(obj: number): Uint8Array {
20012                 if(!isWasmInitialized) {
20013                         throw new Error("initializeWasm() must be awaited first!");
20014                 }
20015                 const nativeResponseValue = wasm.TS_ShutdownScript_write(obj);
20016                 return decodeUint8Array(nativeResponseValue);
20017         }
20018         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
20019         export function ShutdownScript_read(ser: Uint8Array): number {
20020                 if(!isWasmInitialized) {
20021                         throw new Error("initializeWasm() must be awaited first!");
20022                 }
20023                 const nativeResponseValue = wasm.TS_ShutdownScript_read(encodeUint8Array(ser));
20024                 return nativeResponseValue;
20025         }
20026         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
20027         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
20028                 if(!isWasmInitialized) {
20029                         throw new Error("initializeWasm() must be awaited first!");
20030                 }
20031                 const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wpkh(encodeUint8Array(pubkey_hash));
20032                 return nativeResponseValue;
20033         }
20034         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
20035         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
20036                 if(!isWasmInitialized) {
20037                         throw new Error("initializeWasm() must be awaited first!");
20038                 }
20039                 const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wsh(encodeUint8Array(script_hash));
20040                 return nativeResponseValue;
20041         }
20042         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
20043         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
20044                 if(!isWasmInitialized) {
20045                         throw new Error("initializeWasm() must be awaited first!");
20046                 }
20047                 const nativeResponseValue = wasm.TS_ShutdownScript_new_witness_program(version, encodeUint8Array(program));
20048                 return nativeResponseValue;
20049         }
20050         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
20051         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
20052                 if(!isWasmInitialized) {
20053                         throw new Error("initializeWasm() must be awaited first!");
20054                 }
20055                 const nativeResponseValue = wasm.TS_ShutdownScript_into_inner(this_arg);
20056                 return decodeUint8Array(nativeResponseValue);
20057         }
20058         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
20059         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
20060                 if(!isWasmInitialized) {
20061                         throw new Error("initializeWasm() must be awaited first!");
20062                 }
20063                 const nativeResponseValue = wasm.TS_ShutdownScript_as_legacy_pubkey(this_arg);
20064                 return decodeUint8Array(nativeResponseValue);
20065         }
20066         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
20067         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
20068                 if(!isWasmInitialized) {
20069                         throw new Error("initializeWasm() must be awaited first!");
20070                 }
20071                 const nativeResponseValue = wasm.TS_ShutdownScript_is_compatible(this_arg, features);
20072                 return nativeResponseValue;
20073         }
20074         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
20075         export function CustomMessageReader_free(this_ptr: number): void {
20076                 if(!isWasmInitialized) {
20077                         throw new Error("initializeWasm() must be awaited first!");
20078                 }
20079                 const nativeResponseValue = wasm.TS_CustomMessageReader_free(this_ptr);
20080                 // debug statements here
20081         }
20082         // uint64_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
20083         export function Type_clone_ptr(arg: number): number {
20084                 if(!isWasmInitialized) {
20085                         throw new Error("initializeWasm() must be awaited first!");
20086                 }
20087                 const nativeResponseValue = wasm.TS_Type_clone_ptr(arg);
20088                 return nativeResponseValue;
20089         }
20090         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
20091         export function Type_clone(orig: number): number {
20092                 if(!isWasmInitialized) {
20093                         throw new Error("initializeWasm() must be awaited first!");
20094                 }
20095                 const nativeResponseValue = wasm.TS_Type_clone(orig);
20096                 return nativeResponseValue;
20097         }
20098         // void Type_free(struct LDKType this_ptr);
20099         export function Type_free(this_ptr: number): void {
20100                 if(!isWasmInitialized) {
20101                         throw new Error("initializeWasm() must be awaited first!");
20102                 }
20103                 const nativeResponseValue = wasm.TS_Type_free(this_ptr);
20104                 // debug statements here
20105         }
20106         // void NodeId_free(struct LDKNodeId this_obj);
20107         export function NodeId_free(this_obj: number): void {
20108                 if(!isWasmInitialized) {
20109                         throw new Error("initializeWasm() must be awaited first!");
20110                 }
20111                 const nativeResponseValue = wasm.TS_NodeId_free(this_obj);
20112                 // debug statements here
20113         }
20114         // uint64_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
20115         export function NodeId_clone_ptr(arg: number): number {
20116                 if(!isWasmInitialized) {
20117                         throw new Error("initializeWasm() must be awaited first!");
20118                 }
20119                 const nativeResponseValue = wasm.TS_NodeId_clone_ptr(arg);
20120                 return nativeResponseValue;
20121         }
20122         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
20123         export function NodeId_clone(orig: number): number {
20124                 if(!isWasmInitialized) {
20125                         throw new Error("initializeWasm() must be awaited first!");
20126                 }
20127                 const nativeResponseValue = wasm.TS_NodeId_clone(orig);
20128                 return nativeResponseValue;
20129         }
20130         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
20131         export function NodeId_from_pubkey(pubkey: Uint8Array): number {
20132                 if(!isWasmInitialized) {
20133                         throw new Error("initializeWasm() must be awaited first!");
20134                 }
20135                 const nativeResponseValue = wasm.TS_NodeId_from_pubkey(encodeUint8Array(pubkey));
20136                 return nativeResponseValue;
20137         }
20138         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
20139         export function NodeId_as_slice(this_arg: number): Uint8Array {
20140                 if(!isWasmInitialized) {
20141                         throw new Error("initializeWasm() must be awaited first!");
20142                 }
20143                 const nativeResponseValue = wasm.TS_NodeId_as_slice(this_arg);
20144                 return decodeUint8Array(nativeResponseValue);
20145         }
20146         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
20147         export function NodeId_hash(o: number): number {
20148                 if(!isWasmInitialized) {
20149                         throw new Error("initializeWasm() must be awaited first!");
20150                 }
20151                 const nativeResponseValue = wasm.TS_NodeId_hash(o);
20152                 return nativeResponseValue;
20153         }
20154         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
20155         export function NodeId_write(obj: number): Uint8Array {
20156                 if(!isWasmInitialized) {
20157                         throw new Error("initializeWasm() must be awaited first!");
20158                 }
20159                 const nativeResponseValue = wasm.TS_NodeId_write(obj);
20160                 return decodeUint8Array(nativeResponseValue);
20161         }
20162         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
20163         export function NodeId_read(ser: Uint8Array): number {
20164                 if(!isWasmInitialized) {
20165                         throw new Error("initializeWasm() must be awaited first!");
20166                 }
20167                 const nativeResponseValue = wasm.TS_NodeId_read(encodeUint8Array(ser));
20168                 return nativeResponseValue;
20169         }
20170         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
20171         export function NetworkGraph_free(this_obj: number): void {
20172                 if(!isWasmInitialized) {
20173                         throw new Error("initializeWasm() must be awaited first!");
20174                 }
20175                 const nativeResponseValue = wasm.TS_NetworkGraph_free(this_obj);
20176                 // debug statements here
20177         }
20178         // uint64_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
20179         export function NetworkGraph_clone_ptr(arg: number): number {
20180                 if(!isWasmInitialized) {
20181                         throw new Error("initializeWasm() must be awaited first!");
20182                 }
20183                 const nativeResponseValue = wasm.TS_NetworkGraph_clone_ptr(arg);
20184                 return nativeResponseValue;
20185         }
20186         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
20187         export function NetworkGraph_clone(orig: number): number {
20188                 if(!isWasmInitialized) {
20189                         throw new Error("initializeWasm() must be awaited first!");
20190                 }
20191                 const nativeResponseValue = wasm.TS_NetworkGraph_clone(orig);
20192                 return nativeResponseValue;
20193         }
20194         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
20195         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
20196                 if(!isWasmInitialized) {
20197                         throw new Error("initializeWasm() must be awaited first!");
20198                 }
20199                 const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_free(this_obj);
20200                 // debug statements here
20201         }
20202         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
20203         export function NetworkUpdate_free(this_ptr: number): void {
20204                 if(!isWasmInitialized) {
20205                         throw new Error("initializeWasm() must be awaited first!");
20206                 }
20207                 const nativeResponseValue = wasm.TS_NetworkUpdate_free(this_ptr);
20208                 // debug statements here
20209         }
20210         // uint64_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
20211         export function NetworkUpdate_clone_ptr(arg: number): number {
20212                 if(!isWasmInitialized) {
20213                         throw new Error("initializeWasm() must be awaited first!");
20214                 }
20215                 const nativeResponseValue = wasm.TS_NetworkUpdate_clone_ptr(arg);
20216                 return nativeResponseValue;
20217         }
20218         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
20219         export function NetworkUpdate_clone(orig: number): number {
20220                 if(!isWasmInitialized) {
20221                         throw new Error("initializeWasm() must be awaited first!");
20222                 }
20223                 const nativeResponseValue = wasm.TS_NetworkUpdate_clone(orig);
20224                 return nativeResponseValue;
20225         }
20226         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
20227         export function NetworkUpdate_channel_update_message(msg: number): number {
20228                 if(!isWasmInitialized) {
20229                         throw new Error("initializeWasm() must be awaited first!");
20230                 }
20231                 const nativeResponseValue = wasm.TS_NetworkUpdate_channel_update_message(msg);
20232                 return nativeResponseValue;
20233         }
20234         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
20235         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
20236                 if(!isWasmInitialized) {
20237                         throw new Error("initializeWasm() must be awaited first!");
20238                 }
20239                 const nativeResponseValue = wasm.TS_NetworkUpdate_channel_closed(short_channel_id, is_permanent);
20240                 return nativeResponseValue;
20241         }
20242         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
20243         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
20244                 if(!isWasmInitialized) {
20245                         throw new Error("initializeWasm() must be awaited first!");
20246                 }
20247                 const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(encodeUint8Array(node_id), is_permanent);
20248                 return nativeResponseValue;
20249         }
20250         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
20251         export function NetworkUpdate_write(obj: number): Uint8Array {
20252                 if(!isWasmInitialized) {
20253                         throw new Error("initializeWasm() must be awaited first!");
20254                 }
20255                 const nativeResponseValue = wasm.TS_NetworkUpdate_write(obj);
20256                 return decodeUint8Array(nativeResponseValue);
20257         }
20258         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
20259         export function NetworkUpdate_read(ser: Uint8Array): number {
20260                 if(!isWasmInitialized) {
20261                         throw new Error("initializeWasm() must be awaited first!");
20262                 }
20263                 const nativeResponseValue = wasm.TS_NetworkUpdate_read(encodeUint8Array(ser));
20264                 return nativeResponseValue;
20265         }
20266         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
20267         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
20268                 if(!isWasmInitialized) {
20269                         throw new Error("initializeWasm() must be awaited first!");
20270                 }
20271                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_EventHandler(this_arg);
20272                 return nativeResponseValue;
20273         }
20274         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
20275         export function NetGraphMsgHandler_free(this_obj: number): void {
20276                 if(!isWasmInitialized) {
20277                         throw new Error("initializeWasm() must be awaited first!");
20278                 }
20279                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_free(this_obj);
20280                 // debug statements here
20281         }
20282         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
20283         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
20284                 if(!isWasmInitialized) {
20285                         throw new Error("initializeWasm() must be awaited first!");
20286                 }
20287                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_new(network_graph, chain_access, logger);
20288                 return nativeResponseValue;
20289         }
20290         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
20291         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
20292                 if(!isWasmInitialized) {
20293                         throw new Error("initializeWasm() must be awaited first!");
20294                 }
20295                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
20296                 // debug statements here
20297         }
20298         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
20299         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
20300                 if(!isWasmInitialized) {
20301                         throw new Error("initializeWasm() must be awaited first!");
20302                 }
20303                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
20304                 return nativeResponseValue;
20305         }
20306         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
20307         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
20308                 if(!isWasmInitialized) {
20309                         throw new Error("initializeWasm() must be awaited first!");
20310                 }
20311                 const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
20312                 return nativeResponseValue;
20313         }
20314         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
20315         export function DirectionalChannelInfo_free(this_obj: number): void {
20316                 if(!isWasmInitialized) {
20317                         throw new Error("initializeWasm() must be awaited first!");
20318                 }
20319                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_free(this_obj);
20320                 // debug statements here
20321         }
20322         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20323         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
20324                 if(!isWasmInitialized) {
20325                         throw new Error("initializeWasm() must be awaited first!");
20326                 }
20327                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update(this_ptr);
20328                 return nativeResponseValue;
20329         }
20330         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
20331         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
20332                 if(!isWasmInitialized) {
20333                         throw new Error("initializeWasm() must be awaited first!");
20334                 }
20335                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update(this_ptr, val);
20336                 // debug statements here
20337         }
20338         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20339         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
20340                 if(!isWasmInitialized) {
20341                         throw new Error("initializeWasm() must be awaited first!");
20342                 }
20343                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_enabled(this_ptr);
20344                 return nativeResponseValue;
20345         }
20346         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
20347         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
20348                 if(!isWasmInitialized) {
20349                         throw new Error("initializeWasm() must be awaited first!");
20350                 }
20351                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_enabled(this_ptr, val);
20352                 // debug statements here
20353         }
20354         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20355         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
20356                 if(!isWasmInitialized) {
20357                         throw new Error("initializeWasm() must be awaited first!");
20358                 }
20359                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
20360                 return nativeResponseValue;
20361         }
20362         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
20363         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
20364                 if(!isWasmInitialized) {
20365                         throw new Error("initializeWasm() must be awaited first!");
20366                 }
20367                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
20368                 // debug statements here
20369         }
20370         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20371         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
20372                 if(!isWasmInitialized) {
20373                         throw new Error("initializeWasm() must be awaited first!");
20374                 }
20375                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
20376                 return nativeResponseValue;
20377         }
20378         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
20379         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
20380                 if(!isWasmInitialized) {
20381                         throw new Error("initializeWasm() must be awaited first!");
20382                 }
20383                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
20384                 // debug statements here
20385         }
20386         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20387         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
20388                 if(!isWasmInitialized) {
20389                         throw new Error("initializeWasm() must be awaited first!");
20390                 }
20391                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
20392                 return nativeResponseValue;
20393         }
20394         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20395         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
20396                 if(!isWasmInitialized) {
20397                         throw new Error("initializeWasm() must be awaited first!");
20398                 }
20399                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
20400                 // debug statements here
20401         }
20402         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20403         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
20404                 if(!isWasmInitialized) {
20405                         throw new Error("initializeWasm() must be awaited first!");
20406                 }
20407                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_fees(this_ptr);
20408                 return nativeResponseValue;
20409         }
20410         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
20411         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
20412                 if(!isWasmInitialized) {
20413                         throw new Error("initializeWasm() must be awaited first!");
20414                 }
20415                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_fees(this_ptr, val);
20416                 // debug statements here
20417         }
20418         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
20419         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
20420                 if(!isWasmInitialized) {
20421                         throw new Error("initializeWasm() must be awaited first!");
20422                 }
20423                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update_message(this_ptr);
20424                 return nativeResponseValue;
20425         }
20426         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
20427         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
20428                 if(!isWasmInitialized) {
20429                         throw new Error("initializeWasm() must be awaited first!");
20430                 }
20431                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update_message(this_ptr, val);
20432                 // debug statements here
20433         }
20434         // 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);
20435         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 {
20436                 if(!isWasmInitialized) {
20437                         throw new Error("initializeWasm() must be awaited first!");
20438                 }
20439                 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);
20440                 return nativeResponseValue;
20441         }
20442         // uint64_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
20443         export function DirectionalChannelInfo_clone_ptr(arg: number): number {
20444                 if(!isWasmInitialized) {
20445                         throw new Error("initializeWasm() must be awaited first!");
20446                 }
20447                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone_ptr(arg);
20448                 return nativeResponseValue;
20449         }
20450         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
20451         export function DirectionalChannelInfo_clone(orig: number): number {
20452                 if(!isWasmInitialized) {
20453                         throw new Error("initializeWasm() must be awaited first!");
20454                 }
20455                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone(orig);
20456                 return nativeResponseValue;
20457         }
20458         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
20459         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
20460                 if(!isWasmInitialized) {
20461                         throw new Error("initializeWasm() must be awaited first!");
20462                 }
20463                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_write(obj);
20464                 return decodeUint8Array(nativeResponseValue);
20465         }
20466         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
20467         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
20468                 if(!isWasmInitialized) {
20469                         throw new Error("initializeWasm() must be awaited first!");
20470                 }
20471                 const nativeResponseValue = wasm.TS_DirectionalChannelInfo_read(encodeUint8Array(ser));
20472                 return nativeResponseValue;
20473         }
20474         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
20475         export function ChannelInfo_free(this_obj: number): void {
20476                 if(!isWasmInitialized) {
20477                         throw new Error("initializeWasm() must be awaited first!");
20478                 }
20479                 const nativeResponseValue = wasm.TS_ChannelInfo_free(this_obj);
20480                 // debug statements here
20481         }
20482         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20483         export function ChannelInfo_get_features(this_ptr: number): number {
20484                 if(!isWasmInitialized) {
20485                         throw new Error("initializeWasm() must be awaited first!");
20486                 }
20487                 const nativeResponseValue = wasm.TS_ChannelInfo_get_features(this_ptr);
20488                 return nativeResponseValue;
20489         }
20490         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
20491         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
20492                 if(!isWasmInitialized) {
20493                         throw new Error("initializeWasm() must be awaited first!");
20494                 }
20495                 const nativeResponseValue = wasm.TS_ChannelInfo_set_features(this_ptr, val);
20496                 // debug statements here
20497         }
20498         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20499         export function ChannelInfo_get_node_one(this_ptr: number): number {
20500                 if(!isWasmInitialized) {
20501                         throw new Error("initializeWasm() must be awaited first!");
20502                 }
20503                 const nativeResponseValue = wasm.TS_ChannelInfo_get_node_one(this_ptr);
20504                 return nativeResponseValue;
20505         }
20506         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
20507         export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
20508                 if(!isWasmInitialized) {
20509                         throw new Error("initializeWasm() must be awaited first!");
20510                 }
20511                 const nativeResponseValue = wasm.TS_ChannelInfo_set_node_one(this_ptr, val);
20512                 // debug statements here
20513         }
20514         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20515         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
20516                 if(!isWasmInitialized) {
20517                         throw new Error("initializeWasm() must be awaited first!");
20518                 }
20519                 const nativeResponseValue = wasm.TS_ChannelInfo_get_one_to_two(this_ptr);
20520                 return nativeResponseValue;
20521         }
20522         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
20523         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
20524                 if(!isWasmInitialized) {
20525                         throw new Error("initializeWasm() must be awaited first!");
20526                 }
20527                 const nativeResponseValue = wasm.TS_ChannelInfo_set_one_to_two(this_ptr, val);
20528                 // debug statements here
20529         }
20530         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20531         export function ChannelInfo_get_node_two(this_ptr: number): number {
20532                 if(!isWasmInitialized) {
20533                         throw new Error("initializeWasm() must be awaited first!");
20534                 }
20535                 const nativeResponseValue = wasm.TS_ChannelInfo_get_node_two(this_ptr);
20536                 return nativeResponseValue;
20537         }
20538         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
20539         export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
20540                 if(!isWasmInitialized) {
20541                         throw new Error("initializeWasm() must be awaited first!");
20542                 }
20543                 const nativeResponseValue = wasm.TS_ChannelInfo_set_node_two(this_ptr, val);
20544                 // debug statements here
20545         }
20546         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20547         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
20548                 if(!isWasmInitialized) {
20549                         throw new Error("initializeWasm() must be awaited first!");
20550                 }
20551                 const nativeResponseValue = wasm.TS_ChannelInfo_get_two_to_one(this_ptr);
20552                 return nativeResponseValue;
20553         }
20554         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
20555         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
20556                 if(!isWasmInitialized) {
20557                         throw new Error("initializeWasm() must be awaited first!");
20558                 }
20559                 const nativeResponseValue = wasm.TS_ChannelInfo_set_two_to_one(this_ptr, val);
20560                 // debug statements here
20561         }
20562         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20563         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
20564                 if(!isWasmInitialized) {
20565                         throw new Error("initializeWasm() must be awaited first!");
20566                 }
20567                 const nativeResponseValue = wasm.TS_ChannelInfo_get_capacity_sats(this_ptr);
20568                 return nativeResponseValue;
20569         }
20570         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20571         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
20572                 if(!isWasmInitialized) {
20573                         throw new Error("initializeWasm() must be awaited first!");
20574                 }
20575                 const nativeResponseValue = wasm.TS_ChannelInfo_set_capacity_sats(this_ptr, val);
20576                 // debug statements here
20577         }
20578         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
20579         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
20580                 if(!isWasmInitialized) {
20581                         throw new Error("initializeWasm() must be awaited first!");
20582                 }
20583                 const nativeResponseValue = wasm.TS_ChannelInfo_get_announcement_message(this_ptr);
20584                 return nativeResponseValue;
20585         }
20586         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
20587         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
20588                 if(!isWasmInitialized) {
20589                         throw new Error("initializeWasm() must be awaited first!");
20590                 }
20591                 const nativeResponseValue = wasm.TS_ChannelInfo_set_announcement_message(this_ptr, val);
20592                 // debug statements here
20593         }
20594         // uint64_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
20595         export function ChannelInfo_clone_ptr(arg: number): number {
20596                 if(!isWasmInitialized) {
20597                         throw new Error("initializeWasm() must be awaited first!");
20598                 }
20599                 const nativeResponseValue = wasm.TS_ChannelInfo_clone_ptr(arg);
20600                 return nativeResponseValue;
20601         }
20602         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
20603         export function ChannelInfo_clone(orig: number): number {
20604                 if(!isWasmInitialized) {
20605                         throw new Error("initializeWasm() must be awaited first!");
20606                 }
20607                 const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
20608                 return nativeResponseValue;
20609         }
20610         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
20611         export function ChannelInfo_write(obj: number): Uint8Array {
20612                 if(!isWasmInitialized) {
20613                         throw new Error("initializeWasm() must be awaited first!");
20614                 }
20615                 const nativeResponseValue = wasm.TS_ChannelInfo_write(obj);
20616                 return decodeUint8Array(nativeResponseValue);
20617         }
20618         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
20619         export function ChannelInfo_read(ser: Uint8Array): number {
20620                 if(!isWasmInitialized) {
20621                         throw new Error("initializeWasm() must be awaited first!");
20622                 }
20623                 const nativeResponseValue = wasm.TS_ChannelInfo_read(encodeUint8Array(ser));
20624                 return nativeResponseValue;
20625         }
20626         // void RoutingFees_free(struct LDKRoutingFees this_obj);
20627         export function RoutingFees_free(this_obj: number): void {
20628                 if(!isWasmInitialized) {
20629                         throw new Error("initializeWasm() must be awaited first!");
20630                 }
20631                 const nativeResponseValue = wasm.TS_RoutingFees_free(this_obj);
20632                 // debug statements here
20633         }
20634         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
20635         export function RoutingFees_get_base_msat(this_ptr: number): number {
20636                 if(!isWasmInitialized) {
20637                         throw new Error("initializeWasm() must be awaited first!");
20638                 }
20639                 const nativeResponseValue = wasm.TS_RoutingFees_get_base_msat(this_ptr);
20640                 return nativeResponseValue;
20641         }
20642         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
20643         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
20644                 if(!isWasmInitialized) {
20645                         throw new Error("initializeWasm() must be awaited first!");
20646                 }
20647                 const nativeResponseValue = wasm.TS_RoutingFees_set_base_msat(this_ptr, val);
20648                 // debug statements here
20649         }
20650         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
20651         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
20652                 if(!isWasmInitialized) {
20653                         throw new Error("initializeWasm() must be awaited first!");
20654                 }
20655                 const nativeResponseValue = wasm.TS_RoutingFees_get_proportional_millionths(this_ptr);
20656                 return nativeResponseValue;
20657         }
20658         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
20659         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
20660                 if(!isWasmInitialized) {
20661                         throw new Error("initializeWasm() must be awaited first!");
20662                 }
20663                 const nativeResponseValue = wasm.TS_RoutingFees_set_proportional_millionths(this_ptr, val);
20664                 // debug statements here
20665         }
20666         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
20667         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
20668                 if(!isWasmInitialized) {
20669                         throw new Error("initializeWasm() must be awaited first!");
20670                 }
20671                 const nativeResponseValue = wasm.TS_RoutingFees_new(base_msat_arg, proportional_millionths_arg);
20672                 return nativeResponseValue;
20673         }
20674         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
20675         export function RoutingFees_eq(a: number, b: number): boolean {
20676                 if(!isWasmInitialized) {
20677                         throw new Error("initializeWasm() must be awaited first!");
20678                 }
20679                 const nativeResponseValue = wasm.TS_RoutingFees_eq(a, b);
20680                 return nativeResponseValue;
20681         }
20682         // uint64_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
20683         export function RoutingFees_clone_ptr(arg: number): number {
20684                 if(!isWasmInitialized) {
20685                         throw new Error("initializeWasm() must be awaited first!");
20686                 }
20687                 const nativeResponseValue = wasm.TS_RoutingFees_clone_ptr(arg);
20688                 return nativeResponseValue;
20689         }
20690         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
20691         export function RoutingFees_clone(orig: number): number {
20692                 if(!isWasmInitialized) {
20693                         throw new Error("initializeWasm() must be awaited first!");
20694                 }
20695                 const nativeResponseValue = wasm.TS_RoutingFees_clone(orig);
20696                 return nativeResponseValue;
20697         }
20698         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
20699         export function RoutingFees_hash(o: number): number {
20700                 if(!isWasmInitialized) {
20701                         throw new Error("initializeWasm() must be awaited first!");
20702                 }
20703                 const nativeResponseValue = wasm.TS_RoutingFees_hash(o);
20704                 return nativeResponseValue;
20705         }
20706         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
20707         export function RoutingFees_write(obj: number): Uint8Array {
20708                 if(!isWasmInitialized) {
20709                         throw new Error("initializeWasm() must be awaited first!");
20710                 }
20711                 const nativeResponseValue = wasm.TS_RoutingFees_write(obj);
20712                 return decodeUint8Array(nativeResponseValue);
20713         }
20714         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
20715         export function RoutingFees_read(ser: Uint8Array): number {
20716                 if(!isWasmInitialized) {
20717                         throw new Error("initializeWasm() must be awaited first!");
20718                 }
20719                 const nativeResponseValue = wasm.TS_RoutingFees_read(encodeUint8Array(ser));
20720                 return nativeResponseValue;
20721         }
20722         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
20723         export function NodeAnnouncementInfo_free(this_obj: number): void {
20724                 if(!isWasmInitialized) {
20725                         throw new Error("initializeWasm() must be awaited first!");
20726                 }
20727                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_free(this_obj);
20728                 // debug statements here
20729         }
20730         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20731         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
20732                 if(!isWasmInitialized) {
20733                         throw new Error("initializeWasm() must be awaited first!");
20734                 }
20735                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_features(this_ptr);
20736                 return nativeResponseValue;
20737         }
20738         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
20739         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
20740                 if(!isWasmInitialized) {
20741                         throw new Error("initializeWasm() must be awaited first!");
20742                 }
20743                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_features(this_ptr, val);
20744                 // debug statements here
20745         }
20746         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20747         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
20748                 if(!isWasmInitialized) {
20749                         throw new Error("initializeWasm() must be awaited first!");
20750                 }
20751                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_last_update(this_ptr);
20752                 return nativeResponseValue;
20753         }
20754         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
20755         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
20756                 if(!isWasmInitialized) {
20757                         throw new Error("initializeWasm() must be awaited first!");
20758                 }
20759                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_last_update(this_ptr, val);
20760                 // debug statements here
20761         }
20762         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
20763         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
20764                 if(!isWasmInitialized) {
20765                         throw new Error("initializeWasm() must be awaited first!");
20766                 }
20767                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_rgb(this_ptr);
20768                 return decodeUint8Array(nativeResponseValue);
20769         }
20770         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
20771         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
20772                 if(!isWasmInitialized) {
20773                         throw new Error("initializeWasm() must be awaited first!");
20774                 }
20775                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_rgb(this_ptr, encodeUint8Array(val));
20776                 // debug statements here
20777         }
20778         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
20779         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
20780                 if(!isWasmInitialized) {
20781                         throw new Error("initializeWasm() must be awaited first!");
20782                 }
20783                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_alias(this_ptr);
20784                 return decodeUint8Array(nativeResponseValue);
20785         }
20786         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
20787         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
20788                 if(!isWasmInitialized) {
20789                         throw new Error("initializeWasm() must be awaited first!");
20790                 }
20791                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, encodeUint8Array(val));
20792                 // debug statements here
20793         }
20794         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
20795         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
20796                 if(!isWasmInitialized) {
20797                         throw new Error("initializeWasm() must be awaited first!");
20798                 }
20799                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_addresses(this_ptr, val);
20800                 // debug statements here
20801         }
20802         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
20803         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
20804                 if(!isWasmInitialized) {
20805                         throw new Error("initializeWasm() must be awaited first!");
20806                 }
20807                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_announcement_message(this_ptr);
20808                 return nativeResponseValue;
20809         }
20810         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
20811         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
20812                 if(!isWasmInitialized) {
20813                         throw new Error("initializeWasm() must be awaited first!");
20814                 }
20815                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
20816                 // debug statements here
20817         }
20818         // 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);
20819         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 {
20820                 if(!isWasmInitialized) {
20821                         throw new Error("initializeWasm() must be awaited first!");
20822                 }
20823                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeUint8Array(rgb_arg), encodeUint8Array(alias_arg), addresses_arg, announcement_message_arg);
20824                 return nativeResponseValue;
20825         }
20826         // uint64_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
20827         export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
20828                 if(!isWasmInitialized) {
20829                         throw new Error("initializeWasm() must be awaited first!");
20830                 }
20831                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone_ptr(arg);
20832                 return nativeResponseValue;
20833         }
20834         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
20835         export function NodeAnnouncementInfo_clone(orig: number): number {
20836                 if(!isWasmInitialized) {
20837                         throw new Error("initializeWasm() must be awaited first!");
20838                 }
20839                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
20840                 return nativeResponseValue;
20841         }
20842         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
20843         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
20844                 if(!isWasmInitialized) {
20845                         throw new Error("initializeWasm() must be awaited first!");
20846                 }
20847                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_write(obj);
20848                 return decodeUint8Array(nativeResponseValue);
20849         }
20850         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
20851         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
20852                 if(!isWasmInitialized) {
20853                         throw new Error("initializeWasm() must be awaited first!");
20854                 }
20855                 const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_read(encodeUint8Array(ser));
20856                 return nativeResponseValue;
20857         }
20858         // void NodeInfo_free(struct LDKNodeInfo this_obj);
20859         export function NodeInfo_free(this_obj: number): void {
20860                 if(!isWasmInitialized) {
20861                         throw new Error("initializeWasm() must be awaited first!");
20862                 }
20863                 const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
20864                 // debug statements here
20865         }
20866         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
20867         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
20868                 if(!isWasmInitialized) {
20869                         throw new Error("initializeWasm() must be awaited first!");
20870                 }
20871                 const nativeResponseValue = wasm.TS_NodeInfo_set_channels(this_ptr, val);
20872                 // debug statements here
20873         }
20874         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
20875         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
20876                 if(!isWasmInitialized) {
20877                         throw new Error("initializeWasm() must be awaited first!");
20878                 }
20879                 const nativeResponseValue = wasm.TS_NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
20880                 return nativeResponseValue;
20881         }
20882         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
20883         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
20884                 if(!isWasmInitialized) {
20885                         throw new Error("initializeWasm() must be awaited first!");
20886                 }
20887                 const nativeResponseValue = wasm.TS_NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
20888                 // debug statements here
20889         }
20890         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
20891         export function NodeInfo_get_announcement_info(this_ptr: number): number {
20892                 if(!isWasmInitialized) {
20893                         throw new Error("initializeWasm() must be awaited first!");
20894                 }
20895                 const nativeResponseValue = wasm.TS_NodeInfo_get_announcement_info(this_ptr);
20896                 return nativeResponseValue;
20897         }
20898         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
20899         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
20900                 if(!isWasmInitialized) {
20901                         throw new Error("initializeWasm() must be awaited first!");
20902                 }
20903                 const nativeResponseValue = wasm.TS_NodeInfo_set_announcement_info(this_ptr, val);
20904                 // debug statements here
20905         }
20906         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
20907         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
20908                 if(!isWasmInitialized) {
20909                         throw new Error("initializeWasm() must be awaited first!");
20910                 }
20911                 const nativeResponseValue = wasm.TS_NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
20912                 return nativeResponseValue;
20913         }
20914         // uint64_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
20915         export function NodeInfo_clone_ptr(arg: number): number {
20916                 if(!isWasmInitialized) {
20917                         throw new Error("initializeWasm() must be awaited first!");
20918                 }
20919                 const nativeResponseValue = wasm.TS_NodeInfo_clone_ptr(arg);
20920                 return nativeResponseValue;
20921         }
20922         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
20923         export function NodeInfo_clone(orig: number): number {
20924                 if(!isWasmInitialized) {
20925                         throw new Error("initializeWasm() must be awaited first!");
20926                 }
20927                 const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
20928                 return nativeResponseValue;
20929         }
20930         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
20931         export function NodeInfo_write(obj: number): Uint8Array {
20932                 if(!isWasmInitialized) {
20933                         throw new Error("initializeWasm() must be awaited first!");
20934                 }
20935                 const nativeResponseValue = wasm.TS_NodeInfo_write(obj);
20936                 return decodeUint8Array(nativeResponseValue);
20937         }
20938         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
20939         export function NodeInfo_read(ser: Uint8Array): number {
20940                 if(!isWasmInitialized) {
20941                         throw new Error("initializeWasm() must be awaited first!");
20942                 }
20943                 const nativeResponseValue = wasm.TS_NodeInfo_read(encodeUint8Array(ser));
20944                 return nativeResponseValue;
20945         }
20946         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
20947         export function NetworkGraph_write(obj: number): Uint8Array {
20948                 if(!isWasmInitialized) {
20949                         throw new Error("initializeWasm() must be awaited first!");
20950                 }
20951                 const nativeResponseValue = wasm.TS_NetworkGraph_write(obj);
20952                 return decodeUint8Array(nativeResponseValue);
20953         }
20954         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
20955         export function NetworkGraph_read(ser: Uint8Array): number {
20956                 if(!isWasmInitialized) {
20957                         throw new Error("initializeWasm() must be awaited first!");
20958                 }
20959                 const nativeResponseValue = wasm.TS_NetworkGraph_read(encodeUint8Array(ser));
20960                 return nativeResponseValue;
20961         }
20962         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
20963         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
20964                 if(!isWasmInitialized) {
20965                         throw new Error("initializeWasm() must be awaited first!");
20966                 }
20967                 const nativeResponseValue = wasm.TS_NetworkGraph_new(encodeUint8Array(genesis_hash));
20968                 return nativeResponseValue;
20969         }
20970         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
20971         export function NetworkGraph_read_only(this_arg: number): number {
20972                 if(!isWasmInitialized) {
20973                         throw new Error("initializeWasm() must be awaited first!");
20974                 }
20975                 const nativeResponseValue = wasm.TS_NetworkGraph_read_only(this_arg);
20976                 return nativeResponseValue;
20977         }
20978         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
20979         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
20980                 if(!isWasmInitialized) {
20981                         throw new Error("initializeWasm() must be awaited first!");
20982                 }
20983                 const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_announcement(this_arg, msg);
20984                 return nativeResponseValue;
20985         }
20986         // 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);
20987         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
20988                 if(!isWasmInitialized) {
20989                         throw new Error("initializeWasm() must be awaited first!");
20990                 }
20991                 const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
20992                 return nativeResponseValue;
20993         }
20994         // 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);
20995         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
20996                 if(!isWasmInitialized) {
20997                         throw new Error("initializeWasm() must be awaited first!");
20998                 }
20999                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
21000                 return nativeResponseValue;
21001         }
21002         // 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);
21003         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
21004                 if(!isWasmInitialized) {
21005                         throw new Error("initializeWasm() must be awaited first!");
21006                 }
21007                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
21008                 return nativeResponseValue;
21009         }
21010         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
21011         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
21012                 if(!isWasmInitialized) {
21013                         throw new Error("initializeWasm() must be awaited first!");
21014                 }
21015                 const nativeResponseValue = wasm.TS_NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
21016                 // debug statements here
21017         }
21018         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
21019         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
21020                 if(!isWasmInitialized) {
21021                         throw new Error("initializeWasm() must be awaited first!");
21022                 }
21023                 const nativeResponseValue = wasm.TS_NetworkGraph_fail_node(this_arg, encodeUint8Array(_node_id), is_permanent);
21024                 // debug statements here
21025         }
21026         // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
21027         export function NetworkGraph_remove_stale_channels_with_time(this_arg: number, current_time_unix: number): void {
21028                 if(!isWasmInitialized) {
21029                         throw new Error("initializeWasm() must be awaited first!");
21030                 }
21031                 const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
21032                 // debug statements here
21033         }
21034         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
21035         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
21036                 if(!isWasmInitialized) {
21037                         throw new Error("initializeWasm() must be awaited first!");
21038                 }
21039                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel(this_arg, msg);
21040                 return nativeResponseValue;
21041         }
21042         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
21043         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
21044                 if(!isWasmInitialized) {
21045                         throw new Error("initializeWasm() must be awaited first!");
21046                 }
21047                 const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_unsigned(this_arg, msg);
21048                 return nativeResponseValue;
21049         }
21050         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
21051         export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
21052                 if(!isWasmInitialized) {
21053                         throw new Error("initializeWasm() must be awaited first!");
21054                 }
21055                 const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_get_addresses(this_arg, encodeUint8Array(pubkey));
21056                 return nativeResponseValue;
21057         }
21058         // void RouteHop_free(struct LDKRouteHop this_obj);
21059         export function RouteHop_free(this_obj: number): void {
21060                 if(!isWasmInitialized) {
21061                         throw new Error("initializeWasm() must be awaited first!");
21062                 }
21063                 const nativeResponseValue = wasm.TS_RouteHop_free(this_obj);
21064                 // debug statements here
21065         }
21066         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21067         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
21068                 if(!isWasmInitialized) {
21069                         throw new Error("initializeWasm() must be awaited first!");
21070                 }
21071                 const nativeResponseValue = wasm.TS_RouteHop_get_pubkey(this_ptr);
21072                 return decodeUint8Array(nativeResponseValue);
21073         }
21074         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21075         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
21076                 if(!isWasmInitialized) {
21077                         throw new Error("initializeWasm() must be awaited first!");
21078                 }
21079                 const nativeResponseValue = wasm.TS_RouteHop_set_pubkey(this_ptr, encodeUint8Array(val));
21080                 // debug statements here
21081         }
21082         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21083         export function RouteHop_get_node_features(this_ptr: number): number {
21084                 if(!isWasmInitialized) {
21085                         throw new Error("initializeWasm() must be awaited first!");
21086                 }
21087                 const nativeResponseValue = wasm.TS_RouteHop_get_node_features(this_ptr);
21088                 return nativeResponseValue;
21089         }
21090         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
21091         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
21092                 if(!isWasmInitialized) {
21093                         throw new Error("initializeWasm() must be awaited first!");
21094                 }
21095                 const nativeResponseValue = wasm.TS_RouteHop_set_node_features(this_ptr, val);
21096                 // debug statements here
21097         }
21098         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21099         export function RouteHop_get_short_channel_id(this_ptr: number): number {
21100                 if(!isWasmInitialized) {
21101                         throw new Error("initializeWasm() must be awaited first!");
21102                 }
21103                 const nativeResponseValue = wasm.TS_RouteHop_get_short_channel_id(this_ptr);
21104                 return nativeResponseValue;
21105         }
21106         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
21107         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
21108                 if(!isWasmInitialized) {
21109                         throw new Error("initializeWasm() must be awaited first!");
21110                 }
21111                 const nativeResponseValue = wasm.TS_RouteHop_set_short_channel_id(this_ptr, val);
21112                 // debug statements here
21113         }
21114         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21115         export function RouteHop_get_channel_features(this_ptr: number): number {
21116                 if(!isWasmInitialized) {
21117                         throw new Error("initializeWasm() must be awaited first!");
21118                 }
21119                 const nativeResponseValue = wasm.TS_RouteHop_get_channel_features(this_ptr);
21120                 return nativeResponseValue;
21121         }
21122         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
21123         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
21124                 if(!isWasmInitialized) {
21125                         throw new Error("initializeWasm() must be awaited first!");
21126                 }
21127                 const nativeResponseValue = wasm.TS_RouteHop_set_channel_features(this_ptr, val);
21128                 // debug statements here
21129         }
21130         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21131         export function RouteHop_get_fee_msat(this_ptr: number): number {
21132                 if(!isWasmInitialized) {
21133                         throw new Error("initializeWasm() must be awaited first!");
21134                 }
21135                 const nativeResponseValue = wasm.TS_RouteHop_get_fee_msat(this_ptr);
21136                 return nativeResponseValue;
21137         }
21138         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
21139         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
21140                 if(!isWasmInitialized) {
21141                         throw new Error("initializeWasm() must be awaited first!");
21142                 }
21143                 const nativeResponseValue = wasm.TS_RouteHop_set_fee_msat(this_ptr, val);
21144                 // debug statements here
21145         }
21146         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21147         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
21148                 if(!isWasmInitialized) {
21149                         throw new Error("initializeWasm() must be awaited first!");
21150                 }
21151                 const nativeResponseValue = wasm.TS_RouteHop_get_cltv_expiry_delta(this_ptr);
21152                 return nativeResponseValue;
21153         }
21154         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
21155         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21156                 if(!isWasmInitialized) {
21157                         throw new Error("initializeWasm() must be awaited first!");
21158                 }
21159                 const nativeResponseValue = wasm.TS_RouteHop_set_cltv_expiry_delta(this_ptr, val);
21160                 // debug statements here
21161         }
21162         // 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);
21163         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 {
21164                 if(!isWasmInitialized) {
21165                         throw new Error("initializeWasm() must be awaited first!");
21166                 }
21167                 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);
21168                 return nativeResponseValue;
21169         }
21170         // uint64_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
21171         export function RouteHop_clone_ptr(arg: number): number {
21172                 if(!isWasmInitialized) {
21173                         throw new Error("initializeWasm() must be awaited first!");
21174                 }
21175                 const nativeResponseValue = wasm.TS_RouteHop_clone_ptr(arg);
21176                 return nativeResponseValue;
21177         }
21178         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
21179         export function RouteHop_clone(orig: number): number {
21180                 if(!isWasmInitialized) {
21181                         throw new Error("initializeWasm() must be awaited first!");
21182                 }
21183                 const nativeResponseValue = wasm.TS_RouteHop_clone(orig);
21184                 return nativeResponseValue;
21185         }
21186         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
21187         export function RouteHop_hash(o: number): number {
21188                 if(!isWasmInitialized) {
21189                         throw new Error("initializeWasm() must be awaited first!");
21190                 }
21191                 const nativeResponseValue = wasm.TS_RouteHop_hash(o);
21192                 return nativeResponseValue;
21193         }
21194         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
21195         export function RouteHop_eq(a: number, b: number): boolean {
21196                 if(!isWasmInitialized) {
21197                         throw new Error("initializeWasm() must be awaited first!");
21198                 }
21199                 const nativeResponseValue = wasm.TS_RouteHop_eq(a, b);
21200                 return nativeResponseValue;
21201         }
21202         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
21203         export function RouteHop_write(obj: number): Uint8Array {
21204                 if(!isWasmInitialized) {
21205                         throw new Error("initializeWasm() must be awaited first!");
21206                 }
21207                 const nativeResponseValue = wasm.TS_RouteHop_write(obj);
21208                 return decodeUint8Array(nativeResponseValue);
21209         }
21210         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
21211         export function RouteHop_read(ser: Uint8Array): number {
21212                 if(!isWasmInitialized) {
21213                         throw new Error("initializeWasm() must be awaited first!");
21214                 }
21215                 const nativeResponseValue = wasm.TS_RouteHop_read(encodeUint8Array(ser));
21216                 return nativeResponseValue;
21217         }
21218         // void Route_free(struct LDKRoute this_obj);
21219         export function Route_free(this_obj: number): void {
21220                 if(!isWasmInitialized) {
21221                         throw new Error("initializeWasm() must be awaited first!");
21222                 }
21223                 const nativeResponseValue = wasm.TS_Route_free(this_obj);
21224                 // debug statements here
21225         }
21226         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
21227         export function Route_get_paths(this_ptr: number): number[][] {
21228                 if(!isWasmInitialized) {
21229                         throw new Error("initializeWasm() must be awaited first!");
21230                 }
21231                 const nativeResponseValue = wasm.TS_Route_get_paths(this_ptr);
21232                 return nativeResponseValue;
21233         }
21234         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
21235         export function Route_set_paths(this_ptr: number, val: number[][]): void {
21236                 if(!isWasmInitialized) {
21237                         throw new Error("initializeWasm() must be awaited first!");
21238                 }
21239                 const nativeResponseValue = wasm.TS_Route_set_paths(this_ptr, val);
21240                 // debug statements here
21241         }
21242         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
21243         export function Route_get_payee(this_ptr: number): number {
21244                 if(!isWasmInitialized) {
21245                         throw new Error("initializeWasm() must be awaited first!");
21246                 }
21247                 const nativeResponseValue = wasm.TS_Route_get_payee(this_ptr);
21248                 return nativeResponseValue;
21249         }
21250         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
21251         export function Route_set_payee(this_ptr: number, val: number): void {
21252                 if(!isWasmInitialized) {
21253                         throw new Error("initializeWasm() must be awaited first!");
21254                 }
21255                 const nativeResponseValue = wasm.TS_Route_set_payee(this_ptr, val);
21256                 // debug statements here
21257         }
21258         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
21259         export function Route_new(paths_arg: number[][], payee_arg: number): number {
21260                 if(!isWasmInitialized) {
21261                         throw new Error("initializeWasm() must be awaited first!");
21262                 }
21263                 const nativeResponseValue = wasm.TS_Route_new(paths_arg, payee_arg);
21264                 return nativeResponseValue;
21265         }
21266         // uint64_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
21267         export function Route_clone_ptr(arg: number): number {
21268                 if(!isWasmInitialized) {
21269                         throw new Error("initializeWasm() must be awaited first!");
21270                 }
21271                 const nativeResponseValue = wasm.TS_Route_clone_ptr(arg);
21272                 return nativeResponseValue;
21273         }
21274         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
21275         export function Route_clone(orig: number): number {
21276                 if(!isWasmInitialized) {
21277                         throw new Error("initializeWasm() must be awaited first!");
21278                 }
21279                 const nativeResponseValue = wasm.TS_Route_clone(orig);
21280                 return nativeResponseValue;
21281         }
21282         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
21283         export function Route_hash(o: number): number {
21284                 if(!isWasmInitialized) {
21285                         throw new Error("initializeWasm() must be awaited first!");
21286                 }
21287                 const nativeResponseValue = wasm.TS_Route_hash(o);
21288                 return nativeResponseValue;
21289         }
21290         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
21291         export function Route_eq(a: number, b: number): boolean {
21292                 if(!isWasmInitialized) {
21293                         throw new Error("initializeWasm() must be awaited first!");
21294                 }
21295                 const nativeResponseValue = wasm.TS_Route_eq(a, b);
21296                 return nativeResponseValue;
21297         }
21298         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
21299         export function Route_get_total_fees(this_arg: number): number {
21300                 if(!isWasmInitialized) {
21301                         throw new Error("initializeWasm() must be awaited first!");
21302                 }
21303                 const nativeResponseValue = wasm.TS_Route_get_total_fees(this_arg);
21304                 return nativeResponseValue;
21305         }
21306         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
21307         export function Route_get_total_amount(this_arg: number): number {
21308                 if(!isWasmInitialized) {
21309                         throw new Error("initializeWasm() must be awaited first!");
21310                 }
21311                 const nativeResponseValue = wasm.TS_Route_get_total_amount(this_arg);
21312                 return nativeResponseValue;
21313         }
21314         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
21315         export function Route_write(obj: number): Uint8Array {
21316                 if(!isWasmInitialized) {
21317                         throw new Error("initializeWasm() must be awaited first!");
21318                 }
21319                 const nativeResponseValue = wasm.TS_Route_write(obj);
21320                 return decodeUint8Array(nativeResponseValue);
21321         }
21322         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
21323         export function Route_read(ser: Uint8Array): number {
21324                 if(!isWasmInitialized) {
21325                         throw new Error("initializeWasm() must be awaited first!");
21326                 }
21327                 const nativeResponseValue = wasm.TS_Route_read(encodeUint8Array(ser));
21328                 return nativeResponseValue;
21329         }
21330         // void RouteParameters_free(struct LDKRouteParameters this_obj);
21331         export function RouteParameters_free(this_obj: number): void {
21332                 if(!isWasmInitialized) {
21333                         throw new Error("initializeWasm() must be awaited first!");
21334                 }
21335                 const nativeResponseValue = wasm.TS_RouteParameters_free(this_obj);
21336                 // debug statements here
21337         }
21338         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
21339         export function RouteParameters_get_payee(this_ptr: number): number {
21340                 if(!isWasmInitialized) {
21341                         throw new Error("initializeWasm() must be awaited first!");
21342                 }
21343                 const nativeResponseValue = wasm.TS_RouteParameters_get_payee(this_ptr);
21344                 return nativeResponseValue;
21345         }
21346         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
21347         export function RouteParameters_set_payee(this_ptr: number, val: number): void {
21348                 if(!isWasmInitialized) {
21349                         throw new Error("initializeWasm() must be awaited first!");
21350                 }
21351                 const nativeResponseValue = wasm.TS_RouteParameters_set_payee(this_ptr, val);
21352                 // debug statements here
21353         }
21354         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
21355         export function RouteParameters_get_final_value_msat(this_ptr: number): number {
21356                 if(!isWasmInitialized) {
21357                         throw new Error("initializeWasm() must be awaited first!");
21358                 }
21359                 const nativeResponseValue = wasm.TS_RouteParameters_get_final_value_msat(this_ptr);
21360                 return nativeResponseValue;
21361         }
21362         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
21363         export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
21364                 if(!isWasmInitialized) {
21365                         throw new Error("initializeWasm() must be awaited first!");
21366                 }
21367                 const nativeResponseValue = wasm.TS_RouteParameters_set_final_value_msat(this_ptr, val);
21368                 // debug statements here
21369         }
21370         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
21371         export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
21372                 if(!isWasmInitialized) {
21373                         throw new Error("initializeWasm() must be awaited first!");
21374                 }
21375                 const nativeResponseValue = wasm.TS_RouteParameters_get_final_cltv_expiry_delta(this_ptr);
21376                 return nativeResponseValue;
21377         }
21378         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
21379         export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
21380                 if(!isWasmInitialized) {
21381                         throw new Error("initializeWasm() must be awaited first!");
21382                 }
21383                 const nativeResponseValue = wasm.TS_RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
21384                 // debug statements here
21385         }
21386         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
21387         export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
21388                 if(!isWasmInitialized) {
21389                         throw new Error("initializeWasm() must be awaited first!");
21390                 }
21391                 const nativeResponseValue = wasm.TS_RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
21392                 return nativeResponseValue;
21393         }
21394         // uint64_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
21395         export function RouteParameters_clone_ptr(arg: number): number {
21396                 if(!isWasmInitialized) {
21397                         throw new Error("initializeWasm() must be awaited first!");
21398                 }
21399                 const nativeResponseValue = wasm.TS_RouteParameters_clone_ptr(arg);
21400                 return nativeResponseValue;
21401         }
21402         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
21403         export function RouteParameters_clone(orig: number): number {
21404                 if(!isWasmInitialized) {
21405                         throw new Error("initializeWasm() must be awaited first!");
21406                 }
21407                 const nativeResponseValue = wasm.TS_RouteParameters_clone(orig);
21408                 return nativeResponseValue;
21409         }
21410         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
21411         export function RouteParameters_write(obj: number): Uint8Array {
21412                 if(!isWasmInitialized) {
21413                         throw new Error("initializeWasm() must be awaited first!");
21414                 }
21415                 const nativeResponseValue = wasm.TS_RouteParameters_write(obj);
21416                 return decodeUint8Array(nativeResponseValue);
21417         }
21418         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
21419         export function RouteParameters_read(ser: Uint8Array): number {
21420                 if(!isWasmInitialized) {
21421                         throw new Error("initializeWasm() must be awaited first!");
21422                 }
21423                 const nativeResponseValue = wasm.TS_RouteParameters_read(encodeUint8Array(ser));
21424                 return nativeResponseValue;
21425         }
21426         // void Payee_free(struct LDKPayee this_obj);
21427         export function Payee_free(this_obj: number): void {
21428                 if(!isWasmInitialized) {
21429                         throw new Error("initializeWasm() must be awaited first!");
21430                 }
21431                 const nativeResponseValue = wasm.TS_Payee_free(this_obj);
21432                 // debug statements here
21433         }
21434         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
21435         export function Payee_get_pubkey(this_ptr: number): Uint8Array {
21436                 if(!isWasmInitialized) {
21437                         throw new Error("initializeWasm() must be awaited first!");
21438                 }
21439                 const nativeResponseValue = wasm.TS_Payee_get_pubkey(this_ptr);
21440                 return decodeUint8Array(nativeResponseValue);
21441         }
21442         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21443         export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
21444                 if(!isWasmInitialized) {
21445                         throw new Error("initializeWasm() must be awaited first!");
21446                 }
21447                 const nativeResponseValue = wasm.TS_Payee_set_pubkey(this_ptr, encodeUint8Array(val));
21448                 // debug statements here
21449         }
21450         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
21451         export function Payee_get_features(this_ptr: number): number {
21452                 if(!isWasmInitialized) {
21453                         throw new Error("initializeWasm() must be awaited first!");
21454                 }
21455                 const nativeResponseValue = wasm.TS_Payee_get_features(this_ptr);
21456                 return nativeResponseValue;
21457         }
21458         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
21459         export function Payee_set_features(this_ptr: number, val: number): void {
21460                 if(!isWasmInitialized) {
21461                         throw new Error("initializeWasm() must be awaited first!");
21462                 }
21463                 const nativeResponseValue = wasm.TS_Payee_set_features(this_ptr, val);
21464                 // debug statements here
21465         }
21466         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
21467         export function Payee_get_route_hints(this_ptr: number): number[] {
21468                 if(!isWasmInitialized) {
21469                         throw new Error("initializeWasm() must be awaited first!");
21470                 }
21471                 const nativeResponseValue = wasm.TS_Payee_get_route_hints(this_ptr);
21472                 return nativeResponseValue;
21473         }
21474         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
21475         export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
21476                 if(!isWasmInitialized) {
21477                         throw new Error("initializeWasm() must be awaited first!");
21478                 }
21479                 const nativeResponseValue = wasm.TS_Payee_set_route_hints(this_ptr, val);
21480                 // debug statements here
21481         }
21482         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
21483         export function Payee_get_expiry_time(this_ptr: number): number {
21484                 if(!isWasmInitialized) {
21485                         throw new Error("initializeWasm() must be awaited first!");
21486                 }
21487                 const nativeResponseValue = wasm.TS_Payee_get_expiry_time(this_ptr);
21488                 return nativeResponseValue;
21489         }
21490         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21491         export function Payee_set_expiry_time(this_ptr: number, val: number): void {
21492                 if(!isWasmInitialized) {
21493                         throw new Error("initializeWasm() must be awaited first!");
21494                 }
21495                 const nativeResponseValue = wasm.TS_Payee_set_expiry_time(this_ptr, val);
21496                 // debug statements here
21497         }
21498         // 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);
21499         export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
21500                 if(!isWasmInitialized) {
21501                         throw new Error("initializeWasm() must be awaited first!");
21502                 }
21503                 const nativeResponseValue = wasm.TS_Payee_new(encodeUint8Array(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
21504                 return nativeResponseValue;
21505         }
21506         // uint64_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
21507         export function Payee_clone_ptr(arg: number): number {
21508                 if(!isWasmInitialized) {
21509                         throw new Error("initializeWasm() must be awaited first!");
21510                 }
21511                 const nativeResponseValue = wasm.TS_Payee_clone_ptr(arg);
21512                 return nativeResponseValue;
21513         }
21514         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
21515         export function Payee_clone(orig: number): number {
21516                 if(!isWasmInitialized) {
21517                         throw new Error("initializeWasm() must be awaited first!");
21518                 }
21519                 const nativeResponseValue = wasm.TS_Payee_clone(orig);
21520                 return nativeResponseValue;
21521         }
21522         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
21523         export function Payee_hash(o: number): number {
21524                 if(!isWasmInitialized) {
21525                         throw new Error("initializeWasm() must be awaited first!");
21526                 }
21527                 const nativeResponseValue = wasm.TS_Payee_hash(o);
21528                 return nativeResponseValue;
21529         }
21530         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
21531         export function Payee_eq(a: number, b: number): boolean {
21532                 if(!isWasmInitialized) {
21533                         throw new Error("initializeWasm() must be awaited first!");
21534                 }
21535                 const nativeResponseValue = wasm.TS_Payee_eq(a, b);
21536                 return nativeResponseValue;
21537         }
21538         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
21539         export function Payee_write(obj: number): Uint8Array {
21540                 if(!isWasmInitialized) {
21541                         throw new Error("initializeWasm() must be awaited first!");
21542                 }
21543                 const nativeResponseValue = wasm.TS_Payee_write(obj);
21544                 return decodeUint8Array(nativeResponseValue);
21545         }
21546         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
21547         export function Payee_read(ser: Uint8Array): number {
21548                 if(!isWasmInitialized) {
21549                         throw new Error("initializeWasm() must be awaited first!");
21550                 }
21551                 const nativeResponseValue = wasm.TS_Payee_read(encodeUint8Array(ser));
21552                 return nativeResponseValue;
21553         }
21554         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
21555         export function Payee_from_node_id(pubkey: Uint8Array): number {
21556                 if(!isWasmInitialized) {
21557                         throw new Error("initializeWasm() must be awaited first!");
21558                 }
21559                 const nativeResponseValue = wasm.TS_Payee_from_node_id(encodeUint8Array(pubkey));
21560                 return nativeResponseValue;
21561         }
21562         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
21563         export function Payee_for_keysend(pubkey: Uint8Array): number {
21564                 if(!isWasmInitialized) {
21565                         throw new Error("initializeWasm() must be awaited first!");
21566                 }
21567                 const nativeResponseValue = wasm.TS_Payee_for_keysend(encodeUint8Array(pubkey));
21568                 return nativeResponseValue;
21569         }
21570         // void RouteHint_free(struct LDKRouteHint this_obj);
21571         export function RouteHint_free(this_obj: number): void {
21572                 if(!isWasmInitialized) {
21573                         throw new Error("initializeWasm() must be awaited first!");
21574                 }
21575                 const nativeResponseValue = wasm.TS_RouteHint_free(this_obj);
21576                 // debug statements here
21577         }
21578         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
21579         export function RouteHint_get_a(this_ptr: number): number[] {
21580                 if(!isWasmInitialized) {
21581                         throw new Error("initializeWasm() must be awaited first!");
21582                 }
21583                 const nativeResponseValue = wasm.TS_RouteHint_get_a(this_ptr);
21584                 return nativeResponseValue;
21585         }
21586         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
21587         export function RouteHint_set_a(this_ptr: number, val: number[]): void {
21588                 if(!isWasmInitialized) {
21589                         throw new Error("initializeWasm() must be awaited first!");
21590                 }
21591                 const nativeResponseValue = wasm.TS_RouteHint_set_a(this_ptr, val);
21592                 // debug statements here
21593         }
21594         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
21595         export function RouteHint_new(a_arg: number[]): number {
21596                 if(!isWasmInitialized) {
21597                         throw new Error("initializeWasm() must be awaited first!");
21598                 }
21599                 const nativeResponseValue = wasm.TS_RouteHint_new(a_arg);
21600                 return nativeResponseValue;
21601         }
21602         // uint64_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
21603         export function RouteHint_clone_ptr(arg: number): number {
21604                 if(!isWasmInitialized) {
21605                         throw new Error("initializeWasm() must be awaited first!");
21606                 }
21607                 const nativeResponseValue = wasm.TS_RouteHint_clone_ptr(arg);
21608                 return nativeResponseValue;
21609         }
21610         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
21611         export function RouteHint_clone(orig: number): number {
21612                 if(!isWasmInitialized) {
21613                         throw new Error("initializeWasm() must be awaited first!");
21614                 }
21615                 const nativeResponseValue = wasm.TS_RouteHint_clone(orig);
21616                 return nativeResponseValue;
21617         }
21618         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
21619         export function RouteHint_hash(o: number): number {
21620                 if(!isWasmInitialized) {
21621                         throw new Error("initializeWasm() must be awaited first!");
21622                 }
21623                 const nativeResponseValue = wasm.TS_RouteHint_hash(o);
21624                 return nativeResponseValue;
21625         }
21626         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
21627         export function RouteHint_eq(a: number, b: number): boolean {
21628                 if(!isWasmInitialized) {
21629                         throw new Error("initializeWasm() must be awaited first!");
21630                 }
21631                 const nativeResponseValue = wasm.TS_RouteHint_eq(a, b);
21632                 return nativeResponseValue;
21633         }
21634         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
21635         export function RouteHint_write(obj: number): Uint8Array {
21636                 if(!isWasmInitialized) {
21637                         throw new Error("initializeWasm() must be awaited first!");
21638                 }
21639                 const nativeResponseValue = wasm.TS_RouteHint_write(obj);
21640                 return decodeUint8Array(nativeResponseValue);
21641         }
21642         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
21643         export function RouteHint_read(ser: Uint8Array): number {
21644                 if(!isWasmInitialized) {
21645                         throw new Error("initializeWasm() must be awaited first!");
21646                 }
21647                 const nativeResponseValue = wasm.TS_RouteHint_read(encodeUint8Array(ser));
21648                 return nativeResponseValue;
21649         }
21650         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
21651         export function RouteHintHop_free(this_obj: number): void {
21652                 if(!isWasmInitialized) {
21653                         throw new Error("initializeWasm() must be awaited first!");
21654                 }
21655                 const nativeResponseValue = wasm.TS_RouteHintHop_free(this_obj);
21656                 // debug statements here
21657         }
21658         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21659         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
21660                 if(!isWasmInitialized) {
21661                         throw new Error("initializeWasm() must be awaited first!");
21662                 }
21663                 const nativeResponseValue = wasm.TS_RouteHintHop_get_src_node_id(this_ptr);
21664                 return decodeUint8Array(nativeResponseValue);
21665         }
21666         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21667         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
21668                 if(!isWasmInitialized) {
21669                         throw new Error("initializeWasm() must be awaited first!");
21670                 }
21671                 const nativeResponseValue = wasm.TS_RouteHintHop_set_src_node_id(this_ptr, encodeUint8Array(val));
21672                 // debug statements here
21673         }
21674         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21675         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
21676                 if(!isWasmInitialized) {
21677                         throw new Error("initializeWasm() must be awaited first!");
21678                 }
21679                 const nativeResponseValue = wasm.TS_RouteHintHop_get_short_channel_id(this_ptr);
21680                 return nativeResponseValue;
21681         }
21682         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
21683         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
21684                 if(!isWasmInitialized) {
21685                         throw new Error("initializeWasm() must be awaited first!");
21686                 }
21687                 const nativeResponseValue = wasm.TS_RouteHintHop_set_short_channel_id(this_ptr, val);
21688                 // debug statements here
21689         }
21690         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21691         export function RouteHintHop_get_fees(this_ptr: number): number {
21692                 if(!isWasmInitialized) {
21693                         throw new Error("initializeWasm() must be awaited first!");
21694                 }
21695                 const nativeResponseValue = wasm.TS_RouteHintHop_get_fees(this_ptr);
21696                 return nativeResponseValue;
21697         }
21698         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
21699         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
21700                 if(!isWasmInitialized) {
21701                         throw new Error("initializeWasm() must be awaited first!");
21702                 }
21703                 const nativeResponseValue = wasm.TS_RouteHintHop_set_fees(this_ptr, val);
21704                 // debug statements here
21705         }
21706         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21707         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
21708                 if(!isWasmInitialized) {
21709                         throw new Error("initializeWasm() must be awaited first!");
21710                 }
21711                 const nativeResponseValue = wasm.TS_RouteHintHop_get_cltv_expiry_delta(this_ptr);
21712                 return nativeResponseValue;
21713         }
21714         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
21715         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21716                 if(!isWasmInitialized) {
21717                         throw new Error("initializeWasm() must be awaited first!");
21718                 }
21719                 const nativeResponseValue = wasm.TS_RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
21720                 // debug statements here
21721         }
21722         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21723         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
21724                 if(!isWasmInitialized) {
21725                         throw new Error("initializeWasm() must be awaited first!");
21726                 }
21727                 const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_minimum_msat(this_ptr);
21728                 return nativeResponseValue;
21729         }
21730         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21731         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
21732                 if(!isWasmInitialized) {
21733                         throw new Error("initializeWasm() must be awaited first!");
21734                 }
21735                 const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
21736                 // debug statements here
21737         }
21738         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
21739         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
21740                 if(!isWasmInitialized) {
21741                         throw new Error("initializeWasm() must be awaited first!");
21742                 }
21743                 const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_maximum_msat(this_ptr);
21744                 return nativeResponseValue;
21745         }
21746         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21747         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
21748                 if(!isWasmInitialized) {
21749                         throw new Error("initializeWasm() must be awaited first!");
21750                 }
21751                 const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
21752                 // debug statements here
21753         }
21754         // 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);
21755         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 {
21756                 if(!isWasmInitialized) {
21757                         throw new Error("initializeWasm() must be awaited first!");
21758                 }
21759                 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);
21760                 return nativeResponseValue;
21761         }
21762         // uint64_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
21763         export function RouteHintHop_clone_ptr(arg: number): number {
21764                 if(!isWasmInitialized) {
21765                         throw new Error("initializeWasm() must be awaited first!");
21766                 }
21767                 const nativeResponseValue = wasm.TS_RouteHintHop_clone_ptr(arg);
21768                 return nativeResponseValue;
21769         }
21770         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
21771         export function RouteHintHop_clone(orig: number): number {
21772                 if(!isWasmInitialized) {
21773                         throw new Error("initializeWasm() must be awaited first!");
21774                 }
21775                 const nativeResponseValue = wasm.TS_RouteHintHop_clone(orig);
21776                 return nativeResponseValue;
21777         }
21778         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
21779         export function RouteHintHop_hash(o: number): number {
21780                 if(!isWasmInitialized) {
21781                         throw new Error("initializeWasm() must be awaited first!");
21782                 }
21783                 const nativeResponseValue = wasm.TS_RouteHintHop_hash(o);
21784                 return nativeResponseValue;
21785         }
21786         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
21787         export function RouteHintHop_eq(a: number, b: number): boolean {
21788                 if(!isWasmInitialized) {
21789                         throw new Error("initializeWasm() must be awaited first!");
21790                 }
21791                 const nativeResponseValue = wasm.TS_RouteHintHop_eq(a, b);
21792                 return nativeResponseValue;
21793         }
21794         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
21795         export function RouteHintHop_write(obj: number): Uint8Array {
21796                 if(!isWasmInitialized) {
21797                         throw new Error("initializeWasm() must be awaited first!");
21798                 }
21799                 const nativeResponseValue = wasm.TS_RouteHintHop_write(obj);
21800                 return decodeUint8Array(nativeResponseValue);
21801         }
21802         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
21803         export function RouteHintHop_read(ser: Uint8Array): number {
21804                 if(!isWasmInitialized) {
21805                         throw new Error("initializeWasm() must be awaited first!");
21806                 }
21807                 const nativeResponseValue = wasm.TS_RouteHintHop_read(encodeUint8Array(ser));
21808                 return nativeResponseValue;
21809         }
21810         // 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);
21811         export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
21812                 if(!isWasmInitialized) {
21813                         throw new Error("initializeWasm() must be awaited first!");
21814                 }
21815                 const nativeResponseValue = wasm.TS_find_route(encodeUint8Array(our_node_pubkey), params, network, first_hops, logger, scorer);
21816                 return nativeResponseValue;
21817         }
21818         // void Score_free(struct LDKScore this_ptr);
21819         export function Score_free(this_ptr: number): void {
21820                 if(!isWasmInitialized) {
21821                         throw new Error("initializeWasm() must be awaited first!");
21822                 }
21823                 const nativeResponseValue = wasm.TS_Score_free(this_ptr);
21824                 // debug statements here
21825         }
21826         // void LockableScore_free(struct LDKLockableScore this_ptr);
21827         export function LockableScore_free(this_ptr: number): void {
21828                 if(!isWasmInitialized) {
21829                         throw new Error("initializeWasm() must be awaited first!");
21830                 }
21831                 const nativeResponseValue = wasm.TS_LockableScore_free(this_ptr);
21832                 // debug statements here
21833         }
21834         // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
21835         export function MultiThreadedLockableScore_free(this_obj: number): void {
21836                 if(!isWasmInitialized) {
21837                         throw new Error("initializeWasm() must be awaited first!");
21838                 }
21839                 const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_free(this_obj);
21840                 // debug statements here
21841         }
21842         // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
21843         export function MultiThreadedLockableScore_new(score: number): number {
21844                 if(!isWasmInitialized) {
21845                         throw new Error("initializeWasm() must be awaited first!");
21846                 }
21847                 const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_new(score);
21848                 return nativeResponseValue;
21849         }
21850         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
21851         export function ScoringParameters_free(this_obj: number): void {
21852                 if(!isWasmInitialized) {
21853                         throw new Error("initializeWasm() must be awaited first!");
21854                 }
21855                 const nativeResponseValue = wasm.TS_ScoringParameters_free(this_obj);
21856                 // debug statements here
21857         }
21858         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21859         export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
21860                 if(!isWasmInitialized) {
21861                         throw new Error("initializeWasm() must be awaited first!");
21862                 }
21863                 const nativeResponseValue = wasm.TS_ScoringParameters_get_base_penalty_msat(this_ptr);
21864                 return nativeResponseValue;
21865         }
21866         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21867         export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
21868                 if(!isWasmInitialized) {
21869                         throw new Error("initializeWasm() must be awaited first!");
21870                 }
21871                 const nativeResponseValue = wasm.TS_ScoringParameters_set_base_penalty_msat(this_ptr, val);
21872                 // debug statements here
21873         }
21874         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21875         export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
21876                 if(!isWasmInitialized) {
21877                         throw new Error("initializeWasm() must be awaited first!");
21878                 }
21879                 const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_msat(this_ptr);
21880                 return nativeResponseValue;
21881         }
21882         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21883         export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
21884                 if(!isWasmInitialized) {
21885                         throw new Error("initializeWasm() must be awaited first!");
21886                 }
21887                 const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_msat(this_ptr, val);
21888                 // debug statements here
21889         }
21890         // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21891         export function ScoringParameters_get_overuse_penalty_start_1024th(this_ptr: number): number {
21892                 if(!isWasmInitialized) {
21893                         throw new Error("initializeWasm() must be awaited first!");
21894                 }
21895                 const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_start_1024th(this_ptr);
21896                 return nativeResponseValue;
21897         }
21898         // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
21899         export function ScoringParameters_set_overuse_penalty_start_1024th(this_ptr: number, val: number): void {
21900                 if(!isWasmInitialized) {
21901                         throw new Error("initializeWasm() must be awaited first!");
21902                 }
21903                 const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_start_1024th(this_ptr, val);
21904                 // debug statements here
21905         }
21906         // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21907         export function ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr: number): number {
21908                 if(!isWasmInitialized) {
21909                         throw new Error("initializeWasm() must be awaited first!");
21910                 }
21911                 const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr);
21912                 return nativeResponseValue;
21913         }
21914         // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21915         export function ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr: number, val: number): void {
21916                 if(!isWasmInitialized) {
21917                         throw new Error("initializeWasm() must be awaited first!");
21918                 }
21919                 const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr, val);
21920                 // debug statements here
21921         }
21922         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
21923         export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
21924                 if(!isWasmInitialized) {
21925                         throw new Error("initializeWasm() must be awaited first!");
21926                 }
21927                 const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_half_life(this_ptr);
21928                 return nativeResponseValue;
21929         }
21930         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
21931         export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
21932                 if(!isWasmInitialized) {
21933                         throw new Error("initializeWasm() must be awaited first!");
21934                 }
21935                 const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
21936                 // debug statements here
21937         }
21938         // 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);
21939         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 {
21940                 if(!isWasmInitialized) {
21941                         throw new Error("initializeWasm() must be awaited first!");
21942                 }
21943                 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);
21944                 return nativeResponseValue;
21945         }
21946         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
21947         export function ScoringParameters_write(obj: number): Uint8Array {
21948                 if(!isWasmInitialized) {
21949                         throw new Error("initializeWasm() must be awaited first!");
21950                 }
21951                 const nativeResponseValue = wasm.TS_ScoringParameters_write(obj);
21952                 return decodeUint8Array(nativeResponseValue);
21953         }
21954         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
21955         export function ScoringParameters_read(ser: Uint8Array): number {
21956                 if(!isWasmInitialized) {
21957                         throw new Error("initializeWasm() must be awaited first!");
21958                 }
21959                 const nativeResponseValue = wasm.TS_ScoringParameters_read(encodeUint8Array(ser));
21960                 return nativeResponseValue;
21961         }
21962         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
21963         export function ScoringParameters_default(): number {
21964                 if(!isWasmInitialized) {
21965                         throw new Error("initializeWasm() must be awaited first!");
21966                 }
21967                 const nativeResponseValue = wasm.TS_ScoringParameters_default();
21968                 return nativeResponseValue;
21969         }