[TS] Update auto-generated TypeScript Bindings
[ldk-java] / ts / bindings.mts
1
2 import * as version from './version.mjs';
3
4 const imports: any = {};
5 imports.env = {};
6
7 var js_objs: Array<WeakRef<object>> = [];
8 var js_invoke: Function;
9
10 imports.wasi_snapshot_preview1 = {
11         "fd_write": (fd: number, iovec_array_ptr: number, iovec_array_len: number) => {
12                 // This should generally only be used to print panic messages
13                 console.log("FD_WRITE to " + fd + " in " + iovec_array_len + " chunks.");
14                 const ptr_len_view = new Uint32Array(wasm.memory.buffer, iovec_array_ptr, iovec_array_len * 2);
15                 for (var i = 0; i < iovec_array_len; i++) {
16                         const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
17                         console.log(String.fromCharCode(...bytes_view));
18                 }
19                 return 0;
20         },
21         "fd_close": (_fd: number) => {
22                 // This is not generally called, but may be referenced in debug builds
23                 console.log("wasi_snapshot_preview1:fd_close");
24                 return 58; // Not Supported
25         },
26         "fd_seek": (_fd: number, _offset: bigint, _whence: number, _new_offset: number) => {
27                 // This is not generally called, but may be referenced in debug builds
28                 console.log("wasi_snapshot_preview1:fd_seek");
29                 return 58; // Not Supported
30         },
31         "random_get": (buf_ptr: number, buf_len: number) => {
32                 const buf = new Uint8Array(wasm.memory.buffer, buf_ptr, buf_len);
33                 crypto.getRandomValues(buf);
34                 return 0;
35         },
36         "environ_sizes_get": (environ_var_count_ptr: number, environ_len_ptr: number) => {
37                 // This is called before fd_write to format + print panic messages
38                 console.log("wasi_snapshot_preview1:environ_sizes_get");
39                 const out_count_view = new Uint32Array(wasm.memory.buffer, environ_var_count_ptr, 1);
40                 out_count_view[0] = 0;
41                 const out_len_view = new Uint32Array(wasm.memory.buffer, environ_len_ptr, 1);
42                 out_len_view[0] = 0;
43                 return 0;
44         },
45         "environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
46                 // This is called before fd_write to format + print panic messages
47                 console.log("wasi_snapshot_preview1:environ_get");
48                 return 58; // Note supported - we said there were 0 environment entries!
49         },
50         "proc_exit" : () => {
51                 console.log("wasi_snapshot_preview1:proc_exit");
52         },
53 };
54
55 var wasm: any = null;
56 let isWasmInitialized: boolean = false;
57
58 /* @internal */
59 export async function initializeWasm(uri: string) {
60         const stream = fetch(uri);
61         imports.env["js_invoke_function"] = js_invoke;
62         const { instance: wasmInstance } = await WebAssembly.instantiateStreaming(stream, imports);
63         wasm = wasmInstance.exports;
64         if (!wasm.test_bigint_pass_deadbeef0badf00d(BigInt("0xdeadbeef0badf00d"))) {
65                 throw new Error("Currently need BigInt-as-u64 support, try ----experimental-wasm-bigint");
66         }
67
68         if (decodeString(wasm.TS_get_lib_version_string()) !== version.get_ldk_java_bindings_version())
69                 throw new Error("Compiled LDK library and LDK class failes do not match");
70         // Fetching the LDK versions from C also checks that the header and binaries match
71         const c_bindings_ver: number = wasm.TS_get_ldk_c_bindings_version();
72         const ldk_ver: number = wasm.TS_get_ldk_version();
73         if (c_bindings_ver == 0)
74                 throw new Error("LDK version did not match the header we built against");
75         if (ldk_ver == 0)
76                 throw new Error("LDK C bindings version did not match the header we built against");
77         const c_bindings_version: string = decodeString(c_bindings_ver)
78         const ldk_version: string = decodeString(ldk_ver);
79         console.log("Loaded LDK-Java Bindings with LDK " + ldk_version + " and LDK-C-Bindings " + c_bindings_version);
80
81         isWasmInitialized = true;
82 };
83
84 // WASM CODEC
85
86 const nextMultipleOfFour = (value: number) => {
87         return Math.ceil(value / 4) * 4;
88 }
89
90 /* @internal */
91 export function encodeUint8Array (inputArray: Uint8Array): number {
92         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
93         const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
94         arrayLengthView[0] = inputArray.length;
95         const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
96         arrayMemoryView.set(inputArray);
97         return cArrayPointer;
98 }
99 /* @internal */
100 export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
101         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
102         const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer, inputArray.length);
103         arrayMemoryView.set(inputArray, 1);
104         arrayMemoryView[0] = inputArray.length;
105         return cArrayPointer;
106 }
107 /* @internal */
108 export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
109         const cArrayPointer = wasm.TS_malloc(inputArray.length * 8 + 1);
110         const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
111         arrayLengthView[0] = inputArray.length;
112         const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
113         arrayMemoryView.set(inputArray);
114         return cArrayPointer;
115 }
116
117 /* @internal */
118 export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
119         if (arr.length != len) { throw new Error("Expected array of length " + len + "got " + arr.length); }
120         return arr;
121 }
122
123 /* @internal */
124 export function getArrayLength(arrayPointer: number): number {
125         const arraySizeViewer = new Uint32Array(wasm.memory.buffer, arrayPointer, 1);
126         return arraySizeViewer[0];
127 }
128 /* @internal */
129 export function decodeUint8Array (arrayPointer: number, free = true): Uint8Array {
130         const arraySize = getArrayLength(arrayPointer);
131         const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 4, arraySize);
132         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
133         // will free the underlying memory when it becomes unreachable instead of copying here.
134         // Note that doing so may have edge-case interactions with memory resizing (invalidating the buffer).
135         const actualArray = actualArrayViewer.slice(0, arraySize);
136         if (free) {
137                 wasm.TS_free(arrayPointer);
138         }
139         return actualArray;
140 }
141 const decodeUint32Array = (arrayPointer: number, free = true) => {
142         const arraySize = getArrayLength(arrayPointer);
143         const actualArrayViewer = new Uint32Array(
144                 wasm.memory.buffer, // value
145                 arrayPointer + 4, // offset (ignoring length bytes)
146                 arraySize // uint32 count
147         );
148         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
149         // will free the underlying memory when it becomes unreachable instead of copying here.
150         const actualArray = actualArrayViewer.slice(0, arraySize);
151         if (free) {
152                 wasm.TS_free(arrayPointer);
153         }
154         return actualArray;
155 }
156
157
158 export function freeWasmMemory(pointer: number) { wasm.TS_free(pointer); }
159
160 /* @internal */
161 export function getU32ArrayElem(arrayPointer: number, idx: number): number {
162         const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 4, idx + 1);
163         return actualArrayViewer[idx];
164 }
165
166 /* @internal */
167 export function encodeString(str: string): number {
168         const charArray = new TextEncoder().encode(str);
169         return encodeUint8Array(charArray);
170 }
171
172 /* @internal */
173 export function decodeString(stringPointer: number, free = true): string {
174         const arraySize = getArrayLength(stringPointer);
175         const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer + 4, arraySize);
176         const result = new TextDecoder("utf-8").decode(memoryView);
177
178         if (free) {
179                 wasm.TS_free(stringPointer);
180         }
181
182         return result;
183 }
184
185 /* @internal */ export function getRemainingAllocationCount(): number { return 0; }
186 /* @internal */ export function debugPrintRemainingAllocs() { }
187
188 /* @internal */
189 export enum AccessError {
190         /**
191          * The requested chain is unknown.
192          */
193         LDKAccessError_UnknownChain,
194         /**
195          * The requested transaction doesn't exist or hasn't confirmed.
196          */
197         LDKAccessError_UnknownTx,
198         
199 }
200
201 /* @internal */
202 export enum COption_NoneZ {
203         /**
204          * When we're in this state, this COption_NoneZ contains a
205          */
206         LDKCOption_NoneZ_Some,
207         /**
208          * When we're in this state, this COption_NoneZ contains nothing
209          */
210         LDKCOption_NoneZ_None,
211         
212 }
213
214 /* @internal */
215 export enum ChannelMonitorUpdateErr {
216         /**
217          * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
218         our state failed, but is expected to succeed at some point in the future).
219         
220         Such a failure will \"freeze\" a channel, preventing us from revoking old states or
221         submitting new commitment transactions to the counterparty. Once the update(s) that failed
222         have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
223         via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
224         operational state.
225         
226         Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
227         you return a TemporaryFailure you must ensure that it is written to disk safely before
228         writing out the latest ChannelManager state.
229         
230         Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
231         (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
232         to claim it on this channel) and those updates must be applied wherever they can be. At
233         least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
234         be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
235         the channel which would invalidate previous ChannelMonitors are not made when a channel has
236         been \"frozen\".
237         
238         Note that even if updates made after TemporaryFailure succeed you must still provide a
239         [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
240         normal channel operation. Note that this is normally generated through a call to
241         [`ChainMonitor::channel_monitor_updated`].
242         
243         Note that the update being processed here will not be replayed for you when you return a
244         [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
245         you must store the update itself on your own local disk prior to returning a
246         TemporaryFailure. You may, of course, employ a journaling approach, storing only the
247         ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
248         reload-time.
249         
250         For deployments where a copy of ChannelMonitors and other local state are backed up in a
251         remote location (with local copies persisted immediately), it is anticipated that all
252         updates will return TemporaryFailure until the remote copies could be updated.
253         
254         [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
255          */
256         LDKChannelMonitorUpdateErr_TemporaryFailure,
257         /**
258          * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
259         different watchtower and cannot update with all watchtowers that were previously informed
260         of this channel).
261         
262         At reception of this error, ChannelManager will force-close the channel and return at
263         least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
264         least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
265         update must be rejected.
266         
267         This failure may also signal a failure to update the local persisted copy of one of
268         the channel monitor instance.
269         
270         Note that even when you fail a holder commitment transaction update, you must store the
271         update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
272         broadcasts it (e.g distributed channel-monitor deployment)
273         
274         In case of distributed watchtowers deployment, the new version must be written to disk, as
275         state may have been stored but rejected due to a block forcing a commitment broadcast. This
276         storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
277         lagging behind on block processing.
278          */
279         LDKChannelMonitorUpdateErr_PermanentFailure,
280         
281 }
282
283 /* @internal */
284 export enum ConfirmationTarget {
285         /**
286          * We are happy with this transaction confirming slowly when feerate drops some.
287          */
288         LDKConfirmationTarget_Background,
289         /**
290          * We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
291          */
292         LDKConfirmationTarget_Normal,
293         /**
294          * We'd like this transaction to confirm in the next few blocks.
295          */
296         LDKConfirmationTarget_HighPriority,
297         
298 }
299
300 /* @internal */
301 export enum Level {
302         /**
303          * Designates extremely verbose information, including gossip-induced messages
304          */
305         LDKLevel_Gossip,
306         /**
307          * Designates very low priority, often extremely verbose, information
308          */
309         LDKLevel_Trace,
310         /**
311          * Designates lower priority information
312          */
313         LDKLevel_Debug,
314         /**
315          * Designates useful information
316          */
317         LDKLevel_Info,
318         /**
319          * Designates hazardous situations
320          */
321         LDKLevel_Warn,
322         /**
323          * Designates very serious errors
324          */
325         LDKLevel_Error,
326         
327 }
328
329 /* @internal */
330 export enum Network {
331         /**
332          * The main Bitcoin blockchain.
333          */
334         LDKNetwork_Bitcoin,
335         /**
336          * The testnet3 blockchain.
337          */
338         LDKNetwork_Testnet,
339         /**
340          * A local test blockchain.
341          */
342         LDKNetwork_Regtest,
343         /**
344          * A blockchain on which blocks are signed instead of mined.
345          */
346         LDKNetwork_Signet,
347         
348 }
349
350 /* @internal */
351 export enum Secp256k1Error {
352         /**
353          * Signature failed verification
354          */
355         LDKSecp256k1Error_IncorrectSignature,
356         /**
357          * Badly sized message ("messages" are actually fixed-sized digests; see the MESSAGE_SIZE constant)
358          */
359         LDKSecp256k1Error_InvalidMessage,
360         /**
361          * Bad public key
362          */
363         LDKSecp256k1Error_InvalidPublicKey,
364         /**
365          * Bad signature
366          */
367         LDKSecp256k1Error_InvalidSignature,
368         /**
369          * Bad secret key
370          */
371         LDKSecp256k1Error_InvalidSecretKey,
372         /**
373          * Bad recovery id
374          */
375         LDKSecp256k1Error_InvalidRecoveryId,
376         /**
377          * Invalid tweak for add_assign or mul_assign
378          */
379         LDKSecp256k1Error_InvalidTweak,
380         /**
381          * tweak_add_check failed on an xonly public key
382          */
383         LDKSecp256k1Error_TweakCheckFailed,
384         /**
385          * Didn't pass enough memory to context creation with preallocated memory
386          */
387         LDKSecp256k1Error_NotEnoughMemory,
388         
389 }
390         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
391 /* @internal */
392 export function TxOut_get_script_pubkey(thing: number): number {
393         if(!isWasmInitialized) {
394                 throw new Error("initializeWasm() must be awaited first!");
395         }
396         const nativeResponseValue = wasm.TS_TxOut_get_script_pubkey(thing);
397         return nativeResponseValue;
398 }
399         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
400 /* @internal */
401 export function TxOut_get_value(thing: number): bigint {
402         if(!isWasmInitialized) {
403                 throw new Error("initializeWasm() must be awaited first!");
404         }
405         const nativeResponseValue = wasm.TS_TxOut_get_value(thing);
406         return nativeResponseValue;
407 }
408         // struct LDKChannelConfig CResult_ChannelConfigDecodeErrorZ_get_ok(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
409 /* @internal */
410 export function CResult_ChannelConfigDecodeErrorZ_get_ok(owner: number): number {
411         if(!isWasmInitialized) {
412                 throw new Error("initializeWasm() must be awaited first!");
413         }
414         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_ok(owner);
415         return nativeResponseValue;
416 }
417         // struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
418 /* @internal */
419 export function CResult_ChannelConfigDecodeErrorZ_get_err(owner: number): number {
420         if(!isWasmInitialized) {
421                 throw new Error("initializeWasm() must be awaited first!");
422         }
423         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_err(owner);
424         return nativeResponseValue;
425 }
426         // struct LDKOutPoint CResult_OutPointDecodeErrorZ_get_ok(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
427 /* @internal */
428 export function CResult_OutPointDecodeErrorZ_get_ok(owner: number): number {
429         if(!isWasmInitialized) {
430                 throw new Error("initializeWasm() must be awaited first!");
431         }
432         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_ok(owner);
433         return nativeResponseValue;
434 }
435         // struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
436 /* @internal */
437 export function CResult_OutPointDecodeErrorZ_get_err(owner: number): number {
438         if(!isWasmInitialized) {
439                 throw new Error("initializeWasm() must be awaited first!");
440         }
441         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_err(owner);
442         return nativeResponseValue;
443 }
444         // struct LDKSecretKey CResult_SecretKeyErrorZ_get_ok(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
445 /* @internal */
446 export function CResult_SecretKeyErrorZ_get_ok(owner: number): number {
447         if(!isWasmInitialized) {
448                 throw new Error("initializeWasm() must be awaited first!");
449         }
450         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_ok(owner);
451         return nativeResponseValue;
452 }
453         // enum LDKSecp256k1Error CResult_SecretKeyErrorZ_get_err(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
454 /* @internal */
455 export function CResult_SecretKeyErrorZ_get_err(owner: number): Secp256k1Error {
456         if(!isWasmInitialized) {
457                 throw new Error("initializeWasm() must be awaited first!");
458         }
459         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_err(owner);
460         return nativeResponseValue;
461 }
462         // struct LDKPublicKey CResult_PublicKeyErrorZ_get_ok(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
463 /* @internal */
464 export function CResult_PublicKeyErrorZ_get_ok(owner: number): number {
465         if(!isWasmInitialized) {
466                 throw new Error("initializeWasm() must be awaited first!");
467         }
468         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_ok(owner);
469         return nativeResponseValue;
470 }
471         // enum LDKSecp256k1Error CResult_PublicKeyErrorZ_get_err(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
472 /* @internal */
473 export function CResult_PublicKeyErrorZ_get_err(owner: number): Secp256k1Error {
474         if(!isWasmInitialized) {
475                 throw new Error("initializeWasm() must be awaited first!");
476         }
477         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_err(owner);
478         return nativeResponseValue;
479 }
480         // struct LDKTxCreationKeys CResult_TxCreationKeysDecodeErrorZ_get_ok(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
481 /* @internal */
482 export function CResult_TxCreationKeysDecodeErrorZ_get_ok(owner: number): number {
483         if(!isWasmInitialized) {
484                 throw new Error("initializeWasm() must be awaited first!");
485         }
486         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_ok(owner);
487         return nativeResponseValue;
488 }
489         // struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
490 /* @internal */
491 export function CResult_TxCreationKeysDecodeErrorZ_get_err(owner: number): number {
492         if(!isWasmInitialized) {
493                 throw new Error("initializeWasm() must be awaited first!");
494         }
495         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_err(owner);
496         return nativeResponseValue;
497 }
498         // struct LDKChannelPublicKeys CResult_ChannelPublicKeysDecodeErrorZ_get_ok(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
499 /* @internal */
500 export function CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner: number): number {
501         if(!isWasmInitialized) {
502                 throw new Error("initializeWasm() must be awaited first!");
503         }
504         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner);
505         return nativeResponseValue;
506 }
507         // struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
508 /* @internal */
509 export function CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner: number): number {
510         if(!isWasmInitialized) {
511                 throw new Error("initializeWasm() must be awaited first!");
512         }
513         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner);
514         return nativeResponseValue;
515 }
516         // struct LDKTxCreationKeys CResult_TxCreationKeysErrorZ_get_ok(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
517 /* @internal */
518 export function CResult_TxCreationKeysErrorZ_get_ok(owner: number): number {
519         if(!isWasmInitialized) {
520                 throw new Error("initializeWasm() must be awaited first!");
521         }
522         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_ok(owner);
523         return nativeResponseValue;
524 }
525         // enum LDKSecp256k1Error CResult_TxCreationKeysErrorZ_get_err(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
526 /* @internal */
527 export function CResult_TxCreationKeysErrorZ_get_err(owner: number): Secp256k1Error {
528         if(!isWasmInitialized) {
529                 throw new Error("initializeWasm() must be awaited first!");
530         }
531         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_err(owner);
532         return nativeResponseValue;
533 }
534 /* @internal */
535 export class LDKCOption_u32Z {
536         protected constructor() {}
537 }
538 /* @internal */
539 export function LDKCOption_u32Z_ty_from_ptr(ptr: number): number {
540         if(!isWasmInitialized) {
541                 throw new Error("initializeWasm() must be awaited first!");
542         }
543         const nativeResponseValue = wasm.TS_LDKCOption_u32Z_ty_from_ptr(ptr);
544         return nativeResponseValue;
545 }
546 /* @internal */
547 export function LDKCOption_u32Z_Some_get_some(ptr: number): number {
548         if(!isWasmInitialized) {
549                 throw new Error("initializeWasm() must be awaited first!");
550         }
551         const nativeResponseValue = wasm.TS_LDKCOption_u32Z_Some_get_some(ptr);
552         return nativeResponseValue;
553 }
554         // struct LDKHTLCOutputInCommitment CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
555 /* @internal */
556 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner: number): number {
557         if(!isWasmInitialized) {
558                 throw new Error("initializeWasm() must be awaited first!");
559         }
560         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner);
561         return nativeResponseValue;
562 }
563         // struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
564 /* @internal */
565 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner: number): number {
566         if(!isWasmInitialized) {
567                 throw new Error("initializeWasm() must be awaited first!");
568         }
569         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner);
570         return nativeResponseValue;
571 }
572         // struct LDKCounterpartyChannelTransactionParameters CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
573 /* @internal */
574 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
575         if(!isWasmInitialized) {
576                 throw new Error("initializeWasm() must be awaited first!");
577         }
578         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner);
579         return nativeResponseValue;
580 }
581         // struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
582 /* @internal */
583 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
584         if(!isWasmInitialized) {
585                 throw new Error("initializeWasm() must be awaited first!");
586         }
587         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner);
588         return nativeResponseValue;
589 }
590         // struct LDKChannelTransactionParameters CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
591 /* @internal */
592 export function CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
593         if(!isWasmInitialized) {
594                 throw new Error("initializeWasm() must be awaited first!");
595         }
596         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner);
597         return nativeResponseValue;
598 }
599         // struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
600 /* @internal */
601 export function CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
602         if(!isWasmInitialized) {
603                 throw new Error("initializeWasm() must be awaited first!");
604         }
605         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner);
606         return nativeResponseValue;
607 }
608         // struct LDKHolderCommitmentTransaction CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
609 /* @internal */
610 export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
611         if(!isWasmInitialized) {
612                 throw new Error("initializeWasm() must be awaited first!");
613         }
614         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner);
615         return nativeResponseValue;
616 }
617         // struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
618 /* @internal */
619 export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
620         if(!isWasmInitialized) {
621                 throw new Error("initializeWasm() must be awaited first!");
622         }
623         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner);
624         return nativeResponseValue;
625 }
626         // struct LDKBuiltCommitmentTransaction CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
627 /* @internal */
628 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
629         if(!isWasmInitialized) {
630                 throw new Error("initializeWasm() must be awaited first!");
631         }
632         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner);
633         return nativeResponseValue;
634 }
635         // struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
636 /* @internal */
637 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
638         if(!isWasmInitialized) {
639                 throw new Error("initializeWasm() must be awaited first!");
640         }
641         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner);
642         return nativeResponseValue;
643 }
644         // struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
645 /* @internal */
646 export function CResult_TrustedClosingTransactionNoneZ_get_ok(owner: number): number {
647         if(!isWasmInitialized) {
648                 throw new Error("initializeWasm() must be awaited first!");
649         }
650         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_ok(owner);
651         return nativeResponseValue;
652 }
653         // void CResult_TrustedClosingTransactionNoneZ_get_err(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
654 /* @internal */
655 export function CResult_TrustedClosingTransactionNoneZ_get_err(owner: number): void {
656         if(!isWasmInitialized) {
657                 throw new Error("initializeWasm() must be awaited first!");
658         }
659         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_err(owner);
660         // debug statements here
661 }
662         // struct LDKCommitmentTransaction CResult_CommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
663 /* @internal */
664 export function CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
665         if(!isWasmInitialized) {
666                 throw new Error("initializeWasm() must be awaited first!");
667         }
668         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner);
669         return nativeResponseValue;
670 }
671         // struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
672 /* @internal */
673 export function CResult_CommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
674         if(!isWasmInitialized) {
675                 throw new Error("initializeWasm() must be awaited first!");
676         }
677         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(owner);
678         return nativeResponseValue;
679 }
680         // struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
681 /* @internal */
682 export function CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner: number): number {
683         if(!isWasmInitialized) {
684                 throw new Error("initializeWasm() must be awaited first!");
685         }
686         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner);
687         return nativeResponseValue;
688 }
689         // void CResult_TrustedCommitmentTransactionNoneZ_get_err(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
690 /* @internal */
691 export function CResult_TrustedCommitmentTransactionNoneZ_get_err(owner: number): void {
692         if(!isWasmInitialized) {
693                 throw new Error("initializeWasm() must be awaited first!");
694         }
695         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_err(owner);
696         // debug statements here
697 }
698         // struct LDKCVec_SignatureZ CResult_CVec_SignatureZNoneZ_get_ok(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
699 /* @internal */
700 export function CResult_CVec_SignatureZNoneZ_get_ok(owner: number): number {
701         if(!isWasmInitialized) {
702                 throw new Error("initializeWasm() must be awaited first!");
703         }
704         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_ok(owner);
705         return nativeResponseValue;
706 }
707         // void CResult_CVec_SignatureZNoneZ_get_err(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
708 /* @internal */
709 export function CResult_CVec_SignatureZNoneZ_get_err(owner: number): void {
710         if(!isWasmInitialized) {
711                 throw new Error("initializeWasm() must be awaited first!");
712         }
713         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_err(owner);
714         // debug statements here
715 }
716         // struct LDKShutdownScript CResult_ShutdownScriptDecodeErrorZ_get_ok(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
717 /* @internal */
718 export function CResult_ShutdownScriptDecodeErrorZ_get_ok(owner: number): number {
719         if(!isWasmInitialized) {
720                 throw new Error("initializeWasm() must be awaited first!");
721         }
722         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_ok(owner);
723         return nativeResponseValue;
724 }
725         // struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
726 /* @internal */
727 export function CResult_ShutdownScriptDecodeErrorZ_get_err(owner: number): number {
728         if(!isWasmInitialized) {
729                 throw new Error("initializeWasm() must be awaited first!");
730         }
731         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_err(owner);
732         return nativeResponseValue;
733 }
734         // struct LDKShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
735 /* @internal */
736 export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner: number): number {
737         if(!isWasmInitialized) {
738                 throw new Error("initializeWasm() must be awaited first!");
739         }
740         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner);
741         return nativeResponseValue;
742 }
743         // struct LDKInvalidShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
744 /* @internal */
745 export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner: number): number {
746         if(!isWasmInitialized) {
747                 throw new Error("initializeWasm() must be awaited first!");
748         }
749         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner);
750         return nativeResponseValue;
751 }
752 /* @internal */
753 export interface LDKType {
754         type_id (): number;
755         debug_str (): number;
756         write (): number;
757 }
758
759 /* @internal */
760 export function LDKType_new(impl: LDKType): number {
761         if(!isWasmInitialized) {
762                 throw new Error("initializeWasm() must be awaited first!");
763         }
764         var new_obj_idx = js_objs.length;
765         for (var i = 0; i < js_objs.length; i++) {
766                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
767         }
768         js_objs[i] = new WeakRef(impl);
769         return wasm.TS_LDKType_new(i);
770 }
771         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
772 /* @internal */
773 export function Type_type_id(this_arg: number): number {
774         if(!isWasmInitialized) {
775                 throw new Error("initializeWasm() must be awaited first!");
776         }
777         const nativeResponseValue = wasm.TS_Type_type_id(this_arg);
778         return nativeResponseValue;
779 }
780         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
781 /* @internal */
782 export function Type_debug_str(this_arg: number): number {
783         if(!isWasmInitialized) {
784                 throw new Error("initializeWasm() must be awaited first!");
785         }
786         const nativeResponseValue = wasm.TS_Type_debug_str(this_arg);
787         return nativeResponseValue;
788 }
789         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
790 /* @internal */
791 export function Type_write(this_arg: number): number {
792         if(!isWasmInitialized) {
793                 throw new Error("initializeWasm() must be awaited first!");
794         }
795         const nativeResponseValue = wasm.TS_Type_write(this_arg);
796         return nativeResponseValue;
797 }
798 /* @internal */
799 export class LDKCOption_TypeZ {
800         protected constructor() {}
801 }
802 /* @internal */
803 export function LDKCOption_TypeZ_ty_from_ptr(ptr: number): number {
804         if(!isWasmInitialized) {
805                 throw new Error("initializeWasm() must be awaited first!");
806         }
807         const nativeResponseValue = wasm.TS_LDKCOption_TypeZ_ty_from_ptr(ptr);
808         return nativeResponseValue;
809 }
810 /* @internal */
811 export function LDKCOption_TypeZ_Some_get_some(ptr: number): number {
812         if(!isWasmInitialized) {
813                 throw new Error("initializeWasm() must be awaited first!");
814         }
815         const nativeResponseValue = wasm.TS_LDKCOption_TypeZ_Some_get_some(ptr);
816         return nativeResponseValue;
817 }
818         // struct LDKCOption_TypeZ CResult_COption_TypeZDecodeErrorZ_get_ok(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
819 /* @internal */
820 export function CResult_COption_TypeZDecodeErrorZ_get_ok(owner: number): number {
821         if(!isWasmInitialized) {
822                 throw new Error("initializeWasm() must be awaited first!");
823         }
824         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_ok(owner);
825         return nativeResponseValue;
826 }
827         // struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
828 /* @internal */
829 export function CResult_COption_TypeZDecodeErrorZ_get_err(owner: number): number {
830         if(!isWasmInitialized) {
831                 throw new Error("initializeWasm() must be awaited first!");
832         }
833         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_err(owner);
834         return nativeResponseValue;
835 }
836         // struct LDKStr CResult_StringErrorZ_get_ok(LDKCResult_StringErrorZ *NONNULL_PTR owner);
837 /* @internal */
838 export function CResult_StringErrorZ_get_ok(owner: number): number {
839         if(!isWasmInitialized) {
840                 throw new Error("initializeWasm() must be awaited first!");
841         }
842         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_ok(owner);
843         return nativeResponseValue;
844 }
845         // enum LDKSecp256k1Error CResult_StringErrorZ_get_err(LDKCResult_StringErrorZ *NONNULL_PTR owner);
846 /* @internal */
847 export function CResult_StringErrorZ_get_err(owner: number): Secp256k1Error {
848         if(!isWasmInitialized) {
849                 throw new Error("initializeWasm() must be awaited first!");
850         }
851         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_err(owner);
852         return nativeResponseValue;
853 }
854         // struct LDKChannelMonitorUpdate CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
855 /* @internal */
856 export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner: number): number {
857         if(!isWasmInitialized) {
858                 throw new Error("initializeWasm() must be awaited first!");
859         }
860         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner);
861         return nativeResponseValue;
862 }
863         // struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
864 /* @internal */
865 export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner: number): number {
866         if(!isWasmInitialized) {
867                 throw new Error("initializeWasm() must be awaited first!");
868         }
869         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner);
870         return nativeResponseValue;
871 }
872 /* @internal */
873 export class LDKMonitorEvent {
874         protected constructor() {}
875 }
876 /* @internal */
877 export function LDKMonitorEvent_ty_from_ptr(ptr: number): number {
878         if(!isWasmInitialized) {
879                 throw new Error("initializeWasm() must be awaited first!");
880         }
881         const nativeResponseValue = wasm.TS_LDKMonitorEvent_ty_from_ptr(ptr);
882         return nativeResponseValue;
883 }
884 /* @internal */
885 export function LDKMonitorEvent_HTLCEvent_get_htlc_event(ptr: number): number {
886         if(!isWasmInitialized) {
887                 throw new Error("initializeWasm() must be awaited first!");
888         }
889         const nativeResponseValue = wasm.TS_LDKMonitorEvent_HTLCEvent_get_htlc_event(ptr);
890         return nativeResponseValue;
891 }
892 /* @internal */
893 export function LDKMonitorEvent_CommitmentTxConfirmed_get_commitment_tx_confirmed(ptr: number): number {
894         if(!isWasmInitialized) {
895                 throw new Error("initializeWasm() must be awaited first!");
896         }
897         const nativeResponseValue = wasm.TS_LDKMonitorEvent_CommitmentTxConfirmed_get_commitment_tx_confirmed(ptr);
898         return nativeResponseValue;
899 }
900 /* @internal */
901 export function LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr: number): number {
902         if(!isWasmInitialized) {
903                 throw new Error("initializeWasm() must be awaited first!");
904         }
905         const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr);
906         return nativeResponseValue;
907 }
908 /* @internal */
909 export function LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr: number): bigint {
910         if(!isWasmInitialized) {
911                 throw new Error("initializeWasm() must be awaited first!");
912         }
913         const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr);
914         return nativeResponseValue;
915 }
916 /* @internal */
917 export function LDKMonitorEvent_UpdateFailed_get_update_failed(ptr: number): number {
918         if(!isWasmInitialized) {
919                 throw new Error("initializeWasm() must be awaited first!");
920         }
921         const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateFailed_get_update_failed(ptr);
922         return nativeResponseValue;
923 }
924 /* @internal */
925 export class LDKCOption_MonitorEventZ {
926         protected constructor() {}
927 }
928 /* @internal */
929 export function LDKCOption_MonitorEventZ_ty_from_ptr(ptr: number): number {
930         if(!isWasmInitialized) {
931                 throw new Error("initializeWasm() must be awaited first!");
932         }
933         const nativeResponseValue = wasm.TS_LDKCOption_MonitorEventZ_ty_from_ptr(ptr);
934         return nativeResponseValue;
935 }
936 /* @internal */
937 export function LDKCOption_MonitorEventZ_Some_get_some(ptr: number): number {
938         if(!isWasmInitialized) {
939                 throw new Error("initializeWasm() must be awaited first!");
940         }
941         const nativeResponseValue = wasm.TS_LDKCOption_MonitorEventZ_Some_get_some(ptr);
942         return nativeResponseValue;
943 }
944         // struct LDKCOption_MonitorEventZ CResult_COption_MonitorEventZDecodeErrorZ_get_ok(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
945 /* @internal */
946 export function CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner: number): number {
947         if(!isWasmInitialized) {
948                 throw new Error("initializeWasm() must be awaited first!");
949         }
950         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner);
951         return nativeResponseValue;
952 }
953         // struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
954 /* @internal */
955 export function CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner: number): number {
956         if(!isWasmInitialized) {
957                 throw new Error("initializeWasm() must be awaited first!");
958         }
959         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner);
960         return nativeResponseValue;
961 }
962         // struct LDKHTLCUpdate CResult_HTLCUpdateDecodeErrorZ_get_ok(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
963 /* @internal */
964 export function CResult_HTLCUpdateDecodeErrorZ_get_ok(owner: number): number {
965         if(!isWasmInitialized) {
966                 throw new Error("initializeWasm() must be awaited first!");
967         }
968         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_ok(owner);
969         return nativeResponseValue;
970 }
971         // struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
972 /* @internal */
973 export function CResult_HTLCUpdateDecodeErrorZ_get_err(owner: number): number {
974         if(!isWasmInitialized) {
975                 throw new Error("initializeWasm() must be awaited first!");
976         }
977         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_err(owner);
978         return nativeResponseValue;
979 }
980         // void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
981 /* @internal */
982 export function CResult_NoneNoneZ_get_ok(owner: number): void {
983         if(!isWasmInitialized) {
984                 throw new Error("initializeWasm() must be awaited first!");
985         }
986         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_ok(owner);
987         // debug statements here
988 }
989         // void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
990 /* @internal */
991 export function CResult_NoneNoneZ_get_err(owner: number): void {
992         if(!isWasmInitialized) {
993                 throw new Error("initializeWasm() must be awaited first!");
994         }
995         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_err(owner);
996         // debug statements here
997 }
998         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
999 /* @internal */
1000 export function C2Tuple_OutPointScriptZ_get_a(owner: number): number {
1001         if(!isWasmInitialized) {
1002                 throw new Error("initializeWasm() must be awaited first!");
1003         }
1004         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_a(owner);
1005         return nativeResponseValue;
1006 }
1007         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
1008 /* @internal */
1009 export function C2Tuple_OutPointScriptZ_get_b(owner: number): number {
1010         if(!isWasmInitialized) {
1011                 throw new Error("initializeWasm() must be awaited first!");
1012         }
1013         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_b(owner);
1014         return nativeResponseValue;
1015 }
1016         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
1017 /* @internal */
1018 export function C2Tuple_u32ScriptZ_get_a(owner: number): number {
1019         if(!isWasmInitialized) {
1020                 throw new Error("initializeWasm() must be awaited first!");
1021         }
1022         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_a(owner);
1023         return nativeResponseValue;
1024 }
1025         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
1026 /* @internal */
1027 export function C2Tuple_u32ScriptZ_get_b(owner: number): number {
1028         if(!isWasmInitialized) {
1029                 throw new Error("initializeWasm() must be awaited first!");
1030         }
1031         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_b(owner);
1032         return nativeResponseValue;
1033 }
1034         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
1035 /* @internal */
1036 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner: number): number {
1037         if(!isWasmInitialized) {
1038                 throw new Error("initializeWasm() must be awaited first!");
1039         }
1040         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner);
1041         return nativeResponseValue;
1042 }
1043         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
1044 /* @internal */
1045 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner: number): number {
1046         if(!isWasmInitialized) {
1047                 throw new Error("initializeWasm() must be awaited first!");
1048         }
1049         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner);
1050         return nativeResponseValue;
1051 }
1052 /* @internal */
1053 export class LDKPaymentPurpose {
1054         protected constructor() {}
1055 }
1056 /* @internal */
1057 export function LDKPaymentPurpose_ty_from_ptr(ptr: number): number {
1058         if(!isWasmInitialized) {
1059                 throw new Error("initializeWasm() must be awaited first!");
1060         }
1061         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_ty_from_ptr(ptr);
1062         return nativeResponseValue;
1063 }
1064 /* @internal */
1065 export function LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr: number): number {
1066         if(!isWasmInitialized) {
1067                 throw new Error("initializeWasm() must be awaited first!");
1068         }
1069         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr);
1070         return nativeResponseValue;
1071 }
1072 /* @internal */
1073 export function LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr: number): number {
1074         if(!isWasmInitialized) {
1075                 throw new Error("initializeWasm() must be awaited first!");
1076         }
1077         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr);
1078         return nativeResponseValue;
1079 }
1080 /* @internal */
1081 export function LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(ptr: number): number {
1082         if(!isWasmInitialized) {
1083                 throw new Error("initializeWasm() must be awaited first!");
1084         }
1085         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(ptr);
1086         return nativeResponseValue;
1087 }
1088 /* @internal */
1089 export class LDKCOption_u64Z {
1090         protected constructor() {}
1091 }
1092 /* @internal */
1093 export function LDKCOption_u64Z_ty_from_ptr(ptr: number): number {
1094         if(!isWasmInitialized) {
1095                 throw new Error("initializeWasm() must be awaited first!");
1096         }
1097         const nativeResponseValue = wasm.TS_LDKCOption_u64Z_ty_from_ptr(ptr);
1098         return nativeResponseValue;
1099 }
1100 /* @internal */
1101 export function LDKCOption_u64Z_Some_get_some(ptr: number): bigint {
1102         if(!isWasmInitialized) {
1103                 throw new Error("initializeWasm() must be awaited first!");
1104         }
1105         const nativeResponseValue = wasm.TS_LDKCOption_u64Z_Some_get_some(ptr);
1106         return nativeResponseValue;
1107 }
1108 /* @internal */
1109 export class LDKNetworkUpdate {
1110         protected constructor() {}
1111 }
1112 /* @internal */
1113 export function LDKNetworkUpdate_ty_from_ptr(ptr: number): number {
1114         if(!isWasmInitialized) {
1115                 throw new Error("initializeWasm() must be awaited first!");
1116         }
1117         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ty_from_ptr(ptr);
1118         return nativeResponseValue;
1119 }
1120 /* @internal */
1121 export function LDKNetworkUpdate_ChannelUpdateMessage_get_msg(ptr: number): number {
1122         if(!isWasmInitialized) {
1123                 throw new Error("initializeWasm() must be awaited first!");
1124         }
1125         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ChannelUpdateMessage_get_msg(ptr);
1126         return nativeResponseValue;
1127 }
1128 /* @internal */
1129 export function LDKNetworkUpdate_ChannelClosed_get_short_channel_id(ptr: number): bigint {
1130         if(!isWasmInitialized) {
1131                 throw new Error("initializeWasm() must be awaited first!");
1132         }
1133         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ChannelClosed_get_short_channel_id(ptr);
1134         return nativeResponseValue;
1135 }
1136 /* @internal */
1137 export function LDKNetworkUpdate_ChannelClosed_get_is_permanent(ptr: number): boolean {
1138         if(!isWasmInitialized) {
1139                 throw new Error("initializeWasm() must be awaited first!");
1140         }
1141         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ChannelClosed_get_is_permanent(ptr);
1142         return nativeResponseValue;
1143 }
1144 /* @internal */
1145 export function LDKNetworkUpdate_NodeFailure_get_node_id(ptr: number): number {
1146         if(!isWasmInitialized) {
1147                 throw new Error("initializeWasm() must be awaited first!");
1148         }
1149         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_NodeFailure_get_node_id(ptr);
1150         return nativeResponseValue;
1151 }
1152 /* @internal */
1153 export function LDKNetworkUpdate_NodeFailure_get_is_permanent(ptr: number): boolean {
1154         if(!isWasmInitialized) {
1155                 throw new Error("initializeWasm() must be awaited first!");
1156         }
1157         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_NodeFailure_get_is_permanent(ptr);
1158         return nativeResponseValue;
1159 }
1160 /* @internal */
1161 export class LDKCOption_NetworkUpdateZ {
1162         protected constructor() {}
1163 }
1164 /* @internal */
1165 export function LDKCOption_NetworkUpdateZ_ty_from_ptr(ptr: number): number {
1166         if(!isWasmInitialized) {
1167                 throw new Error("initializeWasm() must be awaited first!");
1168         }
1169         const nativeResponseValue = wasm.TS_LDKCOption_NetworkUpdateZ_ty_from_ptr(ptr);
1170         return nativeResponseValue;
1171 }
1172 /* @internal */
1173 export function LDKCOption_NetworkUpdateZ_Some_get_some(ptr: number): number {
1174         if(!isWasmInitialized) {
1175                 throw new Error("initializeWasm() must be awaited first!");
1176         }
1177         const nativeResponseValue = wasm.TS_LDKCOption_NetworkUpdateZ_Some_get_some(ptr);
1178         return nativeResponseValue;
1179 }
1180 /* @internal */
1181 export class LDKSpendableOutputDescriptor {
1182         protected constructor() {}
1183 }
1184 /* @internal */
1185 export function LDKSpendableOutputDescriptor_ty_from_ptr(ptr: number): number {
1186         if(!isWasmInitialized) {
1187                 throw new Error("initializeWasm() must be awaited first!");
1188         }
1189         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_ty_from_ptr(ptr);
1190         return nativeResponseValue;
1191 }
1192 /* @internal */
1193 export function LDKSpendableOutputDescriptor_StaticOutput_get_outpoint(ptr: number): number {
1194         if(!isWasmInitialized) {
1195                 throw new Error("initializeWasm() must be awaited first!");
1196         }
1197         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_StaticOutput_get_outpoint(ptr);
1198         return nativeResponseValue;
1199 }
1200 /* @internal */
1201 export function LDKSpendableOutputDescriptor_StaticOutput_get_output(ptr: number): number {
1202         if(!isWasmInitialized) {
1203                 throw new Error("initializeWasm() must be awaited first!");
1204         }
1205         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_StaticOutput_get_output(ptr);
1206         return nativeResponseValue;
1207 }
1208 /* @internal */
1209 export function LDKSpendableOutputDescriptor_DelayedPaymentOutput_get_delayed_payment_output(ptr: number): number {
1210         if(!isWasmInitialized) {
1211                 throw new Error("initializeWasm() must be awaited first!");
1212         }
1213         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_DelayedPaymentOutput_get_delayed_payment_output(ptr);
1214         return nativeResponseValue;
1215 }
1216 /* @internal */
1217 export function LDKSpendableOutputDescriptor_StaticPaymentOutput_get_static_payment_output(ptr: number): number {
1218         if(!isWasmInitialized) {
1219                 throw new Error("initializeWasm() must be awaited first!");
1220         }
1221         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_StaticPaymentOutput_get_static_payment_output(ptr);
1222         return nativeResponseValue;
1223 }
1224 /* @internal */
1225 export class LDKClosureReason {
1226         protected constructor() {}
1227 }
1228 /* @internal */
1229 export function LDKClosureReason_ty_from_ptr(ptr: number): number {
1230         if(!isWasmInitialized) {
1231                 throw new Error("initializeWasm() must be awaited first!");
1232         }
1233         const nativeResponseValue = wasm.TS_LDKClosureReason_ty_from_ptr(ptr);
1234         return nativeResponseValue;
1235 }
1236 /* @internal */
1237 export function LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr: number): number {
1238         if(!isWasmInitialized) {
1239                 throw new Error("initializeWasm() must be awaited first!");
1240         }
1241         const nativeResponseValue = wasm.TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr);
1242         return nativeResponseValue;
1243 }
1244 /* @internal */
1245 export function LDKClosureReason_ProcessingError_get_err(ptr: number): number {
1246         if(!isWasmInitialized) {
1247                 throw new Error("initializeWasm() must be awaited first!");
1248         }
1249         const nativeResponseValue = wasm.TS_LDKClosureReason_ProcessingError_get_err(ptr);
1250         return nativeResponseValue;
1251 }
1252 /* @internal */
1253 export class LDKEvent {
1254         protected constructor() {}
1255 }
1256 /* @internal */
1257 export function LDKEvent_ty_from_ptr(ptr: number): number {
1258         if(!isWasmInitialized) {
1259                 throw new Error("initializeWasm() must be awaited first!");
1260         }
1261         const nativeResponseValue = wasm.TS_LDKEvent_ty_from_ptr(ptr);
1262         return nativeResponseValue;
1263 }
1264 /* @internal */
1265 export function LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr: number): number {
1266         if(!isWasmInitialized) {
1267                 throw new Error("initializeWasm() must be awaited first!");
1268         }
1269         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr);
1270         return nativeResponseValue;
1271 }
1272 /* @internal */
1273 export function LDKEvent_FundingGenerationReady_get_channel_value_satoshis(ptr: number): bigint {
1274         if(!isWasmInitialized) {
1275                 throw new Error("initializeWasm() must be awaited first!");
1276         }
1277         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_channel_value_satoshis(ptr);
1278         return nativeResponseValue;
1279 }
1280 /* @internal */
1281 export function LDKEvent_FundingGenerationReady_get_output_script(ptr: number): number {
1282         if(!isWasmInitialized) {
1283                 throw new Error("initializeWasm() must be awaited first!");
1284         }
1285         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_output_script(ptr);
1286         return nativeResponseValue;
1287 }
1288 /* @internal */
1289 export function LDKEvent_FundingGenerationReady_get_user_channel_id(ptr: number): bigint {
1290         if(!isWasmInitialized) {
1291                 throw new Error("initializeWasm() must be awaited first!");
1292         }
1293         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_user_channel_id(ptr);
1294         return nativeResponseValue;
1295 }
1296 /* @internal */
1297 export function LDKEvent_PaymentReceived_get_payment_hash(ptr: number): number {
1298         if(!isWasmInitialized) {
1299                 throw new Error("initializeWasm() must be awaited first!");
1300         }
1301         const nativeResponseValue = wasm.TS_LDKEvent_PaymentReceived_get_payment_hash(ptr);
1302         return nativeResponseValue;
1303 }
1304 /* @internal */
1305 export function LDKEvent_PaymentReceived_get_amt(ptr: number): bigint {
1306         if(!isWasmInitialized) {
1307                 throw new Error("initializeWasm() must be awaited first!");
1308         }
1309         const nativeResponseValue = wasm.TS_LDKEvent_PaymentReceived_get_amt(ptr);
1310         return nativeResponseValue;
1311 }
1312 /* @internal */
1313 export function LDKEvent_PaymentReceived_get_purpose(ptr: number): number {
1314         if(!isWasmInitialized) {
1315                 throw new Error("initializeWasm() must be awaited first!");
1316         }
1317         const nativeResponseValue = wasm.TS_LDKEvent_PaymentReceived_get_purpose(ptr);
1318         return nativeResponseValue;
1319 }
1320 /* @internal */
1321 export function LDKEvent_PaymentSent_get_payment_id(ptr: number): number {
1322         if(!isWasmInitialized) {
1323                 throw new Error("initializeWasm() must be awaited first!");
1324         }
1325         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_payment_id(ptr);
1326         return nativeResponseValue;
1327 }
1328 /* @internal */
1329 export function LDKEvent_PaymentSent_get_payment_preimage(ptr: number): number {
1330         if(!isWasmInitialized) {
1331                 throw new Error("initializeWasm() must be awaited first!");
1332         }
1333         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_payment_preimage(ptr);
1334         return nativeResponseValue;
1335 }
1336 /* @internal */
1337 export function LDKEvent_PaymentSent_get_payment_hash(ptr: number): number {
1338         if(!isWasmInitialized) {
1339                 throw new Error("initializeWasm() must be awaited first!");
1340         }
1341         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_payment_hash(ptr);
1342         return nativeResponseValue;
1343 }
1344 /* @internal */
1345 export function LDKEvent_PaymentSent_get_fee_paid_msat(ptr: number): number {
1346         if(!isWasmInitialized) {
1347                 throw new Error("initializeWasm() must be awaited first!");
1348         }
1349         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_fee_paid_msat(ptr);
1350         return nativeResponseValue;
1351 }
1352 /* @internal */
1353 export function LDKEvent_PaymentPathFailed_get_payment_id(ptr: number): number {
1354         if(!isWasmInitialized) {
1355                 throw new Error("initializeWasm() must be awaited first!");
1356         }
1357         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_payment_id(ptr);
1358         return nativeResponseValue;
1359 }
1360 /* @internal */
1361 export function LDKEvent_PaymentPathFailed_get_payment_hash(ptr: number): number {
1362         if(!isWasmInitialized) {
1363                 throw new Error("initializeWasm() must be awaited first!");
1364         }
1365         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_payment_hash(ptr);
1366         return nativeResponseValue;
1367 }
1368 /* @internal */
1369 export function LDKEvent_PaymentPathFailed_get_rejected_by_dest(ptr: number): boolean {
1370         if(!isWasmInitialized) {
1371                 throw new Error("initializeWasm() must be awaited first!");
1372         }
1373         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_rejected_by_dest(ptr);
1374         return nativeResponseValue;
1375 }
1376 /* @internal */
1377 export function LDKEvent_PaymentPathFailed_get_network_update(ptr: number): number {
1378         if(!isWasmInitialized) {
1379                 throw new Error("initializeWasm() must be awaited first!");
1380         }
1381         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_network_update(ptr);
1382         return nativeResponseValue;
1383 }
1384 /* @internal */
1385 export function LDKEvent_PaymentPathFailed_get_all_paths_failed(ptr: number): boolean {
1386         if(!isWasmInitialized) {
1387                 throw new Error("initializeWasm() must be awaited first!");
1388         }
1389         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_all_paths_failed(ptr);
1390         return nativeResponseValue;
1391 }
1392 /* @internal */
1393 export function LDKEvent_PaymentPathFailed_get_path(ptr: number): number {
1394         if(!isWasmInitialized) {
1395                 throw new Error("initializeWasm() must be awaited first!");
1396         }
1397         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_path(ptr);
1398         return nativeResponseValue;
1399 }
1400 /* @internal */
1401 export function LDKEvent_PaymentPathFailed_get_short_channel_id(ptr: number): number {
1402         if(!isWasmInitialized) {
1403                 throw new Error("initializeWasm() must be awaited first!");
1404         }
1405         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_short_channel_id(ptr);
1406         return nativeResponseValue;
1407 }
1408 /* @internal */
1409 export function LDKEvent_PaymentPathFailed_get_retry(ptr: number): number {
1410         if(!isWasmInitialized) {
1411                 throw new Error("initializeWasm() must be awaited first!");
1412         }
1413         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_retry(ptr);
1414         return nativeResponseValue;
1415 }
1416 /* @internal */
1417 export function LDKEvent_PaymentFailed_get_payment_id(ptr: number): number {
1418         if(!isWasmInitialized) {
1419                 throw new Error("initializeWasm() must be awaited first!");
1420         }
1421         const nativeResponseValue = wasm.TS_LDKEvent_PaymentFailed_get_payment_id(ptr);
1422         return nativeResponseValue;
1423 }
1424 /* @internal */
1425 export function LDKEvent_PaymentFailed_get_payment_hash(ptr: number): number {
1426         if(!isWasmInitialized) {
1427                 throw new Error("initializeWasm() must be awaited first!");
1428         }
1429         const nativeResponseValue = wasm.TS_LDKEvent_PaymentFailed_get_payment_hash(ptr);
1430         return nativeResponseValue;
1431 }
1432 /* @internal */
1433 export function LDKEvent_PendingHTLCsForwardable_get_time_forwardable(ptr: number): bigint {
1434         if(!isWasmInitialized) {
1435                 throw new Error("initializeWasm() must be awaited first!");
1436         }
1437         const nativeResponseValue = wasm.TS_LDKEvent_PendingHTLCsForwardable_get_time_forwardable(ptr);
1438         return nativeResponseValue;
1439 }
1440 /* @internal */
1441 export function LDKEvent_SpendableOutputs_get_outputs(ptr: number): number {
1442         if(!isWasmInitialized) {
1443                 throw new Error("initializeWasm() must be awaited first!");
1444         }
1445         const nativeResponseValue = wasm.TS_LDKEvent_SpendableOutputs_get_outputs(ptr);
1446         return nativeResponseValue;
1447 }
1448 /* @internal */
1449 export function LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr: number): number {
1450         if(!isWasmInitialized) {
1451                 throw new Error("initializeWasm() must be awaited first!");
1452         }
1453         const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr);
1454         return nativeResponseValue;
1455 }
1456 /* @internal */
1457 export function LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr: number): boolean {
1458         if(!isWasmInitialized) {
1459                 throw new Error("initializeWasm() must be awaited first!");
1460         }
1461         const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr);
1462         return nativeResponseValue;
1463 }
1464 /* @internal */
1465 export function LDKEvent_ChannelClosed_get_channel_id(ptr: number): number {
1466         if(!isWasmInitialized) {
1467                 throw new Error("initializeWasm() must be awaited first!");
1468         }
1469         const nativeResponseValue = wasm.TS_LDKEvent_ChannelClosed_get_channel_id(ptr);
1470         return nativeResponseValue;
1471 }
1472 /* @internal */
1473 export function LDKEvent_ChannelClosed_get_user_channel_id(ptr: number): bigint {
1474         if(!isWasmInitialized) {
1475                 throw new Error("initializeWasm() must be awaited first!");
1476         }
1477         const nativeResponseValue = wasm.TS_LDKEvent_ChannelClosed_get_user_channel_id(ptr);
1478         return nativeResponseValue;
1479 }
1480 /* @internal */
1481 export function LDKEvent_ChannelClosed_get_reason(ptr: number): number {
1482         if(!isWasmInitialized) {
1483                 throw new Error("initializeWasm() must be awaited first!");
1484         }
1485         const nativeResponseValue = wasm.TS_LDKEvent_ChannelClosed_get_reason(ptr);
1486         return nativeResponseValue;
1487 }
1488 /* @internal */
1489 export function LDKEvent_DiscardFunding_get_channel_id(ptr: number): number {
1490         if(!isWasmInitialized) {
1491                 throw new Error("initializeWasm() must be awaited first!");
1492         }
1493         const nativeResponseValue = wasm.TS_LDKEvent_DiscardFunding_get_channel_id(ptr);
1494         return nativeResponseValue;
1495 }
1496 /* @internal */
1497 export function LDKEvent_DiscardFunding_get_transaction(ptr: number): number {
1498         if(!isWasmInitialized) {
1499                 throw new Error("initializeWasm() must be awaited first!");
1500         }
1501         const nativeResponseValue = wasm.TS_LDKEvent_DiscardFunding_get_transaction(ptr);
1502         return nativeResponseValue;
1503 }
1504 /* @internal */
1505 export function LDKEvent_PaymentPathSuccessful_get_payment_id(ptr: number): number {
1506         if(!isWasmInitialized) {
1507                 throw new Error("initializeWasm() must be awaited first!");
1508         }
1509         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathSuccessful_get_payment_id(ptr);
1510         return nativeResponseValue;
1511 }
1512 /* @internal */
1513 export function LDKEvent_PaymentPathSuccessful_get_payment_hash(ptr: number): number {
1514         if(!isWasmInitialized) {
1515                 throw new Error("initializeWasm() must be awaited first!");
1516         }
1517         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathSuccessful_get_payment_hash(ptr);
1518         return nativeResponseValue;
1519 }
1520 /* @internal */
1521 export function LDKEvent_PaymentPathSuccessful_get_path(ptr: number): number {
1522         if(!isWasmInitialized) {
1523                 throw new Error("initializeWasm() must be awaited first!");
1524         }
1525         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathSuccessful_get_path(ptr);
1526         return nativeResponseValue;
1527 }
1528         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1529 /* @internal */
1530 export function C2Tuple_usizeTransactionZ_get_a(owner: number): number {
1531         if(!isWasmInitialized) {
1532                 throw new Error("initializeWasm() must be awaited first!");
1533         }
1534         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_a(owner);
1535         return nativeResponseValue;
1536 }
1537         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1538 /* @internal */
1539 export function C2Tuple_usizeTransactionZ_get_b(owner: number): number {
1540         if(!isWasmInitialized) {
1541                 throw new Error("initializeWasm() must be awaited first!");
1542         }
1543         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_b(owner);
1544         return nativeResponseValue;
1545 }
1546         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1547 /* @internal */
1548 export function C2Tuple_u32TxOutZ_get_a(owner: number): number {
1549         if(!isWasmInitialized) {
1550                 throw new Error("initializeWasm() must be awaited first!");
1551         }
1552         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_a(owner);
1553         return nativeResponseValue;
1554 }
1555         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1556 /* @internal */
1557 export function C2Tuple_u32TxOutZ_get_b(owner: number): number {
1558         if(!isWasmInitialized) {
1559                 throw new Error("initializeWasm() must be awaited first!");
1560         }
1561         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_b(owner);
1562         return nativeResponseValue;
1563 }
1564         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1565 /* @internal */
1566 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner: number): number {
1567         if(!isWasmInitialized) {
1568                 throw new Error("initializeWasm() must be awaited first!");
1569         }
1570         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner);
1571         return nativeResponseValue;
1572 }
1573         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1574 /* @internal */
1575 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner: number): number {
1576         if(!isWasmInitialized) {
1577                 throw new Error("initializeWasm() must be awaited first!");
1578         }
1579         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner);
1580         return nativeResponseValue;
1581 }
1582 /* @internal */
1583 export class LDKBalance {
1584         protected constructor() {}
1585 }
1586 /* @internal */
1587 export function LDKBalance_ty_from_ptr(ptr: number): number {
1588         if(!isWasmInitialized) {
1589                 throw new Error("initializeWasm() must be awaited first!");
1590         }
1591         const nativeResponseValue = wasm.TS_LDKBalance_ty_from_ptr(ptr);
1592         return nativeResponseValue;
1593 }
1594 /* @internal */
1595 export function LDKBalance_ClaimableOnChannelClose_get_claimable_amount_satoshis(ptr: number): bigint {
1596         if(!isWasmInitialized) {
1597                 throw new Error("initializeWasm() must be awaited first!");
1598         }
1599         const nativeResponseValue = wasm.TS_LDKBalance_ClaimableOnChannelClose_get_claimable_amount_satoshis(ptr);
1600         return nativeResponseValue;
1601 }
1602 /* @internal */
1603 export function LDKBalance_ClaimableAwaitingConfirmations_get_claimable_amount_satoshis(ptr: number): bigint {
1604         if(!isWasmInitialized) {
1605                 throw new Error("initializeWasm() must be awaited first!");
1606         }
1607         const nativeResponseValue = wasm.TS_LDKBalance_ClaimableAwaitingConfirmations_get_claimable_amount_satoshis(ptr);
1608         return nativeResponseValue;
1609 }
1610 /* @internal */
1611 export function LDKBalance_ClaimableAwaitingConfirmations_get_confirmation_height(ptr: number): number {
1612         if(!isWasmInitialized) {
1613                 throw new Error("initializeWasm() must be awaited first!");
1614         }
1615         const nativeResponseValue = wasm.TS_LDKBalance_ClaimableAwaitingConfirmations_get_confirmation_height(ptr);
1616         return nativeResponseValue;
1617 }
1618 /* @internal */
1619 export function LDKBalance_ContentiousClaimable_get_claimable_amount_satoshis(ptr: number): bigint {
1620         if(!isWasmInitialized) {
1621                 throw new Error("initializeWasm() must be awaited first!");
1622         }
1623         const nativeResponseValue = wasm.TS_LDKBalance_ContentiousClaimable_get_claimable_amount_satoshis(ptr);
1624         return nativeResponseValue;
1625 }
1626 /* @internal */
1627 export function LDKBalance_ContentiousClaimable_get_timeout_height(ptr: number): number {
1628         if(!isWasmInitialized) {
1629                 throw new Error("initializeWasm() must be awaited first!");
1630         }
1631         const nativeResponseValue = wasm.TS_LDKBalance_ContentiousClaimable_get_timeout_height(ptr);
1632         return nativeResponseValue;
1633 }
1634 /* @internal */
1635 export function LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_amount_satoshis(ptr: number): bigint {
1636         if(!isWasmInitialized) {
1637                 throw new Error("initializeWasm() must be awaited first!");
1638         }
1639         const nativeResponseValue = wasm.TS_LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_amount_satoshis(ptr);
1640         return nativeResponseValue;
1641 }
1642 /* @internal */
1643 export function LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_height(ptr: number): number {
1644         if(!isWasmInitialized) {
1645                 throw new Error("initializeWasm() must be awaited first!");
1646         }
1647         const nativeResponseValue = wasm.TS_LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_height(ptr);
1648         return nativeResponseValue;
1649 }
1650         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1651 /* @internal */
1652 export function C2Tuple_SignatureCVec_SignatureZZ_get_a(owner: number): number {
1653         if(!isWasmInitialized) {
1654                 throw new Error("initializeWasm() must be awaited first!");
1655         }
1656         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(owner);
1657         return nativeResponseValue;
1658 }
1659         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1660 /* @internal */
1661 export function C2Tuple_SignatureCVec_SignatureZZ_get_b(owner: number): number {
1662         if(!isWasmInitialized) {
1663                 throw new Error("initializeWasm() must be awaited first!");
1664         }
1665         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(owner);
1666         return nativeResponseValue;
1667 }
1668         // struct LDKC2Tuple_SignatureCVec_SignatureZZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1669 /* @internal */
1670 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner: number): number {
1671         if(!isWasmInitialized) {
1672                 throw new Error("initializeWasm() must be awaited first!");
1673         }
1674         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner);
1675         return nativeResponseValue;
1676 }
1677         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1678 /* @internal */
1679 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner: number): void {
1680         if(!isWasmInitialized) {
1681                 throw new Error("initializeWasm() must be awaited first!");
1682         }
1683         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner);
1684         // debug statements here
1685 }
1686         // struct LDKSignature CResult_SignatureNoneZ_get_ok(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1687 /* @internal */
1688 export function CResult_SignatureNoneZ_get_ok(owner: number): number {
1689         if(!isWasmInitialized) {
1690                 throw new Error("initializeWasm() must be awaited first!");
1691         }
1692         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_ok(owner);
1693         return nativeResponseValue;
1694 }
1695         // void CResult_SignatureNoneZ_get_err(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1696 /* @internal */
1697 export function CResult_SignatureNoneZ_get_err(owner: number): void {
1698         if(!isWasmInitialized) {
1699                 throw new Error("initializeWasm() must be awaited first!");
1700         }
1701         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_err(owner);
1702         // debug statements here
1703 }
1704 /* @internal */
1705 export interface LDKBaseSign {
1706         get_per_commitment_point (idx: bigint): number;
1707         release_commitment_secret (idx: bigint): number;
1708         validate_holder_commitment (holder_tx: number): number;
1709         channel_keys_id (): number;
1710         sign_counterparty_commitment (commitment_tx: number): number;
1711         validate_counterparty_revocation (idx: bigint, secret: number): number;
1712         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
1713         sign_justice_revoked_output (justice_tx: number, input: number, amount: bigint, per_commitment_key: number): number;
1714         sign_justice_revoked_htlc (justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: number): number;
1715         sign_counterparty_htlc_transaction (htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: number): number;
1716         sign_closing_transaction (closing_tx: number): number;
1717         sign_channel_announcement (msg: number): number;
1718         ready_channel (channel_parameters: number): void;
1719 }
1720
1721 /* @internal */
1722 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
1723         if(!isWasmInitialized) {
1724                 throw new Error("initializeWasm() must be awaited first!");
1725         }
1726         var new_obj_idx = js_objs.length;
1727         for (var i = 0; i < js_objs.length; i++) {
1728                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
1729         }
1730         js_objs[i] = new WeakRef(impl);
1731         return wasm.TS_LDKBaseSign_new(i);
1732 }
1733         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1734 /* @internal */
1735 export function BaseSign_get_per_commitment_point(this_arg: number, idx: bigint): number {
1736         if(!isWasmInitialized) {
1737                 throw new Error("initializeWasm() must be awaited first!");
1738         }
1739         const nativeResponseValue = wasm.TS_BaseSign_get_per_commitment_point(this_arg, idx);
1740         return nativeResponseValue;
1741 }
1742         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1743 /* @internal */
1744 export function BaseSign_release_commitment_secret(this_arg: number, idx: bigint): number {
1745         if(!isWasmInitialized) {
1746                 throw new Error("initializeWasm() must be awaited first!");
1747         }
1748         const nativeResponseValue = wasm.TS_BaseSign_release_commitment_secret(this_arg, idx);
1749         return nativeResponseValue;
1750 }
1751         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
1752 /* @internal */
1753 export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
1754         if(!isWasmInitialized) {
1755                 throw new Error("initializeWasm() must be awaited first!");
1756         }
1757         const nativeResponseValue = wasm.TS_BaseSign_validate_holder_commitment(this_arg, holder_tx);
1758         return nativeResponseValue;
1759 }
1760         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
1761 /* @internal */
1762 export function BaseSign_channel_keys_id(this_arg: number): number {
1763         if(!isWasmInitialized) {
1764                 throw new Error("initializeWasm() must be awaited first!");
1765         }
1766         const nativeResponseValue = wasm.TS_BaseSign_channel_keys_id(this_arg);
1767         return nativeResponseValue;
1768 }
1769         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
1770 /* @internal */
1771 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
1772         if(!isWasmInitialized) {
1773                 throw new Error("initializeWasm() must be awaited first!");
1774         }
1775         const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
1776         return nativeResponseValue;
1777 }
1778         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
1779 /* @internal */
1780 export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: bigint, secret: number): number {
1781         if(!isWasmInitialized) {
1782                 throw new Error("initializeWasm() must be awaited first!");
1783         }
1784         const nativeResponseValue = wasm.TS_BaseSign_validate_counterparty_revocation(this_arg, idx, secret);
1785         return nativeResponseValue;
1786 }
1787         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
1788 /* @internal */
1789 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
1790         if(!isWasmInitialized) {
1791                 throw new Error("initializeWasm() must be awaited first!");
1792         }
1793         const nativeResponseValue = wasm.TS_BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
1794         return nativeResponseValue;
1795 }
1796         // 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]
1797 /* @internal */
1798 export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: number, input: number, amount: bigint, per_commitment_key: number): number {
1799         if(!isWasmInitialized) {
1800                 throw new Error("initializeWasm() must be awaited first!");
1801         }
1802         const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_output(this_arg, justice_tx, input, amount, per_commitment_key);
1803         return nativeResponseValue;
1804 }
1805         // 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
1806 /* @internal */
1807 export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: number): number {
1808         if(!isWasmInitialized) {
1809                 throw new Error("initializeWasm() must be awaited first!");
1810         }
1811         const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_htlc(this_arg, justice_tx, input, amount, per_commitment_key, htlc);
1812         return nativeResponseValue;
1813 }
1814         // 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
1815 /* @internal */
1816 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: number): number {
1817         if(!isWasmInitialized) {
1818                 throw new Error("initializeWasm() must be awaited first!");
1819         }
1820         const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_htlc_transaction(this_arg, htlc_tx, input, amount, per_commitment_point, htlc);
1821         return nativeResponseValue;
1822 }
1823         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
1824 /* @internal */
1825 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
1826         if(!isWasmInitialized) {
1827                 throw new Error("initializeWasm() must be awaited first!");
1828         }
1829         const nativeResponseValue = wasm.TS_BaseSign_sign_closing_transaction(this_arg, closing_tx);
1830         return nativeResponseValue;
1831 }
1832         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
1833 /* @internal */
1834 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
1835         if(!isWasmInitialized) {
1836                 throw new Error("initializeWasm() must be awaited first!");
1837         }
1838         const nativeResponseValue = wasm.TS_BaseSign_sign_channel_announcement(this_arg, msg);
1839         return nativeResponseValue;
1840 }
1841         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
1842 /* @internal */
1843 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
1844         if(!isWasmInitialized) {
1845                 throw new Error("initializeWasm() must be awaited first!");
1846         }
1847         const nativeResponseValue = wasm.TS_BaseSign_ready_channel(this_arg, channel_parameters);
1848         // debug statements here
1849 }
1850         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
1851 /* @internal */
1852 export function BaseSign_get_pubkeys(this_arg: number): number {
1853         if(!isWasmInitialized) {
1854                 throw new Error("initializeWasm() must be awaited first!");
1855         }
1856         const nativeResponseValue = wasm.TS_BaseSign_get_pubkeys(this_arg);
1857         return nativeResponseValue;
1858 }
1859 /* @internal */
1860 export interface LDKSign {
1861         write (): number;
1862 }
1863
1864 /* @internal */
1865 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
1866         if(!isWasmInitialized) {
1867                 throw new Error("initializeWasm() must be awaited first!");
1868         }
1869         var new_obj_idx = js_objs.length;
1870         for (var i = 0; i < js_objs.length; i++) {
1871                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
1872         }
1873         js_objs[i] = new WeakRef(impl);
1874         return wasm.TS_LDKSign_new(i);
1875 }
1876         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
1877 /* @internal */
1878 export function Sign_write(this_arg: number): number {
1879         if(!isWasmInitialized) {
1880                 throw new Error("initializeWasm() must be awaited first!");
1881         }
1882         const nativeResponseValue = wasm.TS_Sign_write(this_arg);
1883         return nativeResponseValue;
1884 }
1885         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1886 /* @internal */
1887 export function C2Tuple_BlockHashChannelMonitorZ_get_a(owner: number): number {
1888         if(!isWasmInitialized) {
1889                 throw new Error("initializeWasm() must be awaited first!");
1890         }
1891         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_a(owner);
1892         return nativeResponseValue;
1893 }
1894         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1895 /* @internal */
1896 export function C2Tuple_BlockHashChannelMonitorZ_get_b(owner: number): number {
1897         if(!isWasmInitialized) {
1898                 throw new Error("initializeWasm() must be awaited first!");
1899         }
1900         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_b(owner);
1901         return nativeResponseValue;
1902 }
1903         // struct LDKC2Tuple_BlockHashChannelMonitorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1904 /* @internal */
1905 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner: number): number {
1906         if(!isWasmInitialized) {
1907                 throw new Error("initializeWasm() must be awaited first!");
1908         }
1909         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner);
1910         return nativeResponseValue;
1911 }
1912         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1913 /* @internal */
1914 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner: number): number {
1915         if(!isWasmInitialized) {
1916                 throw new Error("initializeWasm() must be awaited first!");
1917         }
1918         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner);
1919         return nativeResponseValue;
1920 }
1921         // struct LDKRouteHop CResult_RouteHopDecodeErrorZ_get_ok(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1922 /* @internal */
1923 export function CResult_RouteHopDecodeErrorZ_get_ok(owner: number): number {
1924         if(!isWasmInitialized) {
1925                 throw new Error("initializeWasm() must be awaited first!");
1926         }
1927         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_ok(owner);
1928         return nativeResponseValue;
1929 }
1930         // struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1931 /* @internal */
1932 export function CResult_RouteHopDecodeErrorZ_get_err(owner: number): number {
1933         if(!isWasmInitialized) {
1934                 throw new Error("initializeWasm() must be awaited first!");
1935         }
1936         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_err(owner);
1937         return nativeResponseValue;
1938 }
1939         // struct LDKRoute CResult_RouteDecodeErrorZ_get_ok(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1940 /* @internal */
1941 export function CResult_RouteDecodeErrorZ_get_ok(owner: number): number {
1942         if(!isWasmInitialized) {
1943                 throw new Error("initializeWasm() must be awaited first!");
1944         }
1945         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_ok(owner);
1946         return nativeResponseValue;
1947 }
1948         // struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1949 /* @internal */
1950 export function CResult_RouteDecodeErrorZ_get_err(owner: number): number {
1951         if(!isWasmInitialized) {
1952                 throw new Error("initializeWasm() must be awaited first!");
1953         }
1954         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_err(owner);
1955         return nativeResponseValue;
1956 }
1957         // struct LDKRouteParameters CResult_RouteParametersDecodeErrorZ_get_ok(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1958 /* @internal */
1959 export function CResult_RouteParametersDecodeErrorZ_get_ok(owner: number): number {
1960         if(!isWasmInitialized) {
1961                 throw new Error("initializeWasm() must be awaited first!");
1962         }
1963         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_ok(owner);
1964         return nativeResponseValue;
1965 }
1966         // struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1967 /* @internal */
1968 export function CResult_RouteParametersDecodeErrorZ_get_err(owner: number): number {
1969         if(!isWasmInitialized) {
1970                 throw new Error("initializeWasm() must be awaited first!");
1971         }
1972         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_err(owner);
1973         return nativeResponseValue;
1974 }
1975         // struct LDKPayee CResult_PayeeDecodeErrorZ_get_ok(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1976 /* @internal */
1977 export function CResult_PayeeDecodeErrorZ_get_ok(owner: number): number {
1978         if(!isWasmInitialized) {
1979                 throw new Error("initializeWasm() must be awaited first!");
1980         }
1981         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_ok(owner);
1982         return nativeResponseValue;
1983 }
1984         // struct LDKDecodeError CResult_PayeeDecodeErrorZ_get_err(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1985 /* @internal */
1986 export function CResult_PayeeDecodeErrorZ_get_err(owner: number): number {
1987         if(!isWasmInitialized) {
1988                 throw new Error("initializeWasm() must be awaited first!");
1989         }
1990         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_err(owner);
1991         return nativeResponseValue;
1992 }
1993         // struct LDKRouteHint CResult_RouteHintDecodeErrorZ_get_ok(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1994 /* @internal */
1995 export function CResult_RouteHintDecodeErrorZ_get_ok(owner: number): number {
1996         if(!isWasmInitialized) {
1997                 throw new Error("initializeWasm() must be awaited first!");
1998         }
1999         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_ok(owner);
2000         return nativeResponseValue;
2001 }
2002         // struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
2003 /* @internal */
2004 export function CResult_RouteHintDecodeErrorZ_get_err(owner: number): number {
2005         if(!isWasmInitialized) {
2006                 throw new Error("initializeWasm() must be awaited first!");
2007         }
2008         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_err(owner);
2009         return nativeResponseValue;
2010 }
2011         // struct LDKRouteHintHop CResult_RouteHintHopDecodeErrorZ_get_ok(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
2012 /* @internal */
2013 export function CResult_RouteHintHopDecodeErrorZ_get_ok(owner: number): number {
2014         if(!isWasmInitialized) {
2015                 throw new Error("initializeWasm() must be awaited first!");
2016         }
2017         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_ok(owner);
2018         return nativeResponseValue;
2019 }
2020         // struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
2021 /* @internal */
2022 export function CResult_RouteHintHopDecodeErrorZ_get_err(owner: number): number {
2023         if(!isWasmInitialized) {
2024                 throw new Error("initializeWasm() must be awaited first!");
2025         }
2026         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_err(owner);
2027         return nativeResponseValue;
2028 }
2029         // struct LDKRoute CResult_RouteLightningErrorZ_get_ok(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
2030 /* @internal */
2031 export function CResult_RouteLightningErrorZ_get_ok(owner: number): number {
2032         if(!isWasmInitialized) {
2033                 throw new Error("initializeWasm() must be awaited first!");
2034         }
2035         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_ok(owner);
2036         return nativeResponseValue;
2037 }
2038         // struct LDKLightningError CResult_RouteLightningErrorZ_get_err(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
2039 /* @internal */
2040 export function CResult_RouteLightningErrorZ_get_err(owner: number): number {
2041         if(!isWasmInitialized) {
2042                 throw new Error("initializeWasm() must be awaited first!");
2043         }
2044         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_err(owner);
2045         return nativeResponseValue;
2046 }
2047         // void CResult_NoneLightningErrorZ_get_ok(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
2048 /* @internal */
2049 export function CResult_NoneLightningErrorZ_get_ok(owner: number): void {
2050         if(!isWasmInitialized) {
2051                 throw new Error("initializeWasm() must be awaited first!");
2052         }
2053         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_ok(owner);
2054         // debug statements here
2055 }
2056         // struct LDKLightningError CResult_NoneLightningErrorZ_get_err(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
2057 /* @internal */
2058 export function CResult_NoneLightningErrorZ_get_err(owner: number): number {
2059         if(!isWasmInitialized) {
2060                 throw new Error("initializeWasm() must be awaited first!");
2061         }
2062         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_err(owner);
2063         return nativeResponseValue;
2064 }
2065         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
2066 /* @internal */
2067 export function C2Tuple_PublicKeyTypeZ_get_a(owner: number): number {
2068         if(!isWasmInitialized) {
2069                 throw new Error("initializeWasm() must be awaited first!");
2070         }
2071         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_a(owner);
2072         return nativeResponseValue;
2073 }
2074         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
2075 /* @internal */
2076 export function C2Tuple_PublicKeyTypeZ_get_b(owner: number): number {
2077         if(!isWasmInitialized) {
2078                 throw new Error("initializeWasm() must be awaited first!");
2079         }
2080         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_b(owner);
2081         return nativeResponseValue;
2082 }
2083 /* @internal */
2084 export class LDKErrorAction {
2085         protected constructor() {}
2086 }
2087 /* @internal */
2088 export function LDKErrorAction_ty_from_ptr(ptr: number): number {
2089         if(!isWasmInitialized) {
2090                 throw new Error("initializeWasm() must be awaited first!");
2091         }
2092         const nativeResponseValue = wasm.TS_LDKErrorAction_ty_from_ptr(ptr);
2093         return nativeResponseValue;
2094 }
2095 /* @internal */
2096 export function LDKErrorAction_DisconnectPeer_get_msg(ptr: number): number {
2097         if(!isWasmInitialized) {
2098                 throw new Error("initializeWasm() must be awaited first!");
2099         }
2100         const nativeResponseValue = wasm.TS_LDKErrorAction_DisconnectPeer_get_msg(ptr);
2101         return nativeResponseValue;
2102 }
2103 /* @internal */
2104 export function LDKErrorAction_IgnoreAndLog_get_ignore_and_log(ptr: number): Level {
2105         if(!isWasmInitialized) {
2106                 throw new Error("initializeWasm() must be awaited first!");
2107         }
2108         const nativeResponseValue = wasm.TS_LDKErrorAction_IgnoreAndLog_get_ignore_and_log(ptr);
2109         return nativeResponseValue;
2110 }
2111 /* @internal */
2112 export function LDKErrorAction_SendErrorMessage_get_msg(ptr: number): number {
2113         if(!isWasmInitialized) {
2114                 throw new Error("initializeWasm() must be awaited first!");
2115         }
2116         const nativeResponseValue = wasm.TS_LDKErrorAction_SendErrorMessage_get_msg(ptr);
2117         return nativeResponseValue;
2118 }
2119 /* @internal */
2120 export class LDKMessageSendEvent {
2121         protected constructor() {}
2122 }
2123 /* @internal */
2124 export function LDKMessageSendEvent_ty_from_ptr(ptr: number): number {
2125         if(!isWasmInitialized) {
2126                 throw new Error("initializeWasm() must be awaited first!");
2127         }
2128         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_ty_from_ptr(ptr);
2129         return nativeResponseValue;
2130 }
2131 /* @internal */
2132 export function LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr: number): number {
2133         if(!isWasmInitialized) {
2134                 throw new Error("initializeWasm() must be awaited first!");
2135         }
2136         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr);
2137         return nativeResponseValue;
2138 }
2139 /* @internal */
2140 export function LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr: number): number {
2141         if(!isWasmInitialized) {
2142                 throw new Error("initializeWasm() must be awaited first!");
2143         }
2144         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr);
2145         return nativeResponseValue;
2146 }
2147 /* @internal */
2148 export function LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr: number): number {
2149         if(!isWasmInitialized) {
2150                 throw new Error("initializeWasm() must be awaited first!");
2151         }
2152         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr);
2153         return nativeResponseValue;
2154 }
2155 /* @internal */
2156 export function LDKMessageSendEvent_SendOpenChannel_get_msg(ptr: number): number {
2157         if(!isWasmInitialized) {
2158                 throw new Error("initializeWasm() must be awaited first!");
2159         }
2160         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendOpenChannel_get_msg(ptr);
2161         return nativeResponseValue;
2162 }
2163 /* @internal */
2164 export function LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr: number): number {
2165         if(!isWasmInitialized) {
2166                 throw new Error("initializeWasm() must be awaited first!");
2167         }
2168         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr);
2169         return nativeResponseValue;
2170 }
2171 /* @internal */
2172 export function LDKMessageSendEvent_SendFundingCreated_get_msg(ptr: number): number {
2173         if(!isWasmInitialized) {
2174                 throw new Error("initializeWasm() must be awaited first!");
2175         }
2176         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingCreated_get_msg(ptr);
2177         return nativeResponseValue;
2178 }
2179 /* @internal */
2180 export function LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr: number): number {
2181         if(!isWasmInitialized) {
2182                 throw new Error("initializeWasm() must be awaited first!");
2183         }
2184         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr);
2185         return nativeResponseValue;
2186 }
2187 /* @internal */
2188 export function LDKMessageSendEvent_SendFundingSigned_get_msg(ptr: number): number {
2189         if(!isWasmInitialized) {
2190                 throw new Error("initializeWasm() must be awaited first!");
2191         }
2192         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingSigned_get_msg(ptr);
2193         return nativeResponseValue;
2194 }
2195 /* @internal */
2196 export function LDKMessageSendEvent_SendFundingLocked_get_node_id(ptr: number): number {
2197         if(!isWasmInitialized) {
2198                 throw new Error("initializeWasm() must be awaited first!");
2199         }
2200         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingLocked_get_node_id(ptr);
2201         return nativeResponseValue;
2202 }
2203 /* @internal */
2204 export function LDKMessageSendEvent_SendFundingLocked_get_msg(ptr: number): number {
2205         if(!isWasmInitialized) {
2206                 throw new Error("initializeWasm() must be awaited first!");
2207         }
2208         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingLocked_get_msg(ptr);
2209         return nativeResponseValue;
2210 }
2211 /* @internal */
2212 export function LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr: number): number {
2213         if(!isWasmInitialized) {
2214                 throw new Error("initializeWasm() must be awaited first!");
2215         }
2216         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr);
2217         return nativeResponseValue;
2218 }
2219 /* @internal */
2220 export function LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr: number): number {
2221         if(!isWasmInitialized) {
2222                 throw new Error("initializeWasm() must be awaited first!");
2223         }
2224         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr);
2225         return nativeResponseValue;
2226 }
2227 /* @internal */
2228 export function LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr: number): number {
2229         if(!isWasmInitialized) {
2230                 throw new Error("initializeWasm() must be awaited first!");
2231         }
2232         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr);
2233         return nativeResponseValue;
2234 }
2235 /* @internal */
2236 export function LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr: number): number {
2237         if(!isWasmInitialized) {
2238                 throw new Error("initializeWasm() must be awaited first!");
2239         }
2240         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr);
2241         return nativeResponseValue;
2242 }
2243 /* @internal */
2244 export function LDKMessageSendEvent_SendRevokeAndACK_get_node_id(ptr: number): number {
2245         if(!isWasmInitialized) {
2246                 throw new Error("initializeWasm() must be awaited first!");
2247         }
2248         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendRevokeAndACK_get_node_id(ptr);
2249         return nativeResponseValue;
2250 }
2251 /* @internal */
2252 export function LDKMessageSendEvent_SendRevokeAndACK_get_msg(ptr: number): number {
2253         if(!isWasmInitialized) {
2254                 throw new Error("initializeWasm() must be awaited first!");
2255         }
2256         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendRevokeAndACK_get_msg(ptr);
2257         return nativeResponseValue;
2258 }
2259 /* @internal */
2260 export function LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr: number): number {
2261         if(!isWasmInitialized) {
2262                 throw new Error("initializeWasm() must be awaited first!");
2263         }
2264         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr);
2265         return nativeResponseValue;
2266 }
2267 /* @internal */
2268 export function LDKMessageSendEvent_SendClosingSigned_get_msg(ptr: number): number {
2269         if(!isWasmInitialized) {
2270                 throw new Error("initializeWasm() must be awaited first!");
2271         }
2272         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendClosingSigned_get_msg(ptr);
2273         return nativeResponseValue;
2274 }
2275 /* @internal */
2276 export function LDKMessageSendEvent_SendShutdown_get_node_id(ptr: number): number {
2277         if(!isWasmInitialized) {
2278                 throw new Error("initializeWasm() must be awaited first!");
2279         }
2280         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShutdown_get_node_id(ptr);
2281         return nativeResponseValue;
2282 }
2283 /* @internal */
2284 export function LDKMessageSendEvent_SendShutdown_get_msg(ptr: number): number {
2285         if(!isWasmInitialized) {
2286                 throw new Error("initializeWasm() must be awaited first!");
2287         }
2288         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShutdown_get_msg(ptr);
2289         return nativeResponseValue;
2290 }
2291 /* @internal */
2292 export function LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr: number): number {
2293         if(!isWasmInitialized) {
2294                 throw new Error("initializeWasm() must be awaited first!");
2295         }
2296         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr);
2297         return nativeResponseValue;
2298 }
2299 /* @internal */
2300 export function LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr: number): number {
2301         if(!isWasmInitialized) {
2302                 throw new Error("initializeWasm() must be awaited first!");
2303         }
2304         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr);
2305         return nativeResponseValue;
2306 }
2307 /* @internal */
2308 export function LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr: number): number {
2309         if(!isWasmInitialized) {
2310                 throw new Error("initializeWasm() must be awaited first!");
2311         }
2312         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr);
2313         return nativeResponseValue;
2314 }
2315 /* @internal */
2316 export function LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr: number): number {
2317         if(!isWasmInitialized) {
2318                 throw new Error("initializeWasm() must be awaited first!");
2319         }
2320         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr);
2321         return nativeResponseValue;
2322 }
2323 /* @internal */
2324 export function LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr: number): number {
2325         if(!isWasmInitialized) {
2326                 throw new Error("initializeWasm() must be awaited first!");
2327         }
2328         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr);
2329         return nativeResponseValue;
2330 }
2331 /* @internal */
2332 export function LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr: number): number {
2333         if(!isWasmInitialized) {
2334                 throw new Error("initializeWasm() must be awaited first!");
2335         }
2336         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr);
2337         return nativeResponseValue;
2338 }
2339 /* @internal */
2340 export function LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr: number): number {
2341         if(!isWasmInitialized) {
2342                 throw new Error("initializeWasm() must be awaited first!");
2343         }
2344         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr);
2345         return nativeResponseValue;
2346 }
2347 /* @internal */
2348 export function LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr: number): number {
2349         if(!isWasmInitialized) {
2350                 throw new Error("initializeWasm() must be awaited first!");
2351         }
2352         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr);
2353         return nativeResponseValue;
2354 }
2355 /* @internal */
2356 export function LDKMessageSendEvent_HandleError_get_node_id(ptr: number): number {
2357         if(!isWasmInitialized) {
2358                 throw new Error("initializeWasm() must be awaited first!");
2359         }
2360         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_HandleError_get_node_id(ptr);
2361         return nativeResponseValue;
2362 }
2363 /* @internal */
2364 export function LDKMessageSendEvent_HandleError_get_action(ptr: number): number {
2365         if(!isWasmInitialized) {
2366                 throw new Error("initializeWasm() must be awaited first!");
2367         }
2368         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_HandleError_get_action(ptr);
2369         return nativeResponseValue;
2370 }
2371 /* @internal */
2372 export function LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr: number): number {
2373         if(!isWasmInitialized) {
2374                 throw new Error("initializeWasm() must be awaited first!");
2375         }
2376         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr);
2377         return nativeResponseValue;
2378 }
2379 /* @internal */
2380 export function LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr: number): number {
2381         if(!isWasmInitialized) {
2382                 throw new Error("initializeWasm() must be awaited first!");
2383         }
2384         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr);
2385         return nativeResponseValue;
2386 }
2387 /* @internal */
2388 export function LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr: number): number {
2389         if(!isWasmInitialized) {
2390                 throw new Error("initializeWasm() must be awaited first!");
2391         }
2392         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr);
2393         return nativeResponseValue;
2394 }
2395 /* @internal */
2396 export function LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr: number): number {
2397         if(!isWasmInitialized) {
2398                 throw new Error("initializeWasm() must be awaited first!");
2399         }
2400         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr);
2401         return nativeResponseValue;
2402 }
2403 /* @internal */
2404 export function LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr: number): number {
2405         if(!isWasmInitialized) {
2406                 throw new Error("initializeWasm() must be awaited first!");
2407         }
2408         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr);
2409         return nativeResponseValue;
2410 }
2411 /* @internal */
2412 export function LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr: number): number {
2413         if(!isWasmInitialized) {
2414                 throw new Error("initializeWasm() must be awaited first!");
2415         }
2416         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr);
2417         return nativeResponseValue;
2418 }
2419         // bool CResult_boolLightningErrorZ_get_ok(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
2420 /* @internal */
2421 export function CResult_boolLightningErrorZ_get_ok(owner: number): boolean {
2422         if(!isWasmInitialized) {
2423                 throw new Error("initializeWasm() must be awaited first!");
2424         }
2425         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_ok(owner);
2426         return nativeResponseValue;
2427 }
2428         // struct LDKLightningError CResult_boolLightningErrorZ_get_err(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
2429 /* @internal */
2430 export function CResult_boolLightningErrorZ_get_err(owner: number): number {
2431         if(!isWasmInitialized) {
2432                 throw new Error("initializeWasm() must be awaited first!");
2433         }
2434         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_err(owner);
2435         return nativeResponseValue;
2436 }
2437         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
2438 /* @internal */
2439 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner: number): number {
2440         if(!isWasmInitialized) {
2441                 throw new Error("initializeWasm() must be awaited first!");
2442         }
2443         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner);
2444         return nativeResponseValue;
2445 }
2446         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
2447 /* @internal */
2448 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner: number): number {
2449         if(!isWasmInitialized) {
2450                 throw new Error("initializeWasm() must be awaited first!");
2451         }
2452         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner);
2453         return nativeResponseValue;
2454 }
2455         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
2456 /* @internal */
2457 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner: number): number {
2458         if(!isWasmInitialized) {
2459                 throw new Error("initializeWasm() must be awaited first!");
2460         }
2461         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner);
2462         return nativeResponseValue;
2463 }
2464         // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
2465 /* @internal */
2466 export function CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner: number): number {
2467         if(!isWasmInitialized) {
2468                 throw new Error("initializeWasm() must be awaited first!");
2469         }
2470         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner);
2471         return nativeResponseValue;
2472 }
2473         // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
2474 /* @internal */
2475 export function CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner: number): number {
2476         if(!isWasmInitialized) {
2477                 throw new Error("initializeWasm() must be awaited first!");
2478         }
2479         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner);
2480         return nativeResponseValue;
2481 }
2482         // void CResult_NonePeerHandleErrorZ_get_ok(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
2483 /* @internal */
2484 export function CResult_NonePeerHandleErrorZ_get_ok(owner: number): void {
2485         if(!isWasmInitialized) {
2486                 throw new Error("initializeWasm() must be awaited first!");
2487         }
2488         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_ok(owner);
2489         // debug statements here
2490 }
2491         // struct LDKPeerHandleError CResult_NonePeerHandleErrorZ_get_err(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
2492 /* @internal */
2493 export function CResult_NonePeerHandleErrorZ_get_err(owner: number): number {
2494         if(!isWasmInitialized) {
2495                 throw new Error("initializeWasm() must be awaited first!");
2496         }
2497         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_err(owner);
2498         return nativeResponseValue;
2499 }
2500         // bool CResult_boolPeerHandleErrorZ_get_ok(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
2501 /* @internal */
2502 export function CResult_boolPeerHandleErrorZ_get_ok(owner: number): boolean {
2503         if(!isWasmInitialized) {
2504                 throw new Error("initializeWasm() must be awaited first!");
2505         }
2506         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_ok(owner);
2507         return nativeResponseValue;
2508 }
2509         // struct LDKPeerHandleError CResult_boolPeerHandleErrorZ_get_err(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
2510 /* @internal */
2511 export function CResult_boolPeerHandleErrorZ_get_err(owner: number): number {
2512         if(!isWasmInitialized) {
2513                 throw new Error("initializeWasm() must be awaited first!");
2514         }
2515         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_err(owner);
2516         return nativeResponseValue;
2517 }
2518         // struct LDKTxOut CResult_TxOutAccessErrorZ_get_ok(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
2519 /* @internal */
2520 export function CResult_TxOutAccessErrorZ_get_ok(owner: number): number {
2521         if(!isWasmInitialized) {
2522                 throw new Error("initializeWasm() must be awaited first!");
2523         }
2524         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_ok(owner);
2525         return nativeResponseValue;
2526 }
2527         // enum LDKAccessError CResult_TxOutAccessErrorZ_get_err(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
2528 /* @internal */
2529 export function CResult_TxOutAccessErrorZ_get_err(owner: number): AccessError {
2530         if(!isWasmInitialized) {
2531                 throw new Error("initializeWasm() must be awaited first!");
2532         }
2533         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_err(owner);
2534         return nativeResponseValue;
2535 }
2536         // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
2537 /* @internal */
2538 export function CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner: number): void {
2539         if(!isWasmInitialized) {
2540                 throw new Error("initializeWasm() must be awaited first!");
2541         }
2542         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner);
2543         // debug statements here
2544 }
2545         // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
2546 /* @internal */
2547 export function CResult_NoneChannelMonitorUpdateErrZ_get_err(owner: number): ChannelMonitorUpdateErr {
2548         if(!isWasmInitialized) {
2549                 throw new Error("initializeWasm() must be awaited first!");
2550         }
2551         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(owner);
2552         return nativeResponseValue;
2553 }
2554 /* @internal */
2555 export class LDKCOption_C2Tuple_usizeTransactionZZ {
2556         protected constructor() {}
2557 }
2558 /* @internal */
2559 export function LDKCOption_C2Tuple_usizeTransactionZZ_ty_from_ptr(ptr: number): number {
2560         if(!isWasmInitialized) {
2561                 throw new Error("initializeWasm() must be awaited first!");
2562         }
2563         const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_usizeTransactionZZ_ty_from_ptr(ptr);
2564         return nativeResponseValue;
2565 }
2566 /* @internal */
2567 export function LDKCOption_C2Tuple_usizeTransactionZZ_Some_get_some(ptr: number): number {
2568         if(!isWasmInitialized) {
2569                 throw new Error("initializeWasm() must be awaited first!");
2570         }
2571         const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_usizeTransactionZZ_Some_get_some(ptr);
2572         return nativeResponseValue;
2573 }
2574 /* @internal */
2575 export class LDKCOption_ClosureReasonZ {
2576         protected constructor() {}
2577 }
2578 /* @internal */
2579 export function LDKCOption_ClosureReasonZ_ty_from_ptr(ptr: number): number {
2580         if(!isWasmInitialized) {
2581                 throw new Error("initializeWasm() must be awaited first!");
2582         }
2583         const nativeResponseValue = wasm.TS_LDKCOption_ClosureReasonZ_ty_from_ptr(ptr);
2584         return nativeResponseValue;
2585 }
2586 /* @internal */
2587 export function LDKCOption_ClosureReasonZ_Some_get_some(ptr: number): number {
2588         if(!isWasmInitialized) {
2589                 throw new Error("initializeWasm() must be awaited first!");
2590         }
2591         const nativeResponseValue = wasm.TS_LDKCOption_ClosureReasonZ_Some_get_some(ptr);
2592         return nativeResponseValue;
2593 }
2594         // struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
2595 /* @internal */
2596 export function CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner: number): number {
2597         if(!isWasmInitialized) {
2598                 throw new Error("initializeWasm() must be awaited first!");
2599         }
2600         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner);
2601         return nativeResponseValue;
2602 }
2603         // struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
2604 /* @internal */
2605 export function CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner: number): number {
2606         if(!isWasmInitialized) {
2607                 throw new Error("initializeWasm() must be awaited first!");
2608         }
2609         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner);
2610         return nativeResponseValue;
2611 }
2612 /* @internal */
2613 export class LDKCOption_EventZ {
2614         protected constructor() {}
2615 }
2616 /* @internal */
2617 export function LDKCOption_EventZ_ty_from_ptr(ptr: number): number {
2618         if(!isWasmInitialized) {
2619                 throw new Error("initializeWasm() must be awaited first!");
2620         }
2621         const nativeResponseValue = wasm.TS_LDKCOption_EventZ_ty_from_ptr(ptr);
2622         return nativeResponseValue;
2623 }
2624 /* @internal */
2625 export function LDKCOption_EventZ_Some_get_some(ptr: number): number {
2626         if(!isWasmInitialized) {
2627                 throw new Error("initializeWasm() must be awaited first!");
2628         }
2629         const nativeResponseValue = wasm.TS_LDKCOption_EventZ_Some_get_some(ptr);
2630         return nativeResponseValue;
2631 }
2632         // struct LDKCOption_EventZ CResult_COption_EventZDecodeErrorZ_get_ok(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
2633 /* @internal */
2634 export function CResult_COption_EventZDecodeErrorZ_get_ok(owner: number): number {
2635         if(!isWasmInitialized) {
2636                 throw new Error("initializeWasm() must be awaited first!");
2637         }
2638         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_ok(owner);
2639         return nativeResponseValue;
2640 }
2641         // struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
2642 /* @internal */
2643 export function CResult_COption_EventZDecodeErrorZ_get_err(owner: number): number {
2644         if(!isWasmInitialized) {
2645                 throw new Error("initializeWasm() must be awaited first!");
2646         }
2647         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_err(owner);
2648         return nativeResponseValue;
2649 }
2650         // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
2651 /* @internal */
2652 export function CResult_NodeIdDecodeErrorZ_get_ok(owner: number): number {
2653         if(!isWasmInitialized) {
2654                 throw new Error("initializeWasm() must be awaited first!");
2655         }
2656         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_ok(owner);
2657         return nativeResponseValue;
2658 }
2659         // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
2660 /* @internal */
2661 export function CResult_NodeIdDecodeErrorZ_get_err(owner: number): number {
2662         if(!isWasmInitialized) {
2663                 throw new Error("initializeWasm() must be awaited first!");
2664         }
2665         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_err(owner);
2666         return nativeResponseValue;
2667 }
2668         // struct LDKCOption_NetworkUpdateZ CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
2669 /* @internal */
2670 export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner: number): number {
2671         if(!isWasmInitialized) {
2672                 throw new Error("initializeWasm() must be awaited first!");
2673         }
2674         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner);
2675         return nativeResponseValue;
2676 }
2677         // struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
2678 /* @internal */
2679 export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner: number): number {
2680         if(!isWasmInitialized) {
2681                 throw new Error("initializeWasm() must be awaited first!");
2682         }
2683         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner);
2684         return nativeResponseValue;
2685 }
2686 /* @internal */
2687 export interface LDKAccess {
2688         get_utxo (genesis_hash: number, short_channel_id: bigint): number;
2689 }
2690
2691 /* @internal */
2692 export function LDKAccess_new(impl: LDKAccess): number {
2693         if(!isWasmInitialized) {
2694                 throw new Error("initializeWasm() must be awaited first!");
2695         }
2696         var new_obj_idx = js_objs.length;
2697         for (var i = 0; i < js_objs.length; i++) {
2698                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
2699         }
2700         js_objs[i] = new WeakRef(impl);
2701         return wasm.TS_LDKAccess_new(i);
2702 }
2703         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
2704 /* @internal */
2705 export function Access_get_utxo(this_arg: number, genesis_hash: number, short_channel_id: bigint): number {
2706         if(!isWasmInitialized) {
2707                 throw new Error("initializeWasm() must be awaited first!");
2708         }
2709         const nativeResponseValue = wasm.TS_Access_get_utxo(this_arg, genesis_hash, short_channel_id);
2710         return nativeResponseValue;
2711 }
2712 /* @internal */
2713 export class LDKCOption_AccessZ {
2714         protected constructor() {}
2715 }
2716 /* @internal */
2717 export function LDKCOption_AccessZ_ty_from_ptr(ptr: number): number {
2718         if(!isWasmInitialized) {
2719                 throw new Error("initializeWasm() must be awaited first!");
2720         }
2721         const nativeResponseValue = wasm.TS_LDKCOption_AccessZ_ty_from_ptr(ptr);
2722         return nativeResponseValue;
2723 }
2724 /* @internal */
2725 export function LDKCOption_AccessZ_Some_get_some(ptr: number): number {
2726         if(!isWasmInitialized) {
2727                 throw new Error("initializeWasm() must be awaited first!");
2728         }
2729         const nativeResponseValue = wasm.TS_LDKCOption_AccessZ_Some_get_some(ptr);
2730         return nativeResponseValue;
2731 }
2732         // struct LDKDirectionalChannelInfo CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2733 /* @internal */
2734 export function CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner: number): number {
2735         if(!isWasmInitialized) {
2736                 throw new Error("initializeWasm() must be awaited first!");
2737         }
2738         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner);
2739         return nativeResponseValue;
2740 }
2741         // struct LDKDecodeError CResult_DirectionalChannelInfoDecodeErrorZ_get_err(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2742 /* @internal */
2743 export function CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner: number): number {
2744         if(!isWasmInitialized) {
2745                 throw new Error("initializeWasm() must be awaited first!");
2746         }
2747         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner);
2748         return nativeResponseValue;
2749 }
2750         // struct LDKChannelInfo CResult_ChannelInfoDecodeErrorZ_get_ok(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2751 /* @internal */
2752 export function CResult_ChannelInfoDecodeErrorZ_get_ok(owner: number): number {
2753         if(!isWasmInitialized) {
2754                 throw new Error("initializeWasm() must be awaited first!");
2755         }
2756         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_ok(owner);
2757         return nativeResponseValue;
2758 }
2759         // struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2760 /* @internal */
2761 export function CResult_ChannelInfoDecodeErrorZ_get_err(owner: number): number {
2762         if(!isWasmInitialized) {
2763                 throw new Error("initializeWasm() must be awaited first!");
2764         }
2765         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_err(owner);
2766         return nativeResponseValue;
2767 }
2768         // struct LDKRoutingFees CResult_RoutingFeesDecodeErrorZ_get_ok(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
2769 /* @internal */
2770 export function CResult_RoutingFeesDecodeErrorZ_get_ok(owner: number): number {
2771         if(!isWasmInitialized) {
2772                 throw new Error("initializeWasm() must be awaited first!");
2773         }
2774         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_ok(owner);
2775         return nativeResponseValue;
2776 }
2777         // struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
2778 /* @internal */
2779 export function CResult_RoutingFeesDecodeErrorZ_get_err(owner: number): number {
2780         if(!isWasmInitialized) {
2781                 throw new Error("initializeWasm() must be awaited first!");
2782         }
2783         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_err(owner);
2784         return nativeResponseValue;
2785 }
2786 /* @internal */
2787 export class LDKNetAddress {
2788         protected constructor() {}
2789 }
2790 /* @internal */
2791 export function LDKNetAddress_ty_from_ptr(ptr: number): number {
2792         if(!isWasmInitialized) {
2793                 throw new Error("initializeWasm() must be awaited first!");
2794         }
2795         const nativeResponseValue = wasm.TS_LDKNetAddress_ty_from_ptr(ptr);
2796         return nativeResponseValue;
2797 }
2798 /* @internal */
2799 export function LDKNetAddress_IPv4_get_addr(ptr: number): number {
2800         if(!isWasmInitialized) {
2801                 throw new Error("initializeWasm() must be awaited first!");
2802         }
2803         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv4_get_addr(ptr);
2804         return nativeResponseValue;
2805 }
2806 /* @internal */
2807 export function LDKNetAddress_IPv4_get_port(ptr: number): number {
2808         if(!isWasmInitialized) {
2809                 throw new Error("initializeWasm() must be awaited first!");
2810         }
2811         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv4_get_port(ptr);
2812         return nativeResponseValue;
2813 }
2814 /* @internal */
2815 export function LDKNetAddress_IPv6_get_addr(ptr: number): number {
2816         if(!isWasmInitialized) {
2817                 throw new Error("initializeWasm() must be awaited first!");
2818         }
2819         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv6_get_addr(ptr);
2820         return nativeResponseValue;
2821 }
2822 /* @internal */
2823 export function LDKNetAddress_IPv6_get_port(ptr: number): number {
2824         if(!isWasmInitialized) {
2825                 throw new Error("initializeWasm() must be awaited first!");
2826         }
2827         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv6_get_port(ptr);
2828         return nativeResponseValue;
2829 }
2830 /* @internal */
2831 export function LDKNetAddress_OnionV2_get_onion_v2(ptr: number): number {
2832         if(!isWasmInitialized) {
2833                 throw new Error("initializeWasm() must be awaited first!");
2834         }
2835         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV2_get_onion_v2(ptr);
2836         return nativeResponseValue;
2837 }
2838 /* @internal */
2839 export function LDKNetAddress_OnionV3_get_ed25519_pubkey(ptr: number): number {
2840         if(!isWasmInitialized) {
2841                 throw new Error("initializeWasm() must be awaited first!");
2842         }
2843         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_ed25519_pubkey(ptr);
2844         return nativeResponseValue;
2845 }
2846 /* @internal */
2847 export function LDKNetAddress_OnionV3_get_checksum(ptr: number): number {
2848         if(!isWasmInitialized) {
2849                 throw new Error("initializeWasm() must be awaited first!");
2850         }
2851         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_checksum(ptr);
2852         return nativeResponseValue;
2853 }
2854 /* @internal */
2855 export function LDKNetAddress_OnionV3_get_version(ptr: number): number {
2856         if(!isWasmInitialized) {
2857                 throw new Error("initializeWasm() must be awaited first!");
2858         }
2859         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_version(ptr);
2860         return nativeResponseValue;
2861 }
2862 /* @internal */
2863 export function LDKNetAddress_OnionV3_get_port(ptr: number): number {
2864         if(!isWasmInitialized) {
2865                 throw new Error("initializeWasm() must be awaited first!");
2866         }
2867         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_port(ptr);
2868         return nativeResponseValue;
2869 }
2870         // struct LDKNodeAnnouncementInfo CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
2871 /* @internal */
2872 export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner: number): number {
2873         if(!isWasmInitialized) {
2874                 throw new Error("initializeWasm() must be awaited first!");
2875         }
2876         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner);
2877         return nativeResponseValue;
2878 }
2879         // struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
2880 /* @internal */
2881 export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner: number): number {
2882         if(!isWasmInitialized) {
2883                 throw new Error("initializeWasm() must be awaited first!");
2884         }
2885         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner);
2886         return nativeResponseValue;
2887 }
2888         // struct LDKNodeInfo CResult_NodeInfoDecodeErrorZ_get_ok(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2889 /* @internal */
2890 export function CResult_NodeInfoDecodeErrorZ_get_ok(owner: number): number {
2891         if(!isWasmInitialized) {
2892                 throw new Error("initializeWasm() must be awaited first!");
2893         }
2894         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_ok(owner);
2895         return nativeResponseValue;
2896 }
2897         // struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2898 /* @internal */
2899 export function CResult_NodeInfoDecodeErrorZ_get_err(owner: number): number {
2900         if(!isWasmInitialized) {
2901                 throw new Error("initializeWasm() must be awaited first!");
2902         }
2903         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_err(owner);
2904         return nativeResponseValue;
2905 }
2906         // struct LDKNetworkGraph CResult_NetworkGraphDecodeErrorZ_get_ok(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2907 /* @internal */
2908 export function CResult_NetworkGraphDecodeErrorZ_get_ok(owner: number): number {
2909         if(!isWasmInitialized) {
2910                 throw new Error("initializeWasm() must be awaited first!");
2911         }
2912         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_ok(owner);
2913         return nativeResponseValue;
2914 }
2915         // struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2916 /* @internal */
2917 export function CResult_NetworkGraphDecodeErrorZ_get_err(owner: number): number {
2918         if(!isWasmInitialized) {
2919                 throw new Error("initializeWasm() must be awaited first!");
2920         }
2921         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_err(owner);
2922         return nativeResponseValue;
2923 }
2924 /* @internal */
2925 export class LDKCOption_CVec_NetAddressZZ {
2926         protected constructor() {}
2927 }
2928 /* @internal */
2929 export function LDKCOption_CVec_NetAddressZZ_ty_from_ptr(ptr: number): number {
2930         if(!isWasmInitialized) {
2931                 throw new Error("initializeWasm() must be awaited first!");
2932         }
2933         const nativeResponseValue = wasm.TS_LDKCOption_CVec_NetAddressZZ_ty_from_ptr(ptr);
2934         return nativeResponseValue;
2935 }
2936 /* @internal */
2937 export function LDKCOption_CVec_NetAddressZZ_Some_get_some(ptr: number): number {
2938         if(!isWasmInitialized) {
2939                 throw new Error("initializeWasm() must be awaited first!");
2940         }
2941         const nativeResponseValue = wasm.TS_LDKCOption_CVec_NetAddressZZ_Some_get_some(ptr);
2942         return nativeResponseValue;
2943 }
2944         // struct LDKScoringParameters *CResult_ScoringParametersDecodeErrorZ_get_ok(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2945 /* @internal */
2946 export function CResult_ScoringParametersDecodeErrorZ_get_ok(owner: number): number {
2947         if(!isWasmInitialized) {
2948                 throw new Error("initializeWasm() must be awaited first!");
2949         }
2950         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_ok(owner);
2951         return nativeResponseValue;
2952 }
2953         // struct LDKDecodeError CResult_ScoringParametersDecodeErrorZ_get_err(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2954 /* @internal */
2955 export function CResult_ScoringParametersDecodeErrorZ_get_err(owner: number): number {
2956         if(!isWasmInitialized) {
2957                 throw new Error("initializeWasm() must be awaited first!");
2958         }
2959         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_err(owner);
2960         return nativeResponseValue;
2961 }
2962         // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2963 /* @internal */
2964 export function CResult_InitFeaturesDecodeErrorZ_get_ok(owner: number): number {
2965         if(!isWasmInitialized) {
2966                 throw new Error("initializeWasm() must be awaited first!");
2967         }
2968         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_ok(owner);
2969         return nativeResponseValue;
2970 }
2971         // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2972 /* @internal */
2973 export function CResult_InitFeaturesDecodeErrorZ_get_err(owner: number): number {
2974         if(!isWasmInitialized) {
2975                 throw new Error("initializeWasm() must be awaited first!");
2976         }
2977         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_err(owner);
2978         return nativeResponseValue;
2979 }
2980         // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2981 /* @internal */
2982 export function CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner: number): number {
2983         if(!isWasmInitialized) {
2984                 throw new Error("initializeWasm() must be awaited first!");
2985         }
2986         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner);
2987         return nativeResponseValue;
2988 }
2989         // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2990 /* @internal */
2991 export function CResult_ChannelFeaturesDecodeErrorZ_get_err(owner: number): number {
2992         if(!isWasmInitialized) {
2993                 throw new Error("initializeWasm() must be awaited first!");
2994         }
2995         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(owner);
2996         return nativeResponseValue;
2997 }
2998         // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2999 /* @internal */
3000 export function CResult_NodeFeaturesDecodeErrorZ_get_ok(owner: number): number {
3001         if(!isWasmInitialized) {
3002                 throw new Error("initializeWasm() must be awaited first!");
3003         }
3004         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_ok(owner);
3005         return nativeResponseValue;
3006 }
3007         // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
3008 /* @internal */
3009 export function CResult_NodeFeaturesDecodeErrorZ_get_err(owner: number): number {
3010         if(!isWasmInitialized) {
3011                 throw new Error("initializeWasm() must be awaited first!");
3012         }
3013         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_err(owner);
3014         return nativeResponseValue;
3015 }
3016         // struct LDKInvoiceFeatures CResult_InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
3017 /* @internal */
3018 export function CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner: number): number {
3019         if(!isWasmInitialized) {
3020                 throw new Error("initializeWasm() must be awaited first!");
3021         }
3022         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner);
3023         return nativeResponseValue;
3024 }
3025         // struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
3026 /* @internal */
3027 export function CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner: number): number {
3028         if(!isWasmInitialized) {
3029                 throw new Error("initializeWasm() must be awaited first!");
3030         }
3031         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner);
3032         return nativeResponseValue;
3033 }
3034         // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
3035 /* @internal */
3036 export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner: number): number {
3037         if(!isWasmInitialized) {
3038                 throw new Error("initializeWasm() must be awaited first!");
3039         }
3040         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner);
3041         return nativeResponseValue;
3042 }
3043         // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
3044 /* @internal */
3045 export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner: number): number {
3046         if(!isWasmInitialized) {
3047                 throw new Error("initializeWasm() must be awaited first!");
3048         }
3049         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner);
3050         return nativeResponseValue;
3051 }
3052         // struct LDKNetAddress CResult_NetAddressDecodeErrorZ_get_ok(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
3053 /* @internal */
3054 export function CResult_NetAddressDecodeErrorZ_get_ok(owner: number): number {
3055         if(!isWasmInitialized) {
3056                 throw new Error("initializeWasm() must be awaited first!");
3057         }
3058         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_ok(owner);
3059         return nativeResponseValue;
3060 }
3061         // struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
3062 /* @internal */
3063 export function CResult_NetAddressDecodeErrorZ_get_err(owner: number): number {
3064         if(!isWasmInitialized) {
3065                 throw new Error("initializeWasm() must be awaited first!");
3066         }
3067         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_err(owner);
3068         return nativeResponseValue;
3069 }
3070         // struct LDKAcceptChannel CResult_AcceptChannelDecodeErrorZ_get_ok(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
3071 /* @internal */
3072 export function CResult_AcceptChannelDecodeErrorZ_get_ok(owner: number): number {
3073         if(!isWasmInitialized) {
3074                 throw new Error("initializeWasm() must be awaited first!");
3075         }
3076         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_ok(owner);
3077         return nativeResponseValue;
3078 }
3079         // struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
3080 /* @internal */
3081 export function CResult_AcceptChannelDecodeErrorZ_get_err(owner: number): number {
3082         if(!isWasmInitialized) {
3083                 throw new Error("initializeWasm() must be awaited first!");
3084         }
3085         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_err(owner);
3086         return nativeResponseValue;
3087 }
3088         // struct LDKAnnouncementSignatures CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
3089 /* @internal */
3090 export function CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner: number): number {
3091         if(!isWasmInitialized) {
3092                 throw new Error("initializeWasm() must be awaited first!");
3093         }
3094         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner);
3095         return nativeResponseValue;
3096 }
3097         // struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
3098 /* @internal */
3099 export function CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner: number): number {
3100         if(!isWasmInitialized) {
3101                 throw new Error("initializeWasm() must be awaited first!");
3102         }
3103         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner);
3104         return nativeResponseValue;
3105 }
3106         // struct LDKChannelReestablish CResult_ChannelReestablishDecodeErrorZ_get_ok(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
3107 /* @internal */
3108 export function CResult_ChannelReestablishDecodeErrorZ_get_ok(owner: number): number {
3109         if(!isWasmInitialized) {
3110                 throw new Error("initializeWasm() must be awaited first!");
3111         }
3112         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_ok(owner);
3113         return nativeResponseValue;
3114 }
3115         // struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
3116 /* @internal */
3117 export function CResult_ChannelReestablishDecodeErrorZ_get_err(owner: number): number {
3118         if(!isWasmInitialized) {
3119                 throw new Error("initializeWasm() must be awaited first!");
3120         }
3121         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_err(owner);
3122         return nativeResponseValue;
3123 }
3124         // struct LDKClosingSigned CResult_ClosingSignedDecodeErrorZ_get_ok(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
3125 /* @internal */
3126 export function CResult_ClosingSignedDecodeErrorZ_get_ok(owner: number): number {
3127         if(!isWasmInitialized) {
3128                 throw new Error("initializeWasm() must be awaited first!");
3129         }
3130         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_ok(owner);
3131         return nativeResponseValue;
3132 }
3133         // struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
3134 /* @internal */
3135 export function CResult_ClosingSignedDecodeErrorZ_get_err(owner: number): number {
3136         if(!isWasmInitialized) {
3137                 throw new Error("initializeWasm() must be awaited first!");
3138         }
3139         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_err(owner);
3140         return nativeResponseValue;
3141 }
3142         // struct LDKClosingSignedFeeRange CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
3143 /* @internal */
3144 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner: number): number {
3145         if(!isWasmInitialized) {
3146                 throw new Error("initializeWasm() must be awaited first!");
3147         }
3148         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner);
3149         return nativeResponseValue;
3150 }
3151         // struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
3152 /* @internal */
3153 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner: number): number {
3154         if(!isWasmInitialized) {
3155                 throw new Error("initializeWasm() must be awaited first!");
3156         }
3157         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner);
3158         return nativeResponseValue;
3159 }
3160         // struct LDKCommitmentSigned CResult_CommitmentSignedDecodeErrorZ_get_ok(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
3161 /* @internal */
3162 export function CResult_CommitmentSignedDecodeErrorZ_get_ok(owner: number): number {
3163         if(!isWasmInitialized) {
3164                 throw new Error("initializeWasm() must be awaited first!");
3165         }
3166         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_ok(owner);
3167         return nativeResponseValue;
3168 }
3169         // struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
3170 /* @internal */
3171 export function CResult_CommitmentSignedDecodeErrorZ_get_err(owner: number): number {
3172         if(!isWasmInitialized) {
3173                 throw new Error("initializeWasm() must be awaited first!");
3174         }
3175         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_err(owner);
3176         return nativeResponseValue;
3177 }
3178         // struct LDKFundingCreated CResult_FundingCreatedDecodeErrorZ_get_ok(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
3179 /* @internal */
3180 export function CResult_FundingCreatedDecodeErrorZ_get_ok(owner: number): number {
3181         if(!isWasmInitialized) {
3182                 throw new Error("initializeWasm() must be awaited first!");
3183         }
3184         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_ok(owner);
3185         return nativeResponseValue;
3186 }
3187         // struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
3188 /* @internal */
3189 export function CResult_FundingCreatedDecodeErrorZ_get_err(owner: number): number {
3190         if(!isWasmInitialized) {
3191                 throw new Error("initializeWasm() must be awaited first!");
3192         }
3193         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_err(owner);
3194         return nativeResponseValue;
3195 }
3196         // struct LDKFundingSigned CResult_FundingSignedDecodeErrorZ_get_ok(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
3197 /* @internal */
3198 export function CResult_FundingSignedDecodeErrorZ_get_ok(owner: number): number {
3199         if(!isWasmInitialized) {
3200                 throw new Error("initializeWasm() must be awaited first!");
3201         }
3202         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_ok(owner);
3203         return nativeResponseValue;
3204 }
3205         // struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
3206 /* @internal */
3207 export function CResult_FundingSignedDecodeErrorZ_get_err(owner: number): number {
3208         if(!isWasmInitialized) {
3209                 throw new Error("initializeWasm() must be awaited first!");
3210         }
3211         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_err(owner);
3212         return nativeResponseValue;
3213 }
3214         // struct LDKFundingLocked CResult_FundingLockedDecodeErrorZ_get_ok(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
3215 /* @internal */
3216 export function CResult_FundingLockedDecodeErrorZ_get_ok(owner: number): number {
3217         if(!isWasmInitialized) {
3218                 throw new Error("initializeWasm() must be awaited first!");
3219         }
3220         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_ok(owner);
3221         return nativeResponseValue;
3222 }
3223         // struct LDKDecodeError CResult_FundingLockedDecodeErrorZ_get_err(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
3224 /* @internal */
3225 export function CResult_FundingLockedDecodeErrorZ_get_err(owner: number): number {
3226         if(!isWasmInitialized) {
3227                 throw new Error("initializeWasm() must be awaited first!");
3228         }
3229         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_err(owner);
3230         return nativeResponseValue;
3231 }
3232         // struct LDKInit CResult_InitDecodeErrorZ_get_ok(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
3233 /* @internal */
3234 export function CResult_InitDecodeErrorZ_get_ok(owner: number): number {
3235         if(!isWasmInitialized) {
3236                 throw new Error("initializeWasm() must be awaited first!");
3237         }
3238         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_ok(owner);
3239         return nativeResponseValue;
3240 }
3241         // struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
3242 /* @internal */
3243 export function CResult_InitDecodeErrorZ_get_err(owner: number): number {
3244         if(!isWasmInitialized) {
3245                 throw new Error("initializeWasm() must be awaited first!");
3246         }
3247         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_err(owner);
3248         return nativeResponseValue;
3249 }
3250         // struct LDKOpenChannel CResult_OpenChannelDecodeErrorZ_get_ok(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
3251 /* @internal */
3252 export function CResult_OpenChannelDecodeErrorZ_get_ok(owner: number): number {
3253         if(!isWasmInitialized) {
3254                 throw new Error("initializeWasm() must be awaited first!");
3255         }
3256         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_ok(owner);
3257         return nativeResponseValue;
3258 }
3259         // struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
3260 /* @internal */
3261 export function CResult_OpenChannelDecodeErrorZ_get_err(owner: number): number {
3262         if(!isWasmInitialized) {
3263                 throw new Error("initializeWasm() must be awaited first!");
3264         }
3265         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_err(owner);
3266         return nativeResponseValue;
3267 }
3268         // struct LDKRevokeAndACK CResult_RevokeAndACKDecodeErrorZ_get_ok(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
3269 /* @internal */
3270 export function CResult_RevokeAndACKDecodeErrorZ_get_ok(owner: number): number {
3271         if(!isWasmInitialized) {
3272                 throw new Error("initializeWasm() must be awaited first!");
3273         }
3274         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_ok(owner);
3275         return nativeResponseValue;
3276 }
3277         // struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
3278 /* @internal */
3279 export function CResult_RevokeAndACKDecodeErrorZ_get_err(owner: number): number {
3280         if(!isWasmInitialized) {
3281                 throw new Error("initializeWasm() must be awaited first!");
3282         }
3283         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_err(owner);
3284         return nativeResponseValue;
3285 }
3286         // struct LDKShutdown CResult_ShutdownDecodeErrorZ_get_ok(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
3287 /* @internal */
3288 export function CResult_ShutdownDecodeErrorZ_get_ok(owner: number): number {
3289         if(!isWasmInitialized) {
3290                 throw new Error("initializeWasm() must be awaited first!");
3291         }
3292         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_ok(owner);
3293         return nativeResponseValue;
3294 }
3295         // struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
3296 /* @internal */
3297 export function CResult_ShutdownDecodeErrorZ_get_err(owner: number): number {
3298         if(!isWasmInitialized) {
3299                 throw new Error("initializeWasm() must be awaited first!");
3300         }
3301         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_err(owner);
3302         return nativeResponseValue;
3303 }
3304         // struct LDKUpdateFailHTLC CResult_UpdateFailHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
3305 /* @internal */
3306 export function CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner: number): number {
3307         if(!isWasmInitialized) {
3308                 throw new Error("initializeWasm() must be awaited first!");
3309         }
3310         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner);
3311         return nativeResponseValue;
3312 }
3313         // struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
3314 /* @internal */
3315 export function CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner: number): number {
3316         if(!isWasmInitialized) {
3317                 throw new Error("initializeWasm() must be awaited first!");
3318         }
3319         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner);
3320         return nativeResponseValue;
3321 }
3322         // struct LDKUpdateFailMalformedHTLC CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
3323 /* @internal */
3324 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner: number): number {
3325         if(!isWasmInitialized) {
3326                 throw new Error("initializeWasm() must be awaited first!");
3327         }
3328         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner);
3329         return nativeResponseValue;
3330 }
3331         // struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
3332 /* @internal */
3333 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner: number): number {
3334         if(!isWasmInitialized) {
3335                 throw new Error("initializeWasm() must be awaited first!");
3336         }
3337         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner);
3338         return nativeResponseValue;
3339 }
3340         // struct LDKUpdateFee CResult_UpdateFeeDecodeErrorZ_get_ok(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
3341 /* @internal */
3342 export function CResult_UpdateFeeDecodeErrorZ_get_ok(owner: number): number {
3343         if(!isWasmInitialized) {
3344                 throw new Error("initializeWasm() must be awaited first!");
3345         }
3346         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_ok(owner);
3347         return nativeResponseValue;
3348 }
3349         // struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
3350 /* @internal */
3351 export function CResult_UpdateFeeDecodeErrorZ_get_err(owner: number): number {
3352         if(!isWasmInitialized) {
3353                 throw new Error("initializeWasm() must be awaited first!");
3354         }
3355         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_err(owner);
3356         return nativeResponseValue;
3357 }
3358         // struct LDKUpdateFulfillHTLC CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
3359 /* @internal */
3360 export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner: number): number {
3361         if(!isWasmInitialized) {
3362                 throw new Error("initializeWasm() must be awaited first!");
3363         }
3364         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner);
3365         return nativeResponseValue;
3366 }
3367         // struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
3368 /* @internal */
3369 export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner: number): number {
3370         if(!isWasmInitialized) {
3371                 throw new Error("initializeWasm() must be awaited first!");
3372         }
3373         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner);
3374         return nativeResponseValue;
3375 }
3376         // struct LDKUpdateAddHTLC CResult_UpdateAddHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
3377 /* @internal */
3378 export function CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner: number): number {
3379         if(!isWasmInitialized) {
3380                 throw new Error("initializeWasm() must be awaited first!");
3381         }
3382         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner);
3383         return nativeResponseValue;
3384 }
3385         // struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
3386 /* @internal */
3387 export function CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner: number): number {
3388         if(!isWasmInitialized) {
3389                 throw new Error("initializeWasm() must be awaited first!");
3390         }
3391         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner);
3392         return nativeResponseValue;
3393 }
3394         // struct LDKPing CResult_PingDecodeErrorZ_get_ok(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
3395 /* @internal */
3396 export function CResult_PingDecodeErrorZ_get_ok(owner: number): number {
3397         if(!isWasmInitialized) {
3398                 throw new Error("initializeWasm() must be awaited first!");
3399         }
3400         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_ok(owner);
3401         return nativeResponseValue;
3402 }
3403         // struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
3404 /* @internal */
3405 export function CResult_PingDecodeErrorZ_get_err(owner: number): number {
3406         if(!isWasmInitialized) {
3407                 throw new Error("initializeWasm() must be awaited first!");
3408         }
3409         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_err(owner);
3410         return nativeResponseValue;
3411 }
3412         // struct LDKPong CResult_PongDecodeErrorZ_get_ok(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
3413 /* @internal */
3414 export function CResult_PongDecodeErrorZ_get_ok(owner: number): number {
3415         if(!isWasmInitialized) {
3416                 throw new Error("initializeWasm() must be awaited first!");
3417         }
3418         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_ok(owner);
3419         return nativeResponseValue;
3420 }
3421         // struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
3422 /* @internal */
3423 export function CResult_PongDecodeErrorZ_get_err(owner: number): number {
3424         if(!isWasmInitialized) {
3425                 throw new Error("initializeWasm() must be awaited first!");
3426         }
3427         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_err(owner);
3428         return nativeResponseValue;
3429 }
3430         // struct LDKUnsignedChannelAnnouncement CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3431 /* @internal */
3432 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3433         if(!isWasmInitialized) {
3434                 throw new Error("initializeWasm() must be awaited first!");
3435         }
3436         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner);
3437         return nativeResponseValue;
3438 }
3439         // struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3440 /* @internal */
3441 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
3442         if(!isWasmInitialized) {
3443                 throw new Error("initializeWasm() must be awaited first!");
3444         }
3445         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner);
3446         return nativeResponseValue;
3447 }
3448         // struct LDKChannelAnnouncement CResult_ChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3449 /* @internal */
3450 export function CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3451         if(!isWasmInitialized) {
3452                 throw new Error("initializeWasm() must be awaited first!");
3453         }
3454         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner);
3455         return nativeResponseValue;
3456 }
3457         // struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3458 /* @internal */
3459 export function CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
3460         if(!isWasmInitialized) {
3461                 throw new Error("initializeWasm() must be awaited first!");
3462         }
3463         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner);
3464         return nativeResponseValue;
3465 }
3466         // struct LDKUnsignedChannelUpdate CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3467 /* @internal */
3468 export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
3469         if(!isWasmInitialized) {
3470                 throw new Error("initializeWasm() must be awaited first!");
3471         }
3472         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner);
3473         return nativeResponseValue;
3474 }
3475         // struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3476 /* @internal */
3477 export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner: number): number {
3478         if(!isWasmInitialized) {
3479                 throw new Error("initializeWasm() must be awaited first!");
3480         }
3481         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner);
3482         return nativeResponseValue;
3483 }
3484         // struct LDKChannelUpdate CResult_ChannelUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3485 /* @internal */
3486 export function CResult_ChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
3487         if(!isWasmInitialized) {
3488                 throw new Error("initializeWasm() must be awaited first!");
3489         }
3490         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_ok(owner);
3491         return nativeResponseValue;
3492 }
3493         // struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3494 /* @internal */
3495 export function CResult_ChannelUpdateDecodeErrorZ_get_err(owner: number): number {
3496         if(!isWasmInitialized) {
3497                 throw new Error("initializeWasm() must be awaited first!");
3498         }
3499         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_err(owner);
3500         return nativeResponseValue;
3501 }
3502         // struct LDKErrorMessage CResult_ErrorMessageDecodeErrorZ_get_ok(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
3503 /* @internal */
3504 export function CResult_ErrorMessageDecodeErrorZ_get_ok(owner: number): number {
3505         if(!isWasmInitialized) {
3506                 throw new Error("initializeWasm() must be awaited first!");
3507         }
3508         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_ok(owner);
3509         return nativeResponseValue;
3510 }
3511         // struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
3512 /* @internal */
3513 export function CResult_ErrorMessageDecodeErrorZ_get_err(owner: number): number {
3514         if(!isWasmInitialized) {
3515                 throw new Error("initializeWasm() must be awaited first!");
3516         }
3517         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_err(owner);
3518         return nativeResponseValue;
3519 }
3520         // struct LDKUnsignedNodeAnnouncement CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3521 /* @internal */
3522 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3523         if(!isWasmInitialized) {
3524                 throw new Error("initializeWasm() must be awaited first!");
3525         }
3526         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner);
3527         return nativeResponseValue;
3528 }
3529         // struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3530 /* @internal */
3531 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
3532         if(!isWasmInitialized) {
3533                 throw new Error("initializeWasm() must be awaited first!");
3534         }
3535         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner);
3536         return nativeResponseValue;
3537 }
3538         // struct LDKNodeAnnouncement CResult_NodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3539 /* @internal */
3540 export function CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3541         if(!isWasmInitialized) {
3542                 throw new Error("initializeWasm() must be awaited first!");
3543         }
3544         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner);
3545         return nativeResponseValue;
3546 }
3547         // struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3548 /* @internal */
3549 export function CResult_NodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
3550         if(!isWasmInitialized) {
3551                 throw new Error("initializeWasm() must be awaited first!");
3552         }
3553         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(owner);
3554         return nativeResponseValue;
3555 }
3556         // struct LDKQueryShortChannelIds CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
3557 /* @internal */
3558 export function CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner: number): number {
3559         if(!isWasmInitialized) {
3560                 throw new Error("initializeWasm() must be awaited first!");
3561         }
3562         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner);
3563         return nativeResponseValue;
3564 }
3565         // struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
3566 /* @internal */
3567 export function CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner: number): number {
3568         if(!isWasmInitialized) {
3569                 throw new Error("initializeWasm() must be awaited first!");
3570         }
3571         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner);
3572         return nativeResponseValue;
3573 }
3574         // struct LDKReplyShortChannelIdsEnd CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
3575 /* @internal */
3576 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner: number): number {
3577         if(!isWasmInitialized) {
3578                 throw new Error("initializeWasm() must be awaited first!");
3579         }
3580         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner);
3581         return nativeResponseValue;
3582 }
3583         // struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
3584 /* @internal */
3585 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner: number): number {
3586         if(!isWasmInitialized) {
3587                 throw new Error("initializeWasm() must be awaited first!");
3588         }
3589         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner);
3590         return nativeResponseValue;
3591 }
3592         // struct LDKQueryChannelRange CResult_QueryChannelRangeDecodeErrorZ_get_ok(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3593 /* @internal */
3594 export function CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner: number): number {
3595         if(!isWasmInitialized) {
3596                 throw new Error("initializeWasm() must be awaited first!");
3597         }
3598         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner);
3599         return nativeResponseValue;
3600 }
3601         // struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3602 /* @internal */
3603 export function CResult_QueryChannelRangeDecodeErrorZ_get_err(owner: number): number {
3604         if(!isWasmInitialized) {
3605                 throw new Error("initializeWasm() must be awaited first!");
3606         }
3607         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(owner);
3608         return nativeResponseValue;
3609 }
3610         // struct LDKReplyChannelRange CResult_ReplyChannelRangeDecodeErrorZ_get_ok(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3611 /* @internal */
3612 export function CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner: number): number {
3613         if(!isWasmInitialized) {
3614                 throw new Error("initializeWasm() must be awaited first!");
3615         }
3616         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner);
3617         return nativeResponseValue;
3618 }
3619         // struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3620 /* @internal */
3621 export function CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner: number): number {
3622         if(!isWasmInitialized) {
3623                 throw new Error("initializeWasm() must be awaited first!");
3624         }
3625         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner);
3626         return nativeResponseValue;
3627 }
3628         // struct LDKGossipTimestampFilter CResult_GossipTimestampFilterDecodeErrorZ_get_ok(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
3629 /* @internal */
3630 export function CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner: number): number {
3631         if(!isWasmInitialized) {
3632                 throw new Error("initializeWasm() must be awaited first!");
3633         }
3634         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner);
3635         return nativeResponseValue;
3636 }
3637         // struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
3638 /* @internal */
3639 export function CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner: number): number {
3640         if(!isWasmInitialized) {
3641                 throw new Error("initializeWasm() must be awaited first!");
3642         }
3643         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner);
3644         return nativeResponseValue;
3645 }
3646         // struct LDKDelayedPaymentOutputDescriptor CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3647 /* @internal */
3648 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
3649         if(!isWasmInitialized) {
3650                 throw new Error("initializeWasm() must be awaited first!");
3651         }
3652         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
3653         return nativeResponseValue;
3654 }
3655         // struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3656 /* @internal */
3657 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
3658         if(!isWasmInitialized) {
3659                 throw new Error("initializeWasm() must be awaited first!");
3660         }
3661         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
3662         return nativeResponseValue;
3663 }
3664         // struct LDKStaticPaymentOutputDescriptor CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3665 /* @internal */
3666 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
3667         if(!isWasmInitialized) {
3668                 throw new Error("initializeWasm() must be awaited first!");
3669         }
3670         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
3671         return nativeResponseValue;
3672 }
3673         // struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3674 /* @internal */
3675 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
3676         if(!isWasmInitialized) {
3677                 throw new Error("initializeWasm() must be awaited first!");
3678         }
3679         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
3680         return nativeResponseValue;
3681 }
3682         // struct LDKSpendableOutputDescriptor CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3683 /* @internal */
3684 export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
3685         if(!isWasmInitialized) {
3686                 throw new Error("initializeWasm() must be awaited first!");
3687         }
3688         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner);
3689         return nativeResponseValue;
3690 }
3691         // struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3692 /* @internal */
3693 export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
3694         if(!isWasmInitialized) {
3695                 throw new Error("initializeWasm() must be awaited first!");
3696         }
3697         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner);
3698         return nativeResponseValue;
3699 }
3700         // struct LDKSign CResult_SignDecodeErrorZ_get_ok(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
3701 /* @internal */
3702 export function CResult_SignDecodeErrorZ_get_ok(owner: number): number {
3703         if(!isWasmInitialized) {
3704                 throw new Error("initializeWasm() must be awaited first!");
3705         }
3706         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_ok(owner);
3707         return nativeResponseValue;
3708 }
3709         // struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
3710 /* @internal */
3711 export function CResult_SignDecodeErrorZ_get_err(owner: number): number {
3712         if(!isWasmInitialized) {
3713                 throw new Error("initializeWasm() must be awaited first!");
3714         }
3715         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_err(owner);
3716         return nativeResponseValue;
3717 }
3718         // struct LDKRecoverableSignature CResult_RecoverableSignatureNoneZ_get_ok(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
3719 /* @internal */
3720 export function CResult_RecoverableSignatureNoneZ_get_ok(owner: number): number {
3721         if(!isWasmInitialized) {
3722                 throw new Error("initializeWasm() must be awaited first!");
3723         }
3724         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_ok(owner);
3725         return nativeResponseValue;
3726 }
3727         // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
3728 /* @internal */
3729 export function CResult_RecoverableSignatureNoneZ_get_err(owner: number): void {
3730         if(!isWasmInitialized) {
3731                 throw new Error("initializeWasm() must be awaited first!");
3732         }
3733         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_err(owner);
3734         // debug statements here
3735 }
3736         // struct LDKCVec_CVec_u8ZZ CResult_CVec_CVec_u8ZZNoneZ_get_ok(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
3737 /* @internal */
3738 export function CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner: number): number {
3739         if(!isWasmInitialized) {
3740                 throw new Error("initializeWasm() must be awaited first!");
3741         }
3742         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner);
3743         return nativeResponseValue;
3744 }
3745         // void CResult_CVec_CVec_u8ZZNoneZ_get_err(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
3746 /* @internal */
3747 export function CResult_CVec_CVec_u8ZZNoneZ_get_err(owner: number): void {
3748         if(!isWasmInitialized) {
3749                 throw new Error("initializeWasm() must be awaited first!");
3750         }
3751         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_err(owner);
3752         // debug statements here
3753 }
3754         // struct LDKInMemorySigner CResult_InMemorySignerDecodeErrorZ_get_ok(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
3755 /* @internal */
3756 export function CResult_InMemorySignerDecodeErrorZ_get_ok(owner: number): number {
3757         if(!isWasmInitialized) {
3758                 throw new Error("initializeWasm() must be awaited first!");
3759         }
3760         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_ok(owner);
3761         return nativeResponseValue;
3762 }
3763         // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
3764 /* @internal */
3765 export function CResult_InMemorySignerDecodeErrorZ_get_err(owner: number): number {
3766         if(!isWasmInitialized) {
3767                 throw new Error("initializeWasm() must be awaited first!");
3768         }
3769         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_err(owner);
3770         return nativeResponseValue;
3771 }
3772         // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
3773 /* @internal */
3774 export function CResult_TransactionNoneZ_get_ok(owner: number): number {
3775         if(!isWasmInitialized) {
3776                 throw new Error("initializeWasm() must be awaited first!");
3777         }
3778         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_ok(owner);
3779         return nativeResponseValue;
3780 }
3781         // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
3782 /* @internal */
3783 export function CResult_TransactionNoneZ_get_err(owner: number): void {
3784         if(!isWasmInitialized) {
3785                 throw new Error("initializeWasm() must be awaited first!");
3786         }
3787         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_err(owner);
3788         // debug statements here
3789 }
3790 /* @internal */
3791 export interface LDKFilter {
3792         register_tx (txid: number, script_pubkey: number): void;
3793         register_output (output: number): number;
3794 }
3795
3796 /* @internal */
3797 export function LDKFilter_new(impl: LDKFilter): number {
3798         if(!isWasmInitialized) {
3799                 throw new Error("initializeWasm() must be awaited first!");
3800         }
3801         var new_obj_idx = js_objs.length;
3802         for (var i = 0; i < js_objs.length; i++) {
3803                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3804         }
3805         js_objs[i] = new WeakRef(impl);
3806         return wasm.TS_LDKFilter_new(i);
3807 }
3808         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
3809 /* @internal */
3810 export function Filter_register_tx(this_arg: number, txid: number, script_pubkey: number): void {
3811         if(!isWasmInitialized) {
3812                 throw new Error("initializeWasm() must be awaited first!");
3813         }
3814         const nativeResponseValue = wasm.TS_Filter_register_tx(this_arg, txid, script_pubkey);
3815         // debug statements here
3816 }
3817         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
3818 /* @internal */
3819 export function Filter_register_output(this_arg: number, output: number): number {
3820         if(!isWasmInitialized) {
3821                 throw new Error("initializeWasm() must be awaited first!");
3822         }
3823         const nativeResponseValue = wasm.TS_Filter_register_output(this_arg, output);
3824         return nativeResponseValue;
3825 }
3826 /* @internal */
3827 export class LDKCOption_FilterZ {
3828         protected constructor() {}
3829 }
3830 /* @internal */
3831 export function LDKCOption_FilterZ_ty_from_ptr(ptr: number): number {
3832         if(!isWasmInitialized) {
3833                 throw new Error("initializeWasm() must be awaited first!");
3834         }
3835         const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_ty_from_ptr(ptr);
3836         return nativeResponseValue;
3837 }
3838 /* @internal */
3839 export function LDKCOption_FilterZ_Some_get_some(ptr: number): number {
3840         if(!isWasmInitialized) {
3841                 throw new Error("initializeWasm() must be awaited first!");
3842         }
3843         const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_Some_get_some(ptr);
3844         return nativeResponseValue;
3845 }
3846         // struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
3847 /* @internal */
3848 export function CResult_LockedChannelMonitorNoneZ_get_ok(owner: number): number {
3849         if(!isWasmInitialized) {
3850                 throw new Error("initializeWasm() must be awaited first!");
3851         }
3852         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_ok(owner);
3853         return nativeResponseValue;
3854 }
3855         // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
3856 /* @internal */
3857 export function CResult_LockedChannelMonitorNoneZ_get_err(owner: number): void {
3858         if(!isWasmInitialized) {
3859                 throw new Error("initializeWasm() must be awaited first!");
3860         }
3861         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_err(owner);
3862         // debug statements here
3863 }
3864 /* @internal */
3865 export class LDKAPIError {
3866         protected constructor() {}
3867 }
3868 /* @internal */
3869 export function LDKAPIError_ty_from_ptr(ptr: number): number {
3870         if(!isWasmInitialized) {
3871                 throw new Error("initializeWasm() must be awaited first!");
3872         }
3873         const nativeResponseValue = wasm.TS_LDKAPIError_ty_from_ptr(ptr);
3874         return nativeResponseValue;
3875 }
3876 /* @internal */
3877 export function LDKAPIError_APIMisuseError_get_err(ptr: number): number {
3878         if(!isWasmInitialized) {
3879                 throw new Error("initializeWasm() must be awaited first!");
3880         }
3881         const nativeResponseValue = wasm.TS_LDKAPIError_APIMisuseError_get_err(ptr);
3882         return nativeResponseValue;
3883 }
3884 /* @internal */
3885 export function LDKAPIError_FeeRateTooHigh_get_err(ptr: number): number {
3886         if(!isWasmInitialized) {
3887                 throw new Error("initializeWasm() must be awaited first!");
3888         }
3889         const nativeResponseValue = wasm.TS_LDKAPIError_FeeRateTooHigh_get_err(ptr);
3890         return nativeResponseValue;
3891 }
3892 /* @internal */
3893 export function LDKAPIError_FeeRateTooHigh_get_feerate(ptr: number): number {
3894         if(!isWasmInitialized) {
3895                 throw new Error("initializeWasm() must be awaited first!");
3896         }
3897         const nativeResponseValue = wasm.TS_LDKAPIError_FeeRateTooHigh_get_feerate(ptr);
3898         return nativeResponseValue;
3899 }
3900 /* @internal */
3901 export function LDKAPIError_RouteError_get_err(ptr: number): number {
3902         if(!isWasmInitialized) {
3903                 throw new Error("initializeWasm() must be awaited first!");
3904         }
3905         const nativeResponseValue = wasm.TS_LDKAPIError_RouteError_get_err(ptr);
3906         return nativeResponseValue;
3907 }
3908 /* @internal */
3909 export function LDKAPIError_ChannelUnavailable_get_err(ptr: number): number {
3910         if(!isWasmInitialized) {
3911                 throw new Error("initializeWasm() must be awaited first!");
3912         }
3913         const nativeResponseValue = wasm.TS_LDKAPIError_ChannelUnavailable_get_err(ptr);
3914         return nativeResponseValue;
3915 }
3916 /* @internal */
3917 export function LDKAPIError_IncompatibleShutdownScript_get_script(ptr: number): number {
3918         if(!isWasmInitialized) {
3919                 throw new Error("initializeWasm() must be awaited first!");
3920         }
3921         const nativeResponseValue = wasm.TS_LDKAPIError_IncompatibleShutdownScript_get_script(ptr);
3922         return nativeResponseValue;
3923 }
3924         // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
3925 /* @internal */
3926 export function CResult_NoneAPIErrorZ_get_ok(owner: number): void {
3927         if(!isWasmInitialized) {
3928                 throw new Error("initializeWasm() must be awaited first!");
3929         }
3930         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_ok(owner);
3931         // debug statements here
3932 }
3933         // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
3934 /* @internal */
3935 export function CResult_NoneAPIErrorZ_get_err(owner: number): number {
3936         if(!isWasmInitialized) {
3937                 throw new Error("initializeWasm() must be awaited first!");
3938         }
3939         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_err(owner);
3940         return nativeResponseValue;
3941 }
3942 /* @internal */
3943 export class LDKCOption_u16Z {
3944         protected constructor() {}
3945 }
3946 /* @internal */
3947 export function LDKCOption_u16Z_ty_from_ptr(ptr: number): number {
3948         if(!isWasmInitialized) {
3949                 throw new Error("initializeWasm() must be awaited first!");
3950         }
3951         const nativeResponseValue = wasm.TS_LDKCOption_u16Z_ty_from_ptr(ptr);
3952         return nativeResponseValue;
3953 }
3954 /* @internal */
3955 export function LDKCOption_u16Z_Some_get_some(ptr: number): number {
3956         if(!isWasmInitialized) {
3957                 throw new Error("initializeWasm() must be awaited first!");
3958         }
3959         const nativeResponseValue = wasm.TS_LDKCOption_u16Z_Some_get_some(ptr);
3960         return nativeResponseValue;
3961 }
3962         // struct LDKThirtyTwoBytes CResult__u832APIErrorZ_get_ok(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
3963 /* @internal */
3964 export function CResult__u832APIErrorZ_get_ok(owner: number): number {
3965         if(!isWasmInitialized) {
3966                 throw new Error("initializeWasm() must be awaited first!");
3967         }
3968         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_ok(owner);
3969         return nativeResponseValue;
3970 }
3971         // struct LDKAPIError CResult__u832APIErrorZ_get_err(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
3972 /* @internal */
3973 export function CResult__u832APIErrorZ_get_err(owner: number): number {
3974         if(!isWasmInitialized) {
3975                 throw new Error("initializeWasm() must be awaited first!");
3976         }
3977         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_err(owner);
3978         return nativeResponseValue;
3979 }
3980 /* @internal */
3981 export class LDKPaymentSendFailure {
3982         protected constructor() {}
3983 }
3984 /* @internal */
3985 export function LDKPaymentSendFailure_ty_from_ptr(ptr: number): number {
3986         if(!isWasmInitialized) {
3987                 throw new Error("initializeWasm() must be awaited first!");
3988         }
3989         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_ty_from_ptr(ptr);
3990         return nativeResponseValue;
3991 }
3992 /* @internal */
3993 export function LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr: number): number {
3994         if(!isWasmInitialized) {
3995                 throw new Error("initializeWasm() must be awaited first!");
3996         }
3997         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr);
3998         return nativeResponseValue;
3999 }
4000 /* @internal */
4001 export function LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(ptr: number): number {
4002         if(!isWasmInitialized) {
4003                 throw new Error("initializeWasm() must be awaited first!");
4004         }
4005         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(ptr);
4006         return nativeResponseValue;
4007 }
4008 /* @internal */
4009 export function LDKPaymentSendFailure_AllFailedRetrySafe_get_all_failed_retry_safe(ptr: number): number {
4010         if(!isWasmInitialized) {
4011                 throw new Error("initializeWasm() must be awaited first!");
4012         }
4013         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_AllFailedRetrySafe_get_all_failed_retry_safe(ptr);
4014         return nativeResponseValue;
4015 }
4016 /* @internal */
4017 export function LDKPaymentSendFailure_PartialFailure_get_results(ptr: number): number {
4018         if(!isWasmInitialized) {
4019                 throw new Error("initializeWasm() must be awaited first!");
4020         }
4021         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PartialFailure_get_results(ptr);
4022         return nativeResponseValue;
4023 }
4024 /* @internal */
4025 export function LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr: number): number {
4026         if(!isWasmInitialized) {
4027                 throw new Error("initializeWasm() must be awaited first!");
4028         }
4029         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr);
4030         return nativeResponseValue;
4031 }
4032 /* @internal */
4033 export function LDKPaymentSendFailure_PartialFailure_get_payment_id(ptr: number): number {
4034         if(!isWasmInitialized) {
4035                 throw new Error("initializeWasm() must be awaited first!");
4036         }
4037         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PartialFailure_get_payment_id(ptr);
4038         return nativeResponseValue;
4039 }
4040         // struct LDKThirtyTwoBytes CResult_PaymentIdPaymentSendFailureZ_get_ok(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
4041 /* @internal */
4042 export function CResult_PaymentIdPaymentSendFailureZ_get_ok(owner: number): number {
4043         if(!isWasmInitialized) {
4044                 throw new Error("initializeWasm() must be awaited first!");
4045         }
4046         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_ok(owner);
4047         return nativeResponseValue;
4048 }
4049         // struct LDKPaymentSendFailure CResult_PaymentIdPaymentSendFailureZ_get_err(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
4050 /* @internal */
4051 export function CResult_PaymentIdPaymentSendFailureZ_get_err(owner: number): number {
4052         if(!isWasmInitialized) {
4053                 throw new Error("initializeWasm() must be awaited first!");
4054         }
4055         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_err(owner);
4056         return nativeResponseValue;
4057 }
4058         // void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
4059 /* @internal */
4060 export function CResult_NonePaymentSendFailureZ_get_ok(owner: number): void {
4061         if(!isWasmInitialized) {
4062                 throw new Error("initializeWasm() must be awaited first!");
4063         }
4064         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_ok(owner);
4065         // debug statements here
4066 }
4067         // struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
4068 /* @internal */
4069 export function CResult_NonePaymentSendFailureZ_get_err(owner: number): number {
4070         if(!isWasmInitialized) {
4071                 throw new Error("initializeWasm() must be awaited first!");
4072         }
4073         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_err(owner);
4074         return nativeResponseValue;
4075 }
4076         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
4077 /* @internal */
4078 export function C2Tuple_PaymentHashPaymentIdZ_get_a(owner: number): number {
4079         if(!isWasmInitialized) {
4080                 throw new Error("initializeWasm() must be awaited first!");
4081         }
4082         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_a(owner);
4083         return nativeResponseValue;
4084 }
4085         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
4086 /* @internal */
4087 export function C2Tuple_PaymentHashPaymentIdZ_get_b(owner: number): number {
4088         if(!isWasmInitialized) {
4089                 throw new Error("initializeWasm() must be awaited first!");
4090         }
4091         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_b(owner);
4092         return nativeResponseValue;
4093 }
4094         // struct LDKC2Tuple_PaymentHashPaymentIdZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
4095 /* @internal */
4096 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner: number): number {
4097         if(!isWasmInitialized) {
4098                 throw new Error("initializeWasm() must be awaited first!");
4099         }
4100         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner);
4101         return nativeResponseValue;
4102 }
4103         // struct LDKPaymentSendFailure CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
4104 /* @internal */
4105 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner: number): number {
4106         if(!isWasmInitialized) {
4107                 throw new Error("initializeWasm() must be awaited first!");
4108         }
4109         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner);
4110         return nativeResponseValue;
4111 }
4112         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
4113 /* @internal */
4114 export function C2Tuple_PaymentHashPaymentSecretZ_get_a(owner: number): number {
4115         if(!isWasmInitialized) {
4116                 throw new Error("initializeWasm() must be awaited first!");
4117         }
4118         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(owner);
4119         return nativeResponseValue;
4120 }
4121         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
4122 /* @internal */
4123 export function C2Tuple_PaymentHashPaymentSecretZ_get_b(owner: number): number {
4124         if(!isWasmInitialized) {
4125                 throw new Error("initializeWasm() must be awaited first!");
4126         }
4127         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(owner);
4128         return nativeResponseValue;
4129 }
4130         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
4131 /* @internal */
4132 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner: number): number {
4133         if(!isWasmInitialized) {
4134                 throw new Error("initializeWasm() must be awaited first!");
4135         }
4136         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner);
4137         return nativeResponseValue;
4138 }
4139         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
4140 /* @internal */
4141 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner: number): void {
4142         if(!isWasmInitialized) {
4143                 throw new Error("initializeWasm() must be awaited first!");
4144         }
4145         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner);
4146         // debug statements here
4147 }
4148         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
4149 /* @internal */
4150 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner: number): number {
4151         if(!isWasmInitialized) {
4152                 throw new Error("initializeWasm() must be awaited first!");
4153         }
4154         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner);
4155         return nativeResponseValue;
4156 }
4157         // struct LDKAPIError CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
4158 /* @internal */
4159 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner: number): number {
4160         if(!isWasmInitialized) {
4161                 throw new Error("initializeWasm() must be awaited first!");
4162         }
4163         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner);
4164         return nativeResponseValue;
4165 }
4166         // struct LDKThirtyTwoBytes CResult_PaymentSecretNoneZ_get_ok(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
4167 /* @internal */
4168 export function CResult_PaymentSecretNoneZ_get_ok(owner: number): number {
4169         if(!isWasmInitialized) {
4170                 throw new Error("initializeWasm() must be awaited first!");
4171         }
4172         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_ok(owner);
4173         return nativeResponseValue;
4174 }
4175         // void CResult_PaymentSecretNoneZ_get_err(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
4176 /* @internal */
4177 export function CResult_PaymentSecretNoneZ_get_err(owner: number): void {
4178         if(!isWasmInitialized) {
4179                 throw new Error("initializeWasm() must be awaited first!");
4180         }
4181         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_err(owner);
4182         // debug statements here
4183 }
4184         // struct LDKThirtyTwoBytes CResult_PaymentSecretAPIErrorZ_get_ok(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
4185 /* @internal */
4186 export function CResult_PaymentSecretAPIErrorZ_get_ok(owner: number): number {
4187         if(!isWasmInitialized) {
4188                 throw new Error("initializeWasm() must be awaited first!");
4189         }
4190         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_ok(owner);
4191         return nativeResponseValue;
4192 }
4193         // struct LDKAPIError CResult_PaymentSecretAPIErrorZ_get_err(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
4194 /* @internal */
4195 export function CResult_PaymentSecretAPIErrorZ_get_err(owner: number): number {
4196         if(!isWasmInitialized) {
4197                 throw new Error("initializeWasm() must be awaited first!");
4198         }
4199         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_err(owner);
4200         return nativeResponseValue;
4201 }
4202         // struct LDKThirtyTwoBytes CResult_PaymentPreimageAPIErrorZ_get_ok(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
4203 /* @internal */
4204 export function CResult_PaymentPreimageAPIErrorZ_get_ok(owner: number): number {
4205         if(!isWasmInitialized) {
4206                 throw new Error("initializeWasm() must be awaited first!");
4207         }
4208         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_ok(owner);
4209         return nativeResponseValue;
4210 }
4211         // struct LDKAPIError CResult_PaymentPreimageAPIErrorZ_get_err(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
4212 /* @internal */
4213 export function CResult_PaymentPreimageAPIErrorZ_get_err(owner: number): number {
4214         if(!isWasmInitialized) {
4215                 throw new Error("initializeWasm() must be awaited first!");
4216         }
4217         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_err(owner);
4218         return nativeResponseValue;
4219 }
4220 /* @internal */
4221 export interface LDKWatch {
4222         watch_channel (funding_txo: number, monitor: number): number;
4223         update_channel (funding_txo: number, update: number): number;
4224         release_pending_monitor_events (): number;
4225 }
4226
4227 /* @internal */
4228 export function LDKWatch_new(impl: LDKWatch): number {
4229         if(!isWasmInitialized) {
4230                 throw new Error("initializeWasm() must be awaited first!");
4231         }
4232         var new_obj_idx = js_objs.length;
4233         for (var i = 0; i < js_objs.length; i++) {
4234                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4235         }
4236         js_objs[i] = new WeakRef(impl);
4237         return wasm.TS_LDKWatch_new(i);
4238 }
4239         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
4240 /* @internal */
4241 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
4242         if(!isWasmInitialized) {
4243                 throw new Error("initializeWasm() must be awaited first!");
4244         }
4245         const nativeResponseValue = wasm.TS_Watch_watch_channel(this_arg, funding_txo, monitor);
4246         return nativeResponseValue;
4247 }
4248         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
4249 /* @internal */
4250 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
4251         if(!isWasmInitialized) {
4252                 throw new Error("initializeWasm() must be awaited first!");
4253         }
4254         const nativeResponseValue = wasm.TS_Watch_update_channel(this_arg, funding_txo, update);
4255         return nativeResponseValue;
4256 }
4257         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
4258 /* @internal */
4259 export function Watch_release_pending_monitor_events(this_arg: number): number {
4260         if(!isWasmInitialized) {
4261                 throw new Error("initializeWasm() must be awaited first!");
4262         }
4263         const nativeResponseValue = wasm.TS_Watch_release_pending_monitor_events(this_arg);
4264         return nativeResponseValue;
4265 }
4266 /* @internal */
4267 export interface LDKBroadcasterInterface {
4268         broadcast_transaction (tx: number): void;
4269 }
4270
4271 /* @internal */
4272 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
4273         if(!isWasmInitialized) {
4274                 throw new Error("initializeWasm() must be awaited first!");
4275         }
4276         var new_obj_idx = js_objs.length;
4277         for (var i = 0; i < js_objs.length; i++) {
4278                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4279         }
4280         js_objs[i] = new WeakRef(impl);
4281         return wasm.TS_LDKBroadcasterInterface_new(i);
4282 }
4283         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
4284 /* @internal */
4285 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: number): void {
4286         if(!isWasmInitialized) {
4287                 throw new Error("initializeWasm() must be awaited first!");
4288         }
4289         const nativeResponseValue = wasm.TS_BroadcasterInterface_broadcast_transaction(this_arg, tx);
4290         // debug statements here
4291 }
4292 /* @internal */
4293 export interface LDKKeysInterface {
4294         get_node_secret (): number;
4295         get_destination_script (): number;
4296         get_shutdown_scriptpubkey (): number;
4297         get_channel_signer (inbound: boolean, channel_value_satoshis: bigint): number;
4298         get_secure_random_bytes (): number;
4299         read_chan_signer (reader: number): number;
4300         sign_invoice (invoice_preimage: number): number;
4301         get_inbound_payment_key_material (): number;
4302 }
4303
4304 /* @internal */
4305 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
4306         if(!isWasmInitialized) {
4307                 throw new Error("initializeWasm() must be awaited first!");
4308         }
4309         var new_obj_idx = js_objs.length;
4310         for (var i = 0; i < js_objs.length; i++) {
4311                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4312         }
4313         js_objs[i] = new WeakRef(impl);
4314         return wasm.TS_LDKKeysInterface_new(i);
4315 }
4316         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
4317 /* @internal */
4318 export function KeysInterface_get_node_secret(this_arg: number): number {
4319         if(!isWasmInitialized) {
4320                 throw new Error("initializeWasm() must be awaited first!");
4321         }
4322         const nativeResponseValue = wasm.TS_KeysInterface_get_node_secret(this_arg);
4323         return nativeResponseValue;
4324 }
4325         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
4326 /* @internal */
4327 export function KeysInterface_get_destination_script(this_arg: number): number {
4328         if(!isWasmInitialized) {
4329                 throw new Error("initializeWasm() must be awaited first!");
4330         }
4331         const nativeResponseValue = wasm.TS_KeysInterface_get_destination_script(this_arg);
4332         return nativeResponseValue;
4333 }
4334         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
4335 /* @internal */
4336 export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
4337         if(!isWasmInitialized) {
4338                 throw new Error("initializeWasm() must be awaited first!");
4339         }
4340         const nativeResponseValue = wasm.TS_KeysInterface_get_shutdown_scriptpubkey(this_arg);
4341         return nativeResponseValue;
4342 }
4343         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
4344 /* @internal */
4345 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: bigint): number {
4346         if(!isWasmInitialized) {
4347                 throw new Error("initializeWasm() must be awaited first!");
4348         }
4349         const nativeResponseValue = wasm.TS_KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
4350         return nativeResponseValue;
4351 }
4352         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
4353 /* @internal */
4354 export function KeysInterface_get_secure_random_bytes(this_arg: number): number {
4355         if(!isWasmInitialized) {
4356                 throw new Error("initializeWasm() must be awaited first!");
4357         }
4358         const nativeResponseValue = wasm.TS_KeysInterface_get_secure_random_bytes(this_arg);
4359         return nativeResponseValue;
4360 }
4361         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
4362 /* @internal */
4363 export function KeysInterface_read_chan_signer(this_arg: number, reader: number): number {
4364         if(!isWasmInitialized) {
4365                 throw new Error("initializeWasm() must be awaited first!");
4366         }
4367         const nativeResponseValue = wasm.TS_KeysInterface_read_chan_signer(this_arg, reader);
4368         return nativeResponseValue;
4369 }
4370         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
4371 /* @internal */
4372 export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: number): number {
4373         if(!isWasmInitialized) {
4374                 throw new Error("initializeWasm() must be awaited first!");
4375         }
4376         const nativeResponseValue = wasm.TS_KeysInterface_sign_invoice(this_arg, invoice_preimage);
4377         return nativeResponseValue;
4378 }
4379         // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
4380 /* @internal */
4381 export function KeysInterface_get_inbound_payment_key_material(this_arg: number): number {
4382         if(!isWasmInitialized) {
4383                 throw new Error("initializeWasm() must be awaited first!");
4384         }
4385         const nativeResponseValue = wasm.TS_KeysInterface_get_inbound_payment_key_material(this_arg);
4386         return nativeResponseValue;
4387 }
4388 /* @internal */
4389 export interface LDKFeeEstimator {
4390         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
4391 }
4392
4393 /* @internal */
4394 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
4395         if(!isWasmInitialized) {
4396                 throw new Error("initializeWasm() must be awaited first!");
4397         }
4398         var new_obj_idx = js_objs.length;
4399         for (var i = 0; i < js_objs.length; i++) {
4400                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4401         }
4402         js_objs[i] = new WeakRef(impl);
4403         return wasm.TS_LDKFeeEstimator_new(i);
4404 }
4405         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
4406 /* @internal */
4407 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
4408         if(!isWasmInitialized) {
4409                 throw new Error("initializeWasm() must be awaited first!");
4410         }
4411         const nativeResponseValue = wasm.TS_FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
4412         return nativeResponseValue;
4413 }
4414 /* @internal */
4415 export interface LDKLogger {
4416         log (record: number): void;
4417 }
4418
4419 /* @internal */
4420 export function LDKLogger_new(impl: LDKLogger): number {
4421         if(!isWasmInitialized) {
4422                 throw new Error("initializeWasm() must be awaited first!");
4423         }
4424         var new_obj_idx = js_objs.length;
4425         for (var i = 0; i < js_objs.length; i++) {
4426                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4427         }
4428         js_objs[i] = new WeakRef(impl);
4429         return wasm.TS_LDKLogger_new(i);
4430 }
4431         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
4432 /* @internal */
4433 export function C2Tuple_BlockHashChannelManagerZ_get_a(owner: number): number {
4434         if(!isWasmInitialized) {
4435                 throw new Error("initializeWasm() must be awaited first!");
4436         }
4437         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_a(owner);
4438         return nativeResponseValue;
4439 }
4440         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
4441 /* @internal */
4442 export function C2Tuple_BlockHashChannelManagerZ_get_b(owner: number): number {
4443         if(!isWasmInitialized) {
4444                 throw new Error("initializeWasm() must be awaited first!");
4445         }
4446         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_b(owner);
4447         return nativeResponseValue;
4448 }
4449         // struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
4450 /* @internal */
4451 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner: number): number {
4452         if(!isWasmInitialized) {
4453                 throw new Error("initializeWasm() must be awaited first!");
4454         }
4455         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner);
4456         return nativeResponseValue;
4457 }
4458         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
4459 /* @internal */
4460 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner: number): number {
4461         if(!isWasmInitialized) {
4462                 throw new Error("initializeWasm() must be awaited first!");
4463         }
4464         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner);
4465         return nativeResponseValue;
4466 }
4467 /* @internal */
4468 export interface LDKMessageSendEventsProvider {
4469         get_and_clear_pending_msg_events (): number;
4470 }
4471
4472 /* @internal */
4473 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
4474         if(!isWasmInitialized) {
4475                 throw new Error("initializeWasm() must be awaited first!");
4476         }
4477         var new_obj_idx = js_objs.length;
4478         for (var i = 0; i < js_objs.length; i++) {
4479                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4480         }
4481         js_objs[i] = new WeakRef(impl);
4482         return wasm.TS_LDKMessageSendEventsProvider_new(i);
4483 }
4484         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
4485 /* @internal */
4486 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number {
4487         if(!isWasmInitialized) {
4488                 throw new Error("initializeWasm() must be awaited first!");
4489         }
4490         const nativeResponseValue = wasm.TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
4491         return nativeResponseValue;
4492 }
4493 /* @internal */
4494 export interface LDKEventHandler {
4495         handle_event (event: number): void;
4496 }
4497
4498 /* @internal */
4499 export function LDKEventHandler_new(impl: LDKEventHandler): number {
4500         if(!isWasmInitialized) {
4501                 throw new Error("initializeWasm() must be awaited first!");
4502         }
4503         var new_obj_idx = js_objs.length;
4504         for (var i = 0; i < js_objs.length; i++) {
4505                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4506         }
4507         js_objs[i] = new WeakRef(impl);
4508         return wasm.TS_LDKEventHandler_new(i);
4509 }
4510         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
4511 /* @internal */
4512 export function EventHandler_handle_event(this_arg: number, event: number): void {
4513         if(!isWasmInitialized) {
4514                 throw new Error("initializeWasm() must be awaited first!");
4515         }
4516         const nativeResponseValue = wasm.TS_EventHandler_handle_event(this_arg, event);
4517         // debug statements here
4518 }
4519 /* @internal */
4520 export interface LDKEventsProvider {
4521         process_pending_events (handler: number): void;
4522 }
4523
4524 /* @internal */
4525 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
4526         if(!isWasmInitialized) {
4527                 throw new Error("initializeWasm() must be awaited first!");
4528         }
4529         var new_obj_idx = js_objs.length;
4530         for (var i = 0; i < js_objs.length; i++) {
4531                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4532         }
4533         js_objs[i] = new WeakRef(impl);
4534         return wasm.TS_LDKEventsProvider_new(i);
4535 }
4536         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
4537 /* @internal */
4538 export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
4539         if(!isWasmInitialized) {
4540                 throw new Error("initializeWasm() must be awaited first!");
4541         }
4542         const nativeResponseValue = wasm.TS_EventsProvider_process_pending_events(this_arg, handler);
4543         // debug statements here
4544 }
4545 /* @internal */
4546 export interface LDKListen {
4547         block_connected (block: number, height: number): void;
4548         block_disconnected (header: number, height: number): void;
4549 }
4550
4551 /* @internal */
4552 export function LDKListen_new(impl: LDKListen): number {
4553         if(!isWasmInitialized) {
4554                 throw new Error("initializeWasm() must be awaited first!");
4555         }
4556         var new_obj_idx = js_objs.length;
4557         for (var i = 0; i < js_objs.length; i++) {
4558                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4559         }
4560         js_objs[i] = new WeakRef(impl);
4561         return wasm.TS_LDKListen_new(i);
4562 }
4563         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
4564 /* @internal */
4565 export function Listen_block_connected(this_arg: number, block: number, height: number): void {
4566         if(!isWasmInitialized) {
4567                 throw new Error("initializeWasm() must be awaited first!");
4568         }
4569         const nativeResponseValue = wasm.TS_Listen_block_connected(this_arg, block, height);
4570         // debug statements here
4571 }
4572         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
4573 /* @internal */
4574 export function Listen_block_disconnected(this_arg: number, header: number, height: number): void {
4575         if(!isWasmInitialized) {
4576                 throw new Error("initializeWasm() must be awaited first!");
4577         }
4578         const nativeResponseValue = wasm.TS_Listen_block_disconnected(this_arg, header, height);
4579         // debug statements here
4580 }
4581 /* @internal */
4582 export interface LDKConfirm {
4583         transactions_confirmed (header: number, txdata: number, height: number): void;
4584         transaction_unconfirmed (txid: number): void;
4585         best_block_updated (header: number, height: number): void;
4586         get_relevant_txids (): number;
4587 }
4588
4589 /* @internal */
4590 export function LDKConfirm_new(impl: LDKConfirm): number {
4591         if(!isWasmInitialized) {
4592                 throw new Error("initializeWasm() must be awaited first!");
4593         }
4594         var new_obj_idx = js_objs.length;
4595         for (var i = 0; i < js_objs.length; i++) {
4596                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4597         }
4598         js_objs[i] = new WeakRef(impl);
4599         return wasm.TS_LDKConfirm_new(i);
4600 }
4601         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
4602 /* @internal */
4603 export function Confirm_transactions_confirmed(this_arg: number, header: number, txdata: number, height: number): void {
4604         if(!isWasmInitialized) {
4605                 throw new Error("initializeWasm() must be awaited first!");
4606         }
4607         const nativeResponseValue = wasm.TS_Confirm_transactions_confirmed(this_arg, header, txdata, height);
4608         // debug statements here
4609 }
4610         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
4611 /* @internal */
4612 export function Confirm_transaction_unconfirmed(this_arg: number, txid: number): void {
4613         if(!isWasmInitialized) {
4614                 throw new Error("initializeWasm() must be awaited first!");
4615         }
4616         const nativeResponseValue = wasm.TS_Confirm_transaction_unconfirmed(this_arg, txid);
4617         // debug statements here
4618 }
4619         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
4620 /* @internal */
4621 export function Confirm_best_block_updated(this_arg: number, header: number, height: number): void {
4622         if(!isWasmInitialized) {
4623                 throw new Error("initializeWasm() must be awaited first!");
4624         }
4625         const nativeResponseValue = wasm.TS_Confirm_best_block_updated(this_arg, header, height);
4626         // debug statements here
4627 }
4628         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
4629 /* @internal */
4630 export function Confirm_get_relevant_txids(this_arg: number): number {
4631         if(!isWasmInitialized) {
4632                 throw new Error("initializeWasm() must be awaited first!");
4633         }
4634         const nativeResponseValue = wasm.TS_Confirm_get_relevant_txids(this_arg);
4635         return nativeResponseValue;
4636 }
4637 /* @internal */
4638 export interface LDKPersist {
4639         persist_new_channel (channel_id: number, data: number, update_id: number): number;
4640         update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
4641 }
4642
4643 /* @internal */
4644 export function LDKPersist_new(impl: LDKPersist): number {
4645         if(!isWasmInitialized) {
4646                 throw new Error("initializeWasm() must be awaited first!");
4647         }
4648         var new_obj_idx = js_objs.length;
4649         for (var i = 0; i < js_objs.length; i++) {
4650                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4651         }
4652         js_objs[i] = new WeakRef(impl);
4653         return wasm.TS_LDKPersist_new(i);
4654 }
4655         // 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
4656 /* @internal */
4657 export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
4658         if(!isWasmInitialized) {
4659                 throw new Error("initializeWasm() must be awaited first!");
4660         }
4661         const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
4662         return nativeResponseValue;
4663 }
4664         // 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
4665 /* @internal */
4666 export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
4667         if(!isWasmInitialized) {
4668                 throw new Error("initializeWasm() must be awaited first!");
4669         }
4670         const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
4671         return nativeResponseValue;
4672 }
4673 /* @internal */
4674 export interface LDKChannelMessageHandler {
4675         handle_open_channel (their_node_id: number, their_features: number, msg: number): void;
4676         handle_accept_channel (their_node_id: number, their_features: number, msg: number): void;
4677         handle_funding_created (their_node_id: number, msg: number): void;
4678         handle_funding_signed (their_node_id: number, msg: number): void;
4679         handle_funding_locked (their_node_id: number, msg: number): void;
4680         handle_shutdown (their_node_id: number, their_features: number, msg: number): void;
4681         handle_closing_signed (their_node_id: number, msg: number): void;
4682         handle_update_add_htlc (their_node_id: number, msg: number): void;
4683         handle_update_fulfill_htlc (their_node_id: number, msg: number): void;
4684         handle_update_fail_htlc (their_node_id: number, msg: number): void;
4685         handle_update_fail_malformed_htlc (their_node_id: number, msg: number): void;
4686         handle_commitment_signed (their_node_id: number, msg: number): void;
4687         handle_revoke_and_ack (their_node_id: number, msg: number): void;
4688         handle_update_fee (their_node_id: number, msg: number): void;
4689         handle_announcement_signatures (their_node_id: number, msg: number): void;
4690         peer_disconnected (their_node_id: number, no_connection_possible: boolean): void;
4691         peer_connected (their_node_id: number, msg: number): void;
4692         handle_channel_reestablish (their_node_id: number, msg: number): void;
4693         handle_channel_update (their_node_id: number, msg: number): void;
4694         handle_error (their_node_id: number, msg: number): void;
4695 }
4696
4697 /* @internal */
4698 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
4699         if(!isWasmInitialized) {
4700                 throw new Error("initializeWasm() must be awaited first!");
4701         }
4702         var new_obj_idx = js_objs.length;
4703         for (var i = 0; i < js_objs.length; i++) {
4704                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4705         }
4706         js_objs[i] = new WeakRef(impl);
4707         return wasm.TS_LDKChannelMessageHandler_new(i);
4708 }
4709         // 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
4710 /* @internal */
4711 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: number, their_features: number, msg: number): void {
4712         if(!isWasmInitialized) {
4713                 throw new Error("initializeWasm() must be awaited first!");
4714         }
4715         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_open_channel(this_arg, their_node_id, their_features, msg);
4716         // debug statements here
4717 }
4718         // 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
4719 /* @internal */
4720 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: number, their_features: number, msg: number): void {
4721         if(!isWasmInitialized) {
4722                 throw new Error("initializeWasm() must be awaited first!");
4723         }
4724         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_accept_channel(this_arg, their_node_id, their_features, msg);
4725         // debug statements here
4726 }
4727         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
4728 /* @internal */
4729 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: number, msg: number): void {
4730         if(!isWasmInitialized) {
4731                 throw new Error("initializeWasm() must be awaited first!");
4732         }
4733         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_created(this_arg, their_node_id, msg);
4734         // debug statements here
4735 }
4736         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
4737 /* @internal */
4738 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: number, msg: number): void {
4739         if(!isWasmInitialized) {
4740                 throw new Error("initializeWasm() must be awaited first!");
4741         }
4742         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_signed(this_arg, their_node_id, msg);
4743         // debug statements here
4744 }
4745         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
4746 /* @internal */
4747 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: number, msg: number): void {
4748         if(!isWasmInitialized) {
4749                 throw new Error("initializeWasm() must be awaited first!");
4750         }
4751         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_locked(this_arg, their_node_id, msg);
4752         // debug statements here
4753 }
4754         // 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
4755 /* @internal */
4756 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: number, their_features: number, msg: number): void {
4757         if(!isWasmInitialized) {
4758                 throw new Error("initializeWasm() must be awaited first!");
4759         }
4760         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_shutdown(this_arg, their_node_id, their_features, msg);
4761         // debug statements here
4762 }
4763         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
4764 /* @internal */
4765 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: number, msg: number): void {
4766         if(!isWasmInitialized) {
4767                 throw new Error("initializeWasm() must be awaited first!");
4768         }
4769         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_closing_signed(this_arg, their_node_id, msg);
4770         // debug statements here
4771 }
4772         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
4773 /* @internal */
4774 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: number, msg: number): void {
4775         if(!isWasmInitialized) {
4776                 throw new Error("initializeWasm() must be awaited first!");
4777         }
4778         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_add_htlc(this_arg, their_node_id, msg);
4779         // debug statements here
4780 }
4781         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
4782 /* @internal */
4783 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: number, msg: number): void {
4784         if(!isWasmInitialized) {
4785                 throw new Error("initializeWasm() must be awaited first!");
4786         }
4787         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, their_node_id, msg);
4788         // debug statements here
4789 }
4790         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
4791 /* @internal */
4792 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: number, msg: number): void {
4793         if(!isWasmInitialized) {
4794                 throw new Error("initializeWasm() must be awaited first!");
4795         }
4796         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_htlc(this_arg, their_node_id, msg);
4797         // debug statements here
4798 }
4799         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
4800 /* @internal */
4801 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: number, msg: number): void {
4802         if(!isWasmInitialized) {
4803                 throw new Error("initializeWasm() must be awaited first!");
4804         }
4805         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, their_node_id, msg);
4806         // debug statements here
4807 }
4808         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
4809 /* @internal */
4810 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: number, msg: number): void {
4811         if(!isWasmInitialized) {
4812                 throw new Error("initializeWasm() must be awaited first!");
4813         }
4814         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_commitment_signed(this_arg, their_node_id, msg);
4815         // debug statements here
4816 }
4817         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
4818 /* @internal */
4819 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: number, msg: number): void {
4820         if(!isWasmInitialized) {
4821                 throw new Error("initializeWasm() must be awaited first!");
4822         }
4823         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_revoke_and_ack(this_arg, their_node_id, msg);
4824         // debug statements here
4825 }
4826         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
4827 /* @internal */
4828 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: number, msg: number): void {
4829         if(!isWasmInitialized) {
4830                 throw new Error("initializeWasm() must be awaited first!");
4831         }
4832         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fee(this_arg, their_node_id, msg);
4833         // debug statements here
4834 }
4835         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
4836 /* @internal */
4837 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: number, msg: number): void {
4838         if(!isWasmInitialized) {
4839                 throw new Error("initializeWasm() must be awaited first!");
4840         }
4841         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_announcement_signatures(this_arg, their_node_id, msg);
4842         // debug statements here
4843 }
4844         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
4845 /* @internal */
4846 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: number, no_connection_possible: boolean): void {
4847         if(!isWasmInitialized) {
4848                 throw new Error("initializeWasm() must be awaited first!");
4849         }
4850         const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, their_node_id, no_connection_possible);
4851         // debug statements here
4852 }
4853         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
4854 /* @internal */
4855 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: number, msg: number): void {
4856         if(!isWasmInitialized) {
4857                 throw new Error("initializeWasm() must be awaited first!");
4858         }
4859         const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, their_node_id, msg);
4860         // debug statements here
4861 }
4862         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
4863 /* @internal */
4864 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: number, msg: number): void {
4865         if(!isWasmInitialized) {
4866                 throw new Error("initializeWasm() must be awaited first!");
4867         }
4868         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_reestablish(this_arg, their_node_id, msg);
4869         // debug statements here
4870 }
4871         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
4872 /* @internal */
4873 export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: number, msg: number): void {
4874         if(!isWasmInitialized) {
4875                 throw new Error("initializeWasm() must be awaited first!");
4876         }
4877         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_update(this_arg, their_node_id, msg);
4878         // debug statements here
4879 }
4880         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
4881 /* @internal */
4882 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: number, msg: number): void {
4883         if(!isWasmInitialized) {
4884                 throw new Error("initializeWasm() must be awaited first!");
4885         }
4886         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_error(this_arg, their_node_id, msg);
4887         // debug statements here
4888 }
4889 /* @internal */
4890 export interface LDKRoutingMessageHandler {
4891         handle_node_announcement (msg: number): number;
4892         handle_channel_announcement (msg: number): number;
4893         handle_channel_update (msg: number): number;
4894         get_next_channel_announcements (starting_point: bigint, batch_amount: number): number;
4895         get_next_node_announcements (starting_point: number, batch_amount: number): number;
4896         sync_routing_table (their_node_id: number, init: number): void;
4897         handle_reply_channel_range (their_node_id: number, msg: number): number;
4898         handle_reply_short_channel_ids_end (their_node_id: number, msg: number): number;
4899         handle_query_channel_range (their_node_id: number, msg: number): number;
4900         handle_query_short_channel_ids (their_node_id: number, msg: number): number;
4901 }
4902
4903 /* @internal */
4904 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
4905         if(!isWasmInitialized) {
4906                 throw new Error("initializeWasm() must be awaited first!");
4907         }
4908         var new_obj_idx = js_objs.length;
4909         for (var i = 0; i < js_objs.length; i++) {
4910                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4911         }
4912         js_objs[i] = new WeakRef(impl);
4913         return wasm.TS_LDKRoutingMessageHandler_new(i);
4914 }
4915         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
4916 /* @internal */
4917 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
4918         if(!isWasmInitialized) {
4919                 throw new Error("initializeWasm() must be awaited first!");
4920         }
4921         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_node_announcement(this_arg, msg);
4922         return nativeResponseValue;
4923 }
4924         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
4925 /* @internal */
4926 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
4927         if(!isWasmInitialized) {
4928                 throw new Error("initializeWasm() must be awaited first!");
4929         }
4930         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
4931         return nativeResponseValue;
4932 }
4933         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
4934 /* @internal */
4935 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
4936         if(!isWasmInitialized) {
4937                 throw new Error("initializeWasm() must be awaited first!");
4938         }
4939         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_update(this_arg, msg);
4940         return nativeResponseValue;
4941 }
4942         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
4943 /* @internal */
4944 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: bigint, batch_amount: number): number {
4945         if(!isWasmInitialized) {
4946                 throw new Error("initializeWasm() must be awaited first!");
4947         }
4948         const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
4949         return nativeResponseValue;
4950 }
4951         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
4952 /* @internal */
4953 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: number, batch_amount: number): number {
4954         if(!isWasmInitialized) {
4955                 throw new Error("initializeWasm() must be awaited first!");
4956         }
4957         const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcements(this_arg, starting_point, batch_amount);
4958         return nativeResponseValue;
4959 }
4960         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
4961 /* @internal */
4962 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: number, init: number): void {
4963         if(!isWasmInitialized) {
4964                 throw new Error("initializeWasm() must be awaited first!");
4965         }
4966         const nativeResponseValue = wasm.TS_RoutingMessageHandler_sync_routing_table(this_arg, their_node_id, init);
4967         // debug statements here
4968 }
4969         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
4970 /* @internal */
4971 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: number, msg: number): number {
4972         if(!isWasmInitialized) {
4973                 throw new Error("initializeWasm() must be awaited first!");
4974         }
4975         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_channel_range(this_arg, their_node_id, msg);
4976         return nativeResponseValue;
4977 }
4978         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
4979 /* @internal */
4980 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: number, msg: number): number {
4981         if(!isWasmInitialized) {
4982                 throw new Error("initializeWasm() must be awaited first!");
4983         }
4984         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, their_node_id, msg);
4985         return nativeResponseValue;
4986 }
4987         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
4988 /* @internal */
4989 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: number, msg: number): number {
4990         if(!isWasmInitialized) {
4991                 throw new Error("initializeWasm() must be awaited first!");
4992         }
4993         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_channel_range(this_arg, their_node_id, msg);
4994         return nativeResponseValue;
4995 }
4996         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
4997 /* @internal */
4998 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: number, msg: number): number {
4999         if(!isWasmInitialized) {
5000                 throw new Error("initializeWasm() must be awaited first!");
5001         }
5002         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_short_channel_ids(this_arg, their_node_id, msg);
5003         return nativeResponseValue;
5004 }
5005 /* @internal */
5006 export interface LDKCustomMessageReader {
5007         read (message_type: number, buffer: number): number;
5008 }
5009
5010 /* @internal */
5011 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
5012         if(!isWasmInitialized) {
5013                 throw new Error("initializeWasm() must be awaited first!");
5014         }
5015         var new_obj_idx = js_objs.length;
5016         for (var i = 0; i < js_objs.length; i++) {
5017                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
5018         }
5019         js_objs[i] = new WeakRef(impl);
5020         return wasm.TS_LDKCustomMessageReader_new(i);
5021 }
5022         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
5023 /* @internal */
5024 export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: number): number {
5025         if(!isWasmInitialized) {
5026                 throw new Error("initializeWasm() must be awaited first!");
5027         }
5028         const nativeResponseValue = wasm.TS_CustomMessageReader_read(this_arg, message_type, buffer);
5029         return nativeResponseValue;
5030 }
5031 /* @internal */
5032 export interface LDKCustomMessageHandler {
5033         handle_custom_message (msg: number, sender_node_id: number): number;
5034         get_and_clear_pending_msg (): number;
5035 }
5036
5037 /* @internal */
5038 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
5039         if(!isWasmInitialized) {
5040                 throw new Error("initializeWasm() must be awaited first!");
5041         }
5042         var new_obj_idx = js_objs.length;
5043         for (var i = 0; i < js_objs.length; i++) {
5044                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
5045         }
5046         js_objs[i] = new WeakRef(impl);
5047         return wasm.TS_LDKCustomMessageHandler_new(i);
5048 }
5049         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
5050 /* @internal */
5051 export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: number): number {
5052         if(!isWasmInitialized) {
5053                 throw new Error("initializeWasm() must be awaited first!");
5054         }
5055         const nativeResponseValue = wasm.TS_CustomMessageHandler_handle_custom_message(this_arg, msg, sender_node_id);
5056         return nativeResponseValue;
5057 }
5058         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
5059 /* @internal */
5060 export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number {
5061         if(!isWasmInitialized) {
5062                 throw new Error("initializeWasm() must be awaited first!");
5063         }
5064         const nativeResponseValue = wasm.TS_CustomMessageHandler_get_and_clear_pending_msg(this_arg);
5065         return nativeResponseValue;
5066 }
5067 /* @internal */
5068 export interface LDKSocketDescriptor {
5069         send_data (data: number, resume_read: boolean): number;
5070         disconnect_socket (): void;
5071         eq (other_arg: number): boolean;
5072         hash (): bigint;
5073 }
5074
5075 /* @internal */
5076 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
5077         if(!isWasmInitialized) {
5078                 throw new Error("initializeWasm() must be awaited first!");
5079         }
5080         var new_obj_idx = js_objs.length;
5081         for (var i = 0; i < js_objs.length; i++) {
5082                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
5083         }
5084         js_objs[i] = new WeakRef(impl);
5085         return wasm.TS_LDKSocketDescriptor_new(i);
5086 }
5087         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
5088 /* @internal */
5089 export function SocketDescriptor_send_data(this_arg: number, data: number, resume_read: boolean): number {
5090         if(!isWasmInitialized) {
5091                 throw new Error("initializeWasm() must be awaited first!");
5092         }
5093         const nativeResponseValue = wasm.TS_SocketDescriptor_send_data(this_arg, data, resume_read);
5094         return nativeResponseValue;
5095 }
5096         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
5097 /* @internal */
5098 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
5099         if(!isWasmInitialized) {
5100                 throw new Error("initializeWasm() must be awaited first!");
5101         }
5102         const nativeResponseValue = wasm.TS_SocketDescriptor_disconnect_socket(this_arg);
5103         // debug statements here
5104 }
5105         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
5106 /* @internal */
5107 export function SocketDescriptor_hash(this_arg: number): bigint {
5108         if(!isWasmInitialized) {
5109                 throw new Error("initializeWasm() must be awaited first!");
5110         }
5111         const nativeResponseValue = wasm.TS_SocketDescriptor_hash(this_arg);
5112         return nativeResponseValue;
5113 }
5114 /* @internal */
5115 export interface LDKScore {
5116         channel_penalty_msat (short_channel_id: bigint, send_amt_msat: bigint, channel_capacity_msat: number, source: number, target: number): bigint;
5117         payment_path_failed (path: number, short_channel_id: bigint): void;
5118         payment_path_successful (path: number): void;
5119         write (): number;
5120 }
5121
5122 /* @internal */
5123 export function LDKScore_new(impl: LDKScore): number {
5124         if(!isWasmInitialized) {
5125                 throw new Error("initializeWasm() must be awaited first!");
5126         }
5127         var new_obj_idx = js_objs.length;
5128         for (var i = 0; i < js_objs.length; i++) {
5129                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
5130         }
5131         js_objs[i] = new WeakRef(impl);
5132         return wasm.TS_LDKScore_new(i);
5133 }
5134         // 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
5135 /* @internal */
5136 export function Score_channel_penalty_msat(this_arg: number, short_channel_id: bigint, send_amt_msat: bigint, channel_capacity_msat: number, source: number, target: number): bigint {
5137         if(!isWasmInitialized) {
5138                 throw new Error("initializeWasm() must be awaited first!");
5139         }
5140         const nativeResponseValue = wasm.TS_Score_channel_penalty_msat(this_arg, short_channel_id, send_amt_msat, channel_capacity_msat, source, target);
5141         return nativeResponseValue;
5142 }
5143         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
5144 /* @internal */
5145 export function Score_payment_path_failed(this_arg: number, path: number, short_channel_id: bigint): void {
5146         if(!isWasmInitialized) {
5147                 throw new Error("initializeWasm() must be awaited first!");
5148         }
5149         const nativeResponseValue = wasm.TS_Score_payment_path_failed(this_arg, path, short_channel_id);
5150         // debug statements here
5151 }
5152         // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
5153 /* @internal */
5154 export function Score_payment_path_successful(this_arg: number, path: number): void {
5155         if(!isWasmInitialized) {
5156                 throw new Error("initializeWasm() must be awaited first!");
5157         }
5158         const nativeResponseValue = wasm.TS_Score_payment_path_successful(this_arg, path);
5159         // debug statements here
5160 }
5161         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
5162 /* @internal */
5163 export function Score_write(this_arg: number): number {
5164         if(!isWasmInitialized) {
5165                 throw new Error("initializeWasm() must be awaited first!");
5166         }
5167         const nativeResponseValue = wasm.TS_Score_write(this_arg);
5168         return nativeResponseValue;
5169 }
5170 /* @internal */
5171 export interface LDKLockableScore {
5172         lock (): number;
5173 }
5174
5175 /* @internal */
5176 export function LDKLockableScore_new(impl: LDKLockableScore): number {
5177         if(!isWasmInitialized) {
5178                 throw new Error("initializeWasm() must be awaited first!");
5179         }
5180         var new_obj_idx = js_objs.length;
5181         for (var i = 0; i < js_objs.length; i++) {
5182                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
5183         }
5184         js_objs[i] = new WeakRef(impl);
5185         return wasm.TS_LDKLockableScore_new(i);
5186 }
5187         // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
5188 /* @internal */
5189 export function LockableScore_lock(this_arg: number): number {
5190         if(!isWasmInitialized) {
5191                 throw new Error("initializeWasm() must be awaited first!");
5192         }
5193         const nativeResponseValue = wasm.TS_LockableScore_lock(this_arg);
5194         return nativeResponseValue;
5195 }
5196         // struct LDKStr _ldk_get_compiled_version(void);
5197 /* @internal */
5198 export function _ldk_get_compiled_version(): number {
5199         if(!isWasmInitialized) {
5200                 throw new Error("initializeWasm() must be awaited first!");
5201         }
5202         const nativeResponseValue = wasm.TS__ldk_get_compiled_version();
5203         return nativeResponseValue;
5204 }
5205         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
5206 /* @internal */
5207 export function _ldk_c_bindings_get_compiled_version(): number {
5208         if(!isWasmInitialized) {
5209                 throw new Error("initializeWasm() must be awaited first!");
5210         }
5211         const nativeResponseValue = wasm.TS__ldk_c_bindings_get_compiled_version();
5212         return nativeResponseValue;
5213 }
5214         // void Transaction_free(struct LDKTransaction _res);
5215 /* @internal */
5216 export function Transaction_free(_res: number): void {
5217         if(!isWasmInitialized) {
5218                 throw new Error("initializeWasm() must be awaited first!");
5219         }
5220         const nativeResponseValue = wasm.TS_Transaction_free(_res);
5221         // debug statements here
5222 }
5223         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
5224 /* @internal */
5225 export function TxOut_new(script_pubkey: number, value: bigint): number {
5226         if(!isWasmInitialized) {
5227                 throw new Error("initializeWasm() must be awaited first!");
5228         }
5229         const nativeResponseValue = wasm.TS_TxOut_new(script_pubkey, value);
5230         return nativeResponseValue;
5231 }
5232         // void TxOut_free(struct LDKTxOut _res);
5233 /* @internal */
5234 export function TxOut_free(_res: number): void {
5235         if(!isWasmInitialized) {
5236                 throw new Error("initializeWasm() must be awaited first!");
5237         }
5238         const nativeResponseValue = wasm.TS_TxOut_free(_res);
5239         // debug statements here
5240 }
5241         // uintptr_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
5242 /* @internal */
5243 export function TxOut_clone_ptr(arg: number): number {
5244         if(!isWasmInitialized) {
5245                 throw new Error("initializeWasm() must be awaited first!");
5246         }
5247         const nativeResponseValue = wasm.TS_TxOut_clone_ptr(arg);
5248         return nativeResponseValue;
5249 }
5250         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
5251 /* @internal */
5252 export function TxOut_clone(orig: number): number {
5253         if(!isWasmInitialized) {
5254                 throw new Error("initializeWasm() must be awaited first!");
5255         }
5256         const nativeResponseValue = wasm.TS_TxOut_clone(orig);
5257         return nativeResponseValue;
5258 }
5259         // void Str_free(struct LDKStr _res);
5260 /* @internal */
5261 export function Str_free(_res: number): void {
5262         if(!isWasmInitialized) {
5263                 throw new Error("initializeWasm() must be awaited first!");
5264         }
5265         const nativeResponseValue = wasm.TS_Str_free(_res);
5266         // debug statements here
5267 }
5268         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
5269 /* @internal */
5270 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
5271         if(!isWasmInitialized) {
5272                 throw new Error("initializeWasm() must be awaited first!");
5273         }
5274         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_ok(o);
5275         return nativeResponseValue;
5276 }
5277         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
5278 /* @internal */
5279 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
5280         if(!isWasmInitialized) {
5281                 throw new Error("initializeWasm() must be awaited first!");
5282         }
5283         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_err(e);
5284         return nativeResponseValue;
5285 }
5286         // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
5287 /* @internal */
5288 export function CResult_ChannelConfigDecodeErrorZ_is_ok(o: number): boolean {
5289         if(!isWasmInitialized) {
5290                 throw new Error("initializeWasm() must be awaited first!");
5291         }
5292         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_is_ok(o);
5293         return nativeResponseValue;
5294 }
5295         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
5296 /* @internal */
5297 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
5298         if(!isWasmInitialized) {
5299                 throw new Error("initializeWasm() must be awaited first!");
5300         }
5301         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_free(_res);
5302         // debug statements here
5303 }
5304         // uintptr_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
5305 /* @internal */
5306 export function CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg: number): number {
5307         if(!isWasmInitialized) {
5308                 throw new Error("initializeWasm() must be awaited first!");
5309         }
5310         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg);
5311         return nativeResponseValue;
5312 }
5313         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
5314 /* @internal */
5315 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
5316         if(!isWasmInitialized) {
5317                 throw new Error("initializeWasm() must be awaited first!");
5318         }
5319         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone(orig);
5320         return nativeResponseValue;
5321 }
5322         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
5323 /* @internal */
5324 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
5325         if(!isWasmInitialized) {
5326                 throw new Error("initializeWasm() must be awaited first!");
5327         }
5328         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_ok(o);
5329         return nativeResponseValue;
5330 }
5331         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
5332 /* @internal */
5333 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
5334         if(!isWasmInitialized) {
5335                 throw new Error("initializeWasm() must be awaited first!");
5336         }
5337         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_err(e);
5338         return nativeResponseValue;
5339 }
5340         // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
5341 /* @internal */
5342 export function CResult_OutPointDecodeErrorZ_is_ok(o: number): boolean {
5343         if(!isWasmInitialized) {
5344                 throw new Error("initializeWasm() must be awaited first!");
5345         }
5346         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_is_ok(o);
5347         return nativeResponseValue;
5348 }
5349         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
5350 /* @internal */
5351 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
5352         if(!isWasmInitialized) {
5353                 throw new Error("initializeWasm() must be awaited first!");
5354         }
5355         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_free(_res);
5356         // debug statements here
5357 }
5358         // uintptr_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
5359 /* @internal */
5360 export function CResult_OutPointDecodeErrorZ_clone_ptr(arg: number): number {
5361         if(!isWasmInitialized) {
5362                 throw new Error("initializeWasm() must be awaited first!");
5363         }
5364         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone_ptr(arg);
5365         return nativeResponseValue;
5366 }
5367         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
5368 /* @internal */
5369 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
5370         if(!isWasmInitialized) {
5371                 throw new Error("initializeWasm() must be awaited first!");
5372         }
5373         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone(orig);
5374         return nativeResponseValue;
5375 }
5376         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
5377 /* @internal */
5378 export function CResult_SecretKeyErrorZ_ok(o: number): number {
5379         if(!isWasmInitialized) {
5380                 throw new Error("initializeWasm() must be awaited first!");
5381         }
5382         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_ok(o);
5383         return nativeResponseValue;
5384 }
5385         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
5386 /* @internal */
5387 export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
5388         if(!isWasmInitialized) {
5389                 throw new Error("initializeWasm() must be awaited first!");
5390         }
5391         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_err(e);
5392         return nativeResponseValue;
5393 }
5394         // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
5395 /* @internal */
5396 export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
5397         if(!isWasmInitialized) {
5398                 throw new Error("initializeWasm() must be awaited first!");
5399         }
5400         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_is_ok(o);
5401         return nativeResponseValue;
5402 }
5403         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
5404 /* @internal */
5405 export function CResult_SecretKeyErrorZ_free(_res: number): void {
5406         if(!isWasmInitialized) {
5407                 throw new Error("initializeWasm() must be awaited first!");
5408         }
5409         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_free(_res);
5410         // debug statements here
5411 }
5412         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
5413 /* @internal */
5414 export function CResult_PublicKeyErrorZ_ok(o: number): number {
5415         if(!isWasmInitialized) {
5416                 throw new Error("initializeWasm() must be awaited first!");
5417         }
5418         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_ok(o);
5419         return nativeResponseValue;
5420 }
5421         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
5422 /* @internal */
5423 export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
5424         if(!isWasmInitialized) {
5425                 throw new Error("initializeWasm() must be awaited first!");
5426         }
5427         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_err(e);
5428         return nativeResponseValue;
5429 }
5430         // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
5431 /* @internal */
5432 export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
5433         if(!isWasmInitialized) {
5434                 throw new Error("initializeWasm() must be awaited first!");
5435         }
5436         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_is_ok(o);
5437         return nativeResponseValue;
5438 }
5439         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
5440 /* @internal */
5441 export function CResult_PublicKeyErrorZ_free(_res: number): void {
5442         if(!isWasmInitialized) {
5443                 throw new Error("initializeWasm() must be awaited first!");
5444         }
5445         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_free(_res);
5446         // debug statements here
5447 }
5448         // uintptr_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
5449 /* @internal */
5450 export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
5451         if(!isWasmInitialized) {
5452                 throw new Error("initializeWasm() must be awaited first!");
5453         }
5454         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone_ptr(arg);
5455         return nativeResponseValue;
5456 }
5457         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
5458 /* @internal */
5459 export function CResult_PublicKeyErrorZ_clone(orig: number): number {
5460         if(!isWasmInitialized) {
5461                 throw new Error("initializeWasm() must be awaited first!");
5462         }
5463         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone(orig);
5464         return nativeResponseValue;
5465 }
5466         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
5467 /* @internal */
5468 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
5469         if(!isWasmInitialized) {
5470                 throw new Error("initializeWasm() must be awaited first!");
5471         }
5472         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_ok(o);
5473         return nativeResponseValue;
5474 }
5475         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
5476 /* @internal */
5477 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
5478         if(!isWasmInitialized) {
5479                 throw new Error("initializeWasm() must be awaited first!");
5480         }
5481         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_err(e);
5482         return nativeResponseValue;
5483 }
5484         // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
5485 /* @internal */
5486 export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
5487         if(!isWasmInitialized) {
5488                 throw new Error("initializeWasm() must be awaited first!");
5489         }
5490         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
5491         return nativeResponseValue;
5492 }
5493         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
5494 /* @internal */
5495 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
5496         if(!isWasmInitialized) {
5497                 throw new Error("initializeWasm() must be awaited first!");
5498         }
5499         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_free(_res);
5500         // debug statements here
5501 }
5502         // uintptr_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
5503 /* @internal */
5504 export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
5505         if(!isWasmInitialized) {
5506                 throw new Error("initializeWasm() must be awaited first!");
5507         }
5508         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
5509         return nativeResponseValue;
5510 }
5511         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
5512 /* @internal */
5513 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
5514         if(!isWasmInitialized) {
5515                 throw new Error("initializeWasm() must be awaited first!");
5516         }
5517         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone(orig);
5518         return nativeResponseValue;
5519 }
5520         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
5521 /* @internal */
5522 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
5523         if(!isWasmInitialized) {
5524                 throw new Error("initializeWasm() must be awaited first!");
5525         }
5526         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
5527         return nativeResponseValue;
5528 }
5529         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
5530 /* @internal */
5531 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
5532         if(!isWasmInitialized) {
5533                 throw new Error("initializeWasm() must be awaited first!");
5534         }
5535         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_err(e);
5536         return nativeResponseValue;
5537 }
5538         // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
5539 /* @internal */
5540 export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
5541         if(!isWasmInitialized) {
5542                 throw new Error("initializeWasm() must be awaited first!");
5543         }
5544         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
5545         return nativeResponseValue;
5546 }
5547         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
5548 /* @internal */
5549 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
5550         if(!isWasmInitialized) {
5551                 throw new Error("initializeWasm() must be awaited first!");
5552         }
5553         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
5554         // debug statements here
5555 }
5556         // uintptr_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
5557 /* @internal */
5558 export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
5559         if(!isWasmInitialized) {
5560                 throw new Error("initializeWasm() must be awaited first!");
5561         }
5562         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
5563         return nativeResponseValue;
5564 }
5565         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
5566 /* @internal */
5567 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
5568         if(!isWasmInitialized) {
5569                 throw new Error("initializeWasm() must be awaited first!");
5570         }
5571         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
5572         return nativeResponseValue;
5573 }
5574         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
5575 /* @internal */
5576 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
5577         if(!isWasmInitialized) {
5578                 throw new Error("initializeWasm() must be awaited first!");
5579         }
5580         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_ok(o);
5581         return nativeResponseValue;
5582 }
5583         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
5584 /* @internal */
5585 export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
5586         if(!isWasmInitialized) {
5587                 throw new Error("initializeWasm() must be awaited first!");
5588         }
5589         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_err(e);
5590         return nativeResponseValue;
5591 }
5592         // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
5593 /* @internal */
5594 export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
5595         if(!isWasmInitialized) {
5596                 throw new Error("initializeWasm() must be awaited first!");
5597         }
5598         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_is_ok(o);
5599         return nativeResponseValue;
5600 }
5601         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
5602 /* @internal */
5603 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
5604         if(!isWasmInitialized) {
5605                 throw new Error("initializeWasm() must be awaited first!");
5606         }
5607         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_free(_res);
5608         // debug statements here
5609 }
5610         // uintptr_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
5611 /* @internal */
5612 export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
5613         if(!isWasmInitialized) {
5614                 throw new Error("initializeWasm() must be awaited first!");
5615         }
5616         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone_ptr(arg);
5617         return nativeResponseValue;
5618 }
5619         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
5620 /* @internal */
5621 export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
5622         if(!isWasmInitialized) {
5623                 throw new Error("initializeWasm() must be awaited first!");
5624         }
5625         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone(orig);
5626         return nativeResponseValue;
5627 }
5628         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
5629 /* @internal */
5630 export function COption_u32Z_some(o: number): number {
5631         if(!isWasmInitialized) {
5632                 throw new Error("initializeWasm() must be awaited first!");
5633         }
5634         const nativeResponseValue = wasm.TS_COption_u32Z_some(o);
5635         return nativeResponseValue;
5636 }
5637         // struct LDKCOption_u32Z COption_u32Z_none(void);
5638 /* @internal */
5639 export function COption_u32Z_none(): number {
5640         if(!isWasmInitialized) {
5641                 throw new Error("initializeWasm() must be awaited first!");
5642         }
5643         const nativeResponseValue = wasm.TS_COption_u32Z_none();
5644         return nativeResponseValue;
5645 }
5646         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
5647 /* @internal */
5648 export function COption_u32Z_free(_res: number): void {
5649         if(!isWasmInitialized) {
5650                 throw new Error("initializeWasm() must be awaited first!");
5651         }
5652         const nativeResponseValue = wasm.TS_COption_u32Z_free(_res);
5653         // debug statements here
5654 }
5655         // uintptr_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
5656 /* @internal */
5657 export function COption_u32Z_clone_ptr(arg: number): number {
5658         if(!isWasmInitialized) {
5659                 throw new Error("initializeWasm() must be awaited first!");
5660         }
5661         const nativeResponseValue = wasm.TS_COption_u32Z_clone_ptr(arg);
5662         return nativeResponseValue;
5663 }
5664         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
5665 /* @internal */
5666 export function COption_u32Z_clone(orig: number): number {
5667         if(!isWasmInitialized) {
5668                 throw new Error("initializeWasm() must be awaited first!");
5669         }
5670         const nativeResponseValue = wasm.TS_COption_u32Z_clone(orig);
5671         return nativeResponseValue;
5672 }
5673         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
5674 /* @internal */
5675 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
5676         if(!isWasmInitialized) {
5677                 throw new Error("initializeWasm() must be awaited first!");
5678         }
5679         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
5680         return nativeResponseValue;
5681 }
5682         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
5683 /* @internal */
5684 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
5685         if(!isWasmInitialized) {
5686                 throw new Error("initializeWasm() must be awaited first!");
5687         }
5688         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
5689         return nativeResponseValue;
5690 }
5691         // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
5692 /* @internal */
5693 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
5694         if(!isWasmInitialized) {
5695                 throw new Error("initializeWasm() must be awaited first!");
5696         }
5697         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
5698         return nativeResponseValue;
5699 }
5700         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
5701 /* @internal */
5702 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
5703         if(!isWasmInitialized) {
5704                 throw new Error("initializeWasm() must be awaited first!");
5705         }
5706         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
5707         // debug statements here
5708 }
5709         // uintptr_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
5710 /* @internal */
5711 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
5712         if(!isWasmInitialized) {
5713                 throw new Error("initializeWasm() must be awaited first!");
5714         }
5715         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
5716         return nativeResponseValue;
5717 }
5718         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
5719 /* @internal */
5720 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
5721         if(!isWasmInitialized) {
5722                 throw new Error("initializeWasm() must be awaited first!");
5723         }
5724         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
5725         return nativeResponseValue;
5726 }
5727         // enum LDKCOption_NoneZ COption_NoneZ_some(void);
5728 /* @internal */
5729 export function COption_NoneZ_some(): COption_NoneZ {
5730         if(!isWasmInitialized) {
5731                 throw new Error("initializeWasm() must be awaited first!");
5732         }
5733         const nativeResponseValue = wasm.TS_COption_NoneZ_some();
5734         return nativeResponseValue;
5735 }
5736         // enum LDKCOption_NoneZ COption_NoneZ_none(void);
5737 /* @internal */
5738 export function COption_NoneZ_none(): COption_NoneZ {
5739         if(!isWasmInitialized) {
5740                 throw new Error("initializeWasm() must be awaited first!");
5741         }
5742         const nativeResponseValue = wasm.TS_COption_NoneZ_none();
5743         return nativeResponseValue;
5744 }
5745         // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
5746 /* @internal */
5747 export function COption_NoneZ_free(_res: COption_NoneZ): void {
5748         if(!isWasmInitialized) {
5749                 throw new Error("initializeWasm() must be awaited first!");
5750         }
5751         const nativeResponseValue = wasm.TS_COption_NoneZ_free(_res);
5752         // debug statements here
5753 }
5754         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
5755 /* @internal */
5756 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
5757         if(!isWasmInitialized) {
5758                 throw new Error("initializeWasm() must be awaited first!");
5759         }
5760         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
5761         return nativeResponseValue;
5762 }
5763         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
5764 /* @internal */
5765 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
5766         if(!isWasmInitialized) {
5767                 throw new Error("initializeWasm() must be awaited first!");
5768         }
5769         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
5770         return nativeResponseValue;
5771 }
5772         // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
5773 /* @internal */
5774 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
5775         if(!isWasmInitialized) {
5776                 throw new Error("initializeWasm() must be awaited first!");
5777         }
5778         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
5779         return nativeResponseValue;
5780 }
5781         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
5782 /* @internal */
5783 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
5784         if(!isWasmInitialized) {
5785                 throw new Error("initializeWasm() must be awaited first!");
5786         }
5787         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
5788         // debug statements here
5789 }
5790         // uintptr_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
5791 /* @internal */
5792 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
5793         if(!isWasmInitialized) {
5794                 throw new Error("initializeWasm() must be awaited first!");
5795         }
5796         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
5797         return nativeResponseValue;
5798 }
5799         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
5800 /* @internal */
5801 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
5802         if(!isWasmInitialized) {
5803                 throw new Error("initializeWasm() must be awaited first!");
5804         }
5805         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
5806         return nativeResponseValue;
5807 }
5808         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
5809 /* @internal */
5810 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
5811         if(!isWasmInitialized) {
5812                 throw new Error("initializeWasm() must be awaited first!");
5813         }
5814         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
5815         return nativeResponseValue;
5816 }
5817         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
5818 /* @internal */
5819 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
5820         if(!isWasmInitialized) {
5821                 throw new Error("initializeWasm() must be awaited first!");
5822         }
5823         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
5824         return nativeResponseValue;
5825 }
5826         // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
5827 /* @internal */
5828 export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
5829         if(!isWasmInitialized) {
5830                 throw new Error("initializeWasm() must be awaited first!");
5831         }
5832         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
5833         return nativeResponseValue;
5834 }
5835         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
5836 /* @internal */
5837 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
5838         if(!isWasmInitialized) {
5839                 throw new Error("initializeWasm() must be awaited first!");
5840         }
5841         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
5842         // debug statements here
5843 }
5844         // uintptr_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
5845 /* @internal */
5846 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
5847         if(!isWasmInitialized) {
5848                 throw new Error("initializeWasm() must be awaited first!");
5849         }
5850         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
5851         return nativeResponseValue;
5852 }
5853         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
5854 /* @internal */
5855 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
5856         if(!isWasmInitialized) {
5857                 throw new Error("initializeWasm() must be awaited first!");
5858         }
5859         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
5860         return nativeResponseValue;
5861 }
5862         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
5863 /* @internal */
5864 export function CVec_SignatureZ_free(_res: number): void {
5865         if(!isWasmInitialized) {
5866                 throw new Error("initializeWasm() must be awaited first!");
5867         }
5868         const nativeResponseValue = wasm.TS_CVec_SignatureZ_free(_res);
5869         // debug statements here
5870 }
5871         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
5872 /* @internal */
5873 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
5874         if(!isWasmInitialized) {
5875                 throw new Error("initializeWasm() must be awaited first!");
5876         }
5877         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
5878         return nativeResponseValue;
5879 }
5880         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
5881 /* @internal */
5882 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
5883         if(!isWasmInitialized) {
5884                 throw new Error("initializeWasm() must be awaited first!");
5885         }
5886         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
5887         return nativeResponseValue;
5888 }
5889         // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
5890 /* @internal */
5891 export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
5892         if(!isWasmInitialized) {
5893                 throw new Error("initializeWasm() must be awaited first!");
5894         }
5895         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
5896         return nativeResponseValue;
5897 }
5898         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
5899 /* @internal */
5900 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
5901         if(!isWasmInitialized) {
5902                 throw new Error("initializeWasm() must be awaited first!");
5903         }
5904         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
5905         // debug statements here
5906 }
5907         // uintptr_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
5908 /* @internal */
5909 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
5910         if(!isWasmInitialized) {
5911                 throw new Error("initializeWasm() must be awaited first!");
5912         }
5913         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
5914         return nativeResponseValue;
5915 }
5916         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
5917 /* @internal */
5918 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
5919         if(!isWasmInitialized) {
5920                 throw new Error("initializeWasm() must be awaited first!");
5921         }
5922         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
5923         return nativeResponseValue;
5924 }
5925         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
5926 /* @internal */
5927 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
5928         if(!isWasmInitialized) {
5929                 throw new Error("initializeWasm() must be awaited first!");
5930         }
5931         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
5932         return nativeResponseValue;
5933 }
5934         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
5935 /* @internal */
5936 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
5937         if(!isWasmInitialized) {
5938                 throw new Error("initializeWasm() must be awaited first!");
5939         }
5940         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
5941         return nativeResponseValue;
5942 }
5943         // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
5944 /* @internal */
5945 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
5946         if(!isWasmInitialized) {
5947                 throw new Error("initializeWasm() must be awaited first!");
5948         }
5949         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
5950         return nativeResponseValue;
5951 }
5952         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
5953 /* @internal */
5954 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
5955         if(!isWasmInitialized) {
5956                 throw new Error("initializeWasm() must be awaited first!");
5957         }
5958         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
5959         // debug statements here
5960 }
5961         // uintptr_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
5962 /* @internal */
5963 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
5964         if(!isWasmInitialized) {
5965                 throw new Error("initializeWasm() must be awaited first!");
5966         }
5967         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
5968         return nativeResponseValue;
5969 }
5970         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
5971 /* @internal */
5972 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
5973         if(!isWasmInitialized) {
5974                 throw new Error("initializeWasm() must be awaited first!");
5975         }
5976         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
5977         return nativeResponseValue;
5978 }
5979         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
5980 /* @internal */
5981 export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
5982         if(!isWasmInitialized) {
5983                 throw new Error("initializeWasm() must be awaited first!");
5984         }
5985         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_ok(o);
5986         return nativeResponseValue;
5987 }
5988         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
5989 /* @internal */
5990 export function CResult_TrustedClosingTransactionNoneZ_err(): number {
5991         if(!isWasmInitialized) {
5992                 throw new Error("initializeWasm() must be awaited first!");
5993         }
5994         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_err();
5995         return nativeResponseValue;
5996 }
5997         // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
5998 /* @internal */
5999 export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
6000         if(!isWasmInitialized) {
6001                 throw new Error("initializeWasm() must be awaited first!");
6002         }
6003         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_is_ok(o);
6004         return nativeResponseValue;
6005 }
6006         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
6007 /* @internal */
6008 export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
6009         if(!isWasmInitialized) {
6010                 throw new Error("initializeWasm() must be awaited first!");
6011         }
6012         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_free(_res);
6013         // debug statements here
6014 }
6015         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
6016 /* @internal */
6017 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
6018         if(!isWasmInitialized) {
6019                 throw new Error("initializeWasm() must be awaited first!");
6020         }
6021         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_ok(o);
6022         return nativeResponseValue;
6023 }
6024         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
6025 /* @internal */
6026 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
6027         if(!isWasmInitialized) {
6028                 throw new Error("initializeWasm() must be awaited first!");
6029         }
6030         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_err(e);
6031         return nativeResponseValue;
6032 }
6033         // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
6034 /* @internal */
6035 export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
6036         if(!isWasmInitialized) {
6037                 throw new Error("initializeWasm() must be awaited first!");
6038         }
6039         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
6040         return nativeResponseValue;
6041 }
6042         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
6043 /* @internal */
6044 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
6045         if(!isWasmInitialized) {
6046                 throw new Error("initializeWasm() must be awaited first!");
6047         }
6048         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_free(_res);
6049         // debug statements here
6050 }
6051         // uintptr_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
6052 /* @internal */
6053 export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
6054         if(!isWasmInitialized) {
6055                 throw new Error("initializeWasm() must be awaited first!");
6056         }
6057         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
6058         return nativeResponseValue;
6059 }
6060         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
6061 /* @internal */
6062 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
6063         if(!isWasmInitialized) {
6064                 throw new Error("initializeWasm() must be awaited first!");
6065         }
6066         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
6067         return nativeResponseValue;
6068 }
6069         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
6070 /* @internal */
6071 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
6072         if(!isWasmInitialized) {
6073                 throw new Error("initializeWasm() must be awaited first!");
6074         }
6075         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_ok(o);
6076         return nativeResponseValue;
6077 }
6078         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
6079 /* @internal */
6080 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
6081         if(!isWasmInitialized) {
6082                 throw new Error("initializeWasm() must be awaited first!");
6083         }
6084         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_err();
6085         return nativeResponseValue;
6086 }
6087         // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
6088 /* @internal */
6089 export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
6090         if(!isWasmInitialized) {
6091                 throw new Error("initializeWasm() must be awaited first!");
6092         }
6093         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
6094         return nativeResponseValue;
6095 }
6096         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
6097 /* @internal */
6098 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
6099         if(!isWasmInitialized) {
6100                 throw new Error("initializeWasm() must be awaited first!");
6101         }
6102         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_free(_res);
6103         // debug statements here
6104 }
6105         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
6106 /* @internal */
6107 export function CResult_CVec_SignatureZNoneZ_ok(o: number): number {
6108         if(!isWasmInitialized) {
6109                 throw new Error("initializeWasm() must be awaited first!");
6110         }
6111         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_ok(o);
6112         return nativeResponseValue;
6113 }
6114         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
6115 /* @internal */
6116 export function CResult_CVec_SignatureZNoneZ_err(): number {
6117         if(!isWasmInitialized) {
6118                 throw new Error("initializeWasm() must be awaited first!");
6119         }
6120         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_err();
6121         return nativeResponseValue;
6122 }
6123         // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
6124 /* @internal */
6125 export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
6126         if(!isWasmInitialized) {
6127                 throw new Error("initializeWasm() must be awaited first!");
6128         }
6129         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_is_ok(o);
6130         return nativeResponseValue;
6131 }
6132         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
6133 /* @internal */
6134 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
6135         if(!isWasmInitialized) {
6136                 throw new Error("initializeWasm() must be awaited first!");
6137         }
6138         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_free(_res);
6139         // debug statements here
6140 }
6141         // uintptr_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
6142 /* @internal */
6143 export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
6144         if(!isWasmInitialized) {
6145                 throw new Error("initializeWasm() must be awaited first!");
6146         }
6147         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
6148         return nativeResponseValue;
6149 }
6150         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
6151 /* @internal */
6152 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
6153         if(!isWasmInitialized) {
6154                 throw new Error("initializeWasm() must be awaited first!");
6155         }
6156         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone(orig);
6157         return nativeResponseValue;
6158 }
6159         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
6160 /* @internal */
6161 export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
6162         if(!isWasmInitialized) {
6163                 throw new Error("initializeWasm() must be awaited first!");
6164         }
6165         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_ok(o);
6166         return nativeResponseValue;
6167 }
6168         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
6169 /* @internal */
6170 export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
6171         if(!isWasmInitialized) {
6172                 throw new Error("initializeWasm() must be awaited first!");
6173         }
6174         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_err(e);
6175         return nativeResponseValue;
6176 }
6177         // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
6178 /* @internal */
6179 export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
6180         if(!isWasmInitialized) {
6181                 throw new Error("initializeWasm() must be awaited first!");
6182         }
6183         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
6184         return nativeResponseValue;
6185 }
6186         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
6187 /* @internal */
6188 export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
6189         if(!isWasmInitialized) {
6190                 throw new Error("initializeWasm() must be awaited first!");
6191         }
6192         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_free(_res);
6193         // debug statements here
6194 }
6195         // uintptr_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
6196 /* @internal */
6197 export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
6198         if(!isWasmInitialized) {
6199                 throw new Error("initializeWasm() must be awaited first!");
6200         }
6201         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
6202         return nativeResponseValue;
6203 }
6204         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
6205 /* @internal */
6206 export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
6207         if(!isWasmInitialized) {
6208                 throw new Error("initializeWasm() must be awaited first!");
6209         }
6210         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone(orig);
6211         return nativeResponseValue;
6212 }
6213         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
6214 /* @internal */
6215 export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
6216         if(!isWasmInitialized) {
6217                 throw new Error("initializeWasm() must be awaited first!");
6218         }
6219         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
6220         return nativeResponseValue;
6221 }
6222         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
6223 /* @internal */
6224 export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
6225         if(!isWasmInitialized) {
6226                 throw new Error("initializeWasm() must be awaited first!");
6227         }
6228         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
6229         return nativeResponseValue;
6230 }
6231         // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
6232 /* @internal */
6233 export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
6234         if(!isWasmInitialized) {
6235                 throw new Error("initializeWasm() must be awaited first!");
6236         }
6237         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
6238         return nativeResponseValue;
6239 }
6240         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
6241 /* @internal */
6242 export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
6243         if(!isWasmInitialized) {
6244                 throw new Error("initializeWasm() must be awaited first!");
6245         }
6246         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
6247         // debug statements here
6248 }
6249         // uintptr_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
6250 /* @internal */
6251 export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
6252         if(!isWasmInitialized) {
6253                 throw new Error("initializeWasm() must be awaited first!");
6254         }
6255         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
6256         return nativeResponseValue;
6257 }
6258         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
6259 /* @internal */
6260 export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
6261         if(!isWasmInitialized) {
6262                 throw new Error("initializeWasm() must be awaited first!");
6263         }
6264         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
6265         return nativeResponseValue;
6266 }
6267         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
6268 /* @internal */
6269 export function COption_TypeZ_some(o: number): number {
6270         if(!isWasmInitialized) {
6271                 throw new Error("initializeWasm() must be awaited first!");
6272         }
6273         const nativeResponseValue = wasm.TS_COption_TypeZ_some(o);
6274         return nativeResponseValue;
6275 }
6276         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
6277 /* @internal */
6278 export function COption_TypeZ_none(): number {
6279         if(!isWasmInitialized) {
6280                 throw new Error("initializeWasm() must be awaited first!");
6281         }
6282         const nativeResponseValue = wasm.TS_COption_TypeZ_none();
6283         return nativeResponseValue;
6284 }
6285         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
6286 /* @internal */
6287 export function COption_TypeZ_free(_res: number): void {
6288         if(!isWasmInitialized) {
6289                 throw new Error("initializeWasm() must be awaited first!");
6290         }
6291         const nativeResponseValue = wasm.TS_COption_TypeZ_free(_res);
6292         // debug statements here
6293 }
6294         // uintptr_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
6295 /* @internal */
6296 export function COption_TypeZ_clone_ptr(arg: number): number {
6297         if(!isWasmInitialized) {
6298                 throw new Error("initializeWasm() must be awaited first!");
6299         }
6300         const nativeResponseValue = wasm.TS_COption_TypeZ_clone_ptr(arg);
6301         return nativeResponseValue;
6302 }
6303         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
6304 /* @internal */
6305 export function COption_TypeZ_clone(orig: number): number {
6306         if(!isWasmInitialized) {
6307                 throw new Error("initializeWasm() must be awaited first!");
6308         }
6309         const nativeResponseValue = wasm.TS_COption_TypeZ_clone(orig);
6310         return nativeResponseValue;
6311 }
6312         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
6313 /* @internal */
6314 export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
6315         if(!isWasmInitialized) {
6316                 throw new Error("initializeWasm() must be awaited first!");
6317         }
6318         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_ok(o);
6319         return nativeResponseValue;
6320 }
6321         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
6322 /* @internal */
6323 export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
6324         if(!isWasmInitialized) {
6325                 throw new Error("initializeWasm() must be awaited first!");
6326         }
6327         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_err(e);
6328         return nativeResponseValue;
6329 }
6330         // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
6331 /* @internal */
6332 export function CResult_COption_TypeZDecodeErrorZ_is_ok(o: number): boolean {
6333         if(!isWasmInitialized) {
6334                 throw new Error("initializeWasm() must be awaited first!");
6335         }
6336         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_is_ok(o);
6337         return nativeResponseValue;
6338 }
6339         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
6340 /* @internal */
6341 export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
6342         if(!isWasmInitialized) {
6343                 throw new Error("initializeWasm() must be awaited first!");
6344         }
6345         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_free(_res);
6346         // debug statements here
6347 }
6348         // uintptr_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
6349 /* @internal */
6350 export function CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg: number): number {
6351         if(!isWasmInitialized) {
6352                 throw new Error("initializeWasm() must be awaited first!");
6353         }
6354         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg);
6355         return nativeResponseValue;
6356 }
6357         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
6358 /* @internal */
6359 export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
6360         if(!isWasmInitialized) {
6361                 throw new Error("initializeWasm() must be awaited first!");
6362         }
6363         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone(orig);
6364         return nativeResponseValue;
6365 }
6366         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
6367 /* @internal */
6368 export function CResult_StringErrorZ_ok(o: number): number {
6369         if(!isWasmInitialized) {
6370                 throw new Error("initializeWasm() must be awaited first!");
6371         }
6372         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_ok(o);
6373         return nativeResponseValue;
6374 }
6375         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
6376 /* @internal */
6377 export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
6378         if(!isWasmInitialized) {
6379                 throw new Error("initializeWasm() must be awaited first!");
6380         }
6381         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_err(e);
6382         return nativeResponseValue;
6383 }
6384         // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
6385 /* @internal */
6386 export function CResult_StringErrorZ_is_ok(o: number): boolean {
6387         if(!isWasmInitialized) {
6388                 throw new Error("initializeWasm() must be awaited first!");
6389         }
6390         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_is_ok(o);
6391         return nativeResponseValue;
6392 }
6393         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
6394 /* @internal */
6395 export function CResult_StringErrorZ_free(_res: number): void {
6396         if(!isWasmInitialized) {
6397                 throw new Error("initializeWasm() must be awaited first!");
6398         }
6399         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_free(_res);
6400         // debug statements here
6401 }
6402         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
6403 /* @internal */
6404 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
6405         if(!isWasmInitialized) {
6406                 throw new Error("initializeWasm() must be awaited first!");
6407         }
6408         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
6409         return nativeResponseValue;
6410 }
6411         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6412 /* @internal */
6413 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
6414         if(!isWasmInitialized) {
6415                 throw new Error("initializeWasm() must be awaited first!");
6416         }
6417         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
6418         return nativeResponseValue;
6419 }
6420         // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
6421 /* @internal */
6422 export function CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: number): boolean {
6423         if(!isWasmInitialized) {
6424                 throw new Error("initializeWasm() must be awaited first!");
6425         }
6426         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o);
6427         return nativeResponseValue;
6428 }
6429         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
6430 /* @internal */
6431 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
6432         if(!isWasmInitialized) {
6433                 throw new Error("initializeWasm() must be awaited first!");
6434         }
6435         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
6436         // debug statements here
6437 }
6438         // uintptr_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
6439 /* @internal */
6440 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6441         if(!isWasmInitialized) {
6442                 throw new Error("initializeWasm() must be awaited first!");
6443         }
6444         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg);
6445         return nativeResponseValue;
6446 }
6447         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
6448 /* @internal */
6449 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
6450         if(!isWasmInitialized) {
6451                 throw new Error("initializeWasm() must be awaited first!");
6452         }
6453         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
6454         return nativeResponseValue;
6455 }
6456         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
6457 /* @internal */
6458 export function COption_MonitorEventZ_some(o: number): number {
6459         if(!isWasmInitialized) {
6460                 throw new Error("initializeWasm() must be awaited first!");
6461         }
6462         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_some(o);
6463         return nativeResponseValue;
6464 }
6465         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
6466 /* @internal */
6467 export function COption_MonitorEventZ_none(): number {
6468         if(!isWasmInitialized) {
6469                 throw new Error("initializeWasm() must be awaited first!");
6470         }
6471         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_none();
6472         return nativeResponseValue;
6473 }
6474         // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
6475 /* @internal */
6476 export function COption_MonitorEventZ_free(_res: number): void {
6477         if(!isWasmInitialized) {
6478                 throw new Error("initializeWasm() must be awaited first!");
6479         }
6480         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_free(_res);
6481         // debug statements here
6482 }
6483         // uintptr_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
6484 /* @internal */
6485 export function COption_MonitorEventZ_clone_ptr(arg: number): number {
6486         if(!isWasmInitialized) {
6487                 throw new Error("initializeWasm() must be awaited first!");
6488         }
6489         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone_ptr(arg);
6490         return nativeResponseValue;
6491 }
6492         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
6493 /* @internal */
6494 export function COption_MonitorEventZ_clone(orig: number): number {
6495         if(!isWasmInitialized) {
6496                 throw new Error("initializeWasm() must be awaited first!");
6497         }
6498         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone(orig);
6499         return nativeResponseValue;
6500 }
6501         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
6502 /* @internal */
6503 export function CResult_COption_MonitorEventZDecodeErrorZ_ok(o: number): number {
6504         if(!isWasmInitialized) {
6505                 throw new Error("initializeWasm() must be awaited first!");
6506         }
6507         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_ok(o);
6508         return nativeResponseValue;
6509 }
6510         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
6511 /* @internal */
6512 export function CResult_COption_MonitorEventZDecodeErrorZ_err(e: number): number {
6513         if(!isWasmInitialized) {
6514                 throw new Error("initializeWasm() must be awaited first!");
6515         }
6516         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_err(e);
6517         return nativeResponseValue;
6518 }
6519         // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
6520 /* @internal */
6521 export function CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: number): boolean {
6522         if(!isWasmInitialized) {
6523                 throw new Error("initializeWasm() must be awaited first!");
6524         }
6525         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o);
6526         return nativeResponseValue;
6527 }
6528         // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
6529 /* @internal */
6530 export function CResult_COption_MonitorEventZDecodeErrorZ_free(_res: number): void {
6531         if(!isWasmInitialized) {
6532                 throw new Error("initializeWasm() must be awaited first!");
6533         }
6534         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_free(_res);
6535         // debug statements here
6536 }
6537         // uintptr_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
6538 /* @internal */
6539 export function CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg: number): number {
6540         if(!isWasmInitialized) {
6541                 throw new Error("initializeWasm() must be awaited first!");
6542         }
6543         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg);
6544         return nativeResponseValue;
6545 }
6546         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
6547 /* @internal */
6548 export function CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: number): number {
6549         if(!isWasmInitialized) {
6550                 throw new Error("initializeWasm() must be awaited first!");
6551         }
6552         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone(orig);
6553         return nativeResponseValue;
6554 }
6555         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
6556 /* @internal */
6557 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
6558         if(!isWasmInitialized) {
6559                 throw new Error("initializeWasm() must be awaited first!");
6560         }
6561         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_ok(o);
6562         return nativeResponseValue;
6563 }
6564         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6565 /* @internal */
6566 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
6567         if(!isWasmInitialized) {
6568                 throw new Error("initializeWasm() must be awaited first!");
6569         }
6570         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_err(e);
6571         return nativeResponseValue;
6572 }
6573         // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
6574 /* @internal */
6575 export function CResult_HTLCUpdateDecodeErrorZ_is_ok(o: number): boolean {
6576         if(!isWasmInitialized) {
6577                 throw new Error("initializeWasm() must be awaited first!");
6578         }
6579         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_is_ok(o);
6580         return nativeResponseValue;
6581 }
6582         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
6583 /* @internal */
6584 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
6585         if(!isWasmInitialized) {
6586                 throw new Error("initializeWasm() must be awaited first!");
6587         }
6588         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_free(_res);
6589         // debug statements here
6590 }
6591         // uintptr_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
6592 /* @internal */
6593 export function CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6594         if(!isWasmInitialized) {
6595                 throw new Error("initializeWasm() must be awaited first!");
6596         }
6597         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg);
6598         return nativeResponseValue;
6599 }
6600         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
6601 /* @internal */
6602 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
6603         if(!isWasmInitialized) {
6604                 throw new Error("initializeWasm() must be awaited first!");
6605         }
6606         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone(orig);
6607         return nativeResponseValue;
6608 }
6609         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
6610 /* @internal */
6611 export function CResult_NoneNoneZ_ok(): number {
6612         if(!isWasmInitialized) {
6613                 throw new Error("initializeWasm() must be awaited first!");
6614         }
6615         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_ok();
6616         return nativeResponseValue;
6617 }
6618         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
6619 /* @internal */
6620 export function CResult_NoneNoneZ_err(): number {
6621         if(!isWasmInitialized) {
6622                 throw new Error("initializeWasm() must be awaited first!");
6623         }
6624         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_err();
6625         return nativeResponseValue;
6626 }
6627         // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
6628 /* @internal */
6629 export function CResult_NoneNoneZ_is_ok(o: number): boolean {
6630         if(!isWasmInitialized) {
6631                 throw new Error("initializeWasm() must be awaited first!");
6632         }
6633         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_is_ok(o);
6634         return nativeResponseValue;
6635 }
6636         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
6637 /* @internal */
6638 export function CResult_NoneNoneZ_free(_res: number): void {
6639         if(!isWasmInitialized) {
6640                 throw new Error("initializeWasm() must be awaited first!");
6641         }
6642         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_free(_res);
6643         // debug statements here
6644 }
6645         // uintptr_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
6646 /* @internal */
6647 export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
6648         if(!isWasmInitialized) {
6649                 throw new Error("initializeWasm() must be awaited first!");
6650         }
6651         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone_ptr(arg);
6652         return nativeResponseValue;
6653 }
6654         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
6655 /* @internal */
6656 export function CResult_NoneNoneZ_clone(orig: number): number {
6657         if(!isWasmInitialized) {
6658                 throw new Error("initializeWasm() must be awaited first!");
6659         }
6660         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone(orig);
6661         return nativeResponseValue;
6662 }
6663         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
6664 /* @internal */
6665 export function C2Tuple_OutPointScriptZ_new(a: number, b: number): number {
6666         if(!isWasmInitialized) {
6667                 throw new Error("initializeWasm() must be awaited first!");
6668         }
6669         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_new(a, b);
6670         return nativeResponseValue;
6671 }
6672         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
6673 /* @internal */
6674 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
6675         if(!isWasmInitialized) {
6676                 throw new Error("initializeWasm() must be awaited first!");
6677         }
6678         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_free(_res);
6679         // debug statements here
6680 }
6681         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
6682 /* @internal */
6683 export function C2Tuple_u32ScriptZ_new(a: number, b: number): number {
6684         if(!isWasmInitialized) {
6685                 throw new Error("initializeWasm() must be awaited first!");
6686         }
6687         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_new(a, b);
6688         return nativeResponseValue;
6689 }
6690         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
6691 /* @internal */
6692 export function C2Tuple_u32ScriptZ_free(_res: number): void {
6693         if(!isWasmInitialized) {
6694                 throw new Error("initializeWasm() must be awaited first!");
6695         }
6696         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_free(_res);
6697         // debug statements here
6698 }
6699         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
6700 /* @internal */
6701 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number): void {
6702         if(!isWasmInitialized) {
6703                 throw new Error("initializeWasm() must be awaited first!");
6704         }
6705         const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32ScriptZZ_free(_res);
6706         // debug statements here
6707 }
6708         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
6709 /* @internal */
6710 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: number, b: number): number {
6711         if(!isWasmInitialized) {
6712                 throw new Error("initializeWasm() must be awaited first!");
6713         }
6714         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b);
6715         return nativeResponseValue;
6716 }
6717         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
6718 /* @internal */
6719 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
6720         if(!isWasmInitialized) {
6721                 throw new Error("initializeWasm() must be awaited first!");
6722         }
6723         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
6724         // debug statements here
6725 }
6726         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
6727 /* @internal */
6728 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number): void {
6729         if(!isWasmInitialized) {
6730                 throw new Error("initializeWasm() must be awaited first!");
6731         }
6732         const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
6733         // debug statements here
6734 }
6735         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
6736 /* @internal */
6737 export function CVec_MonitorEventZ_free(_res: number): void {
6738         if(!isWasmInitialized) {
6739                 throw new Error("initializeWasm() must be awaited first!");
6740         }
6741         const nativeResponseValue = wasm.TS_CVec_MonitorEventZ_free(_res);
6742         // debug statements here
6743 }
6744         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
6745 /* @internal */
6746 export function CVec_EventZ_free(_res: number): void {
6747         if(!isWasmInitialized) {
6748                 throw new Error("initializeWasm() must be awaited first!");
6749         }
6750         const nativeResponseValue = wasm.TS_CVec_EventZ_free(_res);
6751         // debug statements here
6752 }
6753         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
6754 /* @internal */
6755 export function CVec_TransactionZ_free(_res: number): void {
6756         if(!isWasmInitialized) {
6757                 throw new Error("initializeWasm() must be awaited first!");
6758         }
6759         const nativeResponseValue = wasm.TS_CVec_TransactionZ_free(_res);
6760         // debug statements here
6761 }
6762         // uintptr_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
6763 /* @internal */
6764 export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
6765         if(!isWasmInitialized) {
6766                 throw new Error("initializeWasm() must be awaited first!");
6767         }
6768         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone_ptr(arg);
6769         return nativeResponseValue;
6770 }
6771         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
6772 /* @internal */
6773 export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
6774         if(!isWasmInitialized) {
6775                 throw new Error("initializeWasm() must be awaited first!");
6776         }
6777         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone(orig);
6778         return nativeResponseValue;
6779 }
6780         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
6781 /* @internal */
6782 export function C2Tuple_usizeTransactionZ_new(a: number, b: number): number {
6783         if(!isWasmInitialized) {
6784                 throw new Error("initializeWasm() must be awaited first!");
6785         }
6786         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_new(a, b);
6787         return nativeResponseValue;
6788 }
6789         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
6790 /* @internal */
6791 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
6792         if(!isWasmInitialized) {
6793                 throw new Error("initializeWasm() must be awaited first!");
6794         }
6795         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_free(_res);
6796         // debug statements here
6797 }
6798         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
6799 /* @internal */
6800 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number): void {
6801         if(!isWasmInitialized) {
6802                 throw new Error("initializeWasm() must be awaited first!");
6803         }
6804         const nativeResponseValue = wasm.TS_CVec_C2Tuple_usizeTransactionZZ_free(_res);
6805         // debug statements here
6806 }
6807         // uintptr_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
6808 /* @internal */
6809 export function C2Tuple_u32TxOutZ_clone_ptr(arg: number): number {
6810         if(!isWasmInitialized) {
6811                 throw new Error("initializeWasm() must be awaited first!");
6812         }
6813         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone_ptr(arg);
6814         return nativeResponseValue;
6815 }
6816         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
6817 /* @internal */
6818 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
6819         if(!isWasmInitialized) {
6820                 throw new Error("initializeWasm() must be awaited first!");
6821         }
6822         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone(orig);
6823         return nativeResponseValue;
6824 }
6825         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
6826 /* @internal */
6827 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
6828         if(!isWasmInitialized) {
6829                 throw new Error("initializeWasm() must be awaited first!");
6830         }
6831         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_new(a, b);
6832         return nativeResponseValue;
6833 }
6834         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
6835 /* @internal */
6836 export function C2Tuple_u32TxOutZ_free(_res: number): void {
6837         if(!isWasmInitialized) {
6838                 throw new Error("initializeWasm() must be awaited first!");
6839         }
6840         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_free(_res);
6841         // debug statements here
6842 }
6843         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
6844 /* @internal */
6845 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number): void {
6846         if(!isWasmInitialized) {
6847                 throw new Error("initializeWasm() must be awaited first!");
6848         }
6849         const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32TxOutZZ_free(_res);
6850         // debug statements here
6851 }
6852         // uintptr_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
6853 /* @internal */
6854 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg: number): number {
6855         if(!isWasmInitialized) {
6856                 throw new Error("initializeWasm() must be awaited first!");
6857         }
6858         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg);
6859         return nativeResponseValue;
6860 }
6861         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
6862 /* @internal */
6863 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
6864         if(!isWasmInitialized) {
6865                 throw new Error("initializeWasm() must be awaited first!");
6866         }
6867         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
6868         return nativeResponseValue;
6869 }
6870         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
6871 /* @internal */
6872 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: number, b: number): number {
6873         if(!isWasmInitialized) {
6874                 throw new Error("initializeWasm() must be awaited first!");
6875         }
6876         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b);
6877         return nativeResponseValue;
6878 }
6879         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
6880 /* @internal */
6881 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
6882         if(!isWasmInitialized) {
6883                 throw new Error("initializeWasm() must be awaited first!");
6884         }
6885         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
6886         // debug statements here
6887 }
6888         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
6889 /* @internal */
6890 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number): void {
6891         if(!isWasmInitialized) {
6892                 throw new Error("initializeWasm() must be awaited first!");
6893         }
6894         const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
6895         // debug statements here
6896 }
6897         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
6898 /* @internal */
6899 export function CVec_TxidZ_free(_res: number): void {
6900         if(!isWasmInitialized) {
6901                 throw new Error("initializeWasm() must be awaited first!");
6902         }
6903         const nativeResponseValue = wasm.TS_CVec_TxidZ_free(_res);
6904         // debug statements here
6905 }
6906         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
6907 /* @internal */
6908 export function CVec_BalanceZ_free(_res: number): void {
6909         if(!isWasmInitialized) {
6910                 throw new Error("initializeWasm() must be awaited first!");
6911         }
6912         const nativeResponseValue = wasm.TS_CVec_BalanceZ_free(_res);
6913         // debug statements here
6914 }
6915         // uintptr_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
6916 /* @internal */
6917 export function C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg: number): number {
6918         if(!isWasmInitialized) {
6919                 throw new Error("initializeWasm() must be awaited first!");
6920         }
6921         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg);
6922         return nativeResponseValue;
6923 }
6924         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
6925 /* @internal */
6926 export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
6927         if(!isWasmInitialized) {
6928                 throw new Error("initializeWasm() must be awaited first!");
6929         }
6930         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone(orig);
6931         return nativeResponseValue;
6932 }
6933         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
6934 /* @internal */
6935 export function C2Tuple_BlockHashChannelMonitorZ_new(a: number, b: number): number {
6936         if(!isWasmInitialized) {
6937                 throw new Error("initializeWasm() must be awaited first!");
6938         }
6939         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_new(a, b);
6940         return nativeResponseValue;
6941 }
6942         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
6943 /* @internal */
6944 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
6945         if(!isWasmInitialized) {
6946                 throw new Error("initializeWasm() must be awaited first!");
6947         }
6948         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_free(_res);
6949         // debug statements here
6950 }
6951         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
6952 /* @internal */
6953 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
6954         if(!isWasmInitialized) {
6955                 throw new Error("initializeWasm() must be awaited first!");
6956         }
6957         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
6958         return nativeResponseValue;
6959 }
6960         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
6961 /* @internal */
6962 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
6963         if(!isWasmInitialized) {
6964                 throw new Error("initializeWasm() must be awaited first!");
6965         }
6966         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
6967         return nativeResponseValue;
6968 }
6969         // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
6970 /* @internal */
6971 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o: number): boolean {
6972         if(!isWasmInitialized) {
6973                 throw new Error("initializeWasm() must be awaited first!");
6974         }
6975         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o);
6976         return nativeResponseValue;
6977 }
6978         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
6979 /* @internal */
6980 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
6981         if(!isWasmInitialized) {
6982                 throw new Error("initializeWasm() must be awaited first!");
6983         }
6984         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
6985         // debug statements here
6986 }
6987         // uintptr_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
6988 /* @internal */
6989 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg: number): number {
6990         if(!isWasmInitialized) {
6991                 throw new Error("initializeWasm() must be awaited first!");
6992         }
6993         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg);
6994         return nativeResponseValue;
6995 }
6996         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
6997 /* @internal */
6998 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
6999         if(!isWasmInitialized) {
7000                 throw new Error("initializeWasm() must be awaited first!");
7001         }
7002         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
7003         return nativeResponseValue;
7004 }
7005         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
7006 /* @internal */
7007 export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
7008         if(!isWasmInitialized) {
7009                 throw new Error("initializeWasm() must be awaited first!");
7010         }
7011         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_ok(o);
7012         return nativeResponseValue;
7013 }
7014         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
7015 /* @internal */
7016 export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
7017         if(!isWasmInitialized) {
7018                 throw new Error("initializeWasm() must be awaited first!");
7019         }
7020         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_err(e);
7021         return nativeResponseValue;
7022 }
7023         // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
7024 /* @internal */
7025 export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
7026         if(!isWasmInitialized) {
7027                 throw new Error("initializeWasm() must be awaited first!");
7028         }
7029         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_is_ok(o);
7030         return nativeResponseValue;
7031 }
7032         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
7033 /* @internal */
7034 export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
7035         if(!isWasmInitialized) {
7036                 throw new Error("initializeWasm() must be awaited first!");
7037         }
7038         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_free(_res);
7039         // debug statements here
7040 }
7041         // uintptr_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
7042 /* @internal */
7043 export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
7044         if(!isWasmInitialized) {
7045                 throw new Error("initializeWasm() must be awaited first!");
7046         }
7047         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
7048         return nativeResponseValue;
7049 }
7050         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
7051 /* @internal */
7052 export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
7053         if(!isWasmInitialized) {
7054                 throw new Error("initializeWasm() must be awaited first!");
7055         }
7056         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone(orig);
7057         return nativeResponseValue;
7058 }
7059         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
7060 /* @internal */
7061 export function CVec_RouteHopZ_free(_res: number): void {
7062         if(!isWasmInitialized) {
7063                 throw new Error("initializeWasm() must be awaited first!");
7064         }
7065         const nativeResponseValue = wasm.TS_CVec_RouteHopZ_free(_res);
7066         // debug statements here
7067 }
7068         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
7069 /* @internal */
7070 export function CVec_CVec_RouteHopZZ_free(_res: number): void {
7071         if(!isWasmInitialized) {
7072                 throw new Error("initializeWasm() must be awaited first!");
7073         }
7074         const nativeResponseValue = wasm.TS_CVec_CVec_RouteHopZZ_free(_res);
7075         // debug statements here
7076 }
7077         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
7078 /* @internal */
7079 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
7080         if(!isWasmInitialized) {
7081                 throw new Error("initializeWasm() must be awaited first!");
7082         }
7083         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_ok(o);
7084         return nativeResponseValue;
7085 }
7086         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
7087 /* @internal */
7088 export function CResult_RouteDecodeErrorZ_err(e: number): number {
7089         if(!isWasmInitialized) {
7090                 throw new Error("initializeWasm() must be awaited first!");
7091         }
7092         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_err(e);
7093         return nativeResponseValue;
7094 }
7095         // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
7096 /* @internal */
7097 export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
7098         if(!isWasmInitialized) {
7099                 throw new Error("initializeWasm() must be awaited first!");
7100         }
7101         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_is_ok(o);
7102         return nativeResponseValue;
7103 }
7104         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
7105 /* @internal */
7106 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
7107         if(!isWasmInitialized) {
7108                 throw new Error("initializeWasm() must be awaited first!");
7109         }
7110         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_free(_res);
7111         // debug statements here
7112 }
7113         // uintptr_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
7114 /* @internal */
7115 export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
7116         if(!isWasmInitialized) {
7117                 throw new Error("initializeWasm() must be awaited first!");
7118         }
7119         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone_ptr(arg);
7120         return nativeResponseValue;
7121 }
7122         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
7123 /* @internal */
7124 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
7125         if(!isWasmInitialized) {
7126                 throw new Error("initializeWasm() must be awaited first!");
7127         }
7128         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone(orig);
7129         return nativeResponseValue;
7130 }
7131         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
7132 /* @internal */
7133 export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
7134         if(!isWasmInitialized) {
7135                 throw new Error("initializeWasm() must be awaited first!");
7136         }
7137         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_ok(o);
7138         return nativeResponseValue;
7139 }
7140         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
7141 /* @internal */
7142 export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
7143         if(!isWasmInitialized) {
7144                 throw new Error("initializeWasm() must be awaited first!");
7145         }
7146         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_err(e);
7147         return nativeResponseValue;
7148 }
7149         // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
7150 /* @internal */
7151 export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
7152         if(!isWasmInitialized) {
7153                 throw new Error("initializeWasm() must be awaited first!");
7154         }
7155         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_is_ok(o);
7156         return nativeResponseValue;
7157 }
7158         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
7159 /* @internal */
7160 export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
7161         if(!isWasmInitialized) {
7162                 throw new Error("initializeWasm() must be awaited first!");
7163         }
7164         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_free(_res);
7165         // debug statements here
7166 }
7167         // uintptr_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
7168 /* @internal */
7169 export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
7170         if(!isWasmInitialized) {
7171                 throw new Error("initializeWasm() must be awaited first!");
7172         }
7173         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
7174         return nativeResponseValue;
7175 }
7176         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
7177 /* @internal */
7178 export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
7179         if(!isWasmInitialized) {
7180                 throw new Error("initializeWasm() must be awaited first!");
7181         }
7182         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone(orig);
7183         return nativeResponseValue;
7184 }
7185         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
7186 /* @internal */
7187 export function CVec_RouteHintZ_free(_res: number): void {
7188         if(!isWasmInitialized) {
7189                 throw new Error("initializeWasm() must be awaited first!");
7190         }
7191         const nativeResponseValue = wasm.TS_CVec_RouteHintZ_free(_res);
7192         // debug statements here
7193 }
7194         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
7195 /* @internal */
7196 export function COption_u64Z_some(o: bigint): number {
7197         if(!isWasmInitialized) {
7198                 throw new Error("initializeWasm() must be awaited first!");
7199         }
7200         const nativeResponseValue = wasm.TS_COption_u64Z_some(o);
7201         return nativeResponseValue;
7202 }
7203         // struct LDKCOption_u64Z COption_u64Z_none(void);
7204 /* @internal */
7205 export function COption_u64Z_none(): number {
7206         if(!isWasmInitialized) {
7207                 throw new Error("initializeWasm() must be awaited first!");
7208         }
7209         const nativeResponseValue = wasm.TS_COption_u64Z_none();
7210         return nativeResponseValue;
7211 }
7212         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
7213 /* @internal */
7214 export function COption_u64Z_free(_res: number): void {
7215         if(!isWasmInitialized) {
7216                 throw new Error("initializeWasm() must be awaited first!");
7217         }
7218         const nativeResponseValue = wasm.TS_COption_u64Z_free(_res);
7219         // debug statements here
7220 }
7221         // uintptr_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
7222 /* @internal */
7223 export function COption_u64Z_clone_ptr(arg: number): number {
7224         if(!isWasmInitialized) {
7225                 throw new Error("initializeWasm() must be awaited first!");
7226         }
7227         const nativeResponseValue = wasm.TS_COption_u64Z_clone_ptr(arg);
7228         return nativeResponseValue;
7229 }
7230         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
7231 /* @internal */
7232 export function COption_u64Z_clone(orig: number): number {
7233         if(!isWasmInitialized) {
7234                 throw new Error("initializeWasm() must be awaited first!");
7235         }
7236         const nativeResponseValue = wasm.TS_COption_u64Z_clone(orig);
7237         return nativeResponseValue;
7238 }
7239         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
7240 /* @internal */
7241 export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
7242         if(!isWasmInitialized) {
7243                 throw new Error("initializeWasm() must be awaited first!");
7244         }
7245         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_ok(o);
7246         return nativeResponseValue;
7247 }
7248         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
7249 /* @internal */
7250 export function CResult_PayeeDecodeErrorZ_err(e: number): number {
7251         if(!isWasmInitialized) {
7252                 throw new Error("initializeWasm() must be awaited first!");
7253         }
7254         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_err(e);
7255         return nativeResponseValue;
7256 }
7257         // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
7258 /* @internal */
7259 export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
7260         if(!isWasmInitialized) {
7261                 throw new Error("initializeWasm() must be awaited first!");
7262         }
7263         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_is_ok(o);
7264         return nativeResponseValue;
7265 }
7266         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
7267 /* @internal */
7268 export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
7269         if(!isWasmInitialized) {
7270                 throw new Error("initializeWasm() must be awaited first!");
7271         }
7272         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_free(_res);
7273         // debug statements here
7274 }
7275         // uintptr_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
7276 /* @internal */
7277 export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
7278         if(!isWasmInitialized) {
7279                 throw new Error("initializeWasm() must be awaited first!");
7280         }
7281         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone_ptr(arg);
7282         return nativeResponseValue;
7283 }
7284         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
7285 /* @internal */
7286 export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
7287         if(!isWasmInitialized) {
7288                 throw new Error("initializeWasm() must be awaited first!");
7289         }
7290         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone(orig);
7291         return nativeResponseValue;
7292 }
7293         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
7294 /* @internal */
7295 export function CVec_RouteHintHopZ_free(_res: number): void {
7296         if(!isWasmInitialized) {
7297                 throw new Error("initializeWasm() must be awaited first!");
7298         }
7299         const nativeResponseValue = wasm.TS_CVec_RouteHintHopZ_free(_res);
7300         // debug statements here
7301 }
7302         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
7303 /* @internal */
7304 export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
7305         if(!isWasmInitialized) {
7306                 throw new Error("initializeWasm() must be awaited first!");
7307         }
7308         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_ok(o);
7309         return nativeResponseValue;
7310 }
7311         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
7312 /* @internal */
7313 export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
7314         if(!isWasmInitialized) {
7315                 throw new Error("initializeWasm() must be awaited first!");
7316         }
7317         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_err(e);
7318         return nativeResponseValue;
7319 }
7320         // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
7321 /* @internal */
7322 export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
7323         if(!isWasmInitialized) {
7324                 throw new Error("initializeWasm() must be awaited first!");
7325         }
7326         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_is_ok(o);
7327         return nativeResponseValue;
7328 }
7329         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
7330 /* @internal */
7331 export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
7332         if(!isWasmInitialized) {
7333                 throw new Error("initializeWasm() must be awaited first!");
7334         }
7335         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_free(_res);
7336         // debug statements here
7337 }
7338         // uintptr_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
7339 /* @internal */
7340 export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
7341         if(!isWasmInitialized) {
7342                 throw new Error("initializeWasm() must be awaited first!");
7343         }
7344         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
7345         return nativeResponseValue;
7346 }
7347         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
7348 /* @internal */
7349 export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
7350         if(!isWasmInitialized) {
7351                 throw new Error("initializeWasm() must be awaited first!");
7352         }
7353         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone(orig);
7354         return nativeResponseValue;
7355 }
7356         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
7357 /* @internal */
7358 export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
7359         if(!isWasmInitialized) {
7360                 throw new Error("initializeWasm() must be awaited first!");
7361         }
7362         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_ok(o);
7363         return nativeResponseValue;
7364 }
7365         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
7366 /* @internal */
7367 export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
7368         if(!isWasmInitialized) {
7369                 throw new Error("initializeWasm() must be awaited first!");
7370         }
7371         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_err(e);
7372         return nativeResponseValue;
7373 }
7374         // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
7375 /* @internal */
7376 export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
7377         if(!isWasmInitialized) {
7378                 throw new Error("initializeWasm() must be awaited first!");
7379         }
7380         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_is_ok(o);
7381         return nativeResponseValue;
7382 }
7383         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
7384 /* @internal */
7385 export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
7386         if(!isWasmInitialized) {
7387                 throw new Error("initializeWasm() must be awaited first!");
7388         }
7389         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_free(_res);
7390         // debug statements here
7391 }
7392         // uintptr_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
7393 /* @internal */
7394 export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
7395         if(!isWasmInitialized) {
7396                 throw new Error("initializeWasm() must be awaited first!");
7397         }
7398         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
7399         return nativeResponseValue;
7400 }
7401         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
7402 /* @internal */
7403 export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
7404         if(!isWasmInitialized) {
7405                 throw new Error("initializeWasm() must be awaited first!");
7406         }
7407         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone(orig);
7408         return nativeResponseValue;
7409 }
7410         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
7411 /* @internal */
7412 export function CVec_ChannelDetailsZ_free(_res: number): void {
7413         if(!isWasmInitialized) {
7414                 throw new Error("initializeWasm() must be awaited first!");
7415         }
7416         const nativeResponseValue = wasm.TS_CVec_ChannelDetailsZ_free(_res);
7417         // debug statements here
7418 }
7419         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
7420 /* @internal */
7421 export function CResult_RouteLightningErrorZ_ok(o: number): number {
7422         if(!isWasmInitialized) {
7423                 throw new Error("initializeWasm() must be awaited first!");
7424         }
7425         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_ok(o);
7426         return nativeResponseValue;
7427 }
7428         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
7429 /* @internal */
7430 export function CResult_RouteLightningErrorZ_err(e: number): number {
7431         if(!isWasmInitialized) {
7432                 throw new Error("initializeWasm() must be awaited first!");
7433         }
7434         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_err(e);
7435         return nativeResponseValue;
7436 }
7437         // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
7438 /* @internal */
7439 export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
7440         if(!isWasmInitialized) {
7441                 throw new Error("initializeWasm() must be awaited first!");
7442         }
7443         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_is_ok(o);
7444         return nativeResponseValue;
7445 }
7446         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
7447 /* @internal */
7448 export function CResult_RouteLightningErrorZ_free(_res: number): void {
7449         if(!isWasmInitialized) {
7450                 throw new Error("initializeWasm() must be awaited first!");
7451         }
7452         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_free(_res);
7453         // debug statements here
7454 }
7455         // uintptr_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
7456 /* @internal */
7457 export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
7458         if(!isWasmInitialized) {
7459                 throw new Error("initializeWasm() must be awaited first!");
7460         }
7461         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone_ptr(arg);
7462         return nativeResponseValue;
7463 }
7464         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
7465 /* @internal */
7466 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
7467         if(!isWasmInitialized) {
7468                 throw new Error("initializeWasm() must be awaited first!");
7469         }
7470         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone(orig);
7471         return nativeResponseValue;
7472 }
7473         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
7474 /* @internal */
7475 export function CResult_NoneLightningErrorZ_ok(): number {
7476         if(!isWasmInitialized) {
7477                 throw new Error("initializeWasm() must be awaited first!");
7478         }
7479         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_ok();
7480         return nativeResponseValue;
7481 }
7482         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
7483 /* @internal */
7484 export function CResult_NoneLightningErrorZ_err(e: number): number {
7485         if(!isWasmInitialized) {
7486                 throw new Error("initializeWasm() must be awaited first!");
7487         }
7488         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_err(e);
7489         return nativeResponseValue;
7490 }
7491         // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
7492 /* @internal */
7493 export function CResult_NoneLightningErrorZ_is_ok(o: number): boolean {
7494         if(!isWasmInitialized) {
7495                 throw new Error("initializeWasm() must be awaited first!");
7496         }
7497         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_is_ok(o);
7498         return nativeResponseValue;
7499 }
7500         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
7501 /* @internal */
7502 export function CResult_NoneLightningErrorZ_free(_res: number): void {
7503         if(!isWasmInitialized) {
7504                 throw new Error("initializeWasm() must be awaited first!");
7505         }
7506         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_free(_res);
7507         // debug statements here
7508 }
7509         // uintptr_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
7510 /* @internal */
7511 export function CResult_NoneLightningErrorZ_clone_ptr(arg: number): number {
7512         if(!isWasmInitialized) {
7513                 throw new Error("initializeWasm() must be awaited first!");
7514         }
7515         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone_ptr(arg);
7516         return nativeResponseValue;
7517 }
7518         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
7519 /* @internal */
7520 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
7521         if(!isWasmInitialized) {
7522                 throw new Error("initializeWasm() must be awaited first!");
7523         }
7524         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone(orig);
7525         return nativeResponseValue;
7526 }
7527         // uintptr_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
7528 /* @internal */
7529 export function C2Tuple_PublicKeyTypeZ_clone_ptr(arg: number): number {
7530         if(!isWasmInitialized) {
7531                 throw new Error("initializeWasm() must be awaited first!");
7532         }
7533         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone_ptr(arg);
7534         return nativeResponseValue;
7535 }
7536         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
7537 /* @internal */
7538 export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
7539         if(!isWasmInitialized) {
7540                 throw new Error("initializeWasm() must be awaited first!");
7541         }
7542         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone(orig);
7543         return nativeResponseValue;
7544 }
7545         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
7546 /* @internal */
7547 export function C2Tuple_PublicKeyTypeZ_new(a: number, b: number): number {
7548         if(!isWasmInitialized) {
7549                 throw new Error("initializeWasm() must be awaited first!");
7550         }
7551         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_new(a, b);
7552         return nativeResponseValue;
7553 }
7554         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
7555 /* @internal */
7556 export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
7557         if(!isWasmInitialized) {
7558                 throw new Error("initializeWasm() must be awaited first!");
7559         }
7560         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_free(_res);
7561         // debug statements here
7562 }
7563         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
7564 /* @internal */
7565 export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number): void {
7566         if(!isWasmInitialized) {
7567                 throw new Error("initializeWasm() must be awaited first!");
7568         }
7569         const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
7570         // debug statements here
7571 }
7572         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
7573 /* @internal */
7574 export function CVec_MessageSendEventZ_free(_res: number): void {
7575         if(!isWasmInitialized) {
7576                 throw new Error("initializeWasm() must be awaited first!");
7577         }
7578         const nativeResponseValue = wasm.TS_CVec_MessageSendEventZ_free(_res);
7579         // debug statements here
7580 }
7581         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
7582 /* @internal */
7583 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
7584         if(!isWasmInitialized) {
7585                 throw new Error("initializeWasm() must be awaited first!");
7586         }
7587         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_ok(o);
7588         return nativeResponseValue;
7589 }
7590         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
7591 /* @internal */
7592 export function CResult_boolLightningErrorZ_err(e: number): number {
7593         if(!isWasmInitialized) {
7594                 throw new Error("initializeWasm() must be awaited first!");
7595         }
7596         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_err(e);
7597         return nativeResponseValue;
7598 }
7599         // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
7600 /* @internal */
7601 export function CResult_boolLightningErrorZ_is_ok(o: number): boolean {
7602         if(!isWasmInitialized) {
7603                 throw new Error("initializeWasm() must be awaited first!");
7604         }
7605         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_is_ok(o);
7606         return nativeResponseValue;
7607 }
7608         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
7609 /* @internal */
7610 export function CResult_boolLightningErrorZ_free(_res: number): void {
7611         if(!isWasmInitialized) {
7612                 throw new Error("initializeWasm() must be awaited first!");
7613         }
7614         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_free(_res);
7615         // debug statements here
7616 }
7617         // uintptr_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
7618 /* @internal */
7619 export function CResult_boolLightningErrorZ_clone_ptr(arg: number): number {
7620         if(!isWasmInitialized) {
7621                 throw new Error("initializeWasm() must be awaited first!");
7622         }
7623         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone_ptr(arg);
7624         return nativeResponseValue;
7625 }
7626         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
7627 /* @internal */
7628 export function CResult_boolLightningErrorZ_clone(orig: number): number {
7629         if(!isWasmInitialized) {
7630                 throw new Error("initializeWasm() must be awaited first!");
7631         }
7632         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone(orig);
7633         return nativeResponseValue;
7634 }
7635         // uintptr_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
7636 /* @internal */
7637 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg: number): number {
7638         if(!isWasmInitialized) {
7639                 throw new Error("initializeWasm() must be awaited first!");
7640         }
7641         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg);
7642         return nativeResponseValue;
7643 }
7644         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
7645 /* @internal */
7646 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
7647         if(!isWasmInitialized) {
7648                 throw new Error("initializeWasm() must be awaited first!");
7649         }
7650         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
7651         return nativeResponseValue;
7652 }
7653         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
7654 /* @internal */
7655 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
7656         if(!isWasmInitialized) {
7657                 throw new Error("initializeWasm() must be awaited first!");
7658         }
7659         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
7660         return nativeResponseValue;
7661 }
7662         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
7663 /* @internal */
7664 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
7665         if(!isWasmInitialized) {
7666                 throw new Error("initializeWasm() must be awaited first!");
7667         }
7668         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
7669         // debug statements here
7670 }
7671         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
7672 /* @internal */
7673 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number): void {
7674         if(!isWasmInitialized) {
7675                 throw new Error("initializeWasm() must be awaited first!");
7676         }
7677         const nativeResponseValue = wasm.TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
7678         // debug statements here
7679 }
7680         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
7681 /* @internal */
7682 export function CVec_NodeAnnouncementZ_free(_res: number): void {
7683         if(!isWasmInitialized) {
7684                 throw new Error("initializeWasm() must be awaited first!");
7685         }
7686         const nativeResponseValue = wasm.TS_CVec_NodeAnnouncementZ_free(_res);
7687         // debug statements here
7688 }
7689         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
7690 /* @internal */
7691 export function CVec_PublicKeyZ_free(_res: number): void {
7692         if(!isWasmInitialized) {
7693                 throw new Error("initializeWasm() must be awaited first!");
7694         }
7695         const nativeResponseValue = wasm.TS_CVec_PublicKeyZ_free(_res);
7696         // debug statements here
7697 }
7698         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
7699 /* @internal */
7700 export function CVec_u8Z_free(_res: number): void {
7701         if(!isWasmInitialized) {
7702                 throw new Error("initializeWasm() must be awaited first!");
7703         }
7704         const nativeResponseValue = wasm.TS_CVec_u8Z_free(_res);
7705         // debug statements here
7706 }
7707         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
7708 /* @internal */
7709 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: number): number {
7710         if(!isWasmInitialized) {
7711                 throw new Error("initializeWasm() must be awaited first!");
7712         }
7713         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
7714         return nativeResponseValue;
7715 }
7716         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7717 /* @internal */
7718 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
7719         if(!isWasmInitialized) {
7720                 throw new Error("initializeWasm() must be awaited first!");
7721         }
7722         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_err(e);
7723         return nativeResponseValue;
7724 }
7725         // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
7726 /* @internal */
7727 export function CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: number): boolean {
7728         if(!isWasmInitialized) {
7729                 throw new Error("initializeWasm() must be awaited first!");
7730         }
7731         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o);
7732         return nativeResponseValue;
7733 }
7734         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
7735 /* @internal */
7736 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
7737         if(!isWasmInitialized) {
7738                 throw new Error("initializeWasm() must be awaited first!");
7739         }
7740         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
7741         // debug statements here
7742 }
7743         // uintptr_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
7744 /* @internal */
7745 export function CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg: number): number {
7746         if(!isWasmInitialized) {
7747                 throw new Error("initializeWasm() must be awaited first!");
7748         }
7749         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg);
7750         return nativeResponseValue;
7751 }
7752         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
7753 /* @internal */
7754 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
7755         if(!isWasmInitialized) {
7756                 throw new Error("initializeWasm() must be awaited first!");
7757         }
7758         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
7759         return nativeResponseValue;
7760 }
7761         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
7762 /* @internal */
7763 export function CResult_NonePeerHandleErrorZ_ok(): number {
7764         if(!isWasmInitialized) {
7765                 throw new Error("initializeWasm() must be awaited first!");
7766         }
7767         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_ok();
7768         return nativeResponseValue;
7769 }
7770         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
7771 /* @internal */
7772 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
7773         if(!isWasmInitialized) {
7774                 throw new Error("initializeWasm() must be awaited first!");
7775         }
7776         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_err(e);
7777         return nativeResponseValue;
7778 }
7779         // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
7780 /* @internal */
7781 export function CResult_NonePeerHandleErrorZ_is_ok(o: number): boolean {
7782         if(!isWasmInitialized) {
7783                 throw new Error("initializeWasm() must be awaited first!");
7784         }
7785         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_is_ok(o);
7786         return nativeResponseValue;
7787 }
7788         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
7789 /* @internal */
7790 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
7791         if(!isWasmInitialized) {
7792                 throw new Error("initializeWasm() must be awaited first!");
7793         }
7794         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_free(_res);
7795         // debug statements here
7796 }
7797         // uintptr_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
7798 /* @internal */
7799 export function CResult_NonePeerHandleErrorZ_clone_ptr(arg: number): number {
7800         if(!isWasmInitialized) {
7801                 throw new Error("initializeWasm() must be awaited first!");
7802         }
7803         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone_ptr(arg);
7804         return nativeResponseValue;
7805 }
7806         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
7807 /* @internal */
7808 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
7809         if(!isWasmInitialized) {
7810                 throw new Error("initializeWasm() must be awaited first!");
7811         }
7812         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone(orig);
7813         return nativeResponseValue;
7814 }
7815         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
7816 /* @internal */
7817 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
7818         if(!isWasmInitialized) {
7819                 throw new Error("initializeWasm() must be awaited first!");
7820         }
7821         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_ok(o);
7822         return nativeResponseValue;
7823 }
7824         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7825 /* @internal */
7826 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
7827         if(!isWasmInitialized) {
7828                 throw new Error("initializeWasm() must be awaited first!");
7829         }
7830         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_err(e);
7831         return nativeResponseValue;
7832 }
7833         // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
7834 /* @internal */
7835 export function CResult_boolPeerHandleErrorZ_is_ok(o: number): boolean {
7836         if(!isWasmInitialized) {
7837                 throw new Error("initializeWasm() must be awaited first!");
7838         }
7839         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_is_ok(o);
7840         return nativeResponseValue;
7841 }
7842         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
7843 /* @internal */
7844 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
7845         if(!isWasmInitialized) {
7846                 throw new Error("initializeWasm() must be awaited first!");
7847         }
7848         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_free(_res);
7849         // debug statements here
7850 }
7851         // uintptr_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
7852 /* @internal */
7853 export function CResult_boolPeerHandleErrorZ_clone_ptr(arg: number): number {
7854         if(!isWasmInitialized) {
7855                 throw new Error("initializeWasm() must be awaited first!");
7856         }
7857         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone_ptr(arg);
7858         return nativeResponseValue;
7859 }
7860         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
7861 /* @internal */
7862 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
7863         if(!isWasmInitialized) {
7864                 throw new Error("initializeWasm() must be awaited first!");
7865         }
7866         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone(orig);
7867         return nativeResponseValue;
7868 }
7869         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
7870 /* @internal */
7871 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
7872         if(!isWasmInitialized) {
7873                 throw new Error("initializeWasm() must be awaited first!");
7874         }
7875         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_ok(o);
7876         return nativeResponseValue;
7877 }
7878         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
7879 /* @internal */
7880 export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
7881         if(!isWasmInitialized) {
7882                 throw new Error("initializeWasm() must be awaited first!");
7883         }
7884         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_err(e);
7885         return nativeResponseValue;
7886 }
7887         // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
7888 /* @internal */
7889 export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
7890         if(!isWasmInitialized) {
7891                 throw new Error("initializeWasm() must be awaited first!");
7892         }
7893         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_is_ok(o);
7894         return nativeResponseValue;
7895 }
7896         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
7897 /* @internal */
7898 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
7899         if(!isWasmInitialized) {
7900                 throw new Error("initializeWasm() must be awaited first!");
7901         }
7902         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_free(_res);
7903         // debug statements here
7904 }
7905         // uintptr_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
7906 /* @internal */
7907 export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
7908         if(!isWasmInitialized) {
7909                 throw new Error("initializeWasm() must be awaited first!");
7910         }
7911         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone_ptr(arg);
7912         return nativeResponseValue;
7913 }
7914         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
7915 /* @internal */
7916 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
7917         if(!isWasmInitialized) {
7918                 throw new Error("initializeWasm() must be awaited first!");
7919         }
7920         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone(orig);
7921         return nativeResponseValue;
7922 }
7923         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
7924 /* @internal */
7925 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
7926         if(!isWasmInitialized) {
7927                 throw new Error("initializeWasm() must be awaited first!");
7928         }
7929         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_ok();
7930         return nativeResponseValue;
7931 }
7932         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
7933 /* @internal */
7934 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
7935         if(!isWasmInitialized) {
7936                 throw new Error("initializeWasm() must be awaited first!");
7937         }
7938         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_err(e);
7939         return nativeResponseValue;
7940 }
7941         // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
7942 /* @internal */
7943 export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
7944         if(!isWasmInitialized) {
7945                 throw new Error("initializeWasm() must be awaited first!");
7946         }
7947         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
7948         return nativeResponseValue;
7949 }
7950         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
7951 /* @internal */
7952 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
7953         if(!isWasmInitialized) {
7954                 throw new Error("initializeWasm() must be awaited first!");
7955         }
7956         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_free(_res);
7957         // debug statements here
7958 }
7959         // uintptr_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
7960 /* @internal */
7961 export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
7962         if(!isWasmInitialized) {
7963                 throw new Error("initializeWasm() must be awaited first!");
7964         }
7965         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
7966         return nativeResponseValue;
7967 }
7968         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
7969 /* @internal */
7970 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
7971         if(!isWasmInitialized) {
7972                 throw new Error("initializeWasm() must be awaited first!");
7973         }
7974         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
7975         return nativeResponseValue;
7976 }
7977         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
7978 /* @internal */
7979 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
7980         if(!isWasmInitialized) {
7981                 throw new Error("initializeWasm() must be awaited first!");
7982         }
7983         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_some(o);
7984         return nativeResponseValue;
7985 }
7986         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
7987 /* @internal */
7988 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
7989         if(!isWasmInitialized) {
7990                 throw new Error("initializeWasm() must be awaited first!");
7991         }
7992         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_none();
7993         return nativeResponseValue;
7994 }
7995         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
7996 /* @internal */
7997 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
7998         if(!isWasmInitialized) {
7999                 throw new Error("initializeWasm() must be awaited first!");
8000         }
8001         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_free(_res);
8002         // debug statements here
8003 }
8004         // uintptr_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
8005 /* @internal */
8006 export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
8007         if(!isWasmInitialized) {
8008                 throw new Error("initializeWasm() must be awaited first!");
8009         }
8010         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
8011         return nativeResponseValue;
8012 }
8013         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
8014 /* @internal */
8015 export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
8016         if(!isWasmInitialized) {
8017                 throw new Error("initializeWasm() must be awaited first!");
8018         }
8019         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone(orig);
8020         return nativeResponseValue;
8021 }
8022         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
8023 /* @internal */
8024 export function COption_ClosureReasonZ_some(o: number): number {
8025         if(!isWasmInitialized) {
8026                 throw new Error("initializeWasm() must be awaited first!");
8027         }
8028         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_some(o);
8029         return nativeResponseValue;
8030 }
8031         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
8032 /* @internal */
8033 export function COption_ClosureReasonZ_none(): number {
8034         if(!isWasmInitialized) {
8035                 throw new Error("initializeWasm() must be awaited first!");
8036         }
8037         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_none();
8038         return nativeResponseValue;
8039 }
8040         // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
8041 /* @internal */
8042 export function COption_ClosureReasonZ_free(_res: number): void {
8043         if(!isWasmInitialized) {
8044                 throw new Error("initializeWasm() must be awaited first!");
8045         }
8046         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_free(_res);
8047         // debug statements here
8048 }
8049         // uintptr_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
8050 /* @internal */
8051 export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
8052         if(!isWasmInitialized) {
8053                 throw new Error("initializeWasm() must be awaited first!");
8054         }
8055         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone_ptr(arg);
8056         return nativeResponseValue;
8057 }
8058         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
8059 /* @internal */
8060 export function COption_ClosureReasonZ_clone(orig: number): number {
8061         if(!isWasmInitialized) {
8062                 throw new Error("initializeWasm() must be awaited first!");
8063         }
8064         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone(orig);
8065         return nativeResponseValue;
8066 }
8067         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
8068 /* @internal */
8069 export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
8070         if(!isWasmInitialized) {
8071                 throw new Error("initializeWasm() must be awaited first!");
8072         }
8073         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
8074         return nativeResponseValue;
8075 }
8076         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
8077 /* @internal */
8078 export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
8079         if(!isWasmInitialized) {
8080                 throw new Error("initializeWasm() must be awaited first!");
8081         }
8082         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
8083         return nativeResponseValue;
8084 }
8085         // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
8086 /* @internal */
8087 export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
8088         if(!isWasmInitialized) {
8089                 throw new Error("initializeWasm() must be awaited first!");
8090         }
8091         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
8092         return nativeResponseValue;
8093 }
8094         // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
8095 /* @internal */
8096 export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
8097         if(!isWasmInitialized) {
8098                 throw new Error("initializeWasm() must be awaited first!");
8099         }
8100         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
8101         // debug statements here
8102 }
8103         // uintptr_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
8104 /* @internal */
8105 export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
8106         if(!isWasmInitialized) {
8107                 throw new Error("initializeWasm() must be awaited first!");
8108         }
8109         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
8110         return nativeResponseValue;
8111 }
8112         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
8113 /* @internal */
8114 export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
8115         if(!isWasmInitialized) {
8116                 throw new Error("initializeWasm() must be awaited first!");
8117         }
8118         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
8119         return nativeResponseValue;
8120 }
8121         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
8122 /* @internal */
8123 export function COption_NetworkUpdateZ_some(o: number): number {
8124         if(!isWasmInitialized) {
8125                 throw new Error("initializeWasm() must be awaited first!");
8126         }
8127         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_some(o);
8128         return nativeResponseValue;
8129 }
8130         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
8131 /* @internal */
8132 export function COption_NetworkUpdateZ_none(): number {
8133         if(!isWasmInitialized) {
8134                 throw new Error("initializeWasm() must be awaited first!");
8135         }
8136         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_none();
8137         return nativeResponseValue;
8138 }
8139         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
8140 /* @internal */
8141 export function COption_NetworkUpdateZ_free(_res: number): void {
8142         if(!isWasmInitialized) {
8143                 throw new Error("initializeWasm() must be awaited first!");
8144         }
8145         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_free(_res);
8146         // debug statements here
8147 }
8148         // uintptr_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
8149 /* @internal */
8150 export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
8151         if(!isWasmInitialized) {
8152                 throw new Error("initializeWasm() must be awaited first!");
8153         }
8154         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone_ptr(arg);
8155         return nativeResponseValue;
8156 }
8157         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
8158 /* @internal */
8159 export function COption_NetworkUpdateZ_clone(orig: number): number {
8160         if(!isWasmInitialized) {
8161                 throw new Error("initializeWasm() must be awaited first!");
8162         }
8163         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone(orig);
8164         return nativeResponseValue;
8165 }
8166         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
8167 /* @internal */
8168 export function CVec_SpendableOutputDescriptorZ_free(_res: number): void {
8169         if(!isWasmInitialized) {
8170                 throw new Error("initializeWasm() must be awaited first!");
8171         }
8172         const nativeResponseValue = wasm.TS_CVec_SpendableOutputDescriptorZ_free(_res);
8173         // debug statements here
8174 }
8175         // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
8176 /* @internal */
8177 export function COption_EventZ_some(o: number): number {
8178         if(!isWasmInitialized) {
8179                 throw new Error("initializeWasm() must be awaited first!");
8180         }
8181         const nativeResponseValue = wasm.TS_COption_EventZ_some(o);
8182         return nativeResponseValue;
8183 }
8184         // struct LDKCOption_EventZ COption_EventZ_none(void);
8185 /* @internal */
8186 export function COption_EventZ_none(): number {
8187         if(!isWasmInitialized) {
8188                 throw new Error("initializeWasm() must be awaited first!");
8189         }
8190         const nativeResponseValue = wasm.TS_COption_EventZ_none();
8191         return nativeResponseValue;
8192 }
8193         // void COption_EventZ_free(struct LDKCOption_EventZ _res);
8194 /* @internal */
8195 export function COption_EventZ_free(_res: number): void {
8196         if(!isWasmInitialized) {
8197                 throw new Error("initializeWasm() must be awaited first!");
8198         }
8199         const nativeResponseValue = wasm.TS_COption_EventZ_free(_res);
8200         // debug statements here
8201 }
8202         // uintptr_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
8203 /* @internal */
8204 export function COption_EventZ_clone_ptr(arg: number): number {
8205         if(!isWasmInitialized) {
8206                 throw new Error("initializeWasm() must be awaited first!");
8207         }
8208         const nativeResponseValue = wasm.TS_COption_EventZ_clone_ptr(arg);
8209         return nativeResponseValue;
8210 }
8211         // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
8212 /* @internal */
8213 export function COption_EventZ_clone(orig: number): number {
8214         if(!isWasmInitialized) {
8215                 throw new Error("initializeWasm() must be awaited first!");
8216         }
8217         const nativeResponseValue = wasm.TS_COption_EventZ_clone(orig);
8218         return nativeResponseValue;
8219 }
8220         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
8221 /* @internal */
8222 export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
8223         if(!isWasmInitialized) {
8224                 throw new Error("initializeWasm() must be awaited first!");
8225         }
8226         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_ok(o);
8227         return nativeResponseValue;
8228 }
8229         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
8230 /* @internal */
8231 export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
8232         if(!isWasmInitialized) {
8233                 throw new Error("initializeWasm() must be awaited first!");
8234         }
8235         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_err(e);
8236         return nativeResponseValue;
8237 }
8238         // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
8239 /* @internal */
8240 export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
8241         if(!isWasmInitialized) {
8242                 throw new Error("initializeWasm() must be awaited first!");
8243         }
8244         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_is_ok(o);
8245         return nativeResponseValue;
8246 }
8247         // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
8248 /* @internal */
8249 export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
8250         if(!isWasmInitialized) {
8251                 throw new Error("initializeWasm() must be awaited first!");
8252         }
8253         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_free(_res);
8254         // debug statements here
8255 }
8256         // uintptr_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
8257 /* @internal */
8258 export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
8259         if(!isWasmInitialized) {
8260                 throw new Error("initializeWasm() must be awaited first!");
8261         }
8262         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
8263         return nativeResponseValue;
8264 }
8265         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
8266 /* @internal */
8267 export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
8268         if(!isWasmInitialized) {
8269                 throw new Error("initializeWasm() must be awaited first!");
8270         }
8271         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone(orig);
8272         return nativeResponseValue;
8273 }
8274         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
8275 /* @internal */
8276 export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
8277         if(!isWasmInitialized) {
8278                 throw new Error("initializeWasm() must be awaited first!");
8279         }
8280         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_ok(o);
8281         return nativeResponseValue;
8282 }
8283         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
8284 /* @internal */
8285 export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
8286         if(!isWasmInitialized) {
8287                 throw new Error("initializeWasm() must be awaited first!");
8288         }
8289         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_err(e);
8290         return nativeResponseValue;
8291 }
8292         // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
8293 /* @internal */
8294 export function CResult_NodeIdDecodeErrorZ_is_ok(o: number): boolean {
8295         if(!isWasmInitialized) {
8296                 throw new Error("initializeWasm() must be awaited first!");
8297         }
8298         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_is_ok(o);
8299         return nativeResponseValue;
8300 }
8301         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
8302 /* @internal */
8303 export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
8304         if(!isWasmInitialized) {
8305                 throw new Error("initializeWasm() must be awaited first!");
8306         }
8307         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_free(_res);
8308         // debug statements here
8309 }
8310         // uintptr_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
8311 /* @internal */
8312 export function CResult_NodeIdDecodeErrorZ_clone_ptr(arg: number): number {
8313         if(!isWasmInitialized) {
8314                 throw new Error("initializeWasm() must be awaited first!");
8315         }
8316         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone_ptr(arg);
8317         return nativeResponseValue;
8318 }
8319         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
8320 /* @internal */
8321 export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
8322         if(!isWasmInitialized) {
8323                 throw new Error("initializeWasm() must be awaited first!");
8324         }
8325         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone(orig);
8326         return nativeResponseValue;
8327 }
8328         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
8329 /* @internal */
8330 export function CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o: number): number {
8331         if(!isWasmInitialized) {
8332                 throw new Error("initializeWasm() must be awaited first!");
8333         }
8334         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o);
8335         return nativeResponseValue;
8336 }
8337         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
8338 /* @internal */
8339 export function CResult_COption_NetworkUpdateZDecodeErrorZ_err(e: number): number {
8340         if(!isWasmInitialized) {
8341                 throw new Error("initializeWasm() must be awaited first!");
8342         }
8343         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(e);
8344         return nativeResponseValue;
8345 }
8346         // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
8347 /* @internal */
8348 export function CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o: number): boolean {
8349         if(!isWasmInitialized) {
8350                 throw new Error("initializeWasm() must be awaited first!");
8351         }
8352         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o);
8353         return nativeResponseValue;
8354 }
8355         // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
8356 /* @internal */
8357 export function CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res: number): void {
8358         if(!isWasmInitialized) {
8359                 throw new Error("initializeWasm() must be awaited first!");
8360         }
8361         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res);
8362         // debug statements here
8363 }
8364         // uintptr_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
8365 /* @internal */
8366 export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg: number): number {
8367         if(!isWasmInitialized) {
8368                 throw new Error("initializeWasm() must be awaited first!");
8369         }
8370         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg);
8371         return nativeResponseValue;
8372 }
8373         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
8374 /* @internal */
8375 export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig: number): number {
8376         if(!isWasmInitialized) {
8377                 throw new Error("initializeWasm() must be awaited first!");
8378         }
8379         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig);
8380         return nativeResponseValue;
8381 }
8382         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
8383 /* @internal */
8384 export function COption_AccessZ_some(o: number): number {
8385         if(!isWasmInitialized) {
8386                 throw new Error("initializeWasm() must be awaited first!");
8387         }
8388         const nativeResponseValue = wasm.TS_COption_AccessZ_some(o);
8389         return nativeResponseValue;
8390 }
8391         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
8392 /* @internal */
8393 export function COption_AccessZ_none(): number {
8394         if(!isWasmInitialized) {
8395                 throw new Error("initializeWasm() must be awaited first!");
8396         }
8397         const nativeResponseValue = wasm.TS_COption_AccessZ_none();
8398         return nativeResponseValue;
8399 }
8400         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
8401 /* @internal */
8402 export function COption_AccessZ_free(_res: number): void {
8403         if(!isWasmInitialized) {
8404                 throw new Error("initializeWasm() must be awaited first!");
8405         }
8406         const nativeResponseValue = wasm.TS_COption_AccessZ_free(_res);
8407         // debug statements here
8408 }
8409         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
8410 /* @internal */
8411 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
8412         if(!isWasmInitialized) {
8413                 throw new Error("initializeWasm() must be awaited first!");
8414         }
8415         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
8416         return nativeResponseValue;
8417 }
8418         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
8419 /* @internal */
8420 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
8421         if(!isWasmInitialized) {
8422                 throw new Error("initializeWasm() must be awaited first!");
8423         }
8424         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
8425         return nativeResponseValue;
8426 }
8427         // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
8428 /* @internal */
8429 export function CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
8430         if(!isWasmInitialized) {
8431                 throw new Error("initializeWasm() must be awaited first!");
8432         }
8433         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o);
8434         return nativeResponseValue;
8435 }
8436         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
8437 /* @internal */
8438 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
8439         if(!isWasmInitialized) {
8440                 throw new Error("initializeWasm() must be awaited first!");
8441         }
8442         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
8443         // debug statements here
8444 }
8445         // uintptr_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
8446 /* @internal */
8447 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
8448         if(!isWasmInitialized) {
8449                 throw new Error("initializeWasm() must be awaited first!");
8450         }
8451         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg);
8452         return nativeResponseValue;
8453 }
8454         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
8455 /* @internal */
8456 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
8457         if(!isWasmInitialized) {
8458                 throw new Error("initializeWasm() must be awaited first!");
8459         }
8460         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
8461         return nativeResponseValue;
8462 }
8463         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
8464 /* @internal */
8465 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
8466         if(!isWasmInitialized) {
8467                 throw new Error("initializeWasm() must be awaited first!");
8468         }
8469         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_ok(o);
8470         return nativeResponseValue;
8471 }
8472         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
8473 /* @internal */
8474 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
8475         if(!isWasmInitialized) {
8476                 throw new Error("initializeWasm() must be awaited first!");
8477         }
8478         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_err(e);
8479         return nativeResponseValue;
8480 }
8481         // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
8482 /* @internal */
8483 export function CResult_ChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
8484         if(!isWasmInitialized) {
8485                 throw new Error("initializeWasm() must be awaited first!");
8486         }
8487         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_is_ok(o);
8488         return nativeResponseValue;
8489 }
8490         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
8491 /* @internal */
8492 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
8493         if(!isWasmInitialized) {
8494                 throw new Error("initializeWasm() must be awaited first!");
8495         }
8496         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_free(_res);
8497         // debug statements here
8498 }
8499         // uintptr_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
8500 /* @internal */
8501 export function CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
8502         if(!isWasmInitialized) {
8503                 throw new Error("initializeWasm() must be awaited first!");
8504         }
8505         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg);
8506         return nativeResponseValue;
8507 }
8508         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
8509 /* @internal */
8510 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
8511         if(!isWasmInitialized) {
8512                 throw new Error("initializeWasm() must be awaited first!");
8513         }
8514         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone(orig);
8515         return nativeResponseValue;
8516 }
8517         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
8518 /* @internal */
8519 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
8520         if(!isWasmInitialized) {
8521                 throw new Error("initializeWasm() must be awaited first!");
8522         }
8523         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_ok(o);
8524         return nativeResponseValue;
8525 }
8526         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
8527 /* @internal */
8528 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
8529         if(!isWasmInitialized) {
8530                 throw new Error("initializeWasm() must be awaited first!");
8531         }
8532         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_err(e);
8533         return nativeResponseValue;
8534 }
8535         // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
8536 /* @internal */
8537 export function CResult_RoutingFeesDecodeErrorZ_is_ok(o: number): boolean {
8538         if(!isWasmInitialized) {
8539                 throw new Error("initializeWasm() must be awaited first!");
8540         }
8541         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_is_ok(o);
8542         return nativeResponseValue;
8543 }
8544         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
8545 /* @internal */
8546 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
8547         if(!isWasmInitialized) {
8548                 throw new Error("initializeWasm() must be awaited first!");
8549         }
8550         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_free(_res);
8551         // debug statements here
8552 }
8553         // uintptr_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
8554 /* @internal */
8555 export function CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg: number): number {
8556         if(!isWasmInitialized) {
8557                 throw new Error("initializeWasm() must be awaited first!");
8558         }
8559         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg);
8560         return nativeResponseValue;
8561 }
8562         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
8563 /* @internal */
8564 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
8565         if(!isWasmInitialized) {
8566                 throw new Error("initializeWasm() must be awaited first!");
8567         }
8568         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone(orig);
8569         return nativeResponseValue;
8570 }
8571         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
8572 /* @internal */
8573 export function CVec_NetAddressZ_free(_res: number): void {
8574         if(!isWasmInitialized) {
8575                 throw new Error("initializeWasm() must be awaited first!");
8576         }
8577         const nativeResponseValue = wasm.TS_CVec_NetAddressZ_free(_res);
8578         // debug statements here
8579 }
8580         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
8581 /* @internal */
8582 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
8583         if(!isWasmInitialized) {
8584                 throw new Error("initializeWasm() must be awaited first!");
8585         }
8586         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
8587         return nativeResponseValue;
8588 }
8589         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
8590 /* @internal */
8591 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
8592         if(!isWasmInitialized) {
8593                 throw new Error("initializeWasm() must be awaited first!");
8594         }
8595         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
8596         return nativeResponseValue;
8597 }
8598         // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
8599 /* @internal */
8600 export function CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o: number): boolean {
8601         if(!isWasmInitialized) {
8602                 throw new Error("initializeWasm() must be awaited first!");
8603         }
8604         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o);
8605         return nativeResponseValue;
8606 }
8607         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
8608 /* @internal */
8609 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
8610         if(!isWasmInitialized) {
8611                 throw new Error("initializeWasm() must be awaited first!");
8612         }
8613         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
8614         // debug statements here
8615 }
8616         // uintptr_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
8617 /* @internal */
8618 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg: number): number {
8619         if(!isWasmInitialized) {
8620                 throw new Error("initializeWasm() must be awaited first!");
8621         }
8622         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg);
8623         return nativeResponseValue;
8624 }
8625         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
8626 /* @internal */
8627 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
8628         if(!isWasmInitialized) {
8629                 throw new Error("initializeWasm() must be awaited first!");
8630         }
8631         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
8632         return nativeResponseValue;
8633 }
8634         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
8635 /* @internal */
8636 export function CVec_u64Z_free(_res: number): void {
8637         if(!isWasmInitialized) {
8638                 throw new Error("initializeWasm() must be awaited first!");
8639         }
8640         const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
8641         // debug statements here
8642 }
8643         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
8644 /* @internal */
8645 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
8646         if(!isWasmInitialized) {
8647                 throw new Error("initializeWasm() must be awaited first!");
8648         }
8649         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_ok(o);
8650         return nativeResponseValue;
8651 }
8652         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
8653 /* @internal */
8654 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
8655         if(!isWasmInitialized) {
8656                 throw new Error("initializeWasm() must be awaited first!");
8657         }
8658         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_err(e);
8659         return nativeResponseValue;
8660 }
8661         // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
8662 /* @internal */
8663 export function CResult_NodeInfoDecodeErrorZ_is_ok(o: number): boolean {
8664         if(!isWasmInitialized) {
8665                 throw new Error("initializeWasm() must be awaited first!");
8666         }
8667         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_is_ok(o);
8668         return nativeResponseValue;
8669 }
8670         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
8671 /* @internal */
8672 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
8673         if(!isWasmInitialized) {
8674                 throw new Error("initializeWasm() must be awaited first!");
8675         }
8676         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_free(_res);
8677         // debug statements here
8678 }
8679         // uintptr_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
8680 /* @internal */
8681 export function CResult_NodeInfoDecodeErrorZ_clone_ptr(arg: number): number {
8682         if(!isWasmInitialized) {
8683                 throw new Error("initializeWasm() must be awaited first!");
8684         }
8685         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone_ptr(arg);
8686         return nativeResponseValue;
8687 }
8688         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
8689 /* @internal */
8690 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
8691         if(!isWasmInitialized) {
8692                 throw new Error("initializeWasm() must be awaited first!");
8693         }
8694         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone(orig);
8695         return nativeResponseValue;
8696 }
8697         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
8698 /* @internal */
8699 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
8700         if(!isWasmInitialized) {
8701                 throw new Error("initializeWasm() must be awaited first!");
8702         }
8703         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_ok(o);
8704         return nativeResponseValue;
8705 }
8706         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
8707 /* @internal */
8708 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
8709         if(!isWasmInitialized) {
8710                 throw new Error("initializeWasm() must be awaited first!");
8711         }
8712         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_err(e);
8713         return nativeResponseValue;
8714 }
8715         // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
8716 /* @internal */
8717 export function CResult_NetworkGraphDecodeErrorZ_is_ok(o: number): boolean {
8718         if(!isWasmInitialized) {
8719                 throw new Error("initializeWasm() must be awaited first!");
8720         }
8721         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_is_ok(o);
8722         return nativeResponseValue;
8723 }
8724         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
8725 /* @internal */
8726 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
8727         if(!isWasmInitialized) {
8728                 throw new Error("initializeWasm() must be awaited first!");
8729         }
8730         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_free(_res);
8731         // debug statements here
8732 }
8733         // uintptr_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
8734 /* @internal */
8735 export function CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg: number): number {
8736         if(!isWasmInitialized) {
8737                 throw new Error("initializeWasm() must be awaited first!");
8738         }
8739         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg);
8740         return nativeResponseValue;
8741 }
8742         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
8743 /* @internal */
8744 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
8745         if(!isWasmInitialized) {
8746                 throw new Error("initializeWasm() must be awaited first!");
8747         }
8748         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone(orig);
8749         return nativeResponseValue;
8750 }
8751         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
8752 /* @internal */
8753 export function COption_CVec_NetAddressZZ_some(o: number): number {
8754         if(!isWasmInitialized) {
8755                 throw new Error("initializeWasm() must be awaited first!");
8756         }
8757         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_some(o);
8758         return nativeResponseValue;
8759 }
8760         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
8761 /* @internal */
8762 export function COption_CVec_NetAddressZZ_none(): number {
8763         if(!isWasmInitialized) {
8764                 throw new Error("initializeWasm() must be awaited first!");
8765         }
8766         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_none();
8767         return nativeResponseValue;
8768 }
8769         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
8770 /* @internal */
8771 export function COption_CVec_NetAddressZZ_free(_res: number): void {
8772         if(!isWasmInitialized) {
8773                 throw new Error("initializeWasm() must be awaited first!");
8774         }
8775         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_free(_res);
8776         // debug statements here
8777 }
8778         // uintptr_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
8779 /* @internal */
8780 export function COption_CVec_NetAddressZZ_clone_ptr(arg: number): number {
8781         if(!isWasmInitialized) {
8782                 throw new Error("initializeWasm() must be awaited first!");
8783         }
8784         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone_ptr(arg);
8785         return nativeResponseValue;
8786 }
8787         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
8788 /* @internal */
8789 export function COption_CVec_NetAddressZZ_clone(orig: number): number {
8790         if(!isWasmInitialized) {
8791                 throw new Error("initializeWasm() must be awaited first!");
8792         }
8793         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone(orig);
8794         return nativeResponseValue;
8795 }
8796         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
8797 /* @internal */
8798 export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
8799         if(!isWasmInitialized) {
8800                 throw new Error("initializeWasm() must be awaited first!");
8801         }
8802         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_ok(o);
8803         return nativeResponseValue;
8804 }
8805         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
8806 /* @internal */
8807 export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
8808         if(!isWasmInitialized) {
8809                 throw new Error("initializeWasm() must be awaited first!");
8810         }
8811         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_err(e);
8812         return nativeResponseValue;
8813 }
8814         // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
8815 /* @internal */
8816 export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
8817         if(!isWasmInitialized) {
8818                 throw new Error("initializeWasm() must be awaited first!");
8819         }
8820         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_is_ok(o);
8821         return nativeResponseValue;
8822 }
8823         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
8824 /* @internal */
8825 export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
8826         if(!isWasmInitialized) {
8827                 throw new Error("initializeWasm() must be awaited first!");
8828         }
8829         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_free(_res);
8830         // debug statements here
8831 }
8832         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
8833 /* @internal */
8834 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
8835         if(!isWasmInitialized) {
8836                 throw new Error("initializeWasm() must be awaited first!");
8837         }
8838         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_ok(o);
8839         return nativeResponseValue;
8840 }
8841         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8842 /* @internal */
8843 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
8844         if(!isWasmInitialized) {
8845                 throw new Error("initializeWasm() must be awaited first!");
8846         }
8847         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_err(e);
8848         return nativeResponseValue;
8849 }
8850         // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
8851 /* @internal */
8852 export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8853         if(!isWasmInitialized) {
8854                 throw new Error("initializeWasm() must be awaited first!");
8855         }
8856         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_is_ok(o);
8857         return nativeResponseValue;
8858 }
8859         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
8860 /* @internal */
8861 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
8862         if(!isWasmInitialized) {
8863                 throw new Error("initializeWasm() must be awaited first!");
8864         }
8865         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_free(_res);
8866         // debug statements here
8867 }
8868         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
8869 /* @internal */
8870 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
8871         if(!isWasmInitialized) {
8872                 throw new Error("initializeWasm() must be awaited first!");
8873         }
8874         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_ok(o);
8875         return nativeResponseValue;
8876 }
8877         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8878 /* @internal */
8879 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
8880         if(!isWasmInitialized) {
8881                 throw new Error("initializeWasm() must be awaited first!");
8882         }
8883         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_err(e);
8884         return nativeResponseValue;
8885 }
8886         // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
8887 /* @internal */
8888 export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8889         if(!isWasmInitialized) {
8890                 throw new Error("initializeWasm() must be awaited first!");
8891         }
8892         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
8893         return nativeResponseValue;
8894 }
8895         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
8896 /* @internal */
8897 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
8898         if(!isWasmInitialized) {
8899                 throw new Error("initializeWasm() must be awaited first!");
8900         }
8901         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_free(_res);
8902         // debug statements here
8903 }
8904         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
8905 /* @internal */
8906 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
8907         if(!isWasmInitialized) {
8908                 throw new Error("initializeWasm() must be awaited first!");
8909         }
8910         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_ok(o);
8911         return nativeResponseValue;
8912 }
8913         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8914 /* @internal */
8915 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
8916         if(!isWasmInitialized) {
8917                 throw new Error("initializeWasm() must be awaited first!");
8918         }
8919         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_err(e);
8920         return nativeResponseValue;
8921 }
8922         // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
8923 /* @internal */
8924 export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8925         if(!isWasmInitialized) {
8926                 throw new Error("initializeWasm() must be awaited first!");
8927         }
8928         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
8929         return nativeResponseValue;
8930 }
8931         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
8932 /* @internal */
8933 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
8934         if(!isWasmInitialized) {
8935                 throw new Error("initializeWasm() must be awaited first!");
8936         }
8937         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_free(_res);
8938         // debug statements here
8939 }
8940         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
8941 /* @internal */
8942 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
8943         if(!isWasmInitialized) {
8944                 throw new Error("initializeWasm() must be awaited first!");
8945         }
8946         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
8947         return nativeResponseValue;
8948 }
8949         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8950 /* @internal */
8951 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
8952         if(!isWasmInitialized) {
8953                 throw new Error("initializeWasm() must be awaited first!");
8954         }
8955         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_err(e);
8956         return nativeResponseValue;
8957 }
8958         // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
8959 /* @internal */
8960 export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8961         if(!isWasmInitialized) {
8962                 throw new Error("initializeWasm() must be awaited first!");
8963         }
8964         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
8965         return nativeResponseValue;
8966 }
8967         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
8968 /* @internal */
8969 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
8970         if(!isWasmInitialized) {
8971                 throw new Error("initializeWasm() must be awaited first!");
8972         }
8973         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
8974         // debug statements here
8975 }
8976         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
8977 /* @internal */
8978 export function CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o: number): number {
8979         if(!isWasmInitialized) {
8980                 throw new Error("initializeWasm() must be awaited first!");
8981         }
8982         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o);
8983         return nativeResponseValue;
8984 }
8985         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8986 /* @internal */
8987 export function CResult_ChannelTypeFeaturesDecodeErrorZ_err(e: number): number {
8988         if(!isWasmInitialized) {
8989                 throw new Error("initializeWasm() must be awaited first!");
8990         }
8991         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(e);
8992         return nativeResponseValue;
8993 }
8994         // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
8995 /* @internal */
8996 export function CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8997         if(!isWasmInitialized) {
8998                 throw new Error("initializeWasm() must be awaited first!");
8999         }
9000         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o);
9001         return nativeResponseValue;
9002 }
9003         // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
9004 /* @internal */
9005 export function CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res: number): void {
9006         if(!isWasmInitialized) {
9007                 throw new Error("initializeWasm() must be awaited first!");
9008         }
9009         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res);
9010         // debug statements here
9011 }
9012         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
9013 /* @internal */
9014 export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
9015         if(!isWasmInitialized) {
9016                 throw new Error("initializeWasm() must be awaited first!");
9017         }
9018         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_ok(o);
9019         return nativeResponseValue;
9020 }
9021         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
9022 /* @internal */
9023 export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
9024         if(!isWasmInitialized) {
9025                 throw new Error("initializeWasm() must be awaited first!");
9026         }
9027         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_err(e);
9028         return nativeResponseValue;
9029 }
9030         // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
9031 /* @internal */
9032 export function CResult_NetAddressDecodeErrorZ_is_ok(o: number): boolean {
9033         if(!isWasmInitialized) {
9034                 throw new Error("initializeWasm() must be awaited first!");
9035         }
9036         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_is_ok(o);
9037         return nativeResponseValue;
9038 }
9039         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
9040 /* @internal */
9041 export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
9042         if(!isWasmInitialized) {
9043                 throw new Error("initializeWasm() must be awaited first!");
9044         }
9045         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_free(_res);
9046         // debug statements here
9047 }
9048         // uintptr_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
9049 /* @internal */
9050 export function CResult_NetAddressDecodeErrorZ_clone_ptr(arg: number): number {
9051         if(!isWasmInitialized) {
9052                 throw new Error("initializeWasm() must be awaited first!");
9053         }
9054         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone_ptr(arg);
9055         return nativeResponseValue;
9056 }
9057         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
9058 /* @internal */
9059 export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
9060         if(!isWasmInitialized) {
9061                 throw new Error("initializeWasm() must be awaited first!");
9062         }
9063         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone(orig);
9064         return nativeResponseValue;
9065 }
9066         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
9067 /* @internal */
9068 export function CVec_UpdateAddHTLCZ_free(_res: number): void {
9069         if(!isWasmInitialized) {
9070                 throw new Error("initializeWasm() must be awaited first!");
9071         }
9072         const nativeResponseValue = wasm.TS_CVec_UpdateAddHTLCZ_free(_res);
9073         // debug statements here
9074 }
9075         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
9076 /* @internal */
9077 export function CVec_UpdateFulfillHTLCZ_free(_res: number): void {
9078         if(!isWasmInitialized) {
9079                 throw new Error("initializeWasm() must be awaited first!");
9080         }
9081         const nativeResponseValue = wasm.TS_CVec_UpdateFulfillHTLCZ_free(_res);
9082         // debug statements here
9083 }
9084         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
9085 /* @internal */
9086 export function CVec_UpdateFailHTLCZ_free(_res: number): void {
9087         if(!isWasmInitialized) {
9088                 throw new Error("initializeWasm() must be awaited first!");
9089         }
9090         const nativeResponseValue = wasm.TS_CVec_UpdateFailHTLCZ_free(_res);
9091         // debug statements here
9092 }
9093         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
9094 /* @internal */
9095 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number): void {
9096         if(!isWasmInitialized) {
9097                 throw new Error("initializeWasm() must be awaited first!");
9098         }
9099         const nativeResponseValue = wasm.TS_CVec_UpdateFailMalformedHTLCZ_free(_res);
9100         // debug statements here
9101 }
9102         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
9103 /* @internal */
9104 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
9105         if(!isWasmInitialized) {
9106                 throw new Error("initializeWasm() must be awaited first!");
9107         }
9108         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_ok(o);
9109         return nativeResponseValue;
9110 }
9111         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
9112 /* @internal */
9113 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
9114         if(!isWasmInitialized) {
9115                 throw new Error("initializeWasm() must be awaited first!");
9116         }
9117         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_err(e);
9118         return nativeResponseValue;
9119 }
9120         // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
9121 /* @internal */
9122 export function CResult_AcceptChannelDecodeErrorZ_is_ok(o: number): boolean {
9123         if(!isWasmInitialized) {
9124                 throw new Error("initializeWasm() must be awaited first!");
9125         }
9126         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_is_ok(o);
9127         return nativeResponseValue;
9128 }
9129         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
9130 /* @internal */
9131 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
9132         if(!isWasmInitialized) {
9133                 throw new Error("initializeWasm() must be awaited first!");
9134         }
9135         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_free(_res);
9136         // debug statements here
9137 }
9138         // uintptr_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
9139 /* @internal */
9140 export function CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg: number): number {
9141         if(!isWasmInitialized) {
9142                 throw new Error("initializeWasm() must be awaited first!");
9143         }
9144         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg);
9145         return nativeResponseValue;
9146 }
9147         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
9148 /* @internal */
9149 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
9150         if(!isWasmInitialized) {
9151                 throw new Error("initializeWasm() must be awaited first!");
9152         }
9153         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone(orig);
9154         return nativeResponseValue;
9155 }
9156         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
9157 /* @internal */
9158 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
9159         if(!isWasmInitialized) {
9160                 throw new Error("initializeWasm() must be awaited first!");
9161         }
9162         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
9163         return nativeResponseValue;
9164 }
9165         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
9166 /* @internal */
9167 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
9168         if(!isWasmInitialized) {
9169                 throw new Error("initializeWasm() must be awaited first!");
9170         }
9171         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
9172         return nativeResponseValue;
9173 }
9174         // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
9175 /* @internal */
9176 export function CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: number): boolean {
9177         if(!isWasmInitialized) {
9178                 throw new Error("initializeWasm() must be awaited first!");
9179         }
9180         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o);
9181         return nativeResponseValue;
9182 }
9183         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
9184 /* @internal */
9185 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
9186         if(!isWasmInitialized) {
9187                 throw new Error("initializeWasm() must be awaited first!");
9188         }
9189         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
9190         // debug statements here
9191 }
9192         // uintptr_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
9193 /* @internal */
9194 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg: number): number {
9195         if(!isWasmInitialized) {
9196                 throw new Error("initializeWasm() must be awaited first!");
9197         }
9198         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg);
9199         return nativeResponseValue;
9200 }
9201         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
9202 /* @internal */
9203 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
9204         if(!isWasmInitialized) {
9205                 throw new Error("initializeWasm() must be awaited first!");
9206         }
9207         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
9208         return nativeResponseValue;
9209 }
9210         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
9211 /* @internal */
9212 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
9213         if(!isWasmInitialized) {
9214                 throw new Error("initializeWasm() must be awaited first!");
9215         }
9216         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_ok(o);
9217         return nativeResponseValue;
9218 }
9219         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
9220 /* @internal */
9221 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
9222         if(!isWasmInitialized) {
9223                 throw new Error("initializeWasm() must be awaited first!");
9224         }
9225         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_err(e);
9226         return nativeResponseValue;
9227 }
9228         // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
9229 /* @internal */
9230 export function CResult_ChannelReestablishDecodeErrorZ_is_ok(o: number): boolean {
9231         if(!isWasmInitialized) {
9232                 throw new Error("initializeWasm() must be awaited first!");
9233         }
9234         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_is_ok(o);
9235         return nativeResponseValue;
9236 }
9237         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
9238 /* @internal */
9239 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
9240         if(!isWasmInitialized) {
9241                 throw new Error("initializeWasm() must be awaited first!");
9242         }
9243         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_free(_res);
9244         // debug statements here
9245 }
9246         // uintptr_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
9247 /* @internal */
9248 export function CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg: number): number {
9249         if(!isWasmInitialized) {
9250                 throw new Error("initializeWasm() must be awaited first!");
9251         }
9252         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg);
9253         return nativeResponseValue;
9254 }
9255         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
9256 /* @internal */
9257 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
9258         if(!isWasmInitialized) {
9259                 throw new Error("initializeWasm() must be awaited first!");
9260         }
9261         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone(orig);
9262         return nativeResponseValue;
9263 }
9264         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
9265 /* @internal */
9266 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
9267         if(!isWasmInitialized) {
9268                 throw new Error("initializeWasm() must be awaited first!");
9269         }
9270         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_ok(o);
9271         return nativeResponseValue;
9272 }
9273         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
9274 /* @internal */
9275 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
9276         if(!isWasmInitialized) {
9277                 throw new Error("initializeWasm() must be awaited first!");
9278         }
9279         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_err(e);
9280         return nativeResponseValue;
9281 }
9282         // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
9283 /* @internal */
9284 export function CResult_ClosingSignedDecodeErrorZ_is_ok(o: number): boolean {
9285         if(!isWasmInitialized) {
9286                 throw new Error("initializeWasm() must be awaited first!");
9287         }
9288         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_is_ok(o);
9289         return nativeResponseValue;
9290 }
9291         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
9292 /* @internal */
9293 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
9294         if(!isWasmInitialized) {
9295                 throw new Error("initializeWasm() must be awaited first!");
9296         }
9297         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_free(_res);
9298         // debug statements here
9299 }
9300         // uintptr_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
9301 /* @internal */
9302 export function CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg: number): number {
9303         if(!isWasmInitialized) {
9304                 throw new Error("initializeWasm() must be awaited first!");
9305         }
9306         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg);
9307         return nativeResponseValue;
9308 }
9309         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
9310 /* @internal */
9311 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
9312         if(!isWasmInitialized) {
9313                 throw new Error("initializeWasm() must be awaited first!");
9314         }
9315         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone(orig);
9316         return nativeResponseValue;
9317 }
9318         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
9319 /* @internal */
9320 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
9321         if(!isWasmInitialized) {
9322                 throw new Error("initializeWasm() must be awaited first!");
9323         }
9324         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
9325         return nativeResponseValue;
9326 }
9327         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
9328 /* @internal */
9329 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
9330         if(!isWasmInitialized) {
9331                 throw new Error("initializeWasm() must be awaited first!");
9332         }
9333         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
9334         return nativeResponseValue;
9335 }
9336         // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
9337 /* @internal */
9338 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: number): boolean {
9339         if(!isWasmInitialized) {
9340                 throw new Error("initializeWasm() must be awaited first!");
9341         }
9342         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o);
9343         return nativeResponseValue;
9344 }
9345         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
9346 /* @internal */
9347 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
9348         if(!isWasmInitialized) {
9349                 throw new Error("initializeWasm() must be awaited first!");
9350         }
9351         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
9352         // debug statements here
9353 }
9354         // uintptr_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
9355 /* @internal */
9356 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg: number): number {
9357         if(!isWasmInitialized) {
9358                 throw new Error("initializeWasm() must be awaited first!");
9359         }
9360         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg);
9361         return nativeResponseValue;
9362 }
9363         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
9364 /* @internal */
9365 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
9366         if(!isWasmInitialized) {
9367                 throw new Error("initializeWasm() must be awaited first!");
9368         }
9369         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
9370         return nativeResponseValue;
9371 }
9372         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
9373 /* @internal */
9374 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
9375         if(!isWasmInitialized) {
9376                 throw new Error("initializeWasm() must be awaited first!");
9377         }
9378         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_ok(o);
9379         return nativeResponseValue;
9380 }
9381         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
9382 /* @internal */
9383 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
9384         if(!isWasmInitialized) {
9385                 throw new Error("initializeWasm() must be awaited first!");
9386         }
9387         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_err(e);
9388         return nativeResponseValue;
9389 }
9390         // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
9391 /* @internal */
9392 export function CResult_CommitmentSignedDecodeErrorZ_is_ok(o: number): boolean {
9393         if(!isWasmInitialized) {
9394                 throw new Error("initializeWasm() must be awaited first!");
9395         }
9396         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_is_ok(o);
9397         return nativeResponseValue;
9398 }
9399         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
9400 /* @internal */
9401 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
9402         if(!isWasmInitialized) {
9403                 throw new Error("initializeWasm() must be awaited first!");
9404         }
9405         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_free(_res);
9406         // debug statements here
9407 }
9408         // uintptr_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
9409 /* @internal */
9410 export function CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg: number): number {
9411         if(!isWasmInitialized) {
9412                 throw new Error("initializeWasm() must be awaited first!");
9413         }
9414         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg);
9415         return nativeResponseValue;
9416 }
9417         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
9418 /* @internal */
9419 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
9420         if(!isWasmInitialized) {
9421                 throw new Error("initializeWasm() must be awaited first!");
9422         }
9423         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone(orig);
9424         return nativeResponseValue;
9425 }
9426         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
9427 /* @internal */
9428 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
9429         if(!isWasmInitialized) {
9430                 throw new Error("initializeWasm() must be awaited first!");
9431         }
9432         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_ok(o);
9433         return nativeResponseValue;
9434 }
9435         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
9436 /* @internal */
9437 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
9438         if(!isWasmInitialized) {
9439                 throw new Error("initializeWasm() must be awaited first!");
9440         }
9441         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_err(e);
9442         return nativeResponseValue;
9443 }
9444         // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
9445 /* @internal */
9446 export function CResult_FundingCreatedDecodeErrorZ_is_ok(o: number): boolean {
9447         if(!isWasmInitialized) {
9448                 throw new Error("initializeWasm() must be awaited first!");
9449         }
9450         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_is_ok(o);
9451         return nativeResponseValue;
9452 }
9453         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
9454 /* @internal */
9455 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
9456         if(!isWasmInitialized) {
9457                 throw new Error("initializeWasm() must be awaited first!");
9458         }
9459         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_free(_res);
9460         // debug statements here
9461 }
9462         // uintptr_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
9463 /* @internal */
9464 export function CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg: number): number {
9465         if(!isWasmInitialized) {
9466                 throw new Error("initializeWasm() must be awaited first!");
9467         }
9468         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg);
9469         return nativeResponseValue;
9470 }
9471         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
9472 /* @internal */
9473 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
9474         if(!isWasmInitialized) {
9475                 throw new Error("initializeWasm() must be awaited first!");
9476         }
9477         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone(orig);
9478         return nativeResponseValue;
9479 }
9480         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
9481 /* @internal */
9482 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
9483         if(!isWasmInitialized) {
9484                 throw new Error("initializeWasm() must be awaited first!");
9485         }
9486         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_ok(o);
9487         return nativeResponseValue;
9488 }
9489         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
9490 /* @internal */
9491 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
9492         if(!isWasmInitialized) {
9493                 throw new Error("initializeWasm() must be awaited first!");
9494         }
9495         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_err(e);
9496         return nativeResponseValue;
9497 }
9498         // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
9499 /* @internal */
9500 export function CResult_FundingSignedDecodeErrorZ_is_ok(o: number): boolean {
9501         if(!isWasmInitialized) {
9502                 throw new Error("initializeWasm() must be awaited first!");
9503         }
9504         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_is_ok(o);
9505         return nativeResponseValue;
9506 }
9507         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
9508 /* @internal */
9509 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
9510         if(!isWasmInitialized) {
9511                 throw new Error("initializeWasm() must be awaited first!");
9512         }
9513         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_free(_res);
9514         // debug statements here
9515 }
9516         // uintptr_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
9517 /* @internal */
9518 export function CResult_FundingSignedDecodeErrorZ_clone_ptr(arg: number): number {
9519         if(!isWasmInitialized) {
9520                 throw new Error("initializeWasm() must be awaited first!");
9521         }
9522         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone_ptr(arg);
9523         return nativeResponseValue;
9524 }
9525         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
9526 /* @internal */
9527 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
9528         if(!isWasmInitialized) {
9529                 throw new Error("initializeWasm() must be awaited first!");
9530         }
9531         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone(orig);
9532         return nativeResponseValue;
9533 }
9534         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
9535 /* @internal */
9536 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
9537         if(!isWasmInitialized) {
9538                 throw new Error("initializeWasm() must be awaited first!");
9539         }
9540         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_ok(o);
9541         return nativeResponseValue;
9542 }
9543         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
9544 /* @internal */
9545 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
9546         if(!isWasmInitialized) {
9547                 throw new Error("initializeWasm() must be awaited first!");
9548         }
9549         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_err(e);
9550         return nativeResponseValue;
9551 }
9552         // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
9553 /* @internal */
9554 export function CResult_FundingLockedDecodeErrorZ_is_ok(o: number): boolean {
9555         if(!isWasmInitialized) {
9556                 throw new Error("initializeWasm() must be awaited first!");
9557         }
9558         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_is_ok(o);
9559         return nativeResponseValue;
9560 }
9561         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
9562 /* @internal */
9563 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
9564         if(!isWasmInitialized) {
9565                 throw new Error("initializeWasm() must be awaited first!");
9566         }
9567         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_free(_res);
9568         // debug statements here
9569 }
9570         // uintptr_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
9571 /* @internal */
9572 export function CResult_FundingLockedDecodeErrorZ_clone_ptr(arg: number): number {
9573         if(!isWasmInitialized) {
9574                 throw new Error("initializeWasm() must be awaited first!");
9575         }
9576         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone_ptr(arg);
9577         return nativeResponseValue;
9578 }
9579         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
9580 /* @internal */
9581 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
9582         if(!isWasmInitialized) {
9583                 throw new Error("initializeWasm() must be awaited first!");
9584         }
9585         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone(orig);
9586         return nativeResponseValue;
9587 }
9588         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
9589 /* @internal */
9590 export function CResult_InitDecodeErrorZ_ok(o: number): number {
9591         if(!isWasmInitialized) {
9592                 throw new Error("initializeWasm() must be awaited first!");
9593         }
9594         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_ok(o);
9595         return nativeResponseValue;
9596 }
9597         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
9598 /* @internal */
9599 export function CResult_InitDecodeErrorZ_err(e: number): number {
9600         if(!isWasmInitialized) {
9601                 throw new Error("initializeWasm() must be awaited first!");
9602         }
9603         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_err(e);
9604         return nativeResponseValue;
9605 }
9606         // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
9607 /* @internal */
9608 export function CResult_InitDecodeErrorZ_is_ok(o: number): boolean {
9609         if(!isWasmInitialized) {
9610                 throw new Error("initializeWasm() must be awaited first!");
9611         }
9612         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_is_ok(o);
9613         return nativeResponseValue;
9614 }
9615         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
9616 /* @internal */
9617 export function CResult_InitDecodeErrorZ_free(_res: number): void {
9618         if(!isWasmInitialized) {
9619                 throw new Error("initializeWasm() must be awaited first!");
9620         }
9621         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_free(_res);
9622         // debug statements here
9623 }
9624         // uintptr_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
9625 /* @internal */
9626 export function CResult_InitDecodeErrorZ_clone_ptr(arg: number): number {
9627         if(!isWasmInitialized) {
9628                 throw new Error("initializeWasm() must be awaited first!");
9629         }
9630         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone_ptr(arg);
9631         return nativeResponseValue;
9632 }
9633         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
9634 /* @internal */
9635 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
9636         if(!isWasmInitialized) {
9637                 throw new Error("initializeWasm() must be awaited first!");
9638         }
9639         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone(orig);
9640         return nativeResponseValue;
9641 }
9642         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
9643 /* @internal */
9644 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
9645         if(!isWasmInitialized) {
9646                 throw new Error("initializeWasm() must be awaited first!");
9647         }
9648         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_ok(o);
9649         return nativeResponseValue;
9650 }
9651         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
9652 /* @internal */
9653 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
9654         if(!isWasmInitialized) {
9655                 throw new Error("initializeWasm() must be awaited first!");
9656         }
9657         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_err(e);
9658         return nativeResponseValue;
9659 }
9660         // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
9661 /* @internal */
9662 export function CResult_OpenChannelDecodeErrorZ_is_ok(o: number): boolean {
9663         if(!isWasmInitialized) {
9664                 throw new Error("initializeWasm() must be awaited first!");
9665         }
9666         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_is_ok(o);
9667         return nativeResponseValue;
9668 }
9669         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
9670 /* @internal */
9671 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
9672         if(!isWasmInitialized) {
9673                 throw new Error("initializeWasm() must be awaited first!");
9674         }
9675         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_free(_res);
9676         // debug statements here
9677 }
9678         // uintptr_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
9679 /* @internal */
9680 export function CResult_OpenChannelDecodeErrorZ_clone_ptr(arg: number): number {
9681         if(!isWasmInitialized) {
9682                 throw new Error("initializeWasm() must be awaited first!");
9683         }
9684         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone_ptr(arg);
9685         return nativeResponseValue;
9686 }
9687         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
9688 /* @internal */
9689 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
9690         if(!isWasmInitialized) {
9691                 throw new Error("initializeWasm() must be awaited first!");
9692         }
9693         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone(orig);
9694         return nativeResponseValue;
9695 }
9696         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
9697 /* @internal */
9698 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
9699         if(!isWasmInitialized) {
9700                 throw new Error("initializeWasm() must be awaited first!");
9701         }
9702         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_ok(o);
9703         return nativeResponseValue;
9704 }
9705         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
9706 /* @internal */
9707 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
9708         if(!isWasmInitialized) {
9709                 throw new Error("initializeWasm() must be awaited first!");
9710         }
9711         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_err(e);
9712         return nativeResponseValue;
9713 }
9714         // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
9715 /* @internal */
9716 export function CResult_RevokeAndACKDecodeErrorZ_is_ok(o: number): boolean {
9717         if(!isWasmInitialized) {
9718                 throw new Error("initializeWasm() must be awaited first!");
9719         }
9720         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_is_ok(o);
9721         return nativeResponseValue;
9722 }
9723         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
9724 /* @internal */
9725 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
9726         if(!isWasmInitialized) {
9727                 throw new Error("initializeWasm() must be awaited first!");
9728         }
9729         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_free(_res);
9730         // debug statements here
9731 }
9732         // uintptr_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
9733 /* @internal */
9734 export function CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg: number): number {
9735         if(!isWasmInitialized) {
9736                 throw new Error("initializeWasm() must be awaited first!");
9737         }
9738         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg);
9739         return nativeResponseValue;
9740 }
9741         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
9742 /* @internal */
9743 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
9744         if(!isWasmInitialized) {
9745                 throw new Error("initializeWasm() must be awaited first!");
9746         }
9747         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone(orig);
9748         return nativeResponseValue;
9749 }
9750         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
9751 /* @internal */
9752 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
9753         if(!isWasmInitialized) {
9754                 throw new Error("initializeWasm() must be awaited first!");
9755         }
9756         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_ok(o);
9757         return nativeResponseValue;
9758 }
9759         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
9760 /* @internal */
9761 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
9762         if(!isWasmInitialized) {
9763                 throw new Error("initializeWasm() must be awaited first!");
9764         }
9765         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_err(e);
9766         return nativeResponseValue;
9767 }
9768         // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
9769 /* @internal */
9770 export function CResult_ShutdownDecodeErrorZ_is_ok(o: number): boolean {
9771         if(!isWasmInitialized) {
9772                 throw new Error("initializeWasm() must be awaited first!");
9773         }
9774         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_is_ok(o);
9775         return nativeResponseValue;
9776 }
9777         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
9778 /* @internal */
9779 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
9780         if(!isWasmInitialized) {
9781                 throw new Error("initializeWasm() must be awaited first!");
9782         }
9783         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_free(_res);
9784         // debug statements here
9785 }
9786         // uintptr_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
9787 /* @internal */
9788 export function CResult_ShutdownDecodeErrorZ_clone_ptr(arg: number): number {
9789         if(!isWasmInitialized) {
9790                 throw new Error("initializeWasm() must be awaited first!");
9791         }
9792         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone_ptr(arg);
9793         return nativeResponseValue;
9794 }
9795         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
9796 /* @internal */
9797 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
9798         if(!isWasmInitialized) {
9799                 throw new Error("initializeWasm() must be awaited first!");
9800         }
9801         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone(orig);
9802         return nativeResponseValue;
9803 }
9804         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
9805 /* @internal */
9806 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
9807         if(!isWasmInitialized) {
9808                 throw new Error("initializeWasm() must be awaited first!");
9809         }
9810         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
9811         return nativeResponseValue;
9812 }
9813         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
9814 /* @internal */
9815 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
9816         if(!isWasmInitialized) {
9817                 throw new Error("initializeWasm() must be awaited first!");
9818         }
9819         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_err(e);
9820         return nativeResponseValue;
9821 }
9822         // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
9823 /* @internal */
9824 export function CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: number): boolean {
9825         if(!isWasmInitialized) {
9826                 throw new Error("initializeWasm() must be awaited first!");
9827         }
9828         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o);
9829         return nativeResponseValue;
9830 }
9831         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
9832 /* @internal */
9833 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
9834         if(!isWasmInitialized) {
9835                 throw new Error("initializeWasm() must be awaited first!");
9836         }
9837         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
9838         // debug statements here
9839 }
9840         // uintptr_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
9841 /* @internal */
9842 export function CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg: number): number {
9843         if(!isWasmInitialized) {
9844                 throw new Error("initializeWasm() must be awaited first!");
9845         }
9846         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg);
9847         return nativeResponseValue;
9848 }
9849         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
9850 /* @internal */
9851 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
9852         if(!isWasmInitialized) {
9853                 throw new Error("initializeWasm() must be awaited first!");
9854         }
9855         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
9856         return nativeResponseValue;
9857 }
9858         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
9859 /* @internal */
9860 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
9861         if(!isWasmInitialized) {
9862                 throw new Error("initializeWasm() must be awaited first!");
9863         }
9864         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
9865         return nativeResponseValue;
9866 }
9867         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
9868 /* @internal */
9869 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
9870         if(!isWasmInitialized) {
9871                 throw new Error("initializeWasm() must be awaited first!");
9872         }
9873         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
9874         return nativeResponseValue;
9875 }
9876         // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
9877 /* @internal */
9878 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: number): boolean {
9879         if(!isWasmInitialized) {
9880                 throw new Error("initializeWasm() must be awaited first!");
9881         }
9882         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o);
9883         return nativeResponseValue;
9884 }
9885         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
9886 /* @internal */
9887 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
9888         if(!isWasmInitialized) {
9889                 throw new Error("initializeWasm() must be awaited first!");
9890         }
9891         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
9892         // debug statements here
9893 }
9894         // uintptr_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
9895 /* @internal */
9896 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg: number): number {
9897         if(!isWasmInitialized) {
9898                 throw new Error("initializeWasm() must be awaited first!");
9899         }
9900         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg);
9901         return nativeResponseValue;
9902 }
9903         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
9904 /* @internal */
9905 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
9906         if(!isWasmInitialized) {
9907                 throw new Error("initializeWasm() must be awaited first!");
9908         }
9909         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
9910         return nativeResponseValue;
9911 }
9912         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
9913 /* @internal */
9914 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
9915         if(!isWasmInitialized) {
9916                 throw new Error("initializeWasm() must be awaited first!");
9917         }
9918         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_ok(o);
9919         return nativeResponseValue;
9920 }
9921         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
9922 /* @internal */
9923 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
9924         if(!isWasmInitialized) {
9925                 throw new Error("initializeWasm() must be awaited first!");
9926         }
9927         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_err(e);
9928         return nativeResponseValue;
9929 }
9930         // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
9931 /* @internal */
9932 export function CResult_UpdateFeeDecodeErrorZ_is_ok(o: number): boolean {
9933         if(!isWasmInitialized) {
9934                 throw new Error("initializeWasm() must be awaited first!");
9935         }
9936         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_is_ok(o);
9937         return nativeResponseValue;
9938 }
9939         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
9940 /* @internal */
9941 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
9942         if(!isWasmInitialized) {
9943                 throw new Error("initializeWasm() must be awaited first!");
9944         }
9945         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_free(_res);
9946         // debug statements here
9947 }
9948         // uintptr_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
9949 /* @internal */
9950 export function CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg: number): number {
9951         if(!isWasmInitialized) {
9952                 throw new Error("initializeWasm() must be awaited first!");
9953         }
9954         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg);
9955         return nativeResponseValue;
9956 }
9957         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
9958 /* @internal */
9959 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
9960         if(!isWasmInitialized) {
9961                 throw new Error("initializeWasm() must be awaited first!");
9962         }
9963         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone(orig);
9964         return nativeResponseValue;
9965 }
9966         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
9967 /* @internal */
9968 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
9969         if(!isWasmInitialized) {
9970                 throw new Error("initializeWasm() must be awaited first!");
9971         }
9972         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
9973         return nativeResponseValue;
9974 }
9975         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
9976 /* @internal */
9977 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
9978         if(!isWasmInitialized) {
9979                 throw new Error("initializeWasm() must be awaited first!");
9980         }
9981         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
9982         return nativeResponseValue;
9983 }
9984         // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
9985 /* @internal */
9986 export function CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: number): boolean {
9987         if(!isWasmInitialized) {
9988                 throw new Error("initializeWasm() must be awaited first!");
9989         }
9990         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o);
9991         return nativeResponseValue;
9992 }
9993         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
9994 /* @internal */
9995 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
9996         if(!isWasmInitialized) {
9997                 throw new Error("initializeWasm() must be awaited first!");
9998         }
9999         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
10000         // debug statements here
10001 }
10002         // uintptr_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
10003 /* @internal */
10004 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg: number): number {
10005         if(!isWasmInitialized) {
10006                 throw new Error("initializeWasm() must be awaited first!");
10007         }
10008         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg);
10009         return nativeResponseValue;
10010 }
10011         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
10012 /* @internal */
10013 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
10014         if(!isWasmInitialized) {
10015                 throw new Error("initializeWasm() must be awaited first!");
10016         }
10017         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
10018         return nativeResponseValue;
10019 }
10020         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
10021 /* @internal */
10022 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
10023         if(!isWasmInitialized) {
10024                 throw new Error("initializeWasm() must be awaited first!");
10025         }
10026         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
10027         return nativeResponseValue;
10028 }
10029         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
10030 /* @internal */
10031 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
10032         if(!isWasmInitialized) {
10033                 throw new Error("initializeWasm() must be awaited first!");
10034         }
10035         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_err(e);
10036         return nativeResponseValue;
10037 }
10038         // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
10039 /* @internal */
10040 export function CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: number): boolean {
10041         if(!isWasmInitialized) {
10042                 throw new Error("initializeWasm() must be awaited first!");
10043         }
10044         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o);
10045         return nativeResponseValue;
10046 }
10047         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
10048 /* @internal */
10049 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
10050         if(!isWasmInitialized) {
10051                 throw new Error("initializeWasm() must be awaited first!");
10052         }
10053         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
10054         // debug statements here
10055 }
10056         // uintptr_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
10057 /* @internal */
10058 export function CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg: number): number {
10059         if(!isWasmInitialized) {
10060                 throw new Error("initializeWasm() must be awaited first!");
10061         }
10062         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg);
10063         return nativeResponseValue;
10064 }
10065         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
10066 /* @internal */
10067 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
10068         if(!isWasmInitialized) {
10069                 throw new Error("initializeWasm() must be awaited first!");
10070         }
10071         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
10072         return nativeResponseValue;
10073 }
10074         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
10075 /* @internal */
10076 export function CResult_PingDecodeErrorZ_ok(o: number): number {
10077         if(!isWasmInitialized) {
10078                 throw new Error("initializeWasm() must be awaited first!");
10079         }
10080         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_ok(o);
10081         return nativeResponseValue;
10082 }
10083         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
10084 /* @internal */
10085 export function CResult_PingDecodeErrorZ_err(e: number): number {
10086         if(!isWasmInitialized) {
10087                 throw new Error("initializeWasm() must be awaited first!");
10088         }
10089         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_err(e);
10090         return nativeResponseValue;
10091 }
10092         // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
10093 /* @internal */
10094 export function CResult_PingDecodeErrorZ_is_ok(o: number): boolean {
10095         if(!isWasmInitialized) {
10096                 throw new Error("initializeWasm() must be awaited first!");
10097         }
10098         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_is_ok(o);
10099         return nativeResponseValue;
10100 }
10101         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
10102 /* @internal */
10103 export function CResult_PingDecodeErrorZ_free(_res: number): void {
10104         if(!isWasmInitialized) {
10105                 throw new Error("initializeWasm() must be awaited first!");
10106         }
10107         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_free(_res);
10108         // debug statements here
10109 }
10110         // uintptr_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
10111 /* @internal */
10112 export function CResult_PingDecodeErrorZ_clone_ptr(arg: number): number {
10113         if(!isWasmInitialized) {
10114                 throw new Error("initializeWasm() must be awaited first!");
10115         }
10116         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone_ptr(arg);
10117         return nativeResponseValue;
10118 }
10119         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
10120 /* @internal */
10121 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
10122         if(!isWasmInitialized) {
10123                 throw new Error("initializeWasm() must be awaited first!");
10124         }
10125         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone(orig);
10126         return nativeResponseValue;
10127 }
10128         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
10129 /* @internal */
10130 export function CResult_PongDecodeErrorZ_ok(o: number): number {
10131         if(!isWasmInitialized) {
10132                 throw new Error("initializeWasm() must be awaited first!");
10133         }
10134         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_ok(o);
10135         return nativeResponseValue;
10136 }
10137         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
10138 /* @internal */
10139 export function CResult_PongDecodeErrorZ_err(e: number): number {
10140         if(!isWasmInitialized) {
10141                 throw new Error("initializeWasm() must be awaited first!");
10142         }
10143         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_err(e);
10144         return nativeResponseValue;
10145 }
10146         // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
10147 /* @internal */
10148 export function CResult_PongDecodeErrorZ_is_ok(o: number): boolean {
10149         if(!isWasmInitialized) {
10150                 throw new Error("initializeWasm() must be awaited first!");
10151         }
10152         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_is_ok(o);
10153         return nativeResponseValue;
10154 }
10155         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
10156 /* @internal */
10157 export function CResult_PongDecodeErrorZ_free(_res: number): void {
10158         if(!isWasmInitialized) {
10159                 throw new Error("initializeWasm() must be awaited first!");
10160         }
10161         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_free(_res);
10162         // debug statements here
10163 }
10164         // uintptr_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
10165 /* @internal */
10166 export function CResult_PongDecodeErrorZ_clone_ptr(arg: number): number {
10167         if(!isWasmInitialized) {
10168                 throw new Error("initializeWasm() must be awaited first!");
10169         }
10170         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone_ptr(arg);
10171         return nativeResponseValue;
10172 }
10173         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
10174 /* @internal */
10175 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
10176         if(!isWasmInitialized) {
10177                 throw new Error("initializeWasm() must be awaited first!");
10178         }
10179         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone(orig);
10180         return nativeResponseValue;
10181 }
10182         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
10183 /* @internal */
10184 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
10185         if(!isWasmInitialized) {
10186                 throw new Error("initializeWasm() must be awaited first!");
10187         }
10188         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
10189         return nativeResponseValue;
10190 }
10191         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
10192 /* @internal */
10193 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
10194         if(!isWasmInitialized) {
10195                 throw new Error("initializeWasm() must be awaited first!");
10196         }
10197         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
10198         return nativeResponseValue;
10199 }
10200         // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
10201 /* @internal */
10202 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
10203         if(!isWasmInitialized) {
10204                 throw new Error("initializeWasm() must be awaited first!");
10205         }
10206         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o);
10207         return nativeResponseValue;
10208 }
10209         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
10210 /* @internal */
10211 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
10212         if(!isWasmInitialized) {
10213                 throw new Error("initializeWasm() must be awaited first!");
10214         }
10215         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
10216         // debug statements here
10217 }
10218         // uintptr_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
10219 /* @internal */
10220 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
10221         if(!isWasmInitialized) {
10222                 throw new Error("initializeWasm() must be awaited first!");
10223         }
10224         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
10225         return nativeResponseValue;
10226 }
10227         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
10228 /* @internal */
10229 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
10230         if(!isWasmInitialized) {
10231                 throw new Error("initializeWasm() must be awaited first!");
10232         }
10233         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
10234         return nativeResponseValue;
10235 }
10236         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
10237 /* @internal */
10238 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
10239         if(!isWasmInitialized) {
10240                 throw new Error("initializeWasm() must be awaited first!");
10241         }
10242         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
10243         return nativeResponseValue;
10244 }
10245         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
10246 /* @internal */
10247 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
10248         if(!isWasmInitialized) {
10249                 throw new Error("initializeWasm() must be awaited first!");
10250         }
10251         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_err(e);
10252         return nativeResponseValue;
10253 }
10254         // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
10255 /* @internal */
10256 export function CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
10257         if(!isWasmInitialized) {
10258                 throw new Error("initializeWasm() must be awaited first!");
10259         }
10260         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o);
10261         return nativeResponseValue;
10262 }
10263         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
10264 /* @internal */
10265 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
10266         if(!isWasmInitialized) {
10267                 throw new Error("initializeWasm() must be awaited first!");
10268         }
10269         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
10270         // debug statements here
10271 }
10272         // uintptr_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
10273 /* @internal */
10274 export function CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
10275         if(!isWasmInitialized) {
10276                 throw new Error("initializeWasm() must be awaited first!");
10277         }
10278         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
10279         return nativeResponseValue;
10280 }
10281         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
10282 /* @internal */
10283 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
10284         if(!isWasmInitialized) {
10285                 throw new Error("initializeWasm() must be awaited first!");
10286         }
10287         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
10288         return nativeResponseValue;
10289 }
10290         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
10291 /* @internal */
10292 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
10293         if(!isWasmInitialized) {
10294                 throw new Error("initializeWasm() must be awaited first!");
10295         }
10296         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
10297         return nativeResponseValue;
10298 }
10299         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
10300 /* @internal */
10301 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
10302         if(!isWasmInitialized) {
10303                 throw new Error("initializeWasm() must be awaited first!");
10304         }
10305         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
10306         return nativeResponseValue;
10307 }
10308         // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
10309 /* @internal */
10310 export function CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
10311         if(!isWasmInitialized) {
10312                 throw new Error("initializeWasm() must be awaited first!");
10313         }
10314         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o);
10315         return nativeResponseValue;
10316 }
10317         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
10318 /* @internal */
10319 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
10320         if(!isWasmInitialized) {
10321                 throw new Error("initializeWasm() must be awaited first!");
10322         }
10323         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
10324         // debug statements here
10325 }
10326         // uintptr_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
10327 /* @internal */
10328 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
10329         if(!isWasmInitialized) {
10330                 throw new Error("initializeWasm() must be awaited first!");
10331         }
10332         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg);
10333         return nativeResponseValue;
10334 }
10335         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
10336 /* @internal */
10337 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
10338         if(!isWasmInitialized) {
10339                 throw new Error("initializeWasm() must be awaited first!");
10340         }
10341         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
10342         return nativeResponseValue;
10343 }
10344         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
10345 /* @internal */
10346 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
10347         if(!isWasmInitialized) {
10348                 throw new Error("initializeWasm() must be awaited first!");
10349         }
10350         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_ok(o);
10351         return nativeResponseValue;
10352 }
10353         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
10354 /* @internal */
10355 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
10356         if(!isWasmInitialized) {
10357                 throw new Error("initializeWasm() must be awaited first!");
10358         }
10359         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_err(e);
10360         return nativeResponseValue;
10361 }
10362         // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
10363 /* @internal */
10364 export function CResult_ChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
10365         if(!isWasmInitialized) {
10366                 throw new Error("initializeWasm() must be awaited first!");
10367         }
10368         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_is_ok(o);
10369         return nativeResponseValue;
10370 }
10371         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
10372 /* @internal */
10373 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
10374         if(!isWasmInitialized) {
10375                 throw new Error("initializeWasm() must be awaited first!");
10376         }
10377         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_free(_res);
10378         // debug statements here
10379 }
10380         // uintptr_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
10381 /* @internal */
10382 export function CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
10383         if(!isWasmInitialized) {
10384                 throw new Error("initializeWasm() must be awaited first!");
10385         }
10386         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg);
10387         return nativeResponseValue;
10388 }
10389         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
10390 /* @internal */
10391 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
10392         if(!isWasmInitialized) {
10393                 throw new Error("initializeWasm() must be awaited first!");
10394         }
10395         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone(orig);
10396         return nativeResponseValue;
10397 }
10398         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
10399 /* @internal */
10400 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
10401         if(!isWasmInitialized) {
10402                 throw new Error("initializeWasm() must be awaited first!");
10403         }
10404         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_ok(o);
10405         return nativeResponseValue;
10406 }
10407         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
10408 /* @internal */
10409 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
10410         if(!isWasmInitialized) {
10411                 throw new Error("initializeWasm() must be awaited first!");
10412         }
10413         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_err(e);
10414         return nativeResponseValue;
10415 }
10416         // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
10417 /* @internal */
10418 export function CResult_ErrorMessageDecodeErrorZ_is_ok(o: number): boolean {
10419         if(!isWasmInitialized) {
10420                 throw new Error("initializeWasm() must be awaited first!");
10421         }
10422         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_is_ok(o);
10423         return nativeResponseValue;
10424 }
10425         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
10426 /* @internal */
10427 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
10428         if(!isWasmInitialized) {
10429                 throw new Error("initializeWasm() must be awaited first!");
10430         }
10431         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_free(_res);
10432         // debug statements here
10433 }
10434         // uintptr_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
10435 /* @internal */
10436 export function CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg: number): number {
10437         if(!isWasmInitialized) {
10438                 throw new Error("initializeWasm() must be awaited first!");
10439         }
10440         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg);
10441         return nativeResponseValue;
10442 }
10443         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
10444 /* @internal */
10445 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
10446         if(!isWasmInitialized) {
10447                 throw new Error("initializeWasm() must be awaited first!");
10448         }
10449         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone(orig);
10450         return nativeResponseValue;
10451 }
10452         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
10453 /* @internal */
10454 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
10455         if(!isWasmInitialized) {
10456                 throw new Error("initializeWasm() must be awaited first!");
10457         }
10458         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
10459         return nativeResponseValue;
10460 }
10461         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
10462 /* @internal */
10463 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
10464         if(!isWasmInitialized) {
10465                 throw new Error("initializeWasm() must be awaited first!");
10466         }
10467         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
10468         return nativeResponseValue;
10469 }
10470         // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
10471 /* @internal */
10472 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
10473         if(!isWasmInitialized) {
10474                 throw new Error("initializeWasm() must be awaited first!");
10475         }
10476         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o);
10477         return nativeResponseValue;
10478 }
10479         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
10480 /* @internal */
10481 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
10482         if(!isWasmInitialized) {
10483                 throw new Error("initializeWasm() must be awaited first!");
10484         }
10485         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
10486         // debug statements here
10487 }
10488         // uintptr_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
10489 /* @internal */
10490 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
10491         if(!isWasmInitialized) {
10492                 throw new Error("initializeWasm() must be awaited first!");
10493         }
10494         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg);
10495         return nativeResponseValue;
10496 }
10497         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
10498 /* @internal */
10499 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
10500         if(!isWasmInitialized) {
10501                 throw new Error("initializeWasm() must be awaited first!");
10502         }
10503         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
10504         return nativeResponseValue;
10505 }
10506         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
10507 /* @internal */
10508 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
10509         if(!isWasmInitialized) {
10510                 throw new Error("initializeWasm() must be awaited first!");
10511         }
10512         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_ok(o);
10513         return nativeResponseValue;
10514 }
10515         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
10516 /* @internal */
10517 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
10518         if(!isWasmInitialized) {
10519                 throw new Error("initializeWasm() must be awaited first!");
10520         }
10521         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_err(e);
10522         return nativeResponseValue;
10523 }
10524         // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
10525 /* @internal */
10526 export function CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
10527         if(!isWasmInitialized) {
10528                 throw new Error("initializeWasm() must be awaited first!");
10529         }
10530         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_is_ok(o);
10531         return nativeResponseValue;
10532 }
10533         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
10534 /* @internal */
10535 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
10536         if(!isWasmInitialized) {
10537                 throw new Error("initializeWasm() must be awaited first!");
10538         }
10539         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_free(_res);
10540         // debug statements here
10541 }
10542         // uintptr_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
10543 /* @internal */
10544 export function CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
10545         if(!isWasmInitialized) {
10546                 throw new Error("initializeWasm() must be awaited first!");
10547         }
10548         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg);
10549         return nativeResponseValue;
10550 }
10551         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
10552 /* @internal */
10553 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
10554         if(!isWasmInitialized) {
10555                 throw new Error("initializeWasm() must be awaited first!");
10556         }
10557         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
10558         return nativeResponseValue;
10559 }
10560         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
10561 /* @internal */
10562 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
10563         if(!isWasmInitialized) {
10564                 throw new Error("initializeWasm() must be awaited first!");
10565         }
10566         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
10567         return nativeResponseValue;
10568 }
10569         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
10570 /* @internal */
10571 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
10572         if(!isWasmInitialized) {
10573                 throw new Error("initializeWasm() must be awaited first!");
10574         }
10575         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
10576         return nativeResponseValue;
10577 }
10578         // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
10579 /* @internal */
10580 export function CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: number): boolean {
10581         if(!isWasmInitialized) {
10582                 throw new Error("initializeWasm() must be awaited first!");
10583         }
10584         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o);
10585         return nativeResponseValue;
10586 }
10587         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
10588 /* @internal */
10589 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
10590         if(!isWasmInitialized) {
10591                 throw new Error("initializeWasm() must be awaited first!");
10592         }
10593         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
10594         // debug statements here
10595 }
10596         // uintptr_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
10597 /* @internal */
10598 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg: number): number {
10599         if(!isWasmInitialized) {
10600                 throw new Error("initializeWasm() must be awaited first!");
10601         }
10602         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg);
10603         return nativeResponseValue;
10604 }
10605         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
10606 /* @internal */
10607 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
10608         if(!isWasmInitialized) {
10609                 throw new Error("initializeWasm() must be awaited first!");
10610         }
10611         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
10612         return nativeResponseValue;
10613 }
10614         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
10615 /* @internal */
10616 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
10617         if(!isWasmInitialized) {
10618                 throw new Error("initializeWasm() must be awaited first!");
10619         }
10620         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
10621         return nativeResponseValue;
10622 }
10623         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
10624 /* @internal */
10625 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
10626         if(!isWasmInitialized) {
10627                 throw new Error("initializeWasm() must be awaited first!");
10628         }
10629         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
10630         return nativeResponseValue;
10631 }
10632         // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
10633 /* @internal */
10634 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: number): boolean {
10635         if(!isWasmInitialized) {
10636                 throw new Error("initializeWasm() must be awaited first!");
10637         }
10638         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o);
10639         return nativeResponseValue;
10640 }
10641         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
10642 /* @internal */
10643 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
10644         if(!isWasmInitialized) {
10645                 throw new Error("initializeWasm() must be awaited first!");
10646         }
10647         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
10648         // debug statements here
10649 }
10650         // uintptr_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
10651 /* @internal */
10652 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg: number): number {
10653         if(!isWasmInitialized) {
10654                 throw new Error("initializeWasm() must be awaited first!");
10655         }
10656         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg);
10657         return nativeResponseValue;
10658 }
10659         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
10660 /* @internal */
10661 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
10662         if(!isWasmInitialized) {
10663                 throw new Error("initializeWasm() must be awaited first!");
10664         }
10665         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
10666         return nativeResponseValue;
10667 }
10668         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
10669 /* @internal */
10670 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
10671         if(!isWasmInitialized) {
10672                 throw new Error("initializeWasm() must be awaited first!");
10673         }
10674         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_ok(o);
10675         return nativeResponseValue;
10676 }
10677         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
10678 /* @internal */
10679 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
10680         if(!isWasmInitialized) {
10681                 throw new Error("initializeWasm() must be awaited first!");
10682         }
10683         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_err(e);
10684         return nativeResponseValue;
10685 }
10686         // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
10687 /* @internal */
10688 export function CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
10689         if(!isWasmInitialized) {
10690                 throw new Error("initializeWasm() must be awaited first!");
10691         }
10692         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_is_ok(o);
10693         return nativeResponseValue;
10694 }
10695         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
10696 /* @internal */
10697 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
10698         if(!isWasmInitialized) {
10699                 throw new Error("initializeWasm() must be awaited first!");
10700         }
10701         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_free(_res);
10702         // debug statements here
10703 }
10704         // uintptr_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
10705 /* @internal */
10706 export function CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
10707         if(!isWasmInitialized) {
10708                 throw new Error("initializeWasm() must be awaited first!");
10709         }
10710         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg);
10711         return nativeResponseValue;
10712 }
10713         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
10714 /* @internal */
10715 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
10716         if(!isWasmInitialized) {
10717                 throw new Error("initializeWasm() must be awaited first!");
10718         }
10719         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
10720         return nativeResponseValue;
10721 }
10722         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
10723 /* @internal */
10724 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
10725         if(!isWasmInitialized) {
10726                 throw new Error("initializeWasm() must be awaited first!");
10727         }
10728         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
10729         return nativeResponseValue;
10730 }
10731         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
10732 /* @internal */
10733 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
10734         if(!isWasmInitialized) {
10735                 throw new Error("initializeWasm() must be awaited first!");
10736         }
10737         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_err(e);
10738         return nativeResponseValue;
10739 }
10740         // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
10741 /* @internal */
10742 export function CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
10743         if(!isWasmInitialized) {
10744                 throw new Error("initializeWasm() must be awaited first!");
10745         }
10746         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o);
10747         return nativeResponseValue;
10748 }
10749         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
10750 /* @internal */
10751 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
10752         if(!isWasmInitialized) {
10753                 throw new Error("initializeWasm() must be awaited first!");
10754         }
10755         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
10756         // debug statements here
10757 }
10758         // uintptr_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
10759 /* @internal */
10760 export function CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
10761         if(!isWasmInitialized) {
10762                 throw new Error("initializeWasm() must be awaited first!");
10763         }
10764         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg);
10765         return nativeResponseValue;
10766 }
10767         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
10768 /* @internal */
10769 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
10770         if(!isWasmInitialized) {
10771                 throw new Error("initializeWasm() must be awaited first!");
10772         }
10773         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
10774         return nativeResponseValue;
10775 }
10776         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
10777 /* @internal */
10778 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
10779         if(!isWasmInitialized) {
10780                 throw new Error("initializeWasm() must be awaited first!");
10781         }
10782         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
10783         return nativeResponseValue;
10784 }
10785         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
10786 /* @internal */
10787 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
10788         if(!isWasmInitialized) {
10789                 throw new Error("initializeWasm() must be awaited first!");
10790         }
10791         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_err(e);
10792         return nativeResponseValue;
10793 }
10794         // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
10795 /* @internal */
10796 export function CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: number): boolean {
10797         if(!isWasmInitialized) {
10798                 throw new Error("initializeWasm() must be awaited first!");
10799         }
10800         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o);
10801         return nativeResponseValue;
10802 }
10803         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
10804 /* @internal */
10805 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
10806         if(!isWasmInitialized) {
10807                 throw new Error("initializeWasm() must be awaited first!");
10808         }
10809         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
10810         // debug statements here
10811 }
10812         // uintptr_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
10813 /* @internal */
10814 export function CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg: number): number {
10815         if(!isWasmInitialized) {
10816                 throw new Error("initializeWasm() must be awaited first!");
10817         }
10818         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg);
10819         return nativeResponseValue;
10820 }
10821         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
10822 /* @internal */
10823 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
10824         if(!isWasmInitialized) {
10825                 throw new Error("initializeWasm() must be awaited first!");
10826         }
10827         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
10828         return nativeResponseValue;
10829 }
10830         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
10831 /* @internal */
10832 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
10833         if(!isWasmInitialized) {
10834                 throw new Error("initializeWasm() must be awaited first!");
10835         }
10836         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
10837         return nativeResponseValue;
10838 }
10839         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
10840 /* @internal */
10841 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
10842         if(!isWasmInitialized) {
10843                 throw new Error("initializeWasm() must be awaited first!");
10844         }
10845         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
10846         return nativeResponseValue;
10847 }
10848         // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
10849 /* @internal */
10850 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
10851         if(!isWasmInitialized) {
10852                 throw new Error("initializeWasm() must be awaited first!");
10853         }
10854         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
10855         return nativeResponseValue;
10856 }
10857         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
10858 /* @internal */
10859 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
10860         if(!isWasmInitialized) {
10861                 throw new Error("initializeWasm() must be awaited first!");
10862         }
10863         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
10864         // debug statements here
10865 }
10866         // uintptr_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
10867 /* @internal */
10868 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
10869         if(!isWasmInitialized) {
10870                 throw new Error("initializeWasm() must be awaited first!");
10871         }
10872         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
10873         return nativeResponseValue;
10874 }
10875         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
10876 /* @internal */
10877 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
10878         if(!isWasmInitialized) {
10879                 throw new Error("initializeWasm() must be awaited first!");
10880         }
10881         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
10882         return nativeResponseValue;
10883 }
10884         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
10885 /* @internal */
10886 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
10887         if(!isWasmInitialized) {
10888                 throw new Error("initializeWasm() must be awaited first!");
10889         }
10890         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
10891         return nativeResponseValue;
10892 }
10893         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
10894 /* @internal */
10895 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
10896         if(!isWasmInitialized) {
10897                 throw new Error("initializeWasm() must be awaited first!");
10898         }
10899         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
10900         return nativeResponseValue;
10901 }
10902         // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
10903 /* @internal */
10904 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
10905         if(!isWasmInitialized) {
10906                 throw new Error("initializeWasm() must be awaited first!");
10907         }
10908         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
10909         return nativeResponseValue;
10910 }
10911         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
10912 /* @internal */
10913 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
10914         if(!isWasmInitialized) {
10915                 throw new Error("initializeWasm() must be awaited first!");
10916         }
10917         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
10918         // debug statements here
10919 }
10920         // uintptr_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
10921 /* @internal */
10922 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
10923         if(!isWasmInitialized) {
10924                 throw new Error("initializeWasm() must be awaited first!");
10925         }
10926         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
10927         return nativeResponseValue;
10928 }
10929         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
10930 /* @internal */
10931 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
10932         if(!isWasmInitialized) {
10933                 throw new Error("initializeWasm() must be awaited first!");
10934         }
10935         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
10936         return nativeResponseValue;
10937 }
10938         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
10939 /* @internal */
10940 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
10941         if(!isWasmInitialized) {
10942                 throw new Error("initializeWasm() must be awaited first!");
10943         }
10944         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
10945         return nativeResponseValue;
10946 }
10947         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
10948 /* @internal */
10949 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
10950         if(!isWasmInitialized) {
10951                 throw new Error("initializeWasm() must be awaited first!");
10952         }
10953         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
10954         return nativeResponseValue;
10955 }
10956         // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
10957 /* @internal */
10958 export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
10959         if(!isWasmInitialized) {
10960                 throw new Error("initializeWasm() must be awaited first!");
10961         }
10962         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
10963         return nativeResponseValue;
10964 }
10965         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
10966 /* @internal */
10967 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
10968         if(!isWasmInitialized) {
10969                 throw new Error("initializeWasm() must be awaited first!");
10970         }
10971         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
10972         // debug statements here
10973 }
10974         // uintptr_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
10975 /* @internal */
10976 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
10977         if(!isWasmInitialized) {
10978                 throw new Error("initializeWasm() must be awaited first!");
10979         }
10980         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
10981         return nativeResponseValue;
10982 }
10983         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
10984 /* @internal */
10985 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
10986         if(!isWasmInitialized) {
10987                 throw new Error("initializeWasm() must be awaited first!");
10988         }
10989         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
10990         return nativeResponseValue;
10991 }
10992         // uintptr_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
10993 /* @internal */
10994 export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
10995         if(!isWasmInitialized) {
10996                 throw new Error("initializeWasm() must be awaited first!");
10997         }
10998         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
10999         return nativeResponseValue;
11000 }
11001         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
11002 /* @internal */
11003 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
11004         if(!isWasmInitialized) {
11005                 throw new Error("initializeWasm() must be awaited first!");
11006         }
11007         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
11008         return nativeResponseValue;
11009 }
11010         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
11011 /* @internal */
11012 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: number, b: number): number {
11013         if(!isWasmInitialized) {
11014                 throw new Error("initializeWasm() must be awaited first!");
11015         }
11016         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_new(a, b);
11017         return nativeResponseValue;
11018 }
11019         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
11020 /* @internal */
11021 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
11022         if(!isWasmInitialized) {
11023                 throw new Error("initializeWasm() must be awaited first!");
11024         }
11025         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_free(_res);
11026         // debug statements here
11027 }
11028         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
11029 /* @internal */
11030 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
11031         if(!isWasmInitialized) {
11032                 throw new Error("initializeWasm() must be awaited first!");
11033         }
11034         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
11035         return nativeResponseValue;
11036 }
11037         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
11038 /* @internal */
11039 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
11040         if(!isWasmInitialized) {
11041                 throw new Error("initializeWasm() must be awaited first!");
11042         }
11043         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
11044         return nativeResponseValue;
11045 }
11046         // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
11047 /* @internal */
11048 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o: number): boolean {
11049         if(!isWasmInitialized) {
11050                 throw new Error("initializeWasm() must be awaited first!");
11051         }
11052         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o);
11053         return nativeResponseValue;
11054 }
11055         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
11056 /* @internal */
11057 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
11058         if(!isWasmInitialized) {
11059                 throw new Error("initializeWasm() must be awaited first!");
11060         }
11061         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
11062         // debug statements here
11063 }
11064         // uintptr_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
11065 /* @internal */
11066 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg: number): number {
11067         if(!isWasmInitialized) {
11068                 throw new Error("initializeWasm() must be awaited first!");
11069         }
11070         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg);
11071         return nativeResponseValue;
11072 }
11073         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
11074 /* @internal */
11075 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
11076         if(!isWasmInitialized) {
11077                 throw new Error("initializeWasm() must be awaited first!");
11078         }
11079         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
11080         return nativeResponseValue;
11081 }
11082         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
11083 /* @internal */
11084 export function CResult_SignatureNoneZ_ok(o: number): number {
11085         if(!isWasmInitialized) {
11086                 throw new Error("initializeWasm() must be awaited first!");
11087         }
11088         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_ok(o);
11089         return nativeResponseValue;
11090 }
11091         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
11092 /* @internal */
11093 export function CResult_SignatureNoneZ_err(): number {
11094         if(!isWasmInitialized) {
11095                 throw new Error("initializeWasm() must be awaited first!");
11096         }
11097         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_err();
11098         return nativeResponseValue;
11099 }
11100         // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
11101 /* @internal */
11102 export function CResult_SignatureNoneZ_is_ok(o: number): boolean {
11103         if(!isWasmInitialized) {
11104                 throw new Error("initializeWasm() must be awaited first!");
11105         }
11106         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_is_ok(o);
11107         return nativeResponseValue;
11108 }
11109         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
11110 /* @internal */
11111 export function CResult_SignatureNoneZ_free(_res: number): void {
11112         if(!isWasmInitialized) {
11113                 throw new Error("initializeWasm() must be awaited first!");
11114         }
11115         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_free(_res);
11116         // debug statements here
11117 }
11118         // uintptr_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
11119 /* @internal */
11120 export function CResult_SignatureNoneZ_clone_ptr(arg: number): number {
11121         if(!isWasmInitialized) {
11122                 throw new Error("initializeWasm() must be awaited first!");
11123         }
11124         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone_ptr(arg);
11125         return nativeResponseValue;
11126 }
11127         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
11128 /* @internal */
11129 export function CResult_SignatureNoneZ_clone(orig: number): number {
11130         if(!isWasmInitialized) {
11131                 throw new Error("initializeWasm() must be awaited first!");
11132         }
11133         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone(orig);
11134         return nativeResponseValue;
11135 }
11136         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
11137 /* @internal */
11138 export function CResult_SignDecodeErrorZ_ok(o: number): number {
11139         if(!isWasmInitialized) {
11140                 throw new Error("initializeWasm() must be awaited first!");
11141         }
11142         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_ok(o);
11143         return nativeResponseValue;
11144 }
11145         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
11146 /* @internal */
11147 export function CResult_SignDecodeErrorZ_err(e: number): number {
11148         if(!isWasmInitialized) {
11149                 throw new Error("initializeWasm() must be awaited first!");
11150         }
11151         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_err(e);
11152         return nativeResponseValue;
11153 }
11154         // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
11155 /* @internal */
11156 export function CResult_SignDecodeErrorZ_is_ok(o: number): boolean {
11157         if(!isWasmInitialized) {
11158                 throw new Error("initializeWasm() must be awaited first!");
11159         }
11160         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_is_ok(o);
11161         return nativeResponseValue;
11162 }
11163         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
11164 /* @internal */
11165 export function CResult_SignDecodeErrorZ_free(_res: number): void {
11166         if(!isWasmInitialized) {
11167                 throw new Error("initializeWasm() must be awaited first!");
11168         }
11169         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_free(_res);
11170         // debug statements here
11171 }
11172         // uintptr_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
11173 /* @internal */
11174 export function CResult_SignDecodeErrorZ_clone_ptr(arg: number): number {
11175         if(!isWasmInitialized) {
11176                 throw new Error("initializeWasm() must be awaited first!");
11177         }
11178         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone_ptr(arg);
11179         return nativeResponseValue;
11180 }
11181         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
11182 /* @internal */
11183 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
11184         if(!isWasmInitialized) {
11185                 throw new Error("initializeWasm() must be awaited first!");
11186         }
11187         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone(orig);
11188         return nativeResponseValue;
11189 }
11190         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
11191 /* @internal */
11192 export function CResult_RecoverableSignatureNoneZ_ok(o: number): number {
11193         if(!isWasmInitialized) {
11194                 throw new Error("initializeWasm() must be awaited first!");
11195         }
11196         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_ok(o);
11197         return nativeResponseValue;
11198 }
11199         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
11200 /* @internal */
11201 export function CResult_RecoverableSignatureNoneZ_err(): number {
11202         if(!isWasmInitialized) {
11203                 throw new Error("initializeWasm() must be awaited first!");
11204         }
11205         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_err();
11206         return nativeResponseValue;
11207 }
11208         // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
11209 /* @internal */
11210 export function CResult_RecoverableSignatureNoneZ_is_ok(o: number): boolean {
11211         if(!isWasmInitialized) {
11212                 throw new Error("initializeWasm() must be awaited first!");
11213         }
11214         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_is_ok(o);
11215         return nativeResponseValue;
11216 }
11217         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
11218 /* @internal */
11219 export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
11220         if(!isWasmInitialized) {
11221                 throw new Error("initializeWasm() must be awaited first!");
11222         }
11223         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_free(_res);
11224         // debug statements here
11225 }
11226         // uintptr_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
11227 /* @internal */
11228 export function CResult_RecoverableSignatureNoneZ_clone_ptr(arg: number): number {
11229         if(!isWasmInitialized) {
11230                 throw new Error("initializeWasm() must be awaited first!");
11231         }
11232         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone_ptr(arg);
11233         return nativeResponseValue;
11234 }
11235         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
11236 /* @internal */
11237 export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
11238         if(!isWasmInitialized) {
11239                 throw new Error("initializeWasm() must be awaited first!");
11240         }
11241         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone(orig);
11242         return nativeResponseValue;
11243 }
11244         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
11245 /* @internal */
11246 export function CVec_CVec_u8ZZ_free(_res: number): void {
11247         if(!isWasmInitialized) {
11248                 throw new Error("initializeWasm() must be awaited first!");
11249         }
11250         const nativeResponseValue = wasm.TS_CVec_CVec_u8ZZ_free(_res);
11251         // debug statements here
11252 }
11253         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
11254 /* @internal */
11255 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: number): number {
11256         if(!isWasmInitialized) {
11257                 throw new Error("initializeWasm() must be awaited first!");
11258         }
11259         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_ok(o);
11260         return nativeResponseValue;
11261 }
11262         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
11263 /* @internal */
11264 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
11265         if(!isWasmInitialized) {
11266                 throw new Error("initializeWasm() must be awaited first!");
11267         }
11268         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_err();
11269         return nativeResponseValue;
11270 }
11271         // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
11272 /* @internal */
11273 export function CResult_CVec_CVec_u8ZZNoneZ_is_ok(o: number): boolean {
11274         if(!isWasmInitialized) {
11275                 throw new Error("initializeWasm() must be awaited first!");
11276         }
11277         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_is_ok(o);
11278         return nativeResponseValue;
11279 }
11280         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
11281 /* @internal */
11282 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
11283         if(!isWasmInitialized) {
11284                 throw new Error("initializeWasm() must be awaited first!");
11285         }
11286         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_free(_res);
11287         // debug statements here
11288 }
11289         // uintptr_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
11290 /* @internal */
11291 export function CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg: number): number {
11292         if(!isWasmInitialized) {
11293                 throw new Error("initializeWasm() must be awaited first!");
11294         }
11295         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg);
11296         return nativeResponseValue;
11297 }
11298         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
11299 /* @internal */
11300 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
11301         if(!isWasmInitialized) {
11302                 throw new Error("initializeWasm() must be awaited first!");
11303         }
11304         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
11305         return nativeResponseValue;
11306 }
11307         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
11308 /* @internal */
11309 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
11310         if(!isWasmInitialized) {
11311                 throw new Error("initializeWasm() must be awaited first!");
11312         }
11313         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_ok(o);
11314         return nativeResponseValue;
11315 }
11316         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
11317 /* @internal */
11318 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
11319         if(!isWasmInitialized) {
11320                 throw new Error("initializeWasm() must be awaited first!");
11321         }
11322         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_err(e);
11323         return nativeResponseValue;
11324 }
11325         // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
11326 /* @internal */
11327 export function CResult_InMemorySignerDecodeErrorZ_is_ok(o: number): boolean {
11328         if(!isWasmInitialized) {
11329                 throw new Error("initializeWasm() must be awaited first!");
11330         }
11331         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_is_ok(o);
11332         return nativeResponseValue;
11333 }
11334         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
11335 /* @internal */
11336 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
11337         if(!isWasmInitialized) {
11338                 throw new Error("initializeWasm() must be awaited first!");
11339         }
11340         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_free(_res);
11341         // debug statements here
11342 }
11343         // uintptr_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
11344 /* @internal */
11345 export function CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg: number): number {
11346         if(!isWasmInitialized) {
11347                 throw new Error("initializeWasm() must be awaited first!");
11348         }
11349         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg);
11350         return nativeResponseValue;
11351 }
11352         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
11353 /* @internal */
11354 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
11355         if(!isWasmInitialized) {
11356                 throw new Error("initializeWasm() must be awaited first!");
11357         }
11358         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone(orig);
11359         return nativeResponseValue;
11360 }
11361         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
11362 /* @internal */
11363 export function CVec_TxOutZ_free(_res: number): void {
11364         if(!isWasmInitialized) {
11365                 throw new Error("initializeWasm() must be awaited first!");
11366         }
11367         const nativeResponseValue = wasm.TS_CVec_TxOutZ_free(_res);
11368         // debug statements here
11369 }
11370         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
11371 /* @internal */
11372 export function CResult_TransactionNoneZ_ok(o: number): number {
11373         if(!isWasmInitialized) {
11374                 throw new Error("initializeWasm() must be awaited first!");
11375         }
11376         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_ok(o);
11377         return nativeResponseValue;
11378 }
11379         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
11380 /* @internal */
11381 export function CResult_TransactionNoneZ_err(): number {
11382         if(!isWasmInitialized) {
11383                 throw new Error("initializeWasm() must be awaited first!");
11384         }
11385         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_err();
11386         return nativeResponseValue;
11387 }
11388         // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
11389 /* @internal */
11390 export function CResult_TransactionNoneZ_is_ok(o: number): boolean {
11391         if(!isWasmInitialized) {
11392                 throw new Error("initializeWasm() must be awaited first!");
11393         }
11394         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_is_ok(o);
11395         return nativeResponseValue;
11396 }
11397         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
11398 /* @internal */
11399 export function CResult_TransactionNoneZ_free(_res: number): void {
11400         if(!isWasmInitialized) {
11401                 throw new Error("initializeWasm() must be awaited first!");
11402         }
11403         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_free(_res);
11404         // debug statements here
11405 }
11406         // uintptr_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
11407 /* @internal */
11408 export function CResult_TransactionNoneZ_clone_ptr(arg: number): number {
11409         if(!isWasmInitialized) {
11410                 throw new Error("initializeWasm() must be awaited first!");
11411         }
11412         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone_ptr(arg);
11413         return nativeResponseValue;
11414 }
11415         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
11416 /* @internal */
11417 export function CResult_TransactionNoneZ_clone(orig: number): number {
11418         if(!isWasmInitialized) {
11419                 throw new Error("initializeWasm() must be awaited first!");
11420         }
11421         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone(orig);
11422         return nativeResponseValue;
11423 }
11424         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
11425 /* @internal */
11426 export function COption_FilterZ_some(o: number): number {
11427         if(!isWasmInitialized) {
11428                 throw new Error("initializeWasm() must be awaited first!");
11429         }
11430         const nativeResponseValue = wasm.TS_COption_FilterZ_some(o);
11431         return nativeResponseValue;
11432 }
11433         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
11434 /* @internal */
11435 export function COption_FilterZ_none(): number {
11436         if(!isWasmInitialized) {
11437                 throw new Error("initializeWasm() must be awaited first!");
11438         }
11439         const nativeResponseValue = wasm.TS_COption_FilterZ_none();
11440         return nativeResponseValue;
11441 }
11442         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
11443 /* @internal */
11444 export function COption_FilterZ_free(_res: number): void {
11445         if(!isWasmInitialized) {
11446                 throw new Error("initializeWasm() must be awaited first!");
11447         }
11448         const nativeResponseValue = wasm.TS_COption_FilterZ_free(_res);
11449         // debug statements here
11450 }
11451         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
11452 /* @internal */
11453 export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
11454         if(!isWasmInitialized) {
11455                 throw new Error("initializeWasm() must be awaited first!");
11456         }
11457         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_ok(o);
11458         return nativeResponseValue;
11459 }
11460         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
11461 /* @internal */
11462 export function CResult_LockedChannelMonitorNoneZ_err(): number {
11463         if(!isWasmInitialized) {
11464                 throw new Error("initializeWasm() must be awaited first!");
11465         }
11466         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_err();
11467         return nativeResponseValue;
11468 }
11469         // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
11470 /* @internal */
11471 export function CResult_LockedChannelMonitorNoneZ_is_ok(o: number): boolean {
11472         if(!isWasmInitialized) {
11473                 throw new Error("initializeWasm() must be awaited first!");
11474         }
11475         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_is_ok(o);
11476         return nativeResponseValue;
11477 }
11478         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
11479 /* @internal */
11480 export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
11481         if(!isWasmInitialized) {
11482                 throw new Error("initializeWasm() must be awaited first!");
11483         }
11484         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_free(_res);
11485         // debug statements here
11486 }
11487         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
11488 /* @internal */
11489 export function CVec_OutPointZ_free(_res: number): void {
11490         if(!isWasmInitialized) {
11491                 throw new Error("initializeWasm() must be awaited first!");
11492         }
11493         const nativeResponseValue = wasm.TS_CVec_OutPointZ_free(_res);
11494         // debug statements here
11495 }
11496         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
11497 /* @internal */
11498 export function CResult_NoneAPIErrorZ_ok(): number {
11499         if(!isWasmInitialized) {
11500                 throw new Error("initializeWasm() must be awaited first!");
11501         }
11502         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_ok();
11503         return nativeResponseValue;
11504 }
11505         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
11506 /* @internal */
11507 export function CResult_NoneAPIErrorZ_err(e: number): number {
11508         if(!isWasmInitialized) {
11509                 throw new Error("initializeWasm() must be awaited first!");
11510         }
11511         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_err(e);
11512         return nativeResponseValue;
11513 }
11514         // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
11515 /* @internal */
11516 export function CResult_NoneAPIErrorZ_is_ok(o: number): boolean {
11517         if(!isWasmInitialized) {
11518                 throw new Error("initializeWasm() must be awaited first!");
11519         }
11520         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_is_ok(o);
11521         return nativeResponseValue;
11522 }
11523         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
11524 /* @internal */
11525 export function CResult_NoneAPIErrorZ_free(_res: number): void {
11526         if(!isWasmInitialized) {
11527                 throw new Error("initializeWasm() must be awaited first!");
11528         }
11529         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_free(_res);
11530         // debug statements here
11531 }
11532         // uintptr_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
11533 /* @internal */
11534 export function CResult_NoneAPIErrorZ_clone_ptr(arg: number): number {
11535         if(!isWasmInitialized) {
11536                 throw new Error("initializeWasm() must be awaited first!");
11537         }
11538         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone_ptr(arg);
11539         return nativeResponseValue;
11540 }
11541         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
11542 /* @internal */
11543 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
11544         if(!isWasmInitialized) {
11545                 throw new Error("initializeWasm() must be awaited first!");
11546         }
11547         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone(orig);
11548         return nativeResponseValue;
11549 }
11550         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
11551 /* @internal */
11552 export function COption_u16Z_some(o: number): number {
11553         if(!isWasmInitialized) {
11554                 throw new Error("initializeWasm() must be awaited first!");
11555         }
11556         const nativeResponseValue = wasm.TS_COption_u16Z_some(o);
11557         return nativeResponseValue;
11558 }
11559         // struct LDKCOption_u16Z COption_u16Z_none(void);
11560 /* @internal */
11561 export function COption_u16Z_none(): number {
11562         if(!isWasmInitialized) {
11563                 throw new Error("initializeWasm() must be awaited first!");
11564         }
11565         const nativeResponseValue = wasm.TS_COption_u16Z_none();
11566         return nativeResponseValue;
11567 }
11568         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
11569 /* @internal */
11570 export function COption_u16Z_free(_res: number): void {
11571         if(!isWasmInitialized) {
11572                 throw new Error("initializeWasm() must be awaited first!");
11573         }
11574         const nativeResponseValue = wasm.TS_COption_u16Z_free(_res);
11575         // debug statements here
11576 }
11577         // uintptr_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
11578 /* @internal */
11579 export function COption_u16Z_clone_ptr(arg: number): number {
11580         if(!isWasmInitialized) {
11581                 throw new Error("initializeWasm() must be awaited first!");
11582         }
11583         const nativeResponseValue = wasm.TS_COption_u16Z_clone_ptr(arg);
11584         return nativeResponseValue;
11585 }
11586         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
11587 /* @internal */
11588 export function COption_u16Z_clone(orig: number): number {
11589         if(!isWasmInitialized) {
11590                 throw new Error("initializeWasm() must be awaited first!");
11591         }
11592         const nativeResponseValue = wasm.TS_COption_u16Z_clone(orig);
11593         return nativeResponseValue;
11594 }
11595         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
11596 /* @internal */
11597 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number): void {
11598         if(!isWasmInitialized) {
11599                 throw new Error("initializeWasm() must be awaited first!");
11600         }
11601         const nativeResponseValue = wasm.TS_CVec_CResult_NoneAPIErrorZZ_free(_res);
11602         // debug statements here
11603 }
11604         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
11605 /* @internal */
11606 export function CVec_APIErrorZ_free(_res: number): void {
11607         if(!isWasmInitialized) {
11608                 throw new Error("initializeWasm() must be awaited first!");
11609         }
11610         const nativeResponseValue = wasm.TS_CVec_APIErrorZ_free(_res);
11611         // debug statements here
11612 }
11613         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
11614 /* @internal */
11615 export function CResult__u832APIErrorZ_ok(o: number): number {
11616         if(!isWasmInitialized) {
11617                 throw new Error("initializeWasm() must be awaited first!");
11618         }
11619         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_ok(o);
11620         return nativeResponseValue;
11621 }
11622         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
11623 /* @internal */
11624 export function CResult__u832APIErrorZ_err(e: number): number {
11625         if(!isWasmInitialized) {
11626                 throw new Error("initializeWasm() must be awaited first!");
11627         }
11628         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_err(e);
11629         return nativeResponseValue;
11630 }
11631         // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
11632 /* @internal */
11633 export function CResult__u832APIErrorZ_is_ok(o: number): boolean {
11634         if(!isWasmInitialized) {
11635                 throw new Error("initializeWasm() must be awaited first!");
11636         }
11637         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_is_ok(o);
11638         return nativeResponseValue;
11639 }
11640         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
11641 /* @internal */
11642 export function CResult__u832APIErrorZ_free(_res: number): void {
11643         if(!isWasmInitialized) {
11644                 throw new Error("initializeWasm() must be awaited first!");
11645         }
11646         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_free(_res);
11647         // debug statements here
11648 }
11649         // uintptr_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
11650 /* @internal */
11651 export function CResult__u832APIErrorZ_clone_ptr(arg: number): number {
11652         if(!isWasmInitialized) {
11653                 throw new Error("initializeWasm() must be awaited first!");
11654         }
11655         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone_ptr(arg);
11656         return nativeResponseValue;
11657 }
11658         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
11659 /* @internal */
11660 export function CResult__u832APIErrorZ_clone(orig: number): number {
11661         if(!isWasmInitialized) {
11662                 throw new Error("initializeWasm() must be awaited first!");
11663         }
11664         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone(orig);
11665         return nativeResponseValue;
11666 }
11667         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
11668 /* @internal */
11669 export function CResult_PaymentIdPaymentSendFailureZ_ok(o: number): number {
11670         if(!isWasmInitialized) {
11671                 throw new Error("initializeWasm() must be awaited first!");
11672         }
11673         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_ok(o);
11674         return nativeResponseValue;
11675 }
11676         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
11677 /* @internal */
11678 export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
11679         if(!isWasmInitialized) {
11680                 throw new Error("initializeWasm() must be awaited first!");
11681         }
11682         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_err(e);
11683         return nativeResponseValue;
11684 }
11685         // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
11686 /* @internal */
11687 export function CResult_PaymentIdPaymentSendFailureZ_is_ok(o: number): boolean {
11688         if(!isWasmInitialized) {
11689                 throw new Error("initializeWasm() must be awaited first!");
11690         }
11691         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_is_ok(o);
11692         return nativeResponseValue;
11693 }
11694         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
11695 /* @internal */
11696 export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
11697         if(!isWasmInitialized) {
11698                 throw new Error("initializeWasm() must be awaited first!");
11699         }
11700         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_free(_res);
11701         // debug statements here
11702 }
11703         // uintptr_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
11704 /* @internal */
11705 export function CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg: number): number {
11706         if(!isWasmInitialized) {
11707                 throw new Error("initializeWasm() must be awaited first!");
11708         }
11709         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg);
11710         return nativeResponseValue;
11711 }
11712         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
11713 /* @internal */
11714 export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
11715         if(!isWasmInitialized) {
11716                 throw new Error("initializeWasm() must be awaited first!");
11717         }
11718         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone(orig);
11719         return nativeResponseValue;
11720 }
11721         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
11722 /* @internal */
11723 export function CResult_NonePaymentSendFailureZ_ok(): number {
11724         if(!isWasmInitialized) {
11725                 throw new Error("initializeWasm() must be awaited first!");
11726         }
11727         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_ok();
11728         return nativeResponseValue;
11729 }
11730         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
11731 /* @internal */
11732 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
11733         if(!isWasmInitialized) {
11734                 throw new Error("initializeWasm() must be awaited first!");
11735         }
11736         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_err(e);
11737         return nativeResponseValue;
11738 }
11739         // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
11740 /* @internal */
11741 export function CResult_NonePaymentSendFailureZ_is_ok(o: number): boolean {
11742         if(!isWasmInitialized) {
11743                 throw new Error("initializeWasm() must be awaited first!");
11744         }
11745         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_is_ok(o);
11746         return nativeResponseValue;
11747 }
11748         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
11749 /* @internal */
11750 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
11751         if(!isWasmInitialized) {
11752                 throw new Error("initializeWasm() must be awaited first!");
11753         }
11754         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_free(_res);
11755         // debug statements here
11756 }
11757         // uintptr_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
11758 /* @internal */
11759 export function CResult_NonePaymentSendFailureZ_clone_ptr(arg: number): number {
11760         if(!isWasmInitialized) {
11761                 throw new Error("initializeWasm() must be awaited first!");
11762         }
11763         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone_ptr(arg);
11764         return nativeResponseValue;
11765 }
11766         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
11767 /* @internal */
11768 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
11769         if(!isWasmInitialized) {
11770                 throw new Error("initializeWasm() must be awaited first!");
11771         }
11772         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone(orig);
11773         return nativeResponseValue;
11774 }
11775         // uintptr_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
11776 /* @internal */
11777 export function C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg: number): number {
11778         if(!isWasmInitialized) {
11779                 throw new Error("initializeWasm() must be awaited first!");
11780         }
11781         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg);
11782         return nativeResponseValue;
11783 }
11784         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
11785 /* @internal */
11786 export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
11787         if(!isWasmInitialized) {
11788                 throw new Error("initializeWasm() must be awaited first!");
11789         }
11790         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone(orig);
11791         return nativeResponseValue;
11792 }
11793         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
11794 /* @internal */
11795 export function C2Tuple_PaymentHashPaymentIdZ_new(a: number, b: number): number {
11796         if(!isWasmInitialized) {
11797                 throw new Error("initializeWasm() must be awaited first!");
11798         }
11799         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_new(a, b);
11800         return nativeResponseValue;
11801 }
11802         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
11803 /* @internal */
11804 export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
11805         if(!isWasmInitialized) {
11806                 throw new Error("initializeWasm() must be awaited first!");
11807         }
11808         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_free(_res);
11809         // debug statements here
11810 }
11811         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
11812 /* @internal */
11813 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
11814         if(!isWasmInitialized) {
11815                 throw new Error("initializeWasm() must be awaited first!");
11816         }
11817         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
11818         return nativeResponseValue;
11819 }
11820         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
11821 /* @internal */
11822 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
11823         if(!isWasmInitialized) {
11824                 throw new Error("initializeWasm() must be awaited first!");
11825         }
11826         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
11827         return nativeResponseValue;
11828 }
11829         // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
11830 /* @internal */
11831 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o: number): boolean {
11832         if(!isWasmInitialized) {
11833                 throw new Error("initializeWasm() must be awaited first!");
11834         }
11835         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o);
11836         return nativeResponseValue;
11837 }
11838         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
11839 /* @internal */
11840 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
11841         if(!isWasmInitialized) {
11842                 throw new Error("initializeWasm() must be awaited first!");
11843         }
11844         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
11845         // debug statements here
11846 }
11847         // uintptr_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
11848 /* @internal */
11849 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg: number): number {
11850         if(!isWasmInitialized) {
11851                 throw new Error("initializeWasm() must be awaited first!");
11852         }
11853         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg);
11854         return nativeResponseValue;
11855 }
11856         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
11857 /* @internal */
11858 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
11859         if(!isWasmInitialized) {
11860                 throw new Error("initializeWasm() must be awaited first!");
11861         }
11862         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
11863         return nativeResponseValue;
11864 }
11865         // uintptr_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
11866 /* @internal */
11867 export function C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg: number): number {
11868         if(!isWasmInitialized) {
11869                 throw new Error("initializeWasm() must be awaited first!");
11870         }
11871         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg);
11872         return nativeResponseValue;
11873 }
11874         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
11875 /* @internal */
11876 export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
11877         if(!isWasmInitialized) {
11878                 throw new Error("initializeWasm() must be awaited first!");
11879         }
11880         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
11881         return nativeResponseValue;
11882 }
11883         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
11884 /* @internal */
11885 export function C2Tuple_PaymentHashPaymentSecretZ_new(a: number, b: number): number {
11886         if(!isWasmInitialized) {
11887                 throw new Error("initializeWasm() must be awaited first!");
11888         }
11889         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
11890         return nativeResponseValue;
11891 }
11892         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
11893 /* @internal */
11894 export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
11895         if(!isWasmInitialized) {
11896                 throw new Error("initializeWasm() must be awaited first!");
11897         }
11898         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_free(_res);
11899         // debug statements here
11900 }
11901         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
11902 /* @internal */
11903 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o: number): number {
11904         if(!isWasmInitialized) {
11905                 throw new Error("initializeWasm() must be awaited first!");
11906         }
11907         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o);
11908         return nativeResponseValue;
11909 }
11910         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
11911 /* @internal */
11912 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(): number {
11913         if(!isWasmInitialized) {
11914                 throw new Error("initializeWasm() must be awaited first!");
11915         }
11916         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err();
11917         return nativeResponseValue;
11918 }
11919         // bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
11920 /* @internal */
11921 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o: number): boolean {
11922         if(!isWasmInitialized) {
11923                 throw new Error("initializeWasm() must be awaited first!");
11924         }
11925         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o);
11926         return nativeResponseValue;
11927 }
11928         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
11929 /* @internal */
11930 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res: number): void {
11931         if(!isWasmInitialized) {
11932                 throw new Error("initializeWasm() must be awaited first!");
11933         }
11934         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res);
11935         // debug statements here
11936 }
11937         // uintptr_t CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR arg);
11938 /* @internal */
11939 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg: number): number {
11940         if(!isWasmInitialized) {
11941                 throw new Error("initializeWasm() must be awaited first!");
11942         }
11943         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg);
11944         return nativeResponseValue;
11945 }
11946         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
11947 /* @internal */
11948 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig: number): number {
11949         if(!isWasmInitialized) {
11950                 throw new Error("initializeWasm() must be awaited first!");
11951         }
11952         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig);
11953         return nativeResponseValue;
11954 }
11955         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
11956 /* @internal */
11957 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o: number): number {
11958         if(!isWasmInitialized) {
11959                 throw new Error("initializeWasm() must be awaited first!");
11960         }
11961         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o);
11962         return nativeResponseValue;
11963 }
11964         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(struct LDKAPIError e);
11965 /* @internal */
11966 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e: number): number {
11967         if(!isWasmInitialized) {
11968                 throw new Error("initializeWasm() must be awaited first!");
11969         }
11970         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e);
11971         return nativeResponseValue;
11972 }
11973         // bool CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR o);
11974 /* @internal */
11975 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o: number): boolean {
11976         if(!isWasmInitialized) {
11977                 throw new Error("initializeWasm() must be awaited first!");
11978         }
11979         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o);
11980         return nativeResponseValue;
11981 }
11982         // void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ _res);
11983 /* @internal */
11984 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res: number): void {
11985         if(!isWasmInitialized) {
11986                 throw new Error("initializeWasm() must be awaited first!");
11987         }
11988         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res);
11989         // debug statements here
11990 }
11991         // uintptr_t CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR arg);
11992 /* @internal */
11993 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg: number): number {
11994         if(!isWasmInitialized) {
11995                 throw new Error("initializeWasm() must be awaited first!");
11996         }
11997         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg);
11998         return nativeResponseValue;
11999 }
12000         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR orig);
12001 /* @internal */
12002 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig: number): number {
12003         if(!isWasmInitialized) {
12004                 throw new Error("initializeWasm() must be awaited first!");
12005         }
12006         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig);
12007         return nativeResponseValue;
12008 }
12009         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
12010 /* @internal */
12011 export function CResult_PaymentSecretNoneZ_ok(o: number): number {
12012         if(!isWasmInitialized) {
12013                 throw new Error("initializeWasm() must be awaited first!");
12014         }
12015         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_ok(o);
12016         return nativeResponseValue;
12017 }
12018         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
12019 /* @internal */
12020 export function CResult_PaymentSecretNoneZ_err(): number {
12021         if(!isWasmInitialized) {
12022                 throw new Error("initializeWasm() must be awaited first!");
12023         }
12024         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_err();
12025         return nativeResponseValue;
12026 }
12027         // bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
12028 /* @internal */
12029 export function CResult_PaymentSecretNoneZ_is_ok(o: number): boolean {
12030         if(!isWasmInitialized) {
12031                 throw new Error("initializeWasm() must be awaited first!");
12032         }
12033         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_is_ok(o);
12034         return nativeResponseValue;
12035 }
12036         // void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
12037 /* @internal */
12038 export function CResult_PaymentSecretNoneZ_free(_res: number): void {
12039         if(!isWasmInitialized) {
12040                 throw new Error("initializeWasm() must be awaited first!");
12041         }
12042         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_free(_res);
12043         // debug statements here
12044 }
12045         // uintptr_t CResult_PaymentSecretNoneZ_clone_ptr(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR arg);
12046 /* @internal */
12047 export function CResult_PaymentSecretNoneZ_clone_ptr(arg: number): number {
12048         if(!isWasmInitialized) {
12049                 throw new Error("initializeWasm() must be awaited first!");
12050         }
12051         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone_ptr(arg);
12052         return nativeResponseValue;
12053 }
12054         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
12055 /* @internal */
12056 export function CResult_PaymentSecretNoneZ_clone(orig: number): number {
12057         if(!isWasmInitialized) {
12058                 throw new Error("initializeWasm() must be awaited first!");
12059         }
12060         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone(orig);
12061         return nativeResponseValue;
12062 }
12063         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
12064 /* @internal */
12065 export function CResult_PaymentSecretAPIErrorZ_ok(o: number): number {
12066         if(!isWasmInitialized) {
12067                 throw new Error("initializeWasm() must be awaited first!");
12068         }
12069         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_ok(o);
12070         return nativeResponseValue;
12071 }
12072         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
12073 /* @internal */
12074 export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
12075         if(!isWasmInitialized) {
12076                 throw new Error("initializeWasm() must be awaited first!");
12077         }
12078         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_err(e);
12079         return nativeResponseValue;
12080 }
12081         // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
12082 /* @internal */
12083 export function CResult_PaymentSecretAPIErrorZ_is_ok(o: number): boolean {
12084         if(!isWasmInitialized) {
12085                 throw new Error("initializeWasm() must be awaited first!");
12086         }
12087         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_is_ok(o);
12088         return nativeResponseValue;
12089 }
12090         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
12091 /* @internal */
12092 export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
12093         if(!isWasmInitialized) {
12094                 throw new Error("initializeWasm() must be awaited first!");
12095         }
12096         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_free(_res);
12097         // debug statements here
12098 }
12099         // uintptr_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
12100 /* @internal */
12101 export function CResult_PaymentSecretAPIErrorZ_clone_ptr(arg: number): number {
12102         if(!isWasmInitialized) {
12103                 throw new Error("initializeWasm() must be awaited first!");
12104         }
12105         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone_ptr(arg);
12106         return nativeResponseValue;
12107 }
12108         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
12109 /* @internal */
12110 export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
12111         if(!isWasmInitialized) {
12112                 throw new Error("initializeWasm() must be awaited first!");
12113         }
12114         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone(orig);
12115         return nativeResponseValue;
12116 }
12117         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
12118 /* @internal */
12119 export function CResult_PaymentPreimageAPIErrorZ_ok(o: number): number {
12120         if(!isWasmInitialized) {
12121                 throw new Error("initializeWasm() must be awaited first!");
12122         }
12123         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_ok(o);
12124         return nativeResponseValue;
12125 }
12126         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
12127 /* @internal */
12128 export function CResult_PaymentPreimageAPIErrorZ_err(e: number): number {
12129         if(!isWasmInitialized) {
12130                 throw new Error("initializeWasm() must be awaited first!");
12131         }
12132         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_err(e);
12133         return nativeResponseValue;
12134 }
12135         // bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
12136 /* @internal */
12137 export function CResult_PaymentPreimageAPIErrorZ_is_ok(o: number): boolean {
12138         if(!isWasmInitialized) {
12139                 throw new Error("initializeWasm() must be awaited first!");
12140         }
12141         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_is_ok(o);
12142         return nativeResponseValue;
12143 }
12144         // void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
12145 /* @internal */
12146 export function CResult_PaymentPreimageAPIErrorZ_free(_res: number): void {
12147         if(!isWasmInitialized) {
12148                 throw new Error("initializeWasm() must be awaited first!");
12149         }
12150         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_free(_res);
12151         // debug statements here
12152 }
12153         // uintptr_t CResult_PaymentPreimageAPIErrorZ_clone_ptr(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR arg);
12154 /* @internal */
12155 export function CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg: number): number {
12156         if(!isWasmInitialized) {
12157                 throw new Error("initializeWasm() must be awaited first!");
12158         }
12159         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg);
12160         return nativeResponseValue;
12161 }
12162         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
12163 /* @internal */
12164 export function CResult_PaymentPreimageAPIErrorZ_clone(orig: number): number {
12165         if(!isWasmInitialized) {
12166                 throw new Error("initializeWasm() must be awaited first!");
12167         }
12168         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone(orig);
12169         return nativeResponseValue;
12170 }
12171         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
12172 /* @internal */
12173 export function CVec_ChannelMonitorZ_free(_res: number): void {
12174         if(!isWasmInitialized) {
12175                 throw new Error("initializeWasm() must be awaited first!");
12176         }
12177         const nativeResponseValue = wasm.TS_CVec_ChannelMonitorZ_free(_res);
12178         // debug statements here
12179 }
12180         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
12181 /* @internal */
12182 export function C2Tuple_BlockHashChannelManagerZ_new(a: number, b: number): number {
12183         if(!isWasmInitialized) {
12184                 throw new Error("initializeWasm() must be awaited first!");
12185         }
12186         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_new(a, b);
12187         return nativeResponseValue;
12188 }
12189         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
12190 /* @internal */
12191 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
12192         if(!isWasmInitialized) {
12193                 throw new Error("initializeWasm() must be awaited first!");
12194         }
12195         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_free(_res);
12196         // debug statements here
12197 }
12198         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
12199 /* @internal */
12200 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
12201         if(!isWasmInitialized) {
12202                 throw new Error("initializeWasm() must be awaited first!");
12203         }
12204         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
12205         return nativeResponseValue;
12206 }
12207         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
12208 /* @internal */
12209 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
12210         if(!isWasmInitialized) {
12211                 throw new Error("initializeWasm() must be awaited first!");
12212         }
12213         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
12214         return nativeResponseValue;
12215 }
12216         // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
12217 /* @internal */
12218 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o: number): boolean {
12219         if(!isWasmInitialized) {
12220                 throw new Error("initializeWasm() must be awaited first!");
12221         }
12222         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o);
12223         return nativeResponseValue;
12224 }
12225         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
12226 /* @internal */
12227 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
12228         if(!isWasmInitialized) {
12229                 throw new Error("initializeWasm() must be awaited first!");
12230         }
12231         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
12232         // debug statements here
12233 }
12234         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
12235 /* @internal */
12236 export function PaymentPurpose_free(this_ptr: number): void {
12237         if(!isWasmInitialized) {
12238                 throw new Error("initializeWasm() must be awaited first!");
12239         }
12240         const nativeResponseValue = wasm.TS_PaymentPurpose_free(this_ptr);
12241         // debug statements here
12242 }
12243         // uintptr_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
12244 /* @internal */
12245 export function PaymentPurpose_clone_ptr(arg: number): number {
12246         if(!isWasmInitialized) {
12247                 throw new Error("initializeWasm() must be awaited first!");
12248         }
12249         const nativeResponseValue = wasm.TS_PaymentPurpose_clone_ptr(arg);
12250         return nativeResponseValue;
12251 }
12252         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
12253 /* @internal */
12254 export function PaymentPurpose_clone(orig: number): number {
12255         if(!isWasmInitialized) {
12256                 throw new Error("initializeWasm() must be awaited first!");
12257         }
12258         const nativeResponseValue = wasm.TS_PaymentPurpose_clone(orig);
12259         return nativeResponseValue;
12260 }
12261         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret);
12262 /* @internal */
12263 export function PaymentPurpose_invoice_payment(payment_preimage: number, payment_secret: number): number {
12264         if(!isWasmInitialized) {
12265                 throw new Error("initializeWasm() must be awaited first!");
12266         }
12267         const nativeResponseValue = wasm.TS_PaymentPurpose_invoice_payment(payment_preimage, payment_secret);
12268         return nativeResponseValue;
12269 }
12270         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
12271 /* @internal */
12272 export function PaymentPurpose_spontaneous_payment(a: number): number {
12273         if(!isWasmInitialized) {
12274                 throw new Error("initializeWasm() must be awaited first!");
12275         }
12276         const nativeResponseValue = wasm.TS_PaymentPurpose_spontaneous_payment(a);
12277         return nativeResponseValue;
12278 }
12279         // void ClosureReason_free(struct LDKClosureReason this_ptr);
12280 /* @internal */
12281 export function ClosureReason_free(this_ptr: number): void {
12282         if(!isWasmInitialized) {
12283                 throw new Error("initializeWasm() must be awaited first!");
12284         }
12285         const nativeResponseValue = wasm.TS_ClosureReason_free(this_ptr);
12286         // debug statements here
12287 }
12288         // uintptr_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
12289 /* @internal */
12290 export function ClosureReason_clone_ptr(arg: number): number {
12291         if(!isWasmInitialized) {
12292                 throw new Error("initializeWasm() must be awaited first!");
12293         }
12294         const nativeResponseValue = wasm.TS_ClosureReason_clone_ptr(arg);
12295         return nativeResponseValue;
12296 }
12297         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
12298 /* @internal */
12299 export function ClosureReason_clone(orig: number): number {
12300         if(!isWasmInitialized) {
12301                 throw new Error("initializeWasm() must be awaited first!");
12302         }
12303         const nativeResponseValue = wasm.TS_ClosureReason_clone(orig);
12304         return nativeResponseValue;
12305 }
12306         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
12307 /* @internal */
12308 export function ClosureReason_counterparty_force_closed(peer_msg: number): number {
12309         if(!isWasmInitialized) {
12310                 throw new Error("initializeWasm() must be awaited first!");
12311         }
12312         const nativeResponseValue = wasm.TS_ClosureReason_counterparty_force_closed(peer_msg);
12313         return nativeResponseValue;
12314 }
12315         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
12316 /* @internal */
12317 export function ClosureReason_holder_force_closed(): number {
12318         if(!isWasmInitialized) {
12319                 throw new Error("initializeWasm() must be awaited first!");
12320         }
12321         const nativeResponseValue = wasm.TS_ClosureReason_holder_force_closed();
12322         return nativeResponseValue;
12323 }
12324         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
12325 /* @internal */
12326 export function ClosureReason_cooperative_closure(): number {
12327         if(!isWasmInitialized) {
12328                 throw new Error("initializeWasm() must be awaited first!");
12329         }
12330         const nativeResponseValue = wasm.TS_ClosureReason_cooperative_closure();
12331         return nativeResponseValue;
12332 }
12333         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
12334 /* @internal */
12335 export function ClosureReason_commitment_tx_confirmed(): number {
12336         if(!isWasmInitialized) {
12337                 throw new Error("initializeWasm() must be awaited first!");
12338         }
12339         const nativeResponseValue = wasm.TS_ClosureReason_commitment_tx_confirmed();
12340         return nativeResponseValue;
12341 }
12342         // struct LDKClosureReason ClosureReason_funding_timed_out(void);
12343 /* @internal */
12344 export function ClosureReason_funding_timed_out(): number {
12345         if(!isWasmInitialized) {
12346                 throw new Error("initializeWasm() must be awaited first!");
12347         }
12348         const nativeResponseValue = wasm.TS_ClosureReason_funding_timed_out();
12349         return nativeResponseValue;
12350 }
12351         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
12352 /* @internal */
12353 export function ClosureReason_processing_error(err: number): number {
12354         if(!isWasmInitialized) {
12355                 throw new Error("initializeWasm() must be awaited first!");
12356         }
12357         const nativeResponseValue = wasm.TS_ClosureReason_processing_error(err);
12358         return nativeResponseValue;
12359 }
12360         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
12361 /* @internal */
12362 export function ClosureReason_disconnected_peer(): number {
12363         if(!isWasmInitialized) {
12364                 throw new Error("initializeWasm() must be awaited first!");
12365         }
12366         const nativeResponseValue = wasm.TS_ClosureReason_disconnected_peer();
12367         return nativeResponseValue;
12368 }
12369         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
12370 /* @internal */
12371 export function ClosureReason_outdated_channel_manager(): number {
12372         if(!isWasmInitialized) {
12373                 throw new Error("initializeWasm() must be awaited first!");
12374         }
12375         const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
12376         return nativeResponseValue;
12377 }
12378         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
12379 /* @internal */
12380 export function ClosureReason_write(obj: number): number {
12381         if(!isWasmInitialized) {
12382                 throw new Error("initializeWasm() must be awaited first!");
12383         }
12384         const nativeResponseValue = wasm.TS_ClosureReason_write(obj);
12385         return nativeResponseValue;
12386 }
12387         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
12388 /* @internal */
12389 export function ClosureReason_read(ser: number): number {
12390         if(!isWasmInitialized) {
12391                 throw new Error("initializeWasm() must be awaited first!");
12392         }
12393         const nativeResponseValue = wasm.TS_ClosureReason_read(ser);
12394         return nativeResponseValue;
12395 }
12396         // void Event_free(struct LDKEvent this_ptr);
12397 /* @internal */
12398 export function Event_free(this_ptr: number): void {
12399         if(!isWasmInitialized) {
12400                 throw new Error("initializeWasm() must be awaited first!");
12401         }
12402         const nativeResponseValue = wasm.TS_Event_free(this_ptr);
12403         // debug statements here
12404 }
12405         // uintptr_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
12406 /* @internal */
12407 export function Event_clone_ptr(arg: number): number {
12408         if(!isWasmInitialized) {
12409                 throw new Error("initializeWasm() must be awaited first!");
12410         }
12411         const nativeResponseValue = wasm.TS_Event_clone_ptr(arg);
12412         return nativeResponseValue;
12413 }
12414         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
12415 /* @internal */
12416 export function Event_clone(orig: number): number {
12417         if(!isWasmInitialized) {
12418                 throw new Error("initializeWasm() must be awaited first!");
12419         }
12420         const nativeResponseValue = wasm.TS_Event_clone(orig);
12421         return nativeResponseValue;
12422 }
12423         // 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);
12424 /* @internal */
12425 export function Event_funding_generation_ready(temporary_channel_id: number, channel_value_satoshis: bigint, output_script: number, user_channel_id: bigint): number {
12426         if(!isWasmInitialized) {
12427                 throw new Error("initializeWasm() must be awaited first!");
12428         }
12429         const nativeResponseValue = wasm.TS_Event_funding_generation_ready(temporary_channel_id, channel_value_satoshis, output_script, user_channel_id);
12430         return nativeResponseValue;
12431 }
12432         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
12433 /* @internal */
12434 export function Event_payment_received(payment_hash: number, amt: bigint, purpose: number): number {
12435         if(!isWasmInitialized) {
12436                 throw new Error("initializeWasm() must be awaited first!");
12437         }
12438         const nativeResponseValue = wasm.TS_Event_payment_received(payment_hash, amt, purpose);
12439         return nativeResponseValue;
12440 }
12441         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
12442 /* @internal */
12443 export function Event_payment_sent(payment_id: number, payment_preimage: number, payment_hash: number, fee_paid_msat: number): number {
12444         if(!isWasmInitialized) {
12445                 throw new Error("initializeWasm() must be awaited first!");
12446         }
12447         const nativeResponseValue = wasm.TS_Event_payment_sent(payment_id, payment_preimage, payment_hash, fee_paid_msat);
12448         return nativeResponseValue;
12449 }
12450         // 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);
12451 /* @internal */
12452 export function Event_payment_path_failed(payment_id: number, payment_hash: number, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number, short_channel_id: number, retry: number): number {
12453         if(!isWasmInitialized) {
12454                 throw new Error("initializeWasm() must be awaited first!");
12455         }
12456         const nativeResponseValue = wasm.TS_Event_payment_path_failed(payment_id, payment_hash, rejected_by_dest, network_update, all_paths_failed, path, short_channel_id, retry);
12457         return nativeResponseValue;
12458 }
12459         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
12460 /* @internal */
12461 export function Event_payment_failed(payment_id: number, payment_hash: number): number {
12462         if(!isWasmInitialized) {
12463                 throw new Error("initializeWasm() must be awaited first!");
12464         }
12465         const nativeResponseValue = wasm.TS_Event_payment_failed(payment_id, payment_hash);
12466         return nativeResponseValue;
12467 }
12468         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
12469 /* @internal */
12470 export function Event_pending_htlcs_forwardable(time_forwardable: bigint): number {
12471         if(!isWasmInitialized) {
12472                 throw new Error("initializeWasm() must be awaited first!");
12473         }
12474         const nativeResponseValue = wasm.TS_Event_pending_htlcs_forwardable(time_forwardable);
12475         return nativeResponseValue;
12476 }
12477         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
12478 /* @internal */
12479 export function Event_spendable_outputs(outputs: number): number {
12480         if(!isWasmInitialized) {
12481                 throw new Error("initializeWasm() must be awaited first!");
12482         }
12483         const nativeResponseValue = wasm.TS_Event_spendable_outputs(outputs);
12484         return nativeResponseValue;
12485 }
12486         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
12487 /* @internal */
12488 export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
12489         if(!isWasmInitialized) {
12490                 throw new Error("initializeWasm() must be awaited first!");
12491         }
12492         const nativeResponseValue = wasm.TS_Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
12493         return nativeResponseValue;
12494 }
12495         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
12496 /* @internal */
12497 export function Event_channel_closed(channel_id: number, user_channel_id: bigint, reason: number): number {
12498         if(!isWasmInitialized) {
12499                 throw new Error("initializeWasm() must be awaited first!");
12500         }
12501         const nativeResponseValue = wasm.TS_Event_channel_closed(channel_id, user_channel_id, reason);
12502         return nativeResponseValue;
12503 }
12504         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
12505 /* @internal */
12506 export function Event_discard_funding(channel_id: number, transaction: number): number {
12507         if(!isWasmInitialized) {
12508                 throw new Error("initializeWasm() must be awaited first!");
12509         }
12510         const nativeResponseValue = wasm.TS_Event_discard_funding(channel_id, transaction);
12511         return nativeResponseValue;
12512 }
12513         // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
12514 /* @internal */
12515 export function Event_payment_path_successful(payment_id: number, payment_hash: number, path: number): number {
12516         if(!isWasmInitialized) {
12517                 throw new Error("initializeWasm() must be awaited first!");
12518         }
12519         const nativeResponseValue = wasm.TS_Event_payment_path_successful(payment_id, payment_hash, path);
12520         return nativeResponseValue;
12521 }
12522         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
12523 /* @internal */
12524 export function Event_write(obj: number): number {
12525         if(!isWasmInitialized) {
12526                 throw new Error("initializeWasm() must be awaited first!");
12527         }
12528         const nativeResponseValue = wasm.TS_Event_write(obj);
12529         return nativeResponseValue;
12530 }
12531         // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
12532 /* @internal */
12533 export function Event_read(ser: number): number {
12534         if(!isWasmInitialized) {
12535                 throw new Error("initializeWasm() must be awaited first!");
12536         }
12537         const nativeResponseValue = wasm.TS_Event_read(ser);
12538         return nativeResponseValue;
12539 }
12540         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
12541 /* @internal */
12542 export function MessageSendEvent_free(this_ptr: number): void {
12543         if(!isWasmInitialized) {
12544                 throw new Error("initializeWasm() must be awaited first!");
12545         }
12546         const nativeResponseValue = wasm.TS_MessageSendEvent_free(this_ptr);
12547         // debug statements here
12548 }
12549         // uintptr_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
12550 /* @internal */
12551 export function MessageSendEvent_clone_ptr(arg: number): number {
12552         if(!isWasmInitialized) {
12553                 throw new Error("initializeWasm() must be awaited first!");
12554         }
12555         const nativeResponseValue = wasm.TS_MessageSendEvent_clone_ptr(arg);
12556         return nativeResponseValue;
12557 }
12558         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
12559 /* @internal */
12560 export function MessageSendEvent_clone(orig: number): number {
12561         if(!isWasmInitialized) {
12562                 throw new Error("initializeWasm() must be awaited first!");
12563         }
12564         const nativeResponseValue = wasm.TS_MessageSendEvent_clone(orig);
12565         return nativeResponseValue;
12566 }
12567         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
12568 /* @internal */
12569 export function MessageSendEvent_send_accept_channel(node_id: number, msg: number): number {
12570         if(!isWasmInitialized) {
12571                 throw new Error("initializeWasm() must be awaited first!");
12572         }
12573         const nativeResponseValue = wasm.TS_MessageSendEvent_send_accept_channel(node_id, msg);
12574         return nativeResponseValue;
12575 }
12576         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
12577 /* @internal */
12578 export function MessageSendEvent_send_open_channel(node_id: number, msg: number): number {
12579         if(!isWasmInitialized) {
12580                 throw new Error("initializeWasm() must be awaited first!");
12581         }
12582         const nativeResponseValue = wasm.TS_MessageSendEvent_send_open_channel(node_id, msg);
12583         return nativeResponseValue;
12584 }
12585         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
12586 /* @internal */
12587 export function MessageSendEvent_send_funding_created(node_id: number, msg: number): number {
12588         if(!isWasmInitialized) {
12589                 throw new Error("initializeWasm() must be awaited first!");
12590         }
12591         const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_created(node_id, msg);
12592         return nativeResponseValue;
12593 }
12594         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
12595 /* @internal */
12596 export function MessageSendEvent_send_funding_signed(node_id: number, msg: number): number {
12597         if(!isWasmInitialized) {
12598                 throw new Error("initializeWasm() must be awaited first!");
12599         }
12600         const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_signed(node_id, msg);
12601         return nativeResponseValue;
12602 }
12603         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
12604 /* @internal */
12605 export function MessageSendEvent_send_funding_locked(node_id: number, msg: number): number {
12606         if(!isWasmInitialized) {
12607                 throw new Error("initializeWasm() must be awaited first!");
12608         }
12609         const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_locked(node_id, msg);
12610         return nativeResponseValue;
12611 }
12612         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
12613 /* @internal */
12614 export function MessageSendEvent_send_announcement_signatures(node_id: number, msg: number): number {
12615         if(!isWasmInitialized) {
12616                 throw new Error("initializeWasm() must be awaited first!");
12617         }
12618         const nativeResponseValue = wasm.TS_MessageSendEvent_send_announcement_signatures(node_id, msg);
12619         return nativeResponseValue;
12620 }
12621         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
12622 /* @internal */
12623 export function MessageSendEvent_update_htlcs(node_id: number, updates: number): number {
12624         if(!isWasmInitialized) {
12625                 throw new Error("initializeWasm() must be awaited first!");
12626         }
12627         const nativeResponseValue = wasm.TS_MessageSendEvent_update_htlcs(node_id, updates);
12628         return nativeResponseValue;
12629 }
12630         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
12631 /* @internal */
12632 export function MessageSendEvent_send_revoke_and_ack(node_id: number, msg: number): number {
12633         if(!isWasmInitialized) {
12634                 throw new Error("initializeWasm() must be awaited first!");
12635         }
12636         const nativeResponseValue = wasm.TS_MessageSendEvent_send_revoke_and_ack(node_id, msg);
12637         return nativeResponseValue;
12638 }
12639         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
12640 /* @internal */
12641 export function MessageSendEvent_send_closing_signed(node_id: number, msg: number): number {
12642         if(!isWasmInitialized) {
12643                 throw new Error("initializeWasm() must be awaited first!");
12644         }
12645         const nativeResponseValue = wasm.TS_MessageSendEvent_send_closing_signed(node_id, msg);
12646         return nativeResponseValue;
12647 }
12648         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
12649 /* @internal */
12650 export function MessageSendEvent_send_shutdown(node_id: number, msg: number): number {
12651         if(!isWasmInitialized) {
12652                 throw new Error("initializeWasm() must be awaited first!");
12653         }
12654         const nativeResponseValue = wasm.TS_MessageSendEvent_send_shutdown(node_id, msg);
12655         return nativeResponseValue;
12656 }
12657         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
12658 /* @internal */
12659 export function MessageSendEvent_send_channel_reestablish(node_id: number, msg: number): number {
12660         if(!isWasmInitialized) {
12661                 throw new Error("initializeWasm() must be awaited first!");
12662         }
12663         const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_reestablish(node_id, msg);
12664         return nativeResponseValue;
12665 }
12666         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
12667 /* @internal */
12668 export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
12669         if(!isWasmInitialized) {
12670                 throw new Error("initializeWasm() must be awaited first!");
12671         }
12672         const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
12673         return nativeResponseValue;
12674 }
12675         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
12676 /* @internal */
12677 export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
12678         if(!isWasmInitialized) {
12679                 throw new Error("initializeWasm() must be awaited first!");
12680         }
12681         const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_node_announcement(msg);
12682         return nativeResponseValue;
12683 }
12684         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
12685 /* @internal */
12686 export function MessageSendEvent_broadcast_channel_update(msg: number): number {
12687         if(!isWasmInitialized) {
12688                 throw new Error("initializeWasm() must be awaited first!");
12689         }
12690         const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_update(msg);
12691         return nativeResponseValue;
12692 }
12693         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
12694 /* @internal */
12695 export function MessageSendEvent_send_channel_update(node_id: number, msg: number): number {
12696         if(!isWasmInitialized) {
12697                 throw new Error("initializeWasm() must be awaited first!");
12698         }
12699         const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_update(node_id, msg);
12700         return nativeResponseValue;
12701 }
12702         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
12703 /* @internal */
12704 export function MessageSendEvent_handle_error(node_id: number, action: number): number {
12705         if(!isWasmInitialized) {
12706                 throw new Error("initializeWasm() must be awaited first!");
12707         }
12708         const nativeResponseValue = wasm.TS_MessageSendEvent_handle_error(node_id, action);
12709         return nativeResponseValue;
12710 }
12711         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
12712 /* @internal */
12713 export function MessageSendEvent_send_channel_range_query(node_id: number, msg: number): number {
12714         if(!isWasmInitialized) {
12715                 throw new Error("initializeWasm() must be awaited first!");
12716         }
12717         const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_range_query(node_id, msg);
12718         return nativeResponseValue;
12719 }
12720         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
12721 /* @internal */
12722 export function MessageSendEvent_send_short_ids_query(node_id: number, msg: number): number {
12723         if(!isWasmInitialized) {
12724                 throw new Error("initializeWasm() must be awaited first!");
12725         }
12726         const nativeResponseValue = wasm.TS_MessageSendEvent_send_short_ids_query(node_id, msg);
12727         return nativeResponseValue;
12728 }
12729         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
12730 /* @internal */
12731 export function MessageSendEvent_send_reply_channel_range(node_id: number, msg: number): number {
12732         if(!isWasmInitialized) {
12733                 throw new Error("initializeWasm() must be awaited first!");
12734         }
12735         const nativeResponseValue = wasm.TS_MessageSendEvent_send_reply_channel_range(node_id, msg);
12736         return nativeResponseValue;
12737 }
12738         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
12739 /* @internal */
12740 export function MessageSendEventsProvider_free(this_ptr: number): void {
12741         if(!isWasmInitialized) {
12742                 throw new Error("initializeWasm() must be awaited first!");
12743         }
12744         const nativeResponseValue = wasm.TS_MessageSendEventsProvider_free(this_ptr);
12745         // debug statements here
12746 }
12747         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
12748 /* @internal */
12749 export function EventsProvider_free(this_ptr: number): void {
12750         if(!isWasmInitialized) {
12751                 throw new Error("initializeWasm() must be awaited first!");
12752         }
12753         const nativeResponseValue = wasm.TS_EventsProvider_free(this_ptr);
12754         // debug statements here
12755 }
12756         // void EventHandler_free(struct LDKEventHandler this_ptr);
12757 /* @internal */
12758 export function EventHandler_free(this_ptr: number): void {
12759         if(!isWasmInitialized) {
12760                 throw new Error("initializeWasm() must be awaited first!");
12761         }
12762         const nativeResponseValue = wasm.TS_EventHandler_free(this_ptr);
12763         // debug statements here
12764 }
12765         // void APIError_free(struct LDKAPIError this_ptr);
12766 /* @internal */
12767 export function APIError_free(this_ptr: number): void {
12768         if(!isWasmInitialized) {
12769                 throw new Error("initializeWasm() must be awaited first!");
12770         }
12771         const nativeResponseValue = wasm.TS_APIError_free(this_ptr);
12772         // debug statements here
12773 }
12774         // uintptr_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
12775 /* @internal */
12776 export function APIError_clone_ptr(arg: number): number {
12777         if(!isWasmInitialized) {
12778                 throw new Error("initializeWasm() must be awaited first!");
12779         }
12780         const nativeResponseValue = wasm.TS_APIError_clone_ptr(arg);
12781         return nativeResponseValue;
12782 }
12783         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
12784 /* @internal */
12785 export function APIError_clone(orig: number): number {
12786         if(!isWasmInitialized) {
12787                 throw new Error("initializeWasm() must be awaited first!");
12788         }
12789         const nativeResponseValue = wasm.TS_APIError_clone(orig);
12790         return nativeResponseValue;
12791 }
12792         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
12793 /* @internal */
12794 export function APIError_apimisuse_error(err: number): number {
12795         if(!isWasmInitialized) {
12796                 throw new Error("initializeWasm() must be awaited first!");
12797         }
12798         const nativeResponseValue = wasm.TS_APIError_apimisuse_error(err);
12799         return nativeResponseValue;
12800 }
12801         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
12802 /* @internal */
12803 export function APIError_fee_rate_too_high(err: number, feerate: number): number {
12804         if(!isWasmInitialized) {
12805                 throw new Error("initializeWasm() must be awaited first!");
12806         }
12807         const nativeResponseValue = wasm.TS_APIError_fee_rate_too_high(err, feerate);
12808         return nativeResponseValue;
12809 }
12810         // struct LDKAPIError APIError_route_error(struct LDKStr err);
12811 /* @internal */
12812 export function APIError_route_error(err: number): number {
12813         if(!isWasmInitialized) {
12814                 throw new Error("initializeWasm() must be awaited first!");
12815         }
12816         const nativeResponseValue = wasm.TS_APIError_route_error(err);
12817         return nativeResponseValue;
12818 }
12819         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
12820 /* @internal */
12821 export function APIError_channel_unavailable(err: number): number {
12822         if(!isWasmInitialized) {
12823                 throw new Error("initializeWasm() must be awaited first!");
12824         }
12825         const nativeResponseValue = wasm.TS_APIError_channel_unavailable(err);
12826         return nativeResponseValue;
12827 }
12828         // struct LDKAPIError APIError_monitor_update_failed(void);
12829 /* @internal */
12830 export function APIError_monitor_update_failed(): number {
12831         if(!isWasmInitialized) {
12832                 throw new Error("initializeWasm() must be awaited first!");
12833         }
12834         const nativeResponseValue = wasm.TS_APIError_monitor_update_failed();
12835         return nativeResponseValue;
12836 }
12837         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
12838 /* @internal */
12839 export function APIError_incompatible_shutdown_script(script: number): number {
12840         if(!isWasmInitialized) {
12841                 throw new Error("initializeWasm() must be awaited first!");
12842         }
12843         const nativeResponseValue = wasm.TS_APIError_incompatible_shutdown_script(script);
12844         return nativeResponseValue;
12845 }
12846         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
12847 /* @internal */
12848 export function sign(msg: number, sk: number): number {
12849         if(!isWasmInitialized) {
12850                 throw new Error("initializeWasm() must be awaited first!");
12851         }
12852         const nativeResponseValue = wasm.TS_sign(msg, sk);
12853         return nativeResponseValue;
12854 }
12855         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
12856 /* @internal */
12857 export function recover_pk(msg: number, sig: number): number {
12858         if(!isWasmInitialized) {
12859                 throw new Error("initializeWasm() must be awaited first!");
12860         }
12861         const nativeResponseValue = wasm.TS_recover_pk(msg, sig);
12862         return nativeResponseValue;
12863 }
12864         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
12865 /* @internal */
12866 export function verify(msg: number, sig: number, pk: number): boolean {
12867         if(!isWasmInitialized) {
12868                 throw new Error("initializeWasm() must be awaited first!");
12869         }
12870         const nativeResponseValue = wasm.TS_verify(msg, sig, pk);
12871         return nativeResponseValue;
12872 }
12873         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
12874 /* @internal */
12875 export function Level_clone(orig: number): Level {
12876         if(!isWasmInitialized) {
12877                 throw new Error("initializeWasm() must be awaited first!");
12878         }
12879         const nativeResponseValue = wasm.TS_Level_clone(orig);
12880         return nativeResponseValue;
12881 }
12882         // enum LDKLevel Level_gossip(void);
12883 /* @internal */
12884 export function Level_gossip(): Level {
12885         if(!isWasmInitialized) {
12886                 throw new Error("initializeWasm() must be awaited first!");
12887         }
12888         const nativeResponseValue = wasm.TS_Level_gossip();
12889         return nativeResponseValue;
12890 }
12891         // enum LDKLevel Level_trace(void);
12892 /* @internal */
12893 export function Level_trace(): Level {
12894         if(!isWasmInitialized) {
12895                 throw new Error("initializeWasm() must be awaited first!");
12896         }
12897         const nativeResponseValue = wasm.TS_Level_trace();
12898         return nativeResponseValue;
12899 }
12900         // enum LDKLevel Level_debug(void);
12901 /* @internal */
12902 export function Level_debug(): Level {
12903         if(!isWasmInitialized) {
12904                 throw new Error("initializeWasm() must be awaited first!");
12905         }
12906         const nativeResponseValue = wasm.TS_Level_debug();
12907         return nativeResponseValue;
12908 }
12909         // enum LDKLevel Level_info(void);
12910 /* @internal */
12911 export function Level_info(): Level {
12912         if(!isWasmInitialized) {
12913                 throw new Error("initializeWasm() must be awaited first!");
12914         }
12915         const nativeResponseValue = wasm.TS_Level_info();
12916         return nativeResponseValue;
12917 }
12918         // enum LDKLevel Level_warn(void);
12919 /* @internal */
12920 export function Level_warn(): Level {
12921         if(!isWasmInitialized) {
12922                 throw new Error("initializeWasm() must be awaited first!");
12923         }
12924         const nativeResponseValue = wasm.TS_Level_warn();
12925         return nativeResponseValue;
12926 }
12927         // enum LDKLevel Level_error(void);
12928 /* @internal */
12929 export function Level_error(): Level {
12930         if(!isWasmInitialized) {
12931                 throw new Error("initializeWasm() must be awaited first!");
12932         }
12933         const nativeResponseValue = wasm.TS_Level_error();
12934         return nativeResponseValue;
12935 }
12936         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
12937 /* @internal */
12938 export function Level_eq(a: number, b: number): boolean {
12939         if(!isWasmInitialized) {
12940                 throw new Error("initializeWasm() must be awaited first!");
12941         }
12942         const nativeResponseValue = wasm.TS_Level_eq(a, b);
12943         return nativeResponseValue;
12944 }
12945         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
12946 /* @internal */
12947 export function Level_hash(o: number): bigint {
12948         if(!isWasmInitialized) {
12949                 throw new Error("initializeWasm() must be awaited first!");
12950         }
12951         const nativeResponseValue = wasm.TS_Level_hash(o);
12952         return nativeResponseValue;
12953 }
12954         // MUST_USE_RES enum LDKLevel Level_max(void);
12955 /* @internal */
12956 export function Level_max(): Level {
12957         if(!isWasmInitialized) {
12958                 throw new Error("initializeWasm() must be awaited first!");
12959         }
12960         const nativeResponseValue = wasm.TS_Level_max();
12961         return nativeResponseValue;
12962 }
12963         // void Record_free(struct LDKRecord this_obj);
12964 /* @internal */
12965 export function Record_free(this_obj: number): void {
12966         if(!isWasmInitialized) {
12967                 throw new Error("initializeWasm() must be awaited first!");
12968         }
12969         const nativeResponseValue = wasm.TS_Record_free(this_obj);
12970         // debug statements here
12971 }
12972         // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
12973 /* @internal */
12974 export function Record_get_level(this_ptr: number): Level {
12975         if(!isWasmInitialized) {
12976                 throw new Error("initializeWasm() must be awaited first!");
12977         }
12978         const nativeResponseValue = wasm.TS_Record_get_level(this_ptr);
12979         return nativeResponseValue;
12980 }
12981         // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
12982 /* @internal */
12983 export function Record_set_level(this_ptr: number, val: Level): void {
12984         if(!isWasmInitialized) {
12985                 throw new Error("initializeWasm() must be awaited first!");
12986         }
12987         const nativeResponseValue = wasm.TS_Record_set_level(this_ptr, val);
12988         // debug statements here
12989 }
12990         // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
12991 /* @internal */
12992 export function Record_get_args(this_ptr: number): number {
12993         if(!isWasmInitialized) {
12994                 throw new Error("initializeWasm() must be awaited first!");
12995         }
12996         const nativeResponseValue = wasm.TS_Record_get_args(this_ptr);
12997         return nativeResponseValue;
12998 }
12999         // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
13000 /* @internal */
13001 export function Record_set_args(this_ptr: number, val: number): void {
13002         if(!isWasmInitialized) {
13003                 throw new Error("initializeWasm() must be awaited first!");
13004         }
13005         const nativeResponseValue = wasm.TS_Record_set_args(this_ptr, val);
13006         // debug statements here
13007 }
13008         // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
13009 /* @internal */
13010 export function Record_get_module_path(this_ptr: number): number {
13011         if(!isWasmInitialized) {
13012                 throw new Error("initializeWasm() must be awaited first!");
13013         }
13014         const nativeResponseValue = wasm.TS_Record_get_module_path(this_ptr);
13015         return nativeResponseValue;
13016 }
13017         // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
13018 /* @internal */
13019 export function Record_set_module_path(this_ptr: number, val: number): void {
13020         if(!isWasmInitialized) {
13021                 throw new Error("initializeWasm() must be awaited first!");
13022         }
13023         const nativeResponseValue = wasm.TS_Record_set_module_path(this_ptr, val);
13024         // debug statements here
13025 }
13026         // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
13027 /* @internal */
13028 export function Record_get_file(this_ptr: number): number {
13029         if(!isWasmInitialized) {
13030                 throw new Error("initializeWasm() must be awaited first!");
13031         }
13032         const nativeResponseValue = wasm.TS_Record_get_file(this_ptr);
13033         return nativeResponseValue;
13034 }
13035         // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
13036 /* @internal */
13037 export function Record_set_file(this_ptr: number, val: number): void {
13038         if(!isWasmInitialized) {
13039                 throw new Error("initializeWasm() must be awaited first!");
13040         }
13041         const nativeResponseValue = wasm.TS_Record_set_file(this_ptr, val);
13042         // debug statements here
13043 }
13044         // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
13045 /* @internal */
13046 export function Record_get_line(this_ptr: number): number {
13047         if(!isWasmInitialized) {
13048                 throw new Error("initializeWasm() must be awaited first!");
13049         }
13050         const nativeResponseValue = wasm.TS_Record_get_line(this_ptr);
13051         return nativeResponseValue;
13052 }
13053         // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
13054 /* @internal */
13055 export function Record_set_line(this_ptr: number, val: number): void {
13056         if(!isWasmInitialized) {
13057                 throw new Error("initializeWasm() must be awaited first!");
13058         }
13059         const nativeResponseValue = wasm.TS_Record_set_line(this_ptr, val);
13060         // debug statements here
13061 }
13062         // uintptr_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
13063 /* @internal */
13064 export function Record_clone_ptr(arg: number): number {
13065         if(!isWasmInitialized) {
13066                 throw new Error("initializeWasm() must be awaited first!");
13067         }
13068         const nativeResponseValue = wasm.TS_Record_clone_ptr(arg);
13069         return nativeResponseValue;
13070 }
13071         // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
13072 /* @internal */
13073 export function Record_clone(orig: number): number {
13074         if(!isWasmInitialized) {
13075                 throw new Error("initializeWasm() must be awaited first!");
13076         }
13077         const nativeResponseValue = wasm.TS_Record_clone(orig);
13078         return nativeResponseValue;
13079 }
13080         // void Logger_free(struct LDKLogger this_ptr);
13081 /* @internal */
13082 export function Logger_free(this_ptr: number): void {
13083         if(!isWasmInitialized) {
13084                 throw new Error("initializeWasm() must be awaited first!");
13085         }
13086         const nativeResponseValue = wasm.TS_Logger_free(this_ptr);
13087         // debug statements here
13088 }
13089         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
13090 /* @internal */
13091 export function ChannelHandshakeConfig_free(this_obj: number): void {
13092         if(!isWasmInitialized) {
13093                 throw new Error("initializeWasm() must be awaited first!");
13094         }
13095         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_free(this_obj);
13096         // debug statements here
13097 }
13098         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
13099 /* @internal */
13100 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
13101         if(!isWasmInitialized) {
13102                 throw new Error("initializeWasm() must be awaited first!");
13103         }
13104         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_minimum_depth(this_ptr);
13105         return nativeResponseValue;
13106 }
13107         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
13108 /* @internal */
13109 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
13110         if(!isWasmInitialized) {
13111                 throw new Error("initializeWasm() must be awaited first!");
13112         }
13113         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
13114         // debug statements here
13115 }
13116         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
13117 /* @internal */
13118 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
13119         if(!isWasmInitialized) {
13120                 throw new Error("initializeWasm() must be awaited first!");
13121         }
13122         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
13123         return nativeResponseValue;
13124 }
13125         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
13126 /* @internal */
13127 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
13128         if(!isWasmInitialized) {
13129                 throw new Error("initializeWasm() must be awaited first!");
13130         }
13131         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
13132         // debug statements here
13133 }
13134         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
13135 /* @internal */
13136 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): bigint {
13137         if(!isWasmInitialized) {
13138                 throw new Error("initializeWasm() must be awaited first!");
13139         }
13140         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
13141         return nativeResponseValue;
13142 }
13143         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
13144 /* @internal */
13145 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: bigint): void {
13146         if(!isWasmInitialized) {
13147                 throw new Error("initializeWasm() must be awaited first!");
13148         }
13149         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
13150         // debug statements here
13151 }
13152         // 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);
13153 /* @internal */
13154 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: bigint): number {
13155         if(!isWasmInitialized) {
13156                 throw new Error("initializeWasm() must be awaited first!");
13157         }
13158         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
13159         return nativeResponseValue;
13160 }
13161         // uintptr_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
13162 /* @internal */
13163 export function ChannelHandshakeConfig_clone_ptr(arg: number): number {
13164         if(!isWasmInitialized) {
13165                 throw new Error("initializeWasm() must be awaited first!");
13166         }
13167         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone_ptr(arg);
13168         return nativeResponseValue;
13169 }
13170         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
13171 /* @internal */
13172 export function ChannelHandshakeConfig_clone(orig: number): number {
13173         if(!isWasmInitialized) {
13174                 throw new Error("initializeWasm() must be awaited first!");
13175         }
13176         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone(orig);
13177         return nativeResponseValue;
13178 }
13179         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
13180 /* @internal */
13181 export function ChannelHandshakeConfig_default(): number {
13182         if(!isWasmInitialized) {
13183                 throw new Error("initializeWasm() must be awaited first!");
13184         }
13185         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_default();
13186         return nativeResponseValue;
13187 }
13188         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
13189 /* @internal */
13190 export function ChannelHandshakeLimits_free(this_obj: number): void {
13191         if(!isWasmInitialized) {
13192                 throw new Error("initializeWasm() must be awaited first!");
13193         }
13194         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_free(this_obj);
13195         // debug statements here
13196 }
13197         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13198 /* @internal */
13199 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): bigint {
13200         if(!isWasmInitialized) {
13201                 throw new Error("initializeWasm() must be awaited first!");
13202         }
13203         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
13204         return nativeResponseValue;
13205 }
13206         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
13207 /* @internal */
13208 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: bigint): void {
13209         if(!isWasmInitialized) {
13210                 throw new Error("initializeWasm() must be awaited first!");
13211         }
13212         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
13213         // debug statements here
13214 }
13215         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13216 /* @internal */
13217 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): bigint {
13218         if(!isWasmInitialized) {
13219                 throw new Error("initializeWasm() must be awaited first!");
13220         }
13221         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
13222         return nativeResponseValue;
13223 }
13224         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
13225 /* @internal */
13226 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: bigint): void {
13227         if(!isWasmInitialized) {
13228                 throw new Error("initializeWasm() must be awaited first!");
13229         }
13230         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
13231         // debug statements here
13232 }
13233         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13234 /* @internal */
13235 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): bigint {
13236         if(!isWasmInitialized) {
13237                 throw new Error("initializeWasm() must be awaited first!");
13238         }
13239         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
13240         return nativeResponseValue;
13241 }
13242         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
13243 /* @internal */
13244 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: bigint): void {
13245         if(!isWasmInitialized) {
13246                 throw new Error("initializeWasm() must be awaited first!");
13247         }
13248         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
13249         // debug statements here
13250 }
13251         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13252 /* @internal */
13253 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): bigint {
13254         if(!isWasmInitialized) {
13255                 throw new Error("initializeWasm() must be awaited first!");
13256         }
13257         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
13258         return nativeResponseValue;
13259 }
13260         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
13261 /* @internal */
13262 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: bigint): void {
13263         if(!isWasmInitialized) {
13264                 throw new Error("initializeWasm() must be awaited first!");
13265         }
13266         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
13267         // debug statements here
13268 }
13269         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13270 /* @internal */
13271 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
13272         if(!isWasmInitialized) {
13273                 throw new Error("initializeWasm() must be awaited first!");
13274         }
13275         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
13276         return nativeResponseValue;
13277 }
13278         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
13279 /* @internal */
13280 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
13281         if(!isWasmInitialized) {
13282                 throw new Error("initializeWasm() must be awaited first!");
13283         }
13284         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
13285         // debug statements here
13286 }
13287         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13288 /* @internal */
13289 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
13290         if(!isWasmInitialized) {
13291                 throw new Error("initializeWasm() must be awaited first!");
13292         }
13293         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
13294         return nativeResponseValue;
13295 }
13296         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
13297 /* @internal */
13298 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
13299         if(!isWasmInitialized) {
13300                 throw new Error("initializeWasm() must be awaited first!");
13301         }
13302         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
13303         // debug statements here
13304 }
13305         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13306 /* @internal */
13307 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
13308         if(!isWasmInitialized) {
13309                 throw new Error("initializeWasm() must be awaited first!");
13310         }
13311         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
13312         return nativeResponseValue;
13313 }
13314         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
13315 /* @internal */
13316 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
13317         if(!isWasmInitialized) {
13318                 throw new Error("initializeWasm() must be awaited first!");
13319         }
13320         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
13321         // debug statements here
13322 }
13323         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
13324 /* @internal */
13325 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
13326         if(!isWasmInitialized) {
13327                 throw new Error("initializeWasm() must be awaited first!");
13328         }
13329         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
13330         return nativeResponseValue;
13331 }
13332         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
13333 /* @internal */
13334 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
13335         if(!isWasmInitialized) {
13336                 throw new Error("initializeWasm() must be awaited first!");
13337         }
13338         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
13339         // debug statements here
13340 }
13341         // 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);
13342 /* @internal */
13343 export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: bigint, max_htlc_minimum_msat_arg: bigint, min_max_htlc_value_in_flight_msat_arg: bigint, max_channel_reserve_satoshis_arg: bigint, min_max_accepted_htlcs_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
13344         if(!isWasmInitialized) {
13345                 throw new Error("initializeWasm() must be awaited first!");
13346         }
13347         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);
13348         return nativeResponseValue;
13349 }
13350         // uintptr_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
13351 /* @internal */
13352 export function ChannelHandshakeLimits_clone_ptr(arg: number): number {
13353         if(!isWasmInitialized) {
13354                 throw new Error("initializeWasm() must be awaited first!");
13355         }
13356         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone_ptr(arg);
13357         return nativeResponseValue;
13358 }
13359         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
13360 /* @internal */
13361 export function ChannelHandshakeLimits_clone(orig: number): number {
13362         if(!isWasmInitialized) {
13363                 throw new Error("initializeWasm() must be awaited first!");
13364         }
13365         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone(orig);
13366         return nativeResponseValue;
13367 }
13368         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
13369 /* @internal */
13370 export function ChannelHandshakeLimits_default(): number {
13371         if(!isWasmInitialized) {
13372                 throw new Error("initializeWasm() must be awaited first!");
13373         }
13374         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_default();
13375         return nativeResponseValue;
13376 }
13377         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
13378 /* @internal */
13379 export function ChannelConfig_free(this_obj: number): void {
13380         if(!isWasmInitialized) {
13381                 throw new Error("initializeWasm() must be awaited first!");
13382         }
13383         const nativeResponseValue = wasm.TS_ChannelConfig_free(this_obj);
13384         // debug statements here
13385 }
13386         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13387 /* @internal */
13388 export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
13389         if(!isWasmInitialized) {
13390                 throw new Error("initializeWasm() must be awaited first!");
13391         }
13392         const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
13393         return nativeResponseValue;
13394 }
13395         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
13396 /* @internal */
13397 export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
13398         if(!isWasmInitialized) {
13399                 throw new Error("initializeWasm() must be awaited first!");
13400         }
13401         const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
13402         // debug statements here
13403 }
13404         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13405 /* @internal */
13406 export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
13407         if(!isWasmInitialized) {
13408                 throw new Error("initializeWasm() must be awaited first!");
13409         }
13410         const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
13411         return nativeResponseValue;
13412 }
13413         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
13414 /* @internal */
13415 export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
13416         if(!isWasmInitialized) {
13417                 throw new Error("initializeWasm() must be awaited first!");
13418         }
13419         const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
13420         // debug statements here
13421 }
13422         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13423 /* @internal */
13424 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
13425         if(!isWasmInitialized) {
13426                 throw new Error("initializeWasm() must be awaited first!");
13427         }
13428         const nativeResponseValue = wasm.TS_ChannelConfig_get_cltv_expiry_delta(this_ptr);
13429         return nativeResponseValue;
13430 }
13431         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
13432 /* @internal */
13433 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13434         if(!isWasmInitialized) {
13435                 throw new Error("initializeWasm() must be awaited first!");
13436         }
13437         const nativeResponseValue = wasm.TS_ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
13438         // debug statements here
13439 }
13440         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13441 /* @internal */
13442 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
13443         if(!isWasmInitialized) {
13444                 throw new Error("initializeWasm() must be awaited first!");
13445         }
13446         const nativeResponseValue = wasm.TS_ChannelConfig_get_announced_channel(this_ptr);
13447         return nativeResponseValue;
13448 }
13449         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
13450 /* @internal */
13451 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
13452         if(!isWasmInitialized) {
13453                 throw new Error("initializeWasm() must be awaited first!");
13454         }
13455         const nativeResponseValue = wasm.TS_ChannelConfig_set_announced_channel(this_ptr, val);
13456         // debug statements here
13457 }
13458         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13459 /* @internal */
13460 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
13461         if(!isWasmInitialized) {
13462                 throw new Error("initializeWasm() must be awaited first!");
13463         }
13464         const nativeResponseValue = wasm.TS_ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
13465         return nativeResponseValue;
13466 }
13467         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
13468 /* @internal */
13469 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
13470         if(!isWasmInitialized) {
13471                 throw new Error("initializeWasm() must be awaited first!");
13472         }
13473         const nativeResponseValue = wasm.TS_ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
13474         // debug statements here
13475 }
13476         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13477 /* @internal */
13478 export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): bigint {
13479         if(!isWasmInitialized) {
13480                 throw new Error("initializeWasm() must be awaited first!");
13481         }
13482         const nativeResponseValue = wasm.TS_ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
13483         return nativeResponseValue;
13484 }
13485         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
13486 /* @internal */
13487 export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: bigint): void {
13488         if(!isWasmInitialized) {
13489                 throw new Error("initializeWasm() must be awaited first!");
13490         }
13491         const nativeResponseValue = wasm.TS_ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
13492         // debug statements here
13493 }
13494         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
13495 /* @internal */
13496 export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): bigint {
13497         if(!isWasmInitialized) {
13498                 throw new Error("initializeWasm() must be awaited first!");
13499         }
13500         const nativeResponseValue = wasm.TS_ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
13501         return nativeResponseValue;
13502 }
13503         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
13504 /* @internal */
13505 export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: bigint): void {
13506         if(!isWasmInitialized) {
13507                 throw new Error("initializeWasm() must be awaited first!");
13508         }
13509         const nativeResponseValue = wasm.TS_ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
13510         // debug statements here
13511 }
13512         // 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);
13513 /* @internal */
13514 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: bigint, force_close_avoidance_max_fee_satoshis_arg: bigint): number {
13515         if(!isWasmInitialized) {
13516                 throw new Error("initializeWasm() must be awaited first!");
13517         }
13518         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);
13519         return nativeResponseValue;
13520 }
13521         // uintptr_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
13522 /* @internal */
13523 export function ChannelConfig_clone_ptr(arg: number): number {
13524         if(!isWasmInitialized) {
13525                 throw new Error("initializeWasm() must be awaited first!");
13526         }
13527         const nativeResponseValue = wasm.TS_ChannelConfig_clone_ptr(arg);
13528         return nativeResponseValue;
13529 }
13530         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
13531 /* @internal */
13532 export function ChannelConfig_clone(orig: number): number {
13533         if(!isWasmInitialized) {
13534                 throw new Error("initializeWasm() must be awaited first!");
13535         }
13536         const nativeResponseValue = wasm.TS_ChannelConfig_clone(orig);
13537         return nativeResponseValue;
13538 }
13539         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
13540 /* @internal */
13541 export function ChannelConfig_default(): number {
13542         if(!isWasmInitialized) {
13543                 throw new Error("initializeWasm() must be awaited first!");
13544         }
13545         const nativeResponseValue = wasm.TS_ChannelConfig_default();
13546         return nativeResponseValue;
13547 }
13548         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
13549 /* @internal */
13550 export function ChannelConfig_write(obj: number): number {
13551         if(!isWasmInitialized) {
13552                 throw new Error("initializeWasm() must be awaited first!");
13553         }
13554         const nativeResponseValue = wasm.TS_ChannelConfig_write(obj);
13555         return nativeResponseValue;
13556 }
13557         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
13558 /* @internal */
13559 export function ChannelConfig_read(ser: number): number {
13560         if(!isWasmInitialized) {
13561                 throw new Error("initializeWasm() must be awaited first!");
13562         }
13563         const nativeResponseValue = wasm.TS_ChannelConfig_read(ser);
13564         return nativeResponseValue;
13565 }
13566         // void UserConfig_free(struct LDKUserConfig this_obj);
13567 /* @internal */
13568 export function UserConfig_free(this_obj: number): void {
13569         if(!isWasmInitialized) {
13570                 throw new Error("initializeWasm() must be awaited first!");
13571         }
13572         const nativeResponseValue = wasm.TS_UserConfig_free(this_obj);
13573         // debug statements here
13574 }
13575         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
13576 /* @internal */
13577 export function UserConfig_get_own_channel_config(this_ptr: number): number {
13578         if(!isWasmInitialized) {
13579                 throw new Error("initializeWasm() must be awaited first!");
13580         }
13581         const nativeResponseValue = wasm.TS_UserConfig_get_own_channel_config(this_ptr);
13582         return nativeResponseValue;
13583 }
13584         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
13585 /* @internal */
13586 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
13587         if(!isWasmInitialized) {
13588                 throw new Error("initializeWasm() must be awaited first!");
13589         }
13590         const nativeResponseValue = wasm.TS_UserConfig_set_own_channel_config(this_ptr, val);
13591         // debug statements here
13592 }
13593         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
13594 /* @internal */
13595 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
13596         if(!isWasmInitialized) {
13597                 throw new Error("initializeWasm() must be awaited first!");
13598         }
13599         const nativeResponseValue = wasm.TS_UserConfig_get_peer_channel_config_limits(this_ptr);
13600         return nativeResponseValue;
13601 }
13602         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
13603 /* @internal */
13604 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
13605         if(!isWasmInitialized) {
13606                 throw new Error("initializeWasm() must be awaited first!");
13607         }
13608         const nativeResponseValue = wasm.TS_UserConfig_set_peer_channel_config_limits(this_ptr, val);
13609         // debug statements here
13610 }
13611         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
13612 /* @internal */
13613 export function UserConfig_get_channel_options(this_ptr: number): number {
13614         if(!isWasmInitialized) {
13615                 throw new Error("initializeWasm() must be awaited first!");
13616         }
13617         const nativeResponseValue = wasm.TS_UserConfig_get_channel_options(this_ptr);
13618         return nativeResponseValue;
13619 }
13620         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
13621 /* @internal */
13622 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
13623         if(!isWasmInitialized) {
13624                 throw new Error("initializeWasm() must be awaited first!");
13625         }
13626         const nativeResponseValue = wasm.TS_UserConfig_set_channel_options(this_ptr, val);
13627         // debug statements here
13628 }
13629         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
13630 /* @internal */
13631 export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
13632         if(!isWasmInitialized) {
13633                 throw new Error("initializeWasm() must be awaited first!");
13634         }
13635         const nativeResponseValue = wasm.TS_UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
13636         return nativeResponseValue;
13637 }
13638         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
13639 /* @internal */
13640 export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
13641         if(!isWasmInitialized) {
13642                 throw new Error("initializeWasm() must be awaited first!");
13643         }
13644         const nativeResponseValue = wasm.TS_UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
13645         // debug statements here
13646 }
13647         // bool UserConfig_get_accept_inbound_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
13648 /* @internal */
13649 export function UserConfig_get_accept_inbound_channels(this_ptr: number): boolean {
13650         if(!isWasmInitialized) {
13651                 throw new Error("initializeWasm() must be awaited first!");
13652         }
13653         const nativeResponseValue = wasm.TS_UserConfig_get_accept_inbound_channels(this_ptr);
13654         return nativeResponseValue;
13655 }
13656         // void UserConfig_set_accept_inbound_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
13657 /* @internal */
13658 export function UserConfig_set_accept_inbound_channels(this_ptr: number, val: boolean): void {
13659         if(!isWasmInitialized) {
13660                 throw new Error("initializeWasm() must be awaited first!");
13661         }
13662         const nativeResponseValue = wasm.TS_UserConfig_set_accept_inbound_channels(this_ptr, val);
13663         // debug statements here
13664 }
13665         // 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);
13666 /* @internal */
13667 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 {
13668         if(!isWasmInitialized) {
13669                 throw new Error("initializeWasm() must be awaited first!");
13670         }
13671         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);
13672         return nativeResponseValue;
13673 }
13674         // uintptr_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
13675 /* @internal */
13676 export function UserConfig_clone_ptr(arg: number): number {
13677         if(!isWasmInitialized) {
13678                 throw new Error("initializeWasm() must be awaited first!");
13679         }
13680         const nativeResponseValue = wasm.TS_UserConfig_clone_ptr(arg);
13681         return nativeResponseValue;
13682 }
13683         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
13684 /* @internal */
13685 export function UserConfig_clone(orig: number): number {
13686         if(!isWasmInitialized) {
13687                 throw new Error("initializeWasm() must be awaited first!");
13688         }
13689         const nativeResponseValue = wasm.TS_UserConfig_clone(orig);
13690         return nativeResponseValue;
13691 }
13692         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
13693 /* @internal */
13694 export function UserConfig_default(): number {
13695         if(!isWasmInitialized) {
13696                 throw new Error("initializeWasm() must be awaited first!");
13697         }
13698         const nativeResponseValue = wasm.TS_UserConfig_default();
13699         return nativeResponseValue;
13700 }
13701         // void BestBlock_free(struct LDKBestBlock this_obj);
13702 /* @internal */
13703 export function BestBlock_free(this_obj: number): void {
13704         if(!isWasmInitialized) {
13705                 throw new Error("initializeWasm() must be awaited first!");
13706         }
13707         const nativeResponseValue = wasm.TS_BestBlock_free(this_obj);
13708         // debug statements here
13709 }
13710         // uintptr_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
13711 /* @internal */
13712 export function BestBlock_clone_ptr(arg: number): number {
13713         if(!isWasmInitialized) {
13714                 throw new Error("initializeWasm() must be awaited first!");
13715         }
13716         const nativeResponseValue = wasm.TS_BestBlock_clone_ptr(arg);
13717         return nativeResponseValue;
13718 }
13719         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
13720 /* @internal */
13721 export function BestBlock_clone(orig: number): number {
13722         if(!isWasmInitialized) {
13723                 throw new Error("initializeWasm() must be awaited first!");
13724         }
13725         const nativeResponseValue = wasm.TS_BestBlock_clone(orig);
13726         return nativeResponseValue;
13727 }
13728         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
13729 /* @internal */
13730 export function BestBlock_from_genesis(network: Network): number {
13731         if(!isWasmInitialized) {
13732                 throw new Error("initializeWasm() must be awaited first!");
13733         }
13734         const nativeResponseValue = wasm.TS_BestBlock_from_genesis(network);
13735         return nativeResponseValue;
13736 }
13737         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
13738 /* @internal */
13739 export function BestBlock_new(block_hash: number, height: number): number {
13740         if(!isWasmInitialized) {
13741                 throw new Error("initializeWasm() must be awaited first!");
13742         }
13743         const nativeResponseValue = wasm.TS_BestBlock_new(block_hash, height);
13744         return nativeResponseValue;
13745 }
13746         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
13747 /* @internal */
13748 export function BestBlock_block_hash(this_arg: number): number {
13749         if(!isWasmInitialized) {
13750                 throw new Error("initializeWasm() must be awaited first!");
13751         }
13752         const nativeResponseValue = wasm.TS_BestBlock_block_hash(this_arg);
13753         return nativeResponseValue;
13754 }
13755         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
13756 /* @internal */
13757 export function BestBlock_height(this_arg: number): number {
13758         if(!isWasmInitialized) {
13759                 throw new Error("initializeWasm() must be awaited first!");
13760         }
13761         const nativeResponseValue = wasm.TS_BestBlock_height(this_arg);
13762         return nativeResponseValue;
13763 }
13764         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
13765 /* @internal */
13766 export function AccessError_clone(orig: number): AccessError {
13767         if(!isWasmInitialized) {
13768                 throw new Error("initializeWasm() must be awaited first!");
13769         }
13770         const nativeResponseValue = wasm.TS_AccessError_clone(orig);
13771         return nativeResponseValue;
13772 }
13773         // enum LDKAccessError AccessError_unknown_chain(void);
13774 /* @internal */
13775 export function AccessError_unknown_chain(): AccessError {
13776         if(!isWasmInitialized) {
13777                 throw new Error("initializeWasm() must be awaited first!");
13778         }
13779         const nativeResponseValue = wasm.TS_AccessError_unknown_chain();
13780         return nativeResponseValue;
13781 }
13782         // enum LDKAccessError AccessError_unknown_tx(void);
13783 /* @internal */
13784 export function AccessError_unknown_tx(): AccessError {
13785         if(!isWasmInitialized) {
13786                 throw new Error("initializeWasm() must be awaited first!");
13787         }
13788         const nativeResponseValue = wasm.TS_AccessError_unknown_tx();
13789         return nativeResponseValue;
13790 }
13791         // void Access_free(struct LDKAccess this_ptr);
13792 /* @internal */
13793 export function Access_free(this_ptr: number): void {
13794         if(!isWasmInitialized) {
13795                 throw new Error("initializeWasm() must be awaited first!");
13796         }
13797         const nativeResponseValue = wasm.TS_Access_free(this_ptr);
13798         // debug statements here
13799 }
13800         // void Listen_free(struct LDKListen this_ptr);
13801 /* @internal */
13802 export function Listen_free(this_ptr: number): void {
13803         if(!isWasmInitialized) {
13804                 throw new Error("initializeWasm() must be awaited first!");
13805         }
13806         const nativeResponseValue = wasm.TS_Listen_free(this_ptr);
13807         // debug statements here
13808 }
13809         // void Confirm_free(struct LDKConfirm this_ptr);
13810 /* @internal */
13811 export function Confirm_free(this_ptr: number): void {
13812         if(!isWasmInitialized) {
13813                 throw new Error("initializeWasm() must be awaited first!");
13814         }
13815         const nativeResponseValue = wasm.TS_Confirm_free(this_ptr);
13816         // debug statements here
13817 }
13818         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
13819 /* @internal */
13820 export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
13821         if(!isWasmInitialized) {
13822                 throw new Error("initializeWasm() must be awaited first!");
13823         }
13824         const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_clone(orig);
13825         return nativeResponseValue;
13826 }
13827         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
13828 /* @internal */
13829 export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
13830         if(!isWasmInitialized) {
13831                 throw new Error("initializeWasm() must be awaited first!");
13832         }
13833         const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_temporary_failure();
13834         return nativeResponseValue;
13835 }
13836         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
13837 /* @internal */
13838 export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
13839         if(!isWasmInitialized) {
13840                 throw new Error("initializeWasm() must be awaited first!");
13841         }
13842         const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_permanent_failure();
13843         return nativeResponseValue;
13844 }
13845         // void Watch_free(struct LDKWatch this_ptr);
13846 /* @internal */
13847 export function Watch_free(this_ptr: number): void {
13848         if(!isWasmInitialized) {
13849                 throw new Error("initializeWasm() must be awaited first!");
13850         }
13851         const nativeResponseValue = wasm.TS_Watch_free(this_ptr);
13852         // debug statements here
13853 }
13854         // void Filter_free(struct LDKFilter this_ptr);
13855 /* @internal */
13856 export function Filter_free(this_ptr: number): void {
13857         if(!isWasmInitialized) {
13858                 throw new Error("initializeWasm() must be awaited first!");
13859         }
13860         const nativeResponseValue = wasm.TS_Filter_free(this_ptr);
13861         // debug statements here
13862 }
13863         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
13864 /* @internal */
13865 export function WatchedOutput_free(this_obj: number): void {
13866         if(!isWasmInitialized) {
13867                 throw new Error("initializeWasm() must be awaited first!");
13868         }
13869         const nativeResponseValue = wasm.TS_WatchedOutput_free(this_obj);
13870         // debug statements here
13871 }
13872         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
13873 /* @internal */
13874 export function WatchedOutput_get_block_hash(this_ptr: number): number {
13875         if(!isWasmInitialized) {
13876                 throw new Error("initializeWasm() must be awaited first!");
13877         }
13878         const nativeResponseValue = wasm.TS_WatchedOutput_get_block_hash(this_ptr);
13879         return nativeResponseValue;
13880 }
13881         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13882 /* @internal */
13883 export function WatchedOutput_set_block_hash(this_ptr: number, val: number): void {
13884         if(!isWasmInitialized) {
13885                 throw new Error("initializeWasm() must be awaited first!");
13886         }
13887         const nativeResponseValue = wasm.TS_WatchedOutput_set_block_hash(this_ptr, val);
13888         // debug statements here
13889 }
13890         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
13891 /* @internal */
13892 export function WatchedOutput_get_outpoint(this_ptr: number): number {
13893         if(!isWasmInitialized) {
13894                 throw new Error("initializeWasm() must be awaited first!");
13895         }
13896         const nativeResponseValue = wasm.TS_WatchedOutput_get_outpoint(this_ptr);
13897         return nativeResponseValue;
13898 }
13899         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13900 /* @internal */
13901 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
13902         if(!isWasmInitialized) {
13903                 throw new Error("initializeWasm() must be awaited first!");
13904         }
13905         const nativeResponseValue = wasm.TS_WatchedOutput_set_outpoint(this_ptr, val);
13906         // debug statements here
13907 }
13908         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
13909 /* @internal */
13910 export function WatchedOutput_get_script_pubkey(this_ptr: number): number {
13911         if(!isWasmInitialized) {
13912                 throw new Error("initializeWasm() must be awaited first!");
13913         }
13914         const nativeResponseValue = wasm.TS_WatchedOutput_get_script_pubkey(this_ptr);
13915         return nativeResponseValue;
13916 }
13917         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
13918 /* @internal */
13919 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: number): void {
13920         if(!isWasmInitialized) {
13921                 throw new Error("initializeWasm() must be awaited first!");
13922         }
13923         const nativeResponseValue = wasm.TS_WatchedOutput_set_script_pubkey(this_ptr, val);
13924         // debug statements here
13925 }
13926         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
13927 /* @internal */
13928 export function WatchedOutput_new(block_hash_arg: number, outpoint_arg: number, script_pubkey_arg: number): number {
13929         if(!isWasmInitialized) {
13930                 throw new Error("initializeWasm() must be awaited first!");
13931         }
13932         const nativeResponseValue = wasm.TS_WatchedOutput_new(block_hash_arg, outpoint_arg, script_pubkey_arg);
13933         return nativeResponseValue;
13934 }
13935         // uintptr_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
13936 /* @internal */
13937 export function WatchedOutput_clone_ptr(arg: number): number {
13938         if(!isWasmInitialized) {
13939                 throw new Error("initializeWasm() must be awaited first!");
13940         }
13941         const nativeResponseValue = wasm.TS_WatchedOutput_clone_ptr(arg);
13942         return nativeResponseValue;
13943 }
13944         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
13945 /* @internal */
13946 export function WatchedOutput_clone(orig: number): number {
13947         if(!isWasmInitialized) {
13948                 throw new Error("initializeWasm() must be awaited first!");
13949         }
13950         const nativeResponseValue = wasm.TS_WatchedOutput_clone(orig);
13951         return nativeResponseValue;
13952 }
13953         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
13954 /* @internal */
13955 export function WatchedOutput_hash(o: number): bigint {
13956         if(!isWasmInitialized) {
13957                 throw new Error("initializeWasm() must be awaited first!");
13958         }
13959         const nativeResponseValue = wasm.TS_WatchedOutput_hash(o);
13960         return nativeResponseValue;
13961 }
13962         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
13963 /* @internal */
13964 export function BroadcasterInterface_free(this_ptr: number): void {
13965         if(!isWasmInitialized) {
13966                 throw new Error("initializeWasm() must be awaited first!");
13967         }
13968         const nativeResponseValue = wasm.TS_BroadcasterInterface_free(this_ptr);
13969         // debug statements here
13970 }
13971         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
13972 /* @internal */
13973 export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
13974         if(!isWasmInitialized) {
13975                 throw new Error("initializeWasm() must be awaited first!");
13976         }
13977         const nativeResponseValue = wasm.TS_ConfirmationTarget_clone(orig);
13978         return nativeResponseValue;
13979 }
13980         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
13981 /* @internal */
13982 export function ConfirmationTarget_background(): ConfirmationTarget {
13983         if(!isWasmInitialized) {
13984                 throw new Error("initializeWasm() must be awaited first!");
13985         }
13986         const nativeResponseValue = wasm.TS_ConfirmationTarget_background();
13987         return nativeResponseValue;
13988 }
13989         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
13990 /* @internal */
13991 export function ConfirmationTarget_normal(): ConfirmationTarget {
13992         if(!isWasmInitialized) {
13993                 throw new Error("initializeWasm() must be awaited first!");
13994         }
13995         const nativeResponseValue = wasm.TS_ConfirmationTarget_normal();
13996         return nativeResponseValue;
13997 }
13998         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
13999 /* @internal */
14000 export function ConfirmationTarget_high_priority(): ConfirmationTarget {
14001         if(!isWasmInitialized) {
14002                 throw new Error("initializeWasm() must be awaited first!");
14003         }
14004         const nativeResponseValue = wasm.TS_ConfirmationTarget_high_priority();
14005         return nativeResponseValue;
14006 }
14007         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
14008 /* @internal */
14009 export function ConfirmationTarget_eq(a: number, b: number): boolean {
14010         if(!isWasmInitialized) {
14011                 throw new Error("initializeWasm() must be awaited first!");
14012         }
14013         const nativeResponseValue = wasm.TS_ConfirmationTarget_eq(a, b);
14014         return nativeResponseValue;
14015 }
14016         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
14017 /* @internal */
14018 export function FeeEstimator_free(this_ptr: number): void {
14019         if(!isWasmInitialized) {
14020                 throw new Error("initializeWasm() must be awaited first!");
14021         }
14022         const nativeResponseValue = wasm.TS_FeeEstimator_free(this_ptr);
14023         // debug statements here
14024 }
14025         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
14026 /* @internal */
14027 export function MonitorUpdateId_free(this_obj: number): void {
14028         if(!isWasmInitialized) {
14029                 throw new Error("initializeWasm() must be awaited first!");
14030         }
14031         const nativeResponseValue = wasm.TS_MonitorUpdateId_free(this_obj);
14032         // debug statements here
14033 }
14034         // uintptr_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
14035 /* @internal */
14036 export function MonitorUpdateId_clone_ptr(arg: number): number {
14037         if(!isWasmInitialized) {
14038                 throw new Error("initializeWasm() must be awaited first!");
14039         }
14040         const nativeResponseValue = wasm.TS_MonitorUpdateId_clone_ptr(arg);
14041         return nativeResponseValue;
14042 }
14043         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
14044 /* @internal */
14045 export function MonitorUpdateId_clone(orig: number): number {
14046         if(!isWasmInitialized) {
14047                 throw new Error("initializeWasm() must be awaited first!");
14048         }
14049         const nativeResponseValue = wasm.TS_MonitorUpdateId_clone(orig);
14050         return nativeResponseValue;
14051 }
14052         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
14053 /* @internal */
14054 export function MonitorUpdateId_hash(o: number): bigint {
14055         if(!isWasmInitialized) {
14056                 throw new Error("initializeWasm() must be awaited first!");
14057         }
14058         const nativeResponseValue = wasm.TS_MonitorUpdateId_hash(o);
14059         return nativeResponseValue;
14060 }
14061         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
14062 /* @internal */
14063 export function MonitorUpdateId_eq(a: number, b: number): boolean {
14064         if(!isWasmInitialized) {
14065                 throw new Error("initializeWasm() must be awaited first!");
14066         }
14067         const nativeResponseValue = wasm.TS_MonitorUpdateId_eq(a, b);
14068         return nativeResponseValue;
14069 }
14070         // void Persist_free(struct LDKPersist this_ptr);
14071 /* @internal */
14072 export function Persist_free(this_ptr: number): void {
14073         if(!isWasmInitialized) {
14074                 throw new Error("initializeWasm() must be awaited first!");
14075         }
14076         const nativeResponseValue = wasm.TS_Persist_free(this_ptr);
14077         // debug statements here
14078 }
14079         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
14080 /* @internal */
14081 export function LockedChannelMonitor_free(this_obj: number): void {
14082         if(!isWasmInitialized) {
14083                 throw new Error("initializeWasm() must be awaited first!");
14084         }
14085         const nativeResponseValue = wasm.TS_LockedChannelMonitor_free(this_obj);
14086         // debug statements here
14087 }
14088         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
14089 /* @internal */
14090 export function ChainMonitor_free(this_obj: number): void {
14091         if(!isWasmInitialized) {
14092                 throw new Error("initializeWasm() must be awaited first!");
14093         }
14094         const nativeResponseValue = wasm.TS_ChainMonitor_free(this_obj);
14095         // debug statements here
14096 }
14097         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
14098 /* @internal */
14099 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
14100         if(!isWasmInitialized) {
14101                 throw new Error("initializeWasm() must be awaited first!");
14102         }
14103         const nativeResponseValue = wasm.TS_ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
14104         return nativeResponseValue;
14105 }
14106         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
14107 /* @internal */
14108 export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number): number {
14109         if(!isWasmInitialized) {
14110                 throw new Error("initializeWasm() must be awaited first!");
14111         }
14112         const nativeResponseValue = wasm.TS_ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
14113         return nativeResponseValue;
14114 }
14115         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
14116 /* @internal */
14117 export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
14118         if(!isWasmInitialized) {
14119                 throw new Error("initializeWasm() must be awaited first!");
14120         }
14121         const nativeResponseValue = wasm.TS_ChainMonitor_get_monitor(this_arg, funding_txo);
14122         return nativeResponseValue;
14123 }
14124         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
14125 /* @internal */
14126 export function ChainMonitor_list_monitors(this_arg: number): number {
14127         if(!isWasmInitialized) {
14128                 throw new Error("initializeWasm() must be awaited first!");
14129         }
14130         const nativeResponseValue = wasm.TS_ChainMonitor_list_monitors(this_arg);
14131         return nativeResponseValue;
14132 }
14133         // 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);
14134 /* @internal */
14135 export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
14136         if(!isWasmInitialized) {
14137                 throw new Error("initializeWasm() must be awaited first!");
14138         }
14139         const nativeResponseValue = wasm.TS_ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
14140         return nativeResponseValue;
14141 }
14142         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
14143 /* @internal */
14144 export function ChainMonitor_as_Listen(this_arg: number): number {
14145         if(!isWasmInitialized) {
14146                 throw new Error("initializeWasm() must be awaited first!");
14147         }
14148         const nativeResponseValue = wasm.TS_ChainMonitor_as_Listen(this_arg);
14149         return nativeResponseValue;
14150 }
14151         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
14152 /* @internal */
14153 export function ChainMonitor_as_Confirm(this_arg: number): number {
14154         if(!isWasmInitialized) {
14155                 throw new Error("initializeWasm() must be awaited first!");
14156         }
14157         const nativeResponseValue = wasm.TS_ChainMonitor_as_Confirm(this_arg);
14158         return nativeResponseValue;
14159 }
14160         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
14161 /* @internal */
14162 export function ChainMonitor_as_Watch(this_arg: number): number {
14163         if(!isWasmInitialized) {
14164                 throw new Error("initializeWasm() must be awaited first!");
14165         }
14166         const nativeResponseValue = wasm.TS_ChainMonitor_as_Watch(this_arg);
14167         return nativeResponseValue;
14168 }
14169         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
14170 /* @internal */
14171 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
14172         if(!isWasmInitialized) {
14173                 throw new Error("initializeWasm() must be awaited first!");
14174         }
14175         const nativeResponseValue = wasm.TS_ChainMonitor_as_EventsProvider(this_arg);
14176         return nativeResponseValue;
14177 }
14178         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
14179 /* @internal */
14180 export function ChannelMonitorUpdate_free(this_obj: number): void {
14181         if(!isWasmInitialized) {
14182                 throw new Error("initializeWasm() must be awaited first!");
14183         }
14184         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_free(this_obj);
14185         // debug statements here
14186 }
14187         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
14188 /* @internal */
14189 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): bigint {
14190         if(!isWasmInitialized) {
14191                 throw new Error("initializeWasm() must be awaited first!");
14192         }
14193         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_get_update_id(this_ptr);
14194         return nativeResponseValue;
14195 }
14196         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
14197 /* @internal */
14198 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: bigint): void {
14199         if(!isWasmInitialized) {
14200                 throw new Error("initializeWasm() must be awaited first!");
14201         }
14202         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_set_update_id(this_ptr, val);
14203         // debug statements here
14204 }
14205         // uintptr_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
14206 /* @internal */
14207 export function ChannelMonitorUpdate_clone_ptr(arg: number): number {
14208         if(!isWasmInitialized) {
14209                 throw new Error("initializeWasm() must be awaited first!");
14210         }
14211         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone_ptr(arg);
14212         return nativeResponseValue;
14213 }
14214         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
14215 /* @internal */
14216 export function ChannelMonitorUpdate_clone(orig: number): number {
14217         if(!isWasmInitialized) {
14218                 throw new Error("initializeWasm() must be awaited first!");
14219         }
14220         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone(orig);
14221         return nativeResponseValue;
14222 }
14223         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
14224 /* @internal */
14225 export function ChannelMonitorUpdate_write(obj: number): number {
14226         if(!isWasmInitialized) {
14227                 throw new Error("initializeWasm() must be awaited first!");
14228         }
14229         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_write(obj);
14230         return nativeResponseValue;
14231 }
14232         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
14233 /* @internal */
14234 export function ChannelMonitorUpdate_read(ser: number): number {
14235         if(!isWasmInitialized) {
14236                 throw new Error("initializeWasm() must be awaited first!");
14237         }
14238         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_read(ser);
14239         return nativeResponseValue;
14240 }
14241         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
14242 /* @internal */
14243 export function MonitorEvent_free(this_ptr: number): void {
14244         if(!isWasmInitialized) {
14245                 throw new Error("initializeWasm() must be awaited first!");
14246         }
14247         const nativeResponseValue = wasm.TS_MonitorEvent_free(this_ptr);
14248         // debug statements here
14249 }
14250         // uintptr_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
14251 /* @internal */
14252 export function MonitorEvent_clone_ptr(arg: number): number {
14253         if(!isWasmInitialized) {
14254                 throw new Error("initializeWasm() must be awaited first!");
14255         }
14256         const nativeResponseValue = wasm.TS_MonitorEvent_clone_ptr(arg);
14257         return nativeResponseValue;
14258 }
14259         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
14260 /* @internal */
14261 export function MonitorEvent_clone(orig: number): number {
14262         if(!isWasmInitialized) {
14263                 throw new Error("initializeWasm() must be awaited first!");
14264         }
14265         const nativeResponseValue = wasm.TS_MonitorEvent_clone(orig);
14266         return nativeResponseValue;
14267 }
14268         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
14269 /* @internal */
14270 export function MonitorEvent_htlcevent(a: number): number {
14271         if(!isWasmInitialized) {
14272                 throw new Error("initializeWasm() must be awaited first!");
14273         }
14274         const nativeResponseValue = wasm.TS_MonitorEvent_htlcevent(a);
14275         return nativeResponseValue;
14276 }
14277         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
14278 /* @internal */
14279 export function MonitorEvent_commitment_tx_confirmed(a: number): number {
14280         if(!isWasmInitialized) {
14281                 throw new Error("initializeWasm() must be awaited first!");
14282         }
14283         const nativeResponseValue = wasm.TS_MonitorEvent_commitment_tx_confirmed(a);
14284         return nativeResponseValue;
14285 }
14286         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
14287 /* @internal */
14288 export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: bigint): number {
14289         if(!isWasmInitialized) {
14290                 throw new Error("initializeWasm() must be awaited first!");
14291         }
14292         const nativeResponseValue = wasm.TS_MonitorEvent_update_completed(funding_txo, monitor_update_id);
14293         return nativeResponseValue;
14294 }
14295         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
14296 /* @internal */
14297 export function MonitorEvent_update_failed(a: number): number {
14298         if(!isWasmInitialized) {
14299                 throw new Error("initializeWasm() must be awaited first!");
14300         }
14301         const nativeResponseValue = wasm.TS_MonitorEvent_update_failed(a);
14302         return nativeResponseValue;
14303 }
14304         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
14305 /* @internal */
14306 export function MonitorEvent_write(obj: number): number {
14307         if(!isWasmInitialized) {
14308                 throw new Error("initializeWasm() must be awaited first!");
14309         }
14310         const nativeResponseValue = wasm.TS_MonitorEvent_write(obj);
14311         return nativeResponseValue;
14312 }
14313         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
14314 /* @internal */
14315 export function MonitorEvent_read(ser: number): number {
14316         if(!isWasmInitialized) {
14317                 throw new Error("initializeWasm() must be awaited first!");
14318         }
14319         const nativeResponseValue = wasm.TS_MonitorEvent_read(ser);
14320         return nativeResponseValue;
14321 }
14322         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
14323 /* @internal */
14324 export function HTLCUpdate_free(this_obj: number): void {
14325         if(!isWasmInitialized) {
14326                 throw new Error("initializeWasm() must be awaited first!");
14327         }
14328         const nativeResponseValue = wasm.TS_HTLCUpdate_free(this_obj);
14329         // debug statements here
14330 }
14331         // uintptr_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
14332 /* @internal */
14333 export function HTLCUpdate_clone_ptr(arg: number): number {
14334         if(!isWasmInitialized) {
14335                 throw new Error("initializeWasm() must be awaited first!");
14336         }
14337         const nativeResponseValue = wasm.TS_HTLCUpdate_clone_ptr(arg);
14338         return nativeResponseValue;
14339 }
14340         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
14341 /* @internal */
14342 export function HTLCUpdate_clone(orig: number): number {
14343         if(!isWasmInitialized) {
14344                 throw new Error("initializeWasm() must be awaited first!");
14345         }
14346         const nativeResponseValue = wasm.TS_HTLCUpdate_clone(orig);
14347         return nativeResponseValue;
14348 }
14349         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
14350 /* @internal */
14351 export function HTLCUpdate_write(obj: number): number {
14352         if(!isWasmInitialized) {
14353                 throw new Error("initializeWasm() must be awaited first!");
14354         }
14355         const nativeResponseValue = wasm.TS_HTLCUpdate_write(obj);
14356         return nativeResponseValue;
14357 }
14358         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
14359 /* @internal */
14360 export function HTLCUpdate_read(ser: number): number {
14361         if(!isWasmInitialized) {
14362                 throw new Error("initializeWasm() must be awaited first!");
14363         }
14364         const nativeResponseValue = wasm.TS_HTLCUpdate_read(ser);
14365         return nativeResponseValue;
14366 }
14367         // void Balance_free(struct LDKBalance this_ptr);
14368 /* @internal */
14369 export function Balance_free(this_ptr: number): void {
14370         if(!isWasmInitialized) {
14371                 throw new Error("initializeWasm() must be awaited first!");
14372         }
14373         const nativeResponseValue = wasm.TS_Balance_free(this_ptr);
14374         // debug statements here
14375 }
14376         // uintptr_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
14377 /* @internal */
14378 export function Balance_clone_ptr(arg: number): number {
14379         if(!isWasmInitialized) {
14380                 throw new Error("initializeWasm() must be awaited first!");
14381         }
14382         const nativeResponseValue = wasm.TS_Balance_clone_ptr(arg);
14383         return nativeResponseValue;
14384 }
14385         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
14386 /* @internal */
14387 export function Balance_clone(orig: number): number {
14388         if(!isWasmInitialized) {
14389                 throw new Error("initializeWasm() must be awaited first!");
14390         }
14391         const nativeResponseValue = wasm.TS_Balance_clone(orig);
14392         return nativeResponseValue;
14393 }
14394         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
14395 /* @internal */
14396 export function Balance_claimable_on_channel_close(claimable_amount_satoshis: bigint): number {
14397         if(!isWasmInitialized) {
14398                 throw new Error("initializeWasm() must be awaited first!");
14399         }
14400         const nativeResponseValue = wasm.TS_Balance_claimable_on_channel_close(claimable_amount_satoshis);
14401         return nativeResponseValue;
14402 }
14403         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
14404 /* @internal */
14405 export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: bigint, confirmation_height: number): number {
14406         if(!isWasmInitialized) {
14407                 throw new Error("initializeWasm() must be awaited first!");
14408         }
14409         const nativeResponseValue = wasm.TS_Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
14410         return nativeResponseValue;
14411 }
14412         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
14413 /* @internal */
14414 export function Balance_contentious_claimable(claimable_amount_satoshis: bigint, timeout_height: number): number {
14415         if(!isWasmInitialized) {
14416                 throw new Error("initializeWasm() must be awaited first!");
14417         }
14418         const nativeResponseValue = wasm.TS_Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
14419         return nativeResponseValue;
14420 }
14421         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
14422 /* @internal */
14423 export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: bigint, claimable_height: number): number {
14424         if(!isWasmInitialized) {
14425                 throw new Error("initializeWasm() must be awaited first!");
14426         }
14427         const nativeResponseValue = wasm.TS_Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
14428         return nativeResponseValue;
14429 }
14430         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
14431 /* @internal */
14432 export function Balance_eq(a: number, b: number): boolean {
14433         if(!isWasmInitialized) {
14434                 throw new Error("initializeWasm() must be awaited first!");
14435         }
14436         const nativeResponseValue = wasm.TS_Balance_eq(a, b);
14437         return nativeResponseValue;
14438 }
14439         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
14440 /* @internal */
14441 export function ChannelMonitor_free(this_obj: number): void {
14442         if(!isWasmInitialized) {
14443                 throw new Error("initializeWasm() must be awaited first!");
14444         }
14445         const nativeResponseValue = wasm.TS_ChannelMonitor_free(this_obj);
14446         // debug statements here
14447 }
14448         // uintptr_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
14449 /* @internal */
14450 export function ChannelMonitor_clone_ptr(arg: number): number {
14451         if(!isWasmInitialized) {
14452                 throw new Error("initializeWasm() must be awaited first!");
14453         }
14454         const nativeResponseValue = wasm.TS_ChannelMonitor_clone_ptr(arg);
14455         return nativeResponseValue;
14456 }
14457         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
14458 /* @internal */
14459 export function ChannelMonitor_clone(orig: number): number {
14460         if(!isWasmInitialized) {
14461                 throw new Error("initializeWasm() must be awaited first!");
14462         }
14463         const nativeResponseValue = wasm.TS_ChannelMonitor_clone(orig);
14464         return nativeResponseValue;
14465 }
14466         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
14467 /* @internal */
14468 export function ChannelMonitor_write(obj: number): number {
14469         if(!isWasmInitialized) {
14470                 throw new Error("initializeWasm() must be awaited first!");
14471         }
14472         const nativeResponseValue = wasm.TS_ChannelMonitor_write(obj);
14473         return nativeResponseValue;
14474 }
14475         // 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);
14476 /* @internal */
14477 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
14478         if(!isWasmInitialized) {
14479                 throw new Error("initializeWasm() must be awaited first!");
14480         }
14481         const nativeResponseValue = wasm.TS_ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
14482         return nativeResponseValue;
14483 }
14484         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14485 /* @internal */
14486 export function ChannelMonitor_get_latest_update_id(this_arg: number): bigint {
14487         if(!isWasmInitialized) {
14488                 throw new Error("initializeWasm() must be awaited first!");
14489         }
14490         const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_update_id(this_arg);
14491         return nativeResponseValue;
14492 }
14493         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14494 /* @internal */
14495 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
14496         if(!isWasmInitialized) {
14497                 throw new Error("initializeWasm() must be awaited first!");
14498         }
14499         const nativeResponseValue = wasm.TS_ChannelMonitor_get_funding_txo(this_arg);
14500         return nativeResponseValue;
14501 }
14502         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14503 /* @internal */
14504 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number {
14505         if(!isWasmInitialized) {
14506                 throw new Error("initializeWasm() must be awaited first!");
14507         }
14508         const nativeResponseValue = wasm.TS_ChannelMonitor_get_outputs_to_watch(this_arg);
14509         return nativeResponseValue;
14510 }
14511         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
14512 /* @internal */
14513 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
14514         if(!isWasmInitialized) {
14515                 throw new Error("initializeWasm() must be awaited first!");
14516         }
14517         const nativeResponseValue = wasm.TS_ChannelMonitor_load_outputs_to_watch(this_arg, filter);
14518         // debug statements here
14519 }
14520         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14521 /* @internal */
14522 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number {
14523         if(!isWasmInitialized) {
14524                 throw new Error("initializeWasm() must be awaited first!");
14525         }
14526         const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
14527         return nativeResponseValue;
14528 }
14529         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14530 /* @internal */
14531 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number {
14532         if(!isWasmInitialized) {
14533                 throw new Error("initializeWasm() must be awaited first!");
14534         }
14535         const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_events(this_arg);
14536         return nativeResponseValue;
14537 }
14538         // 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);
14539 /* @internal */
14540 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): number {
14541         if(!isWasmInitialized) {
14542                 throw new Error("initializeWasm() must be awaited first!");
14543         }
14544         const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
14545         return nativeResponseValue;
14546 }
14547         // 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);
14548 /* @internal */
14549 export function ChannelMonitor_block_connected(this_arg: number, header: number, txdata: number, height: number, broadcaster: number, fee_estimator: number, logger: number): number {
14550         if(!isWasmInitialized) {
14551                 throw new Error("initializeWasm() must be awaited first!");
14552         }
14553         const nativeResponseValue = wasm.TS_ChannelMonitor_block_connected(this_arg, header, txdata, height, broadcaster, fee_estimator, logger);
14554         return nativeResponseValue;
14555 }
14556         // 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);
14557 /* @internal */
14558 export function ChannelMonitor_block_disconnected(this_arg: number, header: number, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
14559         if(!isWasmInitialized) {
14560                 throw new Error("initializeWasm() must be awaited first!");
14561         }
14562         const nativeResponseValue = wasm.TS_ChannelMonitor_block_disconnected(this_arg, header, height, broadcaster, fee_estimator, logger);
14563         // debug statements here
14564 }
14565         // 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);
14566 /* @internal */
14567 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: number, txdata: number, height: number, broadcaster: number, fee_estimator: number, logger: number): number {
14568         if(!isWasmInitialized) {
14569                 throw new Error("initializeWasm() must be awaited first!");
14570         }
14571         const nativeResponseValue = wasm.TS_ChannelMonitor_transactions_confirmed(this_arg, header, txdata, height, broadcaster, fee_estimator, logger);
14572         return nativeResponseValue;
14573 }
14574         // 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);
14575 /* @internal */
14576 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: number, broadcaster: number, fee_estimator: number, logger: number): void {
14577         if(!isWasmInitialized) {
14578                 throw new Error("initializeWasm() must be awaited first!");
14579         }
14580         const nativeResponseValue = wasm.TS_ChannelMonitor_transaction_unconfirmed(this_arg, txid, broadcaster, fee_estimator, logger);
14581         // debug statements here
14582 }
14583         // 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);
14584 /* @internal */
14585 export function ChannelMonitor_best_block_updated(this_arg: number, header: number, height: number, broadcaster: number, fee_estimator: number, logger: number): number {
14586         if(!isWasmInitialized) {
14587                 throw new Error("initializeWasm() must be awaited first!");
14588         }
14589         const nativeResponseValue = wasm.TS_ChannelMonitor_best_block_updated(this_arg, header, height, broadcaster, fee_estimator, logger);
14590         return nativeResponseValue;
14591 }
14592         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14593 /* @internal */
14594 export function ChannelMonitor_get_relevant_txids(this_arg: number): number {
14595         if(!isWasmInitialized) {
14596                 throw new Error("initializeWasm() must be awaited first!");
14597         }
14598         const nativeResponseValue = wasm.TS_ChannelMonitor_get_relevant_txids(this_arg);
14599         return nativeResponseValue;
14600 }
14601         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14602 /* @internal */
14603 export function ChannelMonitor_current_best_block(this_arg: number): number {
14604         if(!isWasmInitialized) {
14605                 throw new Error("initializeWasm() must be awaited first!");
14606         }
14607         const nativeResponseValue = wasm.TS_ChannelMonitor_current_best_block(this_arg);
14608         return nativeResponseValue;
14609 }
14610         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
14611 /* @internal */
14612 export function ChannelMonitor_get_claimable_balances(this_arg: number): number {
14613         if(!isWasmInitialized) {
14614                 throw new Error("initializeWasm() must be awaited first!");
14615         }
14616         const nativeResponseValue = wasm.TS_ChannelMonitor_get_claimable_balances(this_arg);
14617         return nativeResponseValue;
14618 }
14619         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
14620 /* @internal */
14621 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: number, arg: number): number {
14622         if(!isWasmInitialized) {
14623                 throw new Error("initializeWasm() must be awaited first!");
14624         }
14625         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_read(ser, arg);
14626         return nativeResponseValue;
14627 }
14628         // void OutPoint_free(struct LDKOutPoint this_obj);
14629 /* @internal */
14630 export function OutPoint_free(this_obj: number): void {
14631         if(!isWasmInitialized) {
14632                 throw new Error("initializeWasm() must be awaited first!");
14633         }
14634         const nativeResponseValue = wasm.TS_OutPoint_free(this_obj);
14635         // debug statements here
14636 }
14637         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
14638 /* @internal */
14639 export function OutPoint_get_txid(this_ptr: number): number {
14640         if(!isWasmInitialized) {
14641                 throw new Error("initializeWasm() must be awaited first!");
14642         }
14643         const nativeResponseValue = wasm.TS_OutPoint_get_txid(this_ptr);
14644         return nativeResponseValue;
14645 }
14646         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14647 /* @internal */
14648 export function OutPoint_set_txid(this_ptr: number, val: number): void {
14649         if(!isWasmInitialized) {
14650                 throw new Error("initializeWasm() must be awaited first!");
14651         }
14652         const nativeResponseValue = wasm.TS_OutPoint_set_txid(this_ptr, val);
14653         // debug statements here
14654 }
14655         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
14656 /* @internal */
14657 export function OutPoint_get_index(this_ptr: number): number {
14658         if(!isWasmInitialized) {
14659                 throw new Error("initializeWasm() must be awaited first!");
14660         }
14661         const nativeResponseValue = wasm.TS_OutPoint_get_index(this_ptr);
14662         return nativeResponseValue;
14663 }
14664         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
14665 /* @internal */
14666 export function OutPoint_set_index(this_ptr: number, val: number): void {
14667         if(!isWasmInitialized) {
14668                 throw new Error("initializeWasm() must be awaited first!");
14669         }
14670         const nativeResponseValue = wasm.TS_OutPoint_set_index(this_ptr, val);
14671         // debug statements here
14672 }
14673         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
14674 /* @internal */
14675 export function OutPoint_new(txid_arg: number, index_arg: number): number {
14676         if(!isWasmInitialized) {
14677                 throw new Error("initializeWasm() must be awaited first!");
14678         }
14679         const nativeResponseValue = wasm.TS_OutPoint_new(txid_arg, index_arg);
14680         return nativeResponseValue;
14681 }
14682         // uintptr_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
14683 /* @internal */
14684 export function OutPoint_clone_ptr(arg: number): number {
14685         if(!isWasmInitialized) {
14686                 throw new Error("initializeWasm() must be awaited first!");
14687         }
14688         const nativeResponseValue = wasm.TS_OutPoint_clone_ptr(arg);
14689         return nativeResponseValue;
14690 }
14691         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
14692 /* @internal */
14693 export function OutPoint_clone(orig: number): number {
14694         if(!isWasmInitialized) {
14695                 throw new Error("initializeWasm() must be awaited first!");
14696         }
14697         const nativeResponseValue = wasm.TS_OutPoint_clone(orig);
14698         return nativeResponseValue;
14699 }
14700         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
14701 /* @internal */
14702 export function OutPoint_eq(a: number, b: number): boolean {
14703         if(!isWasmInitialized) {
14704                 throw new Error("initializeWasm() must be awaited first!");
14705         }
14706         const nativeResponseValue = wasm.TS_OutPoint_eq(a, b);
14707         return nativeResponseValue;
14708 }
14709         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
14710 /* @internal */
14711 export function OutPoint_hash(o: number): bigint {
14712         if(!isWasmInitialized) {
14713                 throw new Error("initializeWasm() must be awaited first!");
14714         }
14715         const nativeResponseValue = wasm.TS_OutPoint_hash(o);
14716         return nativeResponseValue;
14717 }
14718         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
14719 /* @internal */
14720 export function OutPoint_to_channel_id(this_arg: number): number {
14721         if(!isWasmInitialized) {
14722                 throw new Error("initializeWasm() must be awaited first!");
14723         }
14724         const nativeResponseValue = wasm.TS_OutPoint_to_channel_id(this_arg);
14725         return nativeResponseValue;
14726 }
14727         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
14728 /* @internal */
14729 export function OutPoint_write(obj: number): number {
14730         if(!isWasmInitialized) {
14731                 throw new Error("initializeWasm() must be awaited first!");
14732         }
14733         const nativeResponseValue = wasm.TS_OutPoint_write(obj);
14734         return nativeResponseValue;
14735 }
14736         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
14737 /* @internal */
14738 export function OutPoint_read(ser: number): number {
14739         if(!isWasmInitialized) {
14740                 throw new Error("initializeWasm() must be awaited first!");
14741         }
14742         const nativeResponseValue = wasm.TS_OutPoint_read(ser);
14743         return nativeResponseValue;
14744 }
14745         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
14746 /* @internal */
14747 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
14748         if(!isWasmInitialized) {
14749                 throw new Error("initializeWasm() must be awaited first!");
14750         }
14751         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_free(this_obj);
14752         // debug statements here
14753 }
14754         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14755 /* @internal */
14756 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
14757         if(!isWasmInitialized) {
14758                 throw new Error("initializeWasm() must be awaited first!");
14759         }
14760         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
14761         return nativeResponseValue;
14762 }
14763         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14764 /* @internal */
14765 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
14766         if(!isWasmInitialized) {
14767                 throw new Error("initializeWasm() must be awaited first!");
14768         }
14769         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
14770         // debug statements here
14771 }
14772         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14773 /* @internal */
14774 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): number {
14775         if(!isWasmInitialized) {
14776                 throw new Error("initializeWasm() must be awaited first!");
14777         }
14778         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
14779         return nativeResponseValue;
14780 }
14781         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14782 /* @internal */
14783 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: number): void {
14784         if(!isWasmInitialized) {
14785                 throw new Error("initializeWasm() must be awaited first!");
14786         }
14787         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, val);
14788         // debug statements here
14789 }
14790         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14791 /* @internal */
14792 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
14793         if(!isWasmInitialized) {
14794                 throw new Error("initializeWasm() must be awaited first!");
14795         }
14796         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
14797         return nativeResponseValue;
14798 }
14799         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
14800 /* @internal */
14801 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
14802         if(!isWasmInitialized) {
14803                 throw new Error("initializeWasm() must be awaited first!");
14804         }
14805         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
14806         // debug statements here
14807 }
14808         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
14809 /* @internal */
14810 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
14811         if(!isWasmInitialized) {
14812                 throw new Error("initializeWasm() must be awaited first!");
14813         }
14814         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
14815         // debug statements here
14816 }
14817         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14818 /* @internal */
14819 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): number {
14820         if(!isWasmInitialized) {
14821                 throw new Error("initializeWasm() must be awaited first!");
14822         }
14823         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
14824         return nativeResponseValue;
14825 }
14826         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14827 /* @internal */
14828 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: number): void {
14829         if(!isWasmInitialized) {
14830                 throw new Error("initializeWasm() must be awaited first!");
14831         }
14832         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, val);
14833         // debug statements here
14834 }
14835         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
14836 /* @internal */
14837 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): number {
14838         if(!isWasmInitialized) {
14839                 throw new Error("initializeWasm() must be awaited first!");
14840         }
14841         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
14842         return nativeResponseValue;
14843 }
14844         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14845 /* @internal */
14846 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: number): void {
14847         if(!isWasmInitialized) {
14848                 throw new Error("initializeWasm() must be awaited first!");
14849         }
14850         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, val);
14851         // debug statements here
14852 }
14853         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14854 /* @internal */
14855 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): bigint {
14856         if(!isWasmInitialized) {
14857                 throw new Error("initializeWasm() must be awaited first!");
14858         }
14859         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
14860         return nativeResponseValue;
14861 }
14862         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
14863 /* @internal */
14864 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: bigint): void {
14865         if(!isWasmInitialized) {
14866                 throw new Error("initializeWasm() must be awaited first!");
14867         }
14868         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
14869         // debug statements here
14870 }
14871         // 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);
14872 /* @internal */
14873 export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: number, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: number, channel_keys_id_arg: number, channel_value_satoshis_arg: bigint): number {
14874         if(!isWasmInitialized) {
14875                 throw new Error("initializeWasm() must be awaited first!");
14876         }
14877         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_new(outpoint_arg, per_commitment_point_arg, to_self_delay_arg, output_arg, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg);
14878         return nativeResponseValue;
14879 }
14880         // uintptr_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
14881 /* @internal */
14882 export function DelayedPaymentOutputDescriptor_clone_ptr(arg: number): number {
14883         if(!isWasmInitialized) {
14884                 throw new Error("initializeWasm() must be awaited first!");
14885         }
14886         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone_ptr(arg);
14887         return nativeResponseValue;
14888 }
14889         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
14890 /* @internal */
14891 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
14892         if(!isWasmInitialized) {
14893                 throw new Error("initializeWasm() must be awaited first!");
14894         }
14895         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone(orig);
14896         return nativeResponseValue;
14897 }
14898         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
14899 /* @internal */
14900 export function DelayedPaymentOutputDescriptor_write(obj: number): number {
14901         if(!isWasmInitialized) {
14902                 throw new Error("initializeWasm() must be awaited first!");
14903         }
14904         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_write(obj);
14905         return nativeResponseValue;
14906 }
14907         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
14908 /* @internal */
14909 export function DelayedPaymentOutputDescriptor_read(ser: number): number {
14910         if(!isWasmInitialized) {
14911                 throw new Error("initializeWasm() must be awaited first!");
14912         }
14913         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_read(ser);
14914         return nativeResponseValue;
14915 }
14916         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
14917 /* @internal */
14918 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
14919         if(!isWasmInitialized) {
14920                 throw new Error("initializeWasm() must be awaited first!");
14921         }
14922         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_free(this_obj);
14923         // debug statements here
14924 }
14925         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14926 /* @internal */
14927 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
14928         if(!isWasmInitialized) {
14929                 throw new Error("initializeWasm() must be awaited first!");
14930         }
14931         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
14932         return nativeResponseValue;
14933 }
14934         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14935 /* @internal */
14936 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
14937         if(!isWasmInitialized) {
14938                 throw new Error("initializeWasm() must be awaited first!");
14939         }
14940         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
14941         // debug statements here
14942 }
14943         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
14944 /* @internal */
14945 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
14946         if(!isWasmInitialized) {
14947                 throw new Error("initializeWasm() must be awaited first!");
14948         }
14949         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_output(this_ptr, val);
14950         // debug statements here
14951 }
14952         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
14953 /* @internal */
14954 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): number {
14955         if(!isWasmInitialized) {
14956                 throw new Error("initializeWasm() must be awaited first!");
14957         }
14958         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
14959         return nativeResponseValue;
14960 }
14961         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14962 /* @internal */
14963 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: number): void {
14964         if(!isWasmInitialized) {
14965                 throw new Error("initializeWasm() must be awaited first!");
14966         }
14967         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, val);
14968         // debug statements here
14969 }
14970         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
14971 /* @internal */
14972 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): bigint {
14973         if(!isWasmInitialized) {
14974                 throw new Error("initializeWasm() must be awaited first!");
14975         }
14976         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
14977         return nativeResponseValue;
14978 }
14979         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
14980 /* @internal */
14981 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: bigint): void {
14982         if(!isWasmInitialized) {
14983                 throw new Error("initializeWasm() must be awaited first!");
14984         }
14985         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
14986         // debug statements here
14987 }
14988         // 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);
14989 /* @internal */
14990 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: number, channel_value_satoshis_arg: bigint): number {
14991         if(!isWasmInitialized) {
14992                 throw new Error("initializeWasm() must be awaited first!");
14993         }
14994         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, channel_keys_id_arg, channel_value_satoshis_arg);
14995         return nativeResponseValue;
14996 }
14997         // uintptr_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
14998 /* @internal */
14999 export function StaticPaymentOutputDescriptor_clone_ptr(arg: number): number {
15000         if(!isWasmInitialized) {
15001                 throw new Error("initializeWasm() must be awaited first!");
15002         }
15003         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone_ptr(arg);
15004         return nativeResponseValue;
15005 }
15006         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
15007 /* @internal */
15008 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
15009         if(!isWasmInitialized) {
15010                 throw new Error("initializeWasm() must be awaited first!");
15011         }
15012         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone(orig);
15013         return nativeResponseValue;
15014 }
15015         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
15016 /* @internal */
15017 export function StaticPaymentOutputDescriptor_write(obj: number): number {
15018         if(!isWasmInitialized) {
15019                 throw new Error("initializeWasm() must be awaited first!");
15020         }
15021         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_write(obj);
15022         return nativeResponseValue;
15023 }
15024         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
15025 /* @internal */
15026 export function StaticPaymentOutputDescriptor_read(ser: number): number {
15027         if(!isWasmInitialized) {
15028                 throw new Error("initializeWasm() must be awaited first!");
15029         }
15030         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_read(ser);
15031         return nativeResponseValue;
15032 }
15033         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
15034 /* @internal */
15035 export function SpendableOutputDescriptor_free(this_ptr: number): void {
15036         if(!isWasmInitialized) {
15037                 throw new Error("initializeWasm() must be awaited first!");
15038         }
15039         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_free(this_ptr);
15040         // debug statements here
15041 }
15042         // uintptr_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
15043 /* @internal */
15044 export function SpendableOutputDescriptor_clone_ptr(arg: number): number {
15045         if(!isWasmInitialized) {
15046                 throw new Error("initializeWasm() must be awaited first!");
15047         }
15048         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone_ptr(arg);
15049         return nativeResponseValue;
15050 }
15051         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
15052 /* @internal */
15053 export function SpendableOutputDescriptor_clone(orig: number): number {
15054         if(!isWasmInitialized) {
15055                 throw new Error("initializeWasm() must be awaited first!");
15056         }
15057         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone(orig);
15058         return nativeResponseValue;
15059 }
15060         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
15061 /* @internal */
15062 export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
15063         if(!isWasmInitialized) {
15064                 throw new Error("initializeWasm() must be awaited first!");
15065         }
15066         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_output(outpoint, output);
15067         return nativeResponseValue;
15068 }
15069         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
15070 /* @internal */
15071 export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
15072         if(!isWasmInitialized) {
15073                 throw new Error("initializeWasm() must be awaited first!");
15074         }
15075         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_delayed_payment_output(a);
15076         return nativeResponseValue;
15077 }
15078         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
15079 /* @internal */
15080 export function SpendableOutputDescriptor_static_payment_output(a: number): number {
15081         if(!isWasmInitialized) {
15082                 throw new Error("initializeWasm() must be awaited first!");
15083         }
15084         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_payment_output(a);
15085         return nativeResponseValue;
15086 }
15087         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
15088 /* @internal */
15089 export function SpendableOutputDescriptor_write(obj: number): number {
15090         if(!isWasmInitialized) {
15091                 throw new Error("initializeWasm() must be awaited first!");
15092         }
15093         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_write(obj);
15094         return nativeResponseValue;
15095 }
15096         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
15097 /* @internal */
15098 export function SpendableOutputDescriptor_read(ser: number): number {
15099         if(!isWasmInitialized) {
15100                 throw new Error("initializeWasm() must be awaited first!");
15101         }
15102         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_read(ser);
15103         return nativeResponseValue;
15104 }
15105         // void BaseSign_free(struct LDKBaseSign this_ptr);
15106 /* @internal */
15107 export function BaseSign_free(this_ptr: number): void {
15108         if(!isWasmInitialized) {
15109                 throw new Error("initializeWasm() must be awaited first!");
15110         }
15111         const nativeResponseValue = wasm.TS_BaseSign_free(this_ptr);
15112         // debug statements here
15113 }
15114         // uintptr_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
15115 /* @internal */
15116 export function Sign_clone_ptr(arg: number): number {
15117         if(!isWasmInitialized) {
15118                 throw new Error("initializeWasm() must be awaited first!");
15119         }
15120         const nativeResponseValue = wasm.TS_Sign_clone_ptr(arg);
15121         return nativeResponseValue;
15122 }
15123         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
15124 /* @internal */
15125 export function Sign_clone(orig: number): number {
15126         if(!isWasmInitialized) {
15127                 throw new Error("initializeWasm() must be awaited first!");
15128         }
15129         const nativeResponseValue = wasm.TS_Sign_clone(orig);
15130         return nativeResponseValue;
15131 }
15132         // void Sign_free(struct LDKSign this_ptr);
15133 /* @internal */
15134 export function Sign_free(this_ptr: number): void {
15135         if(!isWasmInitialized) {
15136                 throw new Error("initializeWasm() must be awaited first!");
15137         }
15138         const nativeResponseValue = wasm.TS_Sign_free(this_ptr);
15139         // debug statements here
15140 }
15141         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
15142 /* @internal */
15143 export function KeysInterface_free(this_ptr: number): void {
15144         if(!isWasmInitialized) {
15145                 throw new Error("initializeWasm() must be awaited first!");
15146         }
15147         const nativeResponseValue = wasm.TS_KeysInterface_free(this_ptr);
15148         // debug statements here
15149 }
15150         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
15151 /* @internal */
15152 export function InMemorySigner_free(this_obj: number): void {
15153         if(!isWasmInitialized) {
15154                 throw new Error("initializeWasm() must be awaited first!");
15155         }
15156         const nativeResponseValue = wasm.TS_InMemorySigner_free(this_obj);
15157         // debug statements here
15158 }
15159         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
15160 /* @internal */
15161 export function InMemorySigner_get_funding_key(this_ptr: number): number {
15162         if(!isWasmInitialized) {
15163                 throw new Error("initializeWasm() must be awaited first!");
15164         }
15165         const nativeResponseValue = wasm.TS_InMemorySigner_get_funding_key(this_ptr);
15166         return nativeResponseValue;
15167 }
15168         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
15169 /* @internal */
15170 export function InMemorySigner_set_funding_key(this_ptr: number, val: number): void {
15171         if(!isWasmInitialized) {
15172                 throw new Error("initializeWasm() must be awaited first!");
15173         }
15174         const nativeResponseValue = wasm.TS_InMemorySigner_set_funding_key(this_ptr, val);
15175         // debug statements here
15176 }
15177         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
15178 /* @internal */
15179 export function InMemorySigner_get_revocation_base_key(this_ptr: number): number {
15180         if(!isWasmInitialized) {
15181                 throw new Error("initializeWasm() must be awaited first!");
15182         }
15183         const nativeResponseValue = wasm.TS_InMemorySigner_get_revocation_base_key(this_ptr);
15184         return nativeResponseValue;
15185 }
15186         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
15187 /* @internal */
15188 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: number): void {
15189         if(!isWasmInitialized) {
15190                 throw new Error("initializeWasm() must be awaited first!");
15191         }
15192         const nativeResponseValue = wasm.TS_InMemorySigner_set_revocation_base_key(this_ptr, val);
15193         // debug statements here
15194 }
15195         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
15196 /* @internal */
15197 export function InMemorySigner_get_payment_key(this_ptr: number): number {
15198         if(!isWasmInitialized) {
15199                 throw new Error("initializeWasm() must be awaited first!");
15200         }
15201         const nativeResponseValue = wasm.TS_InMemorySigner_get_payment_key(this_ptr);
15202         return nativeResponseValue;
15203 }
15204         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
15205 /* @internal */
15206 export function InMemorySigner_set_payment_key(this_ptr: number, val: number): void {
15207         if(!isWasmInitialized) {
15208                 throw new Error("initializeWasm() must be awaited first!");
15209         }
15210         const nativeResponseValue = wasm.TS_InMemorySigner_set_payment_key(this_ptr, val);
15211         // debug statements here
15212 }
15213         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
15214 /* @internal */
15215 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): number {
15216         if(!isWasmInitialized) {
15217                 throw new Error("initializeWasm() must be awaited first!");
15218         }
15219         const nativeResponseValue = wasm.TS_InMemorySigner_get_delayed_payment_base_key(this_ptr);
15220         return nativeResponseValue;
15221 }
15222         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
15223 /* @internal */
15224 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: number): void {
15225         if(!isWasmInitialized) {
15226                 throw new Error("initializeWasm() must be awaited first!");
15227         }
15228         const nativeResponseValue = wasm.TS_InMemorySigner_set_delayed_payment_base_key(this_ptr, val);
15229         // debug statements here
15230 }
15231         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
15232 /* @internal */
15233 export function InMemorySigner_get_htlc_base_key(this_ptr: number): number {
15234         if(!isWasmInitialized) {
15235                 throw new Error("initializeWasm() must be awaited first!");
15236         }
15237         const nativeResponseValue = wasm.TS_InMemorySigner_get_htlc_base_key(this_ptr);
15238         return nativeResponseValue;
15239 }
15240         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
15241 /* @internal */
15242 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: number): void {
15243         if(!isWasmInitialized) {
15244                 throw new Error("initializeWasm() must be awaited first!");
15245         }
15246         const nativeResponseValue = wasm.TS_InMemorySigner_set_htlc_base_key(this_ptr, val);
15247         // debug statements here
15248 }
15249         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
15250 /* @internal */
15251 export function InMemorySigner_get_commitment_seed(this_ptr: number): number {
15252         if(!isWasmInitialized) {
15253                 throw new Error("initializeWasm() must be awaited first!");
15254         }
15255         const nativeResponseValue = wasm.TS_InMemorySigner_get_commitment_seed(this_ptr);
15256         return nativeResponseValue;
15257 }
15258         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15259 /* @internal */
15260 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: number): void {
15261         if(!isWasmInitialized) {
15262                 throw new Error("initializeWasm() must be awaited first!");
15263         }
15264         const nativeResponseValue = wasm.TS_InMemorySigner_set_commitment_seed(this_ptr, val);
15265         // debug statements here
15266 }
15267         // uintptr_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
15268 /* @internal */
15269 export function InMemorySigner_clone_ptr(arg: number): number {
15270         if(!isWasmInitialized) {
15271                 throw new Error("initializeWasm() must be awaited first!");
15272         }
15273         const nativeResponseValue = wasm.TS_InMemorySigner_clone_ptr(arg);
15274         return nativeResponseValue;
15275 }
15276         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
15277 /* @internal */
15278 export function InMemorySigner_clone(orig: number): number {
15279         if(!isWasmInitialized) {
15280                 throw new Error("initializeWasm() must be awaited first!");
15281         }
15282         const nativeResponseValue = wasm.TS_InMemorySigner_clone(orig);
15283         return nativeResponseValue;
15284 }
15285         // 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);
15286 /* @internal */
15287 export function InMemorySigner_new(funding_key: number, revocation_base_key: number, payment_key: number, delayed_payment_base_key: number, htlc_base_key: number, commitment_seed: number, channel_value_satoshis: bigint, channel_keys_id: number): number {
15288         if(!isWasmInitialized) {
15289                 throw new Error("initializeWasm() must be awaited first!");
15290         }
15291         const nativeResponseValue = wasm.TS_InMemorySigner_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, channel_keys_id);
15292         return nativeResponseValue;
15293 }
15294         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15295 /* @internal */
15296 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
15297         if(!isWasmInitialized) {
15298                 throw new Error("initializeWasm() must be awaited first!");
15299         }
15300         const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_pubkeys(this_arg);
15301         return nativeResponseValue;
15302 }
15303         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15304 /* @internal */
15305 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
15306         if(!isWasmInitialized) {
15307                 throw new Error("initializeWasm() must be awaited first!");
15308         }
15309         const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_selected_contest_delay(this_arg);
15310         return nativeResponseValue;
15311 }
15312         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15313 /* @internal */
15314 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
15315         if(!isWasmInitialized) {
15316                 throw new Error("initializeWasm() must be awaited first!");
15317         }
15318         const nativeResponseValue = wasm.TS_InMemorySigner_holder_selected_contest_delay(this_arg);
15319         return nativeResponseValue;
15320 }
15321         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15322 /* @internal */
15323 export function InMemorySigner_is_outbound(this_arg: number): boolean {
15324         if(!isWasmInitialized) {
15325                 throw new Error("initializeWasm() must be awaited first!");
15326         }
15327         const nativeResponseValue = wasm.TS_InMemorySigner_is_outbound(this_arg);
15328         return nativeResponseValue;
15329 }
15330         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15331 /* @internal */
15332 export function InMemorySigner_funding_outpoint(this_arg: number): number {
15333         if(!isWasmInitialized) {
15334                 throw new Error("initializeWasm() must be awaited first!");
15335         }
15336         const nativeResponseValue = wasm.TS_InMemorySigner_funding_outpoint(this_arg);
15337         return nativeResponseValue;
15338 }
15339         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15340 /* @internal */
15341 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
15342         if(!isWasmInitialized) {
15343                 throw new Error("initializeWasm() must be awaited first!");
15344         }
15345         const nativeResponseValue = wasm.TS_InMemorySigner_get_channel_parameters(this_arg);
15346         return nativeResponseValue;
15347 }
15348         // MUST_USE_RES bool InMemorySigner_opt_anchors(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15349 /* @internal */
15350 export function InMemorySigner_opt_anchors(this_arg: number): boolean {
15351         if(!isWasmInitialized) {
15352                 throw new Error("initializeWasm() must be awaited first!");
15353         }
15354         const nativeResponseValue = wasm.TS_InMemorySigner_opt_anchors(this_arg);
15355         return nativeResponseValue;
15356 }
15357         // 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);
15358 /* @internal */
15359 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: number, input_idx: number, descriptor: number): number {
15360         if(!isWasmInitialized) {
15361                 throw new Error("initializeWasm() must be awaited first!");
15362         }
15363         const nativeResponseValue = wasm.TS_InMemorySigner_sign_counterparty_payment_input(this_arg, spend_tx, input_idx, descriptor);
15364         return nativeResponseValue;
15365 }
15366         // 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);
15367 /* @internal */
15368 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: number, input_idx: number, descriptor: number): number {
15369         if(!isWasmInitialized) {
15370                 throw new Error("initializeWasm() must be awaited first!");
15371         }
15372         const nativeResponseValue = wasm.TS_InMemorySigner_sign_dynamic_p2wsh_input(this_arg, spend_tx, input_idx, descriptor);
15373         return nativeResponseValue;
15374 }
15375         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15376 /* @internal */
15377 export function InMemorySigner_as_BaseSign(this_arg: number): number {
15378         if(!isWasmInitialized) {
15379                 throw new Error("initializeWasm() must be awaited first!");
15380         }
15381         const nativeResponseValue = wasm.TS_InMemorySigner_as_BaseSign(this_arg);
15382         return nativeResponseValue;
15383 }
15384         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
15385 /* @internal */
15386 export function InMemorySigner_as_Sign(this_arg: number): number {
15387         if(!isWasmInitialized) {
15388                 throw new Error("initializeWasm() must be awaited first!");
15389         }
15390         const nativeResponseValue = wasm.TS_InMemorySigner_as_Sign(this_arg);
15391         return nativeResponseValue;
15392 }
15393         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
15394 /* @internal */
15395 export function InMemorySigner_write(obj: number): number {
15396         if(!isWasmInitialized) {
15397                 throw new Error("initializeWasm() must be awaited first!");
15398         }
15399         const nativeResponseValue = wasm.TS_InMemorySigner_write(obj);
15400         return nativeResponseValue;
15401 }
15402         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
15403 /* @internal */
15404 export function InMemorySigner_read(ser: number): number {
15405         if(!isWasmInitialized) {
15406                 throw new Error("initializeWasm() must be awaited first!");
15407         }
15408         const nativeResponseValue = wasm.TS_InMemorySigner_read(ser);
15409         return nativeResponseValue;
15410 }
15411         // void KeysManager_free(struct LDKKeysManager this_obj);
15412 /* @internal */
15413 export function KeysManager_free(this_obj: number): void {
15414         if(!isWasmInitialized) {
15415                 throw new Error("initializeWasm() must be awaited first!");
15416         }
15417         const nativeResponseValue = wasm.TS_KeysManager_free(this_obj);
15418         // debug statements here
15419 }
15420         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
15421 /* @internal */
15422 export function KeysManager_new(seed: number, starting_time_secs: bigint, starting_time_nanos: number): number {
15423         if(!isWasmInitialized) {
15424                 throw new Error("initializeWasm() must be awaited first!");
15425         }
15426         const nativeResponseValue = wasm.TS_KeysManager_new(seed, starting_time_secs, starting_time_nanos);
15427         return nativeResponseValue;
15428 }
15429         // 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]);
15430 /* @internal */
15431 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: bigint, params: number): number {
15432         if(!isWasmInitialized) {
15433                 throw new Error("initializeWasm() must be awaited first!");
15434         }
15435         const nativeResponseValue = wasm.TS_KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params);
15436         return nativeResponseValue;
15437 }
15438         // 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);
15439 /* @internal */
15440 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number): number {
15441         if(!isWasmInitialized) {
15442                 throw new Error("initializeWasm() must be awaited first!");
15443         }
15444         const nativeResponseValue = wasm.TS_KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight);
15445         return nativeResponseValue;
15446 }
15447         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
15448 /* @internal */
15449 export function KeysManager_as_KeysInterface(this_arg: number): number {
15450         if(!isWasmInitialized) {
15451                 throw new Error("initializeWasm() must be awaited first!");
15452         }
15453         const nativeResponseValue = wasm.TS_KeysManager_as_KeysInterface(this_arg);
15454         return nativeResponseValue;
15455 }
15456         // void ChannelManager_free(struct LDKChannelManager this_obj);
15457 /* @internal */
15458 export function ChannelManager_free(this_obj: number): void {
15459         if(!isWasmInitialized) {
15460                 throw new Error("initializeWasm() must be awaited first!");
15461         }
15462         const nativeResponseValue = wasm.TS_ChannelManager_free(this_obj);
15463         // debug statements here
15464 }
15465         // void ChainParameters_free(struct LDKChainParameters this_obj);
15466 /* @internal */
15467 export function ChainParameters_free(this_obj: number): void {
15468         if(!isWasmInitialized) {
15469                 throw new Error("initializeWasm() must be awaited first!");
15470         }
15471         const nativeResponseValue = wasm.TS_ChainParameters_free(this_obj);
15472         // debug statements here
15473 }
15474         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
15475 /* @internal */
15476 export function ChainParameters_get_network(this_ptr: number): Network {
15477         if(!isWasmInitialized) {
15478                 throw new Error("initializeWasm() must be awaited first!");
15479         }
15480         const nativeResponseValue = wasm.TS_ChainParameters_get_network(this_ptr);
15481         return nativeResponseValue;
15482 }
15483         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
15484 /* @internal */
15485 export function ChainParameters_set_network(this_ptr: number, val: Network): void {
15486         if(!isWasmInitialized) {
15487                 throw new Error("initializeWasm() must be awaited first!");
15488         }
15489         const nativeResponseValue = wasm.TS_ChainParameters_set_network(this_ptr, val);
15490         // debug statements here
15491 }
15492         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
15493 /* @internal */
15494 export function ChainParameters_get_best_block(this_ptr: number): number {
15495         if(!isWasmInitialized) {
15496                 throw new Error("initializeWasm() must be awaited first!");
15497         }
15498         const nativeResponseValue = wasm.TS_ChainParameters_get_best_block(this_ptr);
15499         return nativeResponseValue;
15500 }
15501         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
15502 /* @internal */
15503 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
15504         if(!isWasmInitialized) {
15505                 throw new Error("initializeWasm() must be awaited first!");
15506         }
15507         const nativeResponseValue = wasm.TS_ChainParameters_set_best_block(this_ptr, val);
15508         // debug statements here
15509 }
15510         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
15511 /* @internal */
15512 export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
15513         if(!isWasmInitialized) {
15514                 throw new Error("initializeWasm() must be awaited first!");
15515         }
15516         const nativeResponseValue = wasm.TS_ChainParameters_new(network_arg, best_block_arg);
15517         return nativeResponseValue;
15518 }
15519         // uintptr_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
15520 /* @internal */
15521 export function ChainParameters_clone_ptr(arg: number): number {
15522         if(!isWasmInitialized) {
15523                 throw new Error("initializeWasm() must be awaited first!");
15524         }
15525         const nativeResponseValue = wasm.TS_ChainParameters_clone_ptr(arg);
15526         return nativeResponseValue;
15527 }
15528         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
15529 /* @internal */
15530 export function ChainParameters_clone(orig: number): number {
15531         if(!isWasmInitialized) {
15532                 throw new Error("initializeWasm() must be awaited first!");
15533         }
15534         const nativeResponseValue = wasm.TS_ChainParameters_clone(orig);
15535         return nativeResponseValue;
15536 }
15537         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
15538 /* @internal */
15539 export function CounterpartyForwardingInfo_free(this_obj: number): void {
15540         if(!isWasmInitialized) {
15541                 throw new Error("initializeWasm() must be awaited first!");
15542         }
15543         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_free(this_obj);
15544         // debug statements here
15545 }
15546         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
15547 /* @internal */
15548 export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
15549         if(!isWasmInitialized) {
15550                 throw new Error("initializeWasm() must be awaited first!");
15551         }
15552         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
15553         return nativeResponseValue;
15554 }
15555         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
15556 /* @internal */
15557 export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
15558         if(!isWasmInitialized) {
15559                 throw new Error("initializeWasm() must be awaited first!");
15560         }
15561         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
15562         // debug statements here
15563 }
15564         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
15565 /* @internal */
15566 export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
15567         if(!isWasmInitialized) {
15568                 throw new Error("initializeWasm() must be awaited first!");
15569         }
15570         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
15571         return nativeResponseValue;
15572 }
15573         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
15574 /* @internal */
15575 export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
15576         if(!isWasmInitialized) {
15577                 throw new Error("initializeWasm() must be awaited first!");
15578         }
15579         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
15580         // debug statements here
15581 }
15582         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
15583 /* @internal */
15584 export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
15585         if(!isWasmInitialized) {
15586                 throw new Error("initializeWasm() must be awaited first!");
15587         }
15588         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
15589         return nativeResponseValue;
15590 }
15591         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
15592 /* @internal */
15593 export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15594         if(!isWasmInitialized) {
15595                 throw new Error("initializeWasm() must be awaited first!");
15596         }
15597         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
15598         // debug statements here
15599 }
15600         // 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);
15601 /* @internal */
15602 export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
15603         if(!isWasmInitialized) {
15604                 throw new Error("initializeWasm() must be awaited first!");
15605         }
15606         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
15607         return nativeResponseValue;
15608 }
15609         // uintptr_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
15610 /* @internal */
15611 export function CounterpartyForwardingInfo_clone_ptr(arg: number): number {
15612         if(!isWasmInitialized) {
15613                 throw new Error("initializeWasm() must be awaited first!");
15614         }
15615         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone_ptr(arg);
15616         return nativeResponseValue;
15617 }
15618         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
15619 /* @internal */
15620 export function CounterpartyForwardingInfo_clone(orig: number): number {
15621         if(!isWasmInitialized) {
15622                 throw new Error("initializeWasm() must be awaited first!");
15623         }
15624         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone(orig);
15625         return nativeResponseValue;
15626 }
15627         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
15628 /* @internal */
15629 export function ChannelCounterparty_free(this_obj: number): void {
15630         if(!isWasmInitialized) {
15631                 throw new Error("initializeWasm() must be awaited first!");
15632         }
15633         const nativeResponseValue = wasm.TS_ChannelCounterparty_free(this_obj);
15634         // debug statements here
15635 }
15636         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
15637 /* @internal */
15638 export function ChannelCounterparty_get_node_id(this_ptr: number): number {
15639         if(!isWasmInitialized) {
15640                 throw new Error("initializeWasm() must be awaited first!");
15641         }
15642         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_node_id(this_ptr);
15643         return nativeResponseValue;
15644 }
15645         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15646 /* @internal */
15647 export function ChannelCounterparty_set_node_id(this_ptr: number, val: number): void {
15648         if(!isWasmInitialized) {
15649                 throw new Error("initializeWasm() must be awaited first!");
15650         }
15651         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_node_id(this_ptr, val);
15652         // debug statements here
15653 }
15654         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
15655 /* @internal */
15656 export function ChannelCounterparty_get_features(this_ptr: number): number {
15657         if(!isWasmInitialized) {
15658                 throw new Error("initializeWasm() must be awaited first!");
15659         }
15660         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_features(this_ptr);
15661         return nativeResponseValue;
15662 }
15663         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
15664 /* @internal */
15665 export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
15666         if(!isWasmInitialized) {
15667                 throw new Error("initializeWasm() must be awaited first!");
15668         }
15669         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_features(this_ptr, val);
15670         // debug statements here
15671 }
15672         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
15673 /* @internal */
15674 export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): bigint {
15675         if(!isWasmInitialized) {
15676                 throw new Error("initializeWasm() must be awaited first!");
15677         }
15678         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
15679         return nativeResponseValue;
15680 }
15681         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
15682 /* @internal */
15683 export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: bigint): void {
15684         if(!isWasmInitialized) {
15685                 throw new Error("initializeWasm() must be awaited first!");
15686         }
15687         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
15688         // debug statements here
15689 }
15690         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
15691 /* @internal */
15692 export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
15693         if(!isWasmInitialized) {
15694                 throw new Error("initializeWasm() must be awaited first!");
15695         }
15696         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_forwarding_info(this_ptr);
15697         return nativeResponseValue;
15698 }
15699         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
15700 /* @internal */
15701 export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
15702         if(!isWasmInitialized) {
15703                 throw new Error("initializeWasm() must be awaited first!");
15704         }
15705         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_forwarding_info(this_ptr, val);
15706         // debug statements here
15707 }
15708         // 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);
15709 /* @internal */
15710 export function ChannelCounterparty_new(node_id_arg: number, features_arg: number, unspendable_punishment_reserve_arg: bigint, forwarding_info_arg: number): number {
15711         if(!isWasmInitialized) {
15712                 throw new Error("initializeWasm() must be awaited first!");
15713         }
15714         const nativeResponseValue = wasm.TS_ChannelCounterparty_new(node_id_arg, features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
15715         return nativeResponseValue;
15716 }
15717         // uintptr_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
15718 /* @internal */
15719 export function ChannelCounterparty_clone_ptr(arg: number): number {
15720         if(!isWasmInitialized) {
15721                 throw new Error("initializeWasm() must be awaited first!");
15722         }
15723         const nativeResponseValue = wasm.TS_ChannelCounterparty_clone_ptr(arg);
15724         return nativeResponseValue;
15725 }
15726         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
15727 /* @internal */
15728 export function ChannelCounterparty_clone(orig: number): number {
15729         if(!isWasmInitialized) {
15730                 throw new Error("initializeWasm() must be awaited first!");
15731         }
15732         const nativeResponseValue = wasm.TS_ChannelCounterparty_clone(orig);
15733         return nativeResponseValue;
15734 }
15735         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
15736 /* @internal */
15737 export function ChannelDetails_free(this_obj: number): void {
15738         if(!isWasmInitialized) {
15739                 throw new Error("initializeWasm() must be awaited first!");
15740         }
15741         const nativeResponseValue = wasm.TS_ChannelDetails_free(this_obj);
15742         // debug statements here
15743 }
15744         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
15745 /* @internal */
15746 export function ChannelDetails_get_channel_id(this_ptr: number): number {
15747         if(!isWasmInitialized) {
15748                 throw new Error("initializeWasm() must be awaited first!");
15749         }
15750         const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_id(this_ptr);
15751         return nativeResponseValue;
15752 }
15753         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15754 /* @internal */
15755 export function ChannelDetails_set_channel_id(this_ptr: number, val: number): void {
15756         if(!isWasmInitialized) {
15757                 throw new Error("initializeWasm() must be awaited first!");
15758         }
15759         const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_id(this_ptr, val);
15760         // debug statements here
15761 }
15762         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15763 /* @internal */
15764 export function ChannelDetails_get_counterparty(this_ptr: number): number {
15765         if(!isWasmInitialized) {
15766                 throw new Error("initializeWasm() must be awaited first!");
15767         }
15768         const nativeResponseValue = wasm.TS_ChannelDetails_get_counterparty(this_ptr);
15769         return nativeResponseValue;
15770 }
15771         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
15772 /* @internal */
15773 export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
15774         if(!isWasmInitialized) {
15775                 throw new Error("initializeWasm() must be awaited first!");
15776         }
15777         const nativeResponseValue = wasm.TS_ChannelDetails_set_counterparty(this_ptr, val);
15778         // debug statements here
15779 }
15780         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15781 /* @internal */
15782 export function ChannelDetails_get_funding_txo(this_ptr: number): number {
15783         if(!isWasmInitialized) {
15784                 throw new Error("initializeWasm() must be awaited first!");
15785         }
15786         const nativeResponseValue = wasm.TS_ChannelDetails_get_funding_txo(this_ptr);
15787         return nativeResponseValue;
15788 }
15789         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
15790 /* @internal */
15791 export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
15792         if(!isWasmInitialized) {
15793                 throw new Error("initializeWasm() must be awaited first!");
15794         }
15795         const nativeResponseValue = wasm.TS_ChannelDetails_set_funding_txo(this_ptr, val);
15796         // debug statements here
15797 }
15798         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15799 /* @internal */
15800 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
15801         if(!isWasmInitialized) {
15802                 throw new Error("initializeWasm() must be awaited first!");
15803         }
15804         const nativeResponseValue = wasm.TS_ChannelDetails_get_short_channel_id(this_ptr);
15805         return nativeResponseValue;
15806 }
15807         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15808 /* @internal */
15809 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
15810         if(!isWasmInitialized) {
15811                 throw new Error("initializeWasm() must be awaited first!");
15812         }
15813         const nativeResponseValue = wasm.TS_ChannelDetails_set_short_channel_id(this_ptr, val);
15814         // debug statements here
15815 }
15816         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15817 /* @internal */
15818 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): bigint {
15819         if(!isWasmInitialized) {
15820                 throw new Error("initializeWasm() must be awaited first!");
15821         }
15822         const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_value_satoshis(this_ptr);
15823         return nativeResponseValue;
15824 }
15825         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
15826 /* @internal */
15827 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: bigint): void {
15828         if(!isWasmInitialized) {
15829                 throw new Error("initializeWasm() must be awaited first!");
15830         }
15831         const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_value_satoshis(this_ptr, val);
15832         // debug statements here
15833 }
15834         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15835 /* @internal */
15836 export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
15837         if(!isWasmInitialized) {
15838                 throw new Error("initializeWasm() must be awaited first!");
15839         }
15840         const nativeResponseValue = wasm.TS_ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
15841         return nativeResponseValue;
15842 }
15843         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15844 /* @internal */
15845 export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
15846         if(!isWasmInitialized) {
15847                 throw new Error("initializeWasm() must be awaited first!");
15848         }
15849         const nativeResponseValue = wasm.TS_ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
15850         // debug statements here
15851 }
15852         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15853 /* @internal */
15854 export function ChannelDetails_get_user_channel_id(this_ptr: number): bigint {
15855         if(!isWasmInitialized) {
15856                 throw new Error("initializeWasm() must be awaited first!");
15857         }
15858         const nativeResponseValue = wasm.TS_ChannelDetails_get_user_channel_id(this_ptr);
15859         return nativeResponseValue;
15860 }
15861         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
15862 /* @internal */
15863 export function ChannelDetails_set_user_channel_id(this_ptr: number, val: bigint): void {
15864         if(!isWasmInitialized) {
15865                 throw new Error("initializeWasm() must be awaited first!");
15866         }
15867         const nativeResponseValue = wasm.TS_ChannelDetails_set_user_channel_id(this_ptr, val);
15868         // debug statements here
15869 }
15870         // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15871 /* @internal */
15872 export function ChannelDetails_get_balance_msat(this_ptr: number): bigint {
15873         if(!isWasmInitialized) {
15874                 throw new Error("initializeWasm() must be awaited first!");
15875         }
15876         const nativeResponseValue = wasm.TS_ChannelDetails_get_balance_msat(this_ptr);
15877         return nativeResponseValue;
15878 }
15879         // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
15880 /* @internal */
15881 export function ChannelDetails_set_balance_msat(this_ptr: number, val: bigint): void {
15882         if(!isWasmInitialized) {
15883                 throw new Error("initializeWasm() must be awaited first!");
15884         }
15885         const nativeResponseValue = wasm.TS_ChannelDetails_set_balance_msat(this_ptr, val);
15886         // debug statements here
15887 }
15888         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15889 /* @internal */
15890 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): bigint {
15891         if(!isWasmInitialized) {
15892                 throw new Error("initializeWasm() must be awaited first!");
15893         }
15894         const nativeResponseValue = wasm.TS_ChannelDetails_get_outbound_capacity_msat(this_ptr);
15895         return nativeResponseValue;
15896 }
15897         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
15898 /* @internal */
15899 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: bigint): void {
15900         if(!isWasmInitialized) {
15901                 throw new Error("initializeWasm() must be awaited first!");
15902         }
15903         const nativeResponseValue = wasm.TS_ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
15904         // debug statements here
15905 }
15906         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15907 /* @internal */
15908 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): bigint {
15909         if(!isWasmInitialized) {
15910                 throw new Error("initializeWasm() must be awaited first!");
15911         }
15912         const nativeResponseValue = wasm.TS_ChannelDetails_get_inbound_capacity_msat(this_ptr);
15913         return nativeResponseValue;
15914 }
15915         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
15916 /* @internal */
15917 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: bigint): void {
15918         if(!isWasmInitialized) {
15919                 throw new Error("initializeWasm() must be awaited first!");
15920         }
15921         const nativeResponseValue = wasm.TS_ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
15922         // debug statements here
15923 }
15924         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15925 /* @internal */
15926 export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
15927         if(!isWasmInitialized) {
15928                 throw new Error("initializeWasm() must be awaited first!");
15929         }
15930         const nativeResponseValue = wasm.TS_ChannelDetails_get_confirmations_required(this_ptr);
15931         return nativeResponseValue;
15932 }
15933         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
15934 /* @internal */
15935 export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
15936         if(!isWasmInitialized) {
15937                 throw new Error("initializeWasm() must be awaited first!");
15938         }
15939         const nativeResponseValue = wasm.TS_ChannelDetails_set_confirmations_required(this_ptr, val);
15940         // debug statements here
15941 }
15942         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15943 /* @internal */
15944 export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
15945         if(!isWasmInitialized) {
15946                 throw new Error("initializeWasm() must be awaited first!");
15947         }
15948         const nativeResponseValue = wasm.TS_ChannelDetails_get_force_close_spend_delay(this_ptr);
15949         return nativeResponseValue;
15950 }
15951         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
15952 /* @internal */
15953 export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
15954         if(!isWasmInitialized) {
15955                 throw new Error("initializeWasm() must be awaited first!");
15956         }
15957         const nativeResponseValue = wasm.TS_ChannelDetails_set_force_close_spend_delay(this_ptr, val);
15958         // debug statements here
15959 }
15960         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15961 /* @internal */
15962 export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
15963         if(!isWasmInitialized) {
15964                 throw new Error("initializeWasm() must be awaited first!");
15965         }
15966         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_outbound(this_ptr);
15967         return nativeResponseValue;
15968 }
15969         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
15970 /* @internal */
15971 export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
15972         if(!isWasmInitialized) {
15973                 throw new Error("initializeWasm() must be awaited first!");
15974         }
15975         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_outbound(this_ptr, val);
15976         // debug statements here
15977 }
15978         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15979 /* @internal */
15980 export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
15981         if(!isWasmInitialized) {
15982                 throw new Error("initializeWasm() must be awaited first!");
15983         }
15984         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_funding_locked(this_ptr);
15985         return nativeResponseValue;
15986 }
15987         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
15988 /* @internal */
15989 export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
15990         if(!isWasmInitialized) {
15991                 throw new Error("initializeWasm() must be awaited first!");
15992         }
15993         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_funding_locked(this_ptr, val);
15994         // debug statements here
15995 }
15996         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
15997 /* @internal */
15998 export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
15999         if(!isWasmInitialized) {
16000                 throw new Error("initializeWasm() must be awaited first!");
16001         }
16002         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_usable(this_ptr);
16003         return nativeResponseValue;
16004 }
16005         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
16006 /* @internal */
16007 export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
16008         if(!isWasmInitialized) {
16009                 throw new Error("initializeWasm() must be awaited first!");
16010         }
16011         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_usable(this_ptr, val);
16012         // debug statements here
16013 }
16014         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
16015 /* @internal */
16016 export function ChannelDetails_get_is_public(this_ptr: number): boolean {
16017         if(!isWasmInitialized) {
16018                 throw new Error("initializeWasm() must be awaited first!");
16019         }
16020         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_public(this_ptr);
16021         return nativeResponseValue;
16022 }
16023         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
16024 /* @internal */
16025 export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
16026         if(!isWasmInitialized) {
16027                 throw new Error("initializeWasm() must be awaited first!");
16028         }
16029         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_public(this_ptr, val);
16030         // debug statements here
16031 }
16032         // 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);
16033 /* @internal */
16034 export function ChannelDetails_new(channel_id_arg: number, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: bigint, unspendable_punishment_reserve_arg: number, user_channel_id_arg: bigint, balance_msat_arg: bigint, outbound_capacity_msat_arg: bigint, inbound_capacity_msat_arg: bigint, 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 {
16035         if(!isWasmInitialized) {
16036                 throw new Error("initializeWasm() must be awaited first!");
16037         }
16038         const nativeResponseValue = wasm.TS_ChannelDetails_new(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);
16039         return nativeResponseValue;
16040 }
16041         // uintptr_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
16042 /* @internal */
16043 export function ChannelDetails_clone_ptr(arg: number): number {
16044         if(!isWasmInitialized) {
16045                 throw new Error("initializeWasm() must be awaited first!");
16046         }
16047         const nativeResponseValue = wasm.TS_ChannelDetails_clone_ptr(arg);
16048         return nativeResponseValue;
16049 }
16050         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
16051 /* @internal */
16052 export function ChannelDetails_clone(orig: number): number {
16053         if(!isWasmInitialized) {
16054                 throw new Error("initializeWasm() must be awaited first!");
16055         }
16056         const nativeResponseValue = wasm.TS_ChannelDetails_clone(orig);
16057         return nativeResponseValue;
16058 }
16059         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
16060 /* @internal */
16061 export function PaymentSendFailure_free(this_ptr: number): void {
16062         if(!isWasmInitialized) {
16063                 throw new Error("initializeWasm() must be awaited first!");
16064         }
16065         const nativeResponseValue = wasm.TS_PaymentSendFailure_free(this_ptr);
16066         // debug statements here
16067 }
16068         // uintptr_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
16069 /* @internal */
16070 export function PaymentSendFailure_clone_ptr(arg: number): number {
16071         if(!isWasmInitialized) {
16072                 throw new Error("initializeWasm() must be awaited first!");
16073         }
16074         const nativeResponseValue = wasm.TS_PaymentSendFailure_clone_ptr(arg);
16075         return nativeResponseValue;
16076 }
16077         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
16078 /* @internal */
16079 export function PaymentSendFailure_clone(orig: number): number {
16080         if(!isWasmInitialized) {
16081                 throw new Error("initializeWasm() must be awaited first!");
16082         }
16083         const nativeResponseValue = wasm.TS_PaymentSendFailure_clone(orig);
16084         return nativeResponseValue;
16085 }
16086         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
16087 /* @internal */
16088 export function PaymentSendFailure_parameter_error(a: number): number {
16089         if(!isWasmInitialized) {
16090                 throw new Error("initializeWasm() must be awaited first!");
16091         }
16092         const nativeResponseValue = wasm.TS_PaymentSendFailure_parameter_error(a);
16093         return nativeResponseValue;
16094 }
16095         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
16096 /* @internal */
16097 export function PaymentSendFailure_path_parameter_error(a: number): number {
16098         if(!isWasmInitialized) {
16099                 throw new Error("initializeWasm() must be awaited first!");
16100         }
16101         const nativeResponseValue = wasm.TS_PaymentSendFailure_path_parameter_error(a);
16102         return nativeResponseValue;
16103 }
16104         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
16105 /* @internal */
16106 export function PaymentSendFailure_all_failed_retry_safe(a: number): number {
16107         if(!isWasmInitialized) {
16108                 throw new Error("initializeWasm() must be awaited first!");
16109         }
16110         const nativeResponseValue = wasm.TS_PaymentSendFailure_all_failed_retry_safe(a);
16111         return nativeResponseValue;
16112 }
16113         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
16114 /* @internal */
16115 export function PaymentSendFailure_partial_failure(results: number, failed_paths_retry: number, payment_id: number): number {
16116         if(!isWasmInitialized) {
16117                 throw new Error("initializeWasm() must be awaited first!");
16118         }
16119         const nativeResponseValue = wasm.TS_PaymentSendFailure_partial_failure(results, failed_paths_retry, payment_id);
16120         return nativeResponseValue;
16121 }
16122         // 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);
16123 /* @internal */
16124 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
16125         if(!isWasmInitialized) {
16126                 throw new Error("initializeWasm() must be awaited first!");
16127         }
16128         const nativeResponseValue = wasm.TS_ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
16129         return nativeResponseValue;
16130 }
16131         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
16132 /* @internal */
16133 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
16134         if(!isWasmInitialized) {
16135                 throw new Error("initializeWasm() must be awaited first!");
16136         }
16137         const nativeResponseValue = wasm.TS_ChannelManager_get_current_default_configuration(this_arg);
16138         return nativeResponseValue;
16139 }
16140         // 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);
16141 /* @internal */
16142 export function ChannelManager_create_channel(this_arg: number, their_network_key: number, channel_value_satoshis: bigint, push_msat: bigint, user_channel_id: bigint, override_config: number): number {
16143         if(!isWasmInitialized) {
16144                 throw new Error("initializeWasm() must be awaited first!");
16145         }
16146         const nativeResponseValue = wasm.TS_ChannelManager_create_channel(this_arg, their_network_key, channel_value_satoshis, push_msat, user_channel_id, override_config);
16147         return nativeResponseValue;
16148 }
16149         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
16150 /* @internal */
16151 export function ChannelManager_list_channels(this_arg: number): number {
16152         if(!isWasmInitialized) {
16153                 throw new Error("initializeWasm() must be awaited first!");
16154         }
16155         const nativeResponseValue = wasm.TS_ChannelManager_list_channels(this_arg);
16156         return nativeResponseValue;
16157 }
16158         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
16159 /* @internal */
16160 export function ChannelManager_list_usable_channels(this_arg: number): number {
16161         if(!isWasmInitialized) {
16162                 throw new Error("initializeWasm() must be awaited first!");
16163         }
16164         const nativeResponseValue = wasm.TS_ChannelManager_list_usable_channels(this_arg);
16165         return nativeResponseValue;
16166 }
16167         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
16168 /* @internal */
16169 export function ChannelManager_close_channel(this_arg: number, channel_id: number): number {
16170         if(!isWasmInitialized) {
16171                 throw new Error("initializeWasm() must be awaited first!");
16172         }
16173         const nativeResponseValue = wasm.TS_ChannelManager_close_channel(this_arg, channel_id);
16174         return nativeResponseValue;
16175 }
16176         // 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);
16177 /* @internal */
16178 export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: number, target_feerate_sats_per_1000_weight: number): number {
16179         if(!isWasmInitialized) {
16180                 throw new Error("initializeWasm() must be awaited first!");
16181         }
16182         const nativeResponseValue = wasm.TS_ChannelManager_close_channel_with_target_feerate(this_arg, channel_id, target_feerate_sats_per_1000_weight);
16183         return nativeResponseValue;
16184 }
16185         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
16186 /* @internal */
16187 export function ChannelManager_force_close_channel(this_arg: number, channel_id: number): number {
16188         if(!isWasmInitialized) {
16189                 throw new Error("initializeWasm() must be awaited first!");
16190         }
16191         const nativeResponseValue = wasm.TS_ChannelManager_force_close_channel(this_arg, channel_id);
16192         return nativeResponseValue;
16193 }
16194         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
16195 /* @internal */
16196 export function ChannelManager_force_close_all_channels(this_arg: number): void {
16197         if(!isWasmInitialized) {
16198                 throw new Error("initializeWasm() must be awaited first!");
16199         }
16200         const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels(this_arg);
16201         // debug statements here
16202 }
16203         // 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);
16204 /* @internal */
16205 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: number, payment_secret: number): number {
16206         if(!isWasmInitialized) {
16207                 throw new Error("initializeWasm() must be awaited first!");
16208         }
16209         const nativeResponseValue = wasm.TS_ChannelManager_send_payment(this_arg, route, payment_hash, payment_secret);
16210         return nativeResponseValue;
16211 }
16212         // 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);
16213 /* @internal */
16214 export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: number): number {
16215         if(!isWasmInitialized) {
16216                 throw new Error("initializeWasm() must be awaited first!");
16217         }
16218         const nativeResponseValue = wasm.TS_ChannelManager_retry_payment(this_arg, route, payment_id);
16219         return nativeResponseValue;
16220 }
16221         // void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
16222 /* @internal */
16223 export function ChannelManager_abandon_payment(this_arg: number, payment_id: number): void {
16224         if(!isWasmInitialized) {
16225                 throw new Error("initializeWasm() must be awaited first!");
16226         }
16227         const nativeResponseValue = wasm.TS_ChannelManager_abandon_payment(this_arg, payment_id);
16228         // debug statements here
16229 }
16230         // 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);
16231 /* @internal */
16232 export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: number): number {
16233         if(!isWasmInitialized) {
16234                 throw new Error("initializeWasm() must be awaited first!");
16235         }
16236         const nativeResponseValue = wasm.TS_ChannelManager_send_spontaneous_payment(this_arg, route, payment_preimage);
16237         return nativeResponseValue;
16238 }
16239         // 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);
16240 /* @internal */
16241 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: number, funding_transaction: number): number {
16242         if(!isWasmInitialized) {
16243                 throw new Error("initializeWasm() must be awaited first!");
16244         }
16245         const nativeResponseValue = wasm.TS_ChannelManager_funding_transaction_generated(this_arg, temporary_channel_id, funding_transaction);
16246         return nativeResponseValue;
16247 }
16248         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
16249 /* @internal */
16250 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: number, alias: number, addresses: number): void {
16251         if(!isWasmInitialized) {
16252                 throw new Error("initializeWasm() must be awaited first!");
16253         }
16254         const nativeResponseValue = wasm.TS_ChannelManager_broadcast_node_announcement(this_arg, rgb, alias, addresses);
16255         // debug statements here
16256 }
16257         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
16258 /* @internal */
16259 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
16260         if(!isWasmInitialized) {
16261                 throw new Error("initializeWasm() must be awaited first!");
16262         }
16263         const nativeResponseValue = wasm.TS_ChannelManager_process_pending_htlc_forwards(this_arg);
16264         // debug statements here
16265 }
16266         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
16267 /* @internal */
16268 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
16269         if(!isWasmInitialized) {
16270                 throw new Error("initializeWasm() must be awaited first!");
16271         }
16272         const nativeResponseValue = wasm.TS_ChannelManager_timer_tick_occurred(this_arg);
16273         // debug statements here
16274 }
16275         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
16276 /* @internal */
16277 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: number): boolean {
16278         if(!isWasmInitialized) {
16279                 throw new Error("initializeWasm() must be awaited first!");
16280         }
16281         const nativeResponseValue = wasm.TS_ChannelManager_fail_htlc_backwards(this_arg, payment_hash);
16282         return nativeResponseValue;
16283 }
16284         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
16285 /* @internal */
16286 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: number): boolean {
16287         if(!isWasmInitialized) {
16288                 throw new Error("initializeWasm() must be awaited first!");
16289         }
16290         const nativeResponseValue = wasm.TS_ChannelManager_claim_funds(this_arg, payment_preimage);
16291         return nativeResponseValue;
16292 }
16293         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
16294 /* @internal */
16295 export function ChannelManager_get_our_node_id(this_arg: number): number {
16296         if(!isWasmInitialized) {
16297                 throw new Error("initializeWasm() must be awaited first!");
16298         }
16299         const nativeResponseValue = wasm.TS_ChannelManager_get_our_node_id(this_arg);
16300         return nativeResponseValue;
16301 }
16302         // 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);
16303 /* @internal */
16304 export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
16305         if(!isWasmInitialized) {
16306                 throw new Error("initializeWasm() must be awaited first!");
16307         }
16308         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs);
16309         return nativeResponseValue;
16310 }
16311         // 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);
16312 /* @internal */
16313 export function ChannelManager_create_inbound_payment_legacy(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
16314         if(!isWasmInitialized) {
16315                 throw new Error("initializeWasm() must be awaited first!");
16316         }
16317         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_legacy(this_arg, min_value_msat, invoice_expiry_delta_secs);
16318         return nativeResponseValue;
16319 }
16320         // 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);
16321 /* @internal */
16322 export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
16323         if(!isWasmInitialized) {
16324                 throw new Error("initializeWasm() must be awaited first!");
16325         }
16326         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash(this_arg, payment_hash, min_value_msat, invoice_expiry_delta_secs);
16327         return nativeResponseValue;
16328 }
16329         // 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);
16330 /* @internal */
16331 export function ChannelManager_create_inbound_payment_for_hash_legacy(this_arg: number, payment_hash: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
16332         if(!isWasmInitialized) {
16333                 throw new Error("initializeWasm() must be awaited first!");
16334         }
16335         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash_legacy(this_arg, payment_hash, min_value_msat, invoice_expiry_delta_secs);
16336         return nativeResponseValue;
16337 }
16338         // 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);
16339 /* @internal */
16340 export function ChannelManager_get_payment_preimage(this_arg: number, payment_hash: number, payment_secret: number): number {
16341         if(!isWasmInitialized) {
16342                 throw new Error("initializeWasm() must be awaited first!");
16343         }
16344         const nativeResponseValue = wasm.TS_ChannelManager_get_payment_preimage(this_arg, payment_hash, payment_secret);
16345         return nativeResponseValue;
16346 }
16347         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
16348 /* @internal */
16349 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
16350         if(!isWasmInitialized) {
16351                 throw new Error("initializeWasm() must be awaited first!");
16352         }
16353         const nativeResponseValue = wasm.TS_ChannelManager_as_MessageSendEventsProvider(this_arg);
16354         return nativeResponseValue;
16355 }
16356         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
16357 /* @internal */
16358 export function ChannelManager_as_EventsProvider(this_arg: number): number {
16359         if(!isWasmInitialized) {
16360                 throw new Error("initializeWasm() must be awaited first!");
16361         }
16362         const nativeResponseValue = wasm.TS_ChannelManager_as_EventsProvider(this_arg);
16363         return nativeResponseValue;
16364 }
16365         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
16366 /* @internal */
16367 export function ChannelManager_as_Listen(this_arg: number): number {
16368         if(!isWasmInitialized) {
16369                 throw new Error("initializeWasm() must be awaited first!");
16370         }
16371         const nativeResponseValue = wasm.TS_ChannelManager_as_Listen(this_arg);
16372         return nativeResponseValue;
16373 }
16374         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
16375 /* @internal */
16376 export function ChannelManager_as_Confirm(this_arg: number): number {
16377         if(!isWasmInitialized) {
16378                 throw new Error("initializeWasm() must be awaited first!");
16379         }
16380         const nativeResponseValue = wasm.TS_ChannelManager_as_Confirm(this_arg);
16381         return nativeResponseValue;
16382 }
16383         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
16384 /* @internal */
16385 export function ChannelManager_await_persistable_update(this_arg: number): void {
16386         if(!isWasmInitialized) {
16387                 throw new Error("initializeWasm() must be awaited first!");
16388         }
16389         const nativeResponseValue = wasm.TS_ChannelManager_await_persistable_update(this_arg);
16390         // debug statements here
16391 }
16392         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
16393 /* @internal */
16394 export function ChannelManager_current_best_block(this_arg: number): number {
16395         if(!isWasmInitialized) {
16396                 throw new Error("initializeWasm() must be awaited first!");
16397         }
16398         const nativeResponseValue = wasm.TS_ChannelManager_current_best_block(this_arg);
16399         return nativeResponseValue;
16400 }
16401         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
16402 /* @internal */
16403 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
16404         if(!isWasmInitialized) {
16405                 throw new Error("initializeWasm() must be awaited first!");
16406         }
16407         const nativeResponseValue = wasm.TS_ChannelManager_as_ChannelMessageHandler(this_arg);
16408         return nativeResponseValue;
16409 }
16410         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
16411 /* @internal */
16412 export function ChannelManager_write(obj: number): number {
16413         if(!isWasmInitialized) {
16414                 throw new Error("initializeWasm() must be awaited first!");
16415         }
16416         const nativeResponseValue = wasm.TS_ChannelManager_write(obj);
16417         return nativeResponseValue;
16418 }
16419         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
16420 /* @internal */
16421 export function ChannelManagerReadArgs_free(this_obj: number): void {
16422         if(!isWasmInitialized) {
16423                 throw new Error("initializeWasm() must be awaited first!");
16424         }
16425         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_free(this_obj);
16426         // debug statements here
16427 }
16428         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
16429 /* @internal */
16430 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
16431         if(!isWasmInitialized) {
16432                 throw new Error("initializeWasm() must be awaited first!");
16433         }
16434         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_keys_manager(this_ptr);
16435         return nativeResponseValue;
16436 }
16437         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
16438 /* @internal */
16439 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
16440         if(!isWasmInitialized) {
16441                 throw new Error("initializeWasm() must be awaited first!");
16442         }
16443         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
16444         // debug statements here
16445 }
16446         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
16447 /* @internal */
16448 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
16449         if(!isWasmInitialized) {
16450                 throw new Error("initializeWasm() must be awaited first!");
16451         }
16452         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_fee_estimator(this_ptr);
16453         return nativeResponseValue;
16454 }
16455         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
16456 /* @internal */
16457 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
16458         if(!isWasmInitialized) {
16459                 throw new Error("initializeWasm() must be awaited first!");
16460         }
16461         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
16462         // debug statements here
16463 }
16464         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
16465 /* @internal */
16466 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
16467         if(!isWasmInitialized) {
16468                 throw new Error("initializeWasm() must be awaited first!");
16469         }
16470         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_chain_monitor(this_ptr);
16471         return nativeResponseValue;
16472 }
16473         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
16474 /* @internal */
16475 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
16476         if(!isWasmInitialized) {
16477                 throw new Error("initializeWasm() must be awaited first!");
16478         }
16479         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
16480         // debug statements here
16481 }
16482         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
16483 /* @internal */
16484 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
16485         if(!isWasmInitialized) {
16486                 throw new Error("initializeWasm() must be awaited first!");
16487         }
16488         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
16489         return nativeResponseValue;
16490 }
16491         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
16492 /* @internal */
16493 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
16494         if(!isWasmInitialized) {
16495                 throw new Error("initializeWasm() must be awaited first!");
16496         }
16497         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
16498         // debug statements here
16499 }
16500         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
16501 /* @internal */
16502 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
16503         if(!isWasmInitialized) {
16504                 throw new Error("initializeWasm() must be awaited first!");
16505         }
16506         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_logger(this_ptr);
16507         return nativeResponseValue;
16508 }
16509         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
16510 /* @internal */
16511 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
16512         if(!isWasmInitialized) {
16513                 throw new Error("initializeWasm() must be awaited first!");
16514         }
16515         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_logger(this_ptr, val);
16516         // debug statements here
16517 }
16518         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
16519 /* @internal */
16520 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
16521         if(!isWasmInitialized) {
16522                 throw new Error("initializeWasm() must be awaited first!");
16523         }
16524         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_default_config(this_ptr);
16525         return nativeResponseValue;
16526 }
16527         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
16528 /* @internal */
16529 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
16530         if(!isWasmInitialized) {
16531                 throw new Error("initializeWasm() must be awaited first!");
16532         }
16533         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_default_config(this_ptr, val);
16534         // debug statements here
16535 }
16536         // 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);
16537 /* @internal */
16538 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 {
16539         if(!isWasmInitialized) {
16540                 throw new Error("initializeWasm() must be awaited first!");
16541         }
16542         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
16543         return nativeResponseValue;
16544 }
16545         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
16546 /* @internal */
16547 export function C2Tuple_BlockHashChannelManagerZ_read(ser: number, arg: number): number {
16548         if(!isWasmInitialized) {
16549                 throw new Error("initializeWasm() must be awaited first!");
16550         }
16551         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_read(ser, arg);
16552         return nativeResponseValue;
16553 }
16554         // void DecodeError_free(struct LDKDecodeError this_obj);
16555 /* @internal */
16556 export function DecodeError_free(this_obj: number): void {
16557         if(!isWasmInitialized) {
16558                 throw new Error("initializeWasm() must be awaited first!");
16559         }
16560         const nativeResponseValue = wasm.TS_DecodeError_free(this_obj);
16561         // debug statements here
16562 }
16563         // uintptr_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
16564 /* @internal */
16565 export function DecodeError_clone_ptr(arg: number): number {
16566         if(!isWasmInitialized) {
16567                 throw new Error("initializeWasm() must be awaited first!");
16568         }
16569         const nativeResponseValue = wasm.TS_DecodeError_clone_ptr(arg);
16570         return nativeResponseValue;
16571 }
16572         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
16573 /* @internal */
16574 export function DecodeError_clone(orig: number): number {
16575         if(!isWasmInitialized) {
16576                 throw new Error("initializeWasm() must be awaited first!");
16577         }
16578         const nativeResponseValue = wasm.TS_DecodeError_clone(orig);
16579         return nativeResponseValue;
16580 }
16581         // void Init_free(struct LDKInit this_obj);
16582 /* @internal */
16583 export function Init_free(this_obj: number): void {
16584         if(!isWasmInitialized) {
16585                 throw new Error("initializeWasm() must be awaited first!");
16586         }
16587         const nativeResponseValue = wasm.TS_Init_free(this_obj);
16588         // debug statements here
16589 }
16590         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
16591 /* @internal */
16592 export function Init_get_features(this_ptr: number): number {
16593         if(!isWasmInitialized) {
16594                 throw new Error("initializeWasm() must be awaited first!");
16595         }
16596         const nativeResponseValue = wasm.TS_Init_get_features(this_ptr);
16597         return nativeResponseValue;
16598 }
16599         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
16600 /* @internal */
16601 export function Init_set_features(this_ptr: number, val: number): void {
16602         if(!isWasmInitialized) {
16603                 throw new Error("initializeWasm() must be awaited first!");
16604         }
16605         const nativeResponseValue = wasm.TS_Init_set_features(this_ptr, val);
16606         // debug statements here
16607 }
16608         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
16609 /* @internal */
16610 export function Init_new(features_arg: number): number {
16611         if(!isWasmInitialized) {
16612                 throw new Error("initializeWasm() must be awaited first!");
16613         }
16614         const nativeResponseValue = wasm.TS_Init_new(features_arg);
16615         return nativeResponseValue;
16616 }
16617         // uintptr_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
16618 /* @internal */
16619 export function Init_clone_ptr(arg: number): number {
16620         if(!isWasmInitialized) {
16621                 throw new Error("initializeWasm() must be awaited first!");
16622         }
16623         const nativeResponseValue = wasm.TS_Init_clone_ptr(arg);
16624         return nativeResponseValue;
16625 }
16626         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
16627 /* @internal */
16628 export function Init_clone(orig: number): number {
16629         if(!isWasmInitialized) {
16630                 throw new Error("initializeWasm() must be awaited first!");
16631         }
16632         const nativeResponseValue = wasm.TS_Init_clone(orig);
16633         return nativeResponseValue;
16634 }
16635         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
16636 /* @internal */
16637 export function ErrorMessage_free(this_obj: number): void {
16638         if(!isWasmInitialized) {
16639                 throw new Error("initializeWasm() must be awaited first!");
16640         }
16641         const nativeResponseValue = wasm.TS_ErrorMessage_free(this_obj);
16642         // debug statements here
16643 }
16644         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
16645 /* @internal */
16646 export function ErrorMessage_get_channel_id(this_ptr: number): number {
16647         if(!isWasmInitialized) {
16648                 throw new Error("initializeWasm() must be awaited first!");
16649         }
16650         const nativeResponseValue = wasm.TS_ErrorMessage_get_channel_id(this_ptr);
16651         return nativeResponseValue;
16652 }
16653         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16654 /* @internal */
16655 export function ErrorMessage_set_channel_id(this_ptr: number, val: number): void {
16656         if(!isWasmInitialized) {
16657                 throw new Error("initializeWasm() must be awaited first!");
16658         }
16659         const nativeResponseValue = wasm.TS_ErrorMessage_set_channel_id(this_ptr, val);
16660         // debug statements here
16661 }
16662         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
16663 /* @internal */
16664 export function ErrorMessage_get_data(this_ptr: number): number {
16665         if(!isWasmInitialized) {
16666                 throw new Error("initializeWasm() must be awaited first!");
16667         }
16668         const nativeResponseValue = wasm.TS_ErrorMessage_get_data(this_ptr);
16669         return nativeResponseValue;
16670 }
16671         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
16672 /* @internal */
16673 export function ErrorMessage_set_data(this_ptr: number, val: number): void {
16674         if(!isWasmInitialized) {
16675                 throw new Error("initializeWasm() must be awaited first!");
16676         }
16677         const nativeResponseValue = wasm.TS_ErrorMessage_set_data(this_ptr, val);
16678         // debug statements here
16679 }
16680         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
16681 /* @internal */
16682 export function ErrorMessage_new(channel_id_arg: number, data_arg: number): number {
16683         if(!isWasmInitialized) {
16684                 throw new Error("initializeWasm() must be awaited first!");
16685         }
16686         const nativeResponseValue = wasm.TS_ErrorMessage_new(channel_id_arg, data_arg);
16687         return nativeResponseValue;
16688 }
16689         // uintptr_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
16690 /* @internal */
16691 export function ErrorMessage_clone_ptr(arg: number): number {
16692         if(!isWasmInitialized) {
16693                 throw new Error("initializeWasm() must be awaited first!");
16694         }
16695         const nativeResponseValue = wasm.TS_ErrorMessage_clone_ptr(arg);
16696         return nativeResponseValue;
16697 }
16698         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
16699 /* @internal */
16700 export function ErrorMessage_clone(orig: number): number {
16701         if(!isWasmInitialized) {
16702                 throw new Error("initializeWasm() must be awaited first!");
16703         }
16704         const nativeResponseValue = wasm.TS_ErrorMessage_clone(orig);
16705         return nativeResponseValue;
16706 }
16707         // void Ping_free(struct LDKPing this_obj);
16708 /* @internal */
16709 export function Ping_free(this_obj: number): void {
16710         if(!isWasmInitialized) {
16711                 throw new Error("initializeWasm() must be awaited first!");
16712         }
16713         const nativeResponseValue = wasm.TS_Ping_free(this_obj);
16714         // debug statements here
16715 }
16716         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
16717 /* @internal */
16718 export function Ping_get_ponglen(this_ptr: number): number {
16719         if(!isWasmInitialized) {
16720                 throw new Error("initializeWasm() must be awaited first!");
16721         }
16722         const nativeResponseValue = wasm.TS_Ping_get_ponglen(this_ptr);
16723         return nativeResponseValue;
16724 }
16725         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
16726 /* @internal */
16727 export function Ping_set_ponglen(this_ptr: number, val: number): void {
16728         if(!isWasmInitialized) {
16729                 throw new Error("initializeWasm() must be awaited first!");
16730         }
16731         const nativeResponseValue = wasm.TS_Ping_set_ponglen(this_ptr, val);
16732         // debug statements here
16733 }
16734         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
16735 /* @internal */
16736 export function Ping_get_byteslen(this_ptr: number): number {
16737         if(!isWasmInitialized) {
16738                 throw new Error("initializeWasm() must be awaited first!");
16739         }
16740         const nativeResponseValue = wasm.TS_Ping_get_byteslen(this_ptr);
16741         return nativeResponseValue;
16742 }
16743         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
16744 /* @internal */
16745 export function Ping_set_byteslen(this_ptr: number, val: number): void {
16746         if(!isWasmInitialized) {
16747                 throw new Error("initializeWasm() must be awaited first!");
16748         }
16749         const nativeResponseValue = wasm.TS_Ping_set_byteslen(this_ptr, val);
16750         // debug statements here
16751 }
16752         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
16753 /* @internal */
16754 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
16755         if(!isWasmInitialized) {
16756                 throw new Error("initializeWasm() must be awaited first!");
16757         }
16758         const nativeResponseValue = wasm.TS_Ping_new(ponglen_arg, byteslen_arg);
16759         return nativeResponseValue;
16760 }
16761         // uintptr_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
16762 /* @internal */
16763 export function Ping_clone_ptr(arg: number): number {
16764         if(!isWasmInitialized) {
16765                 throw new Error("initializeWasm() must be awaited first!");
16766         }
16767         const nativeResponseValue = wasm.TS_Ping_clone_ptr(arg);
16768         return nativeResponseValue;
16769 }
16770         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
16771 /* @internal */
16772 export function Ping_clone(orig: number): number {
16773         if(!isWasmInitialized) {
16774                 throw new Error("initializeWasm() must be awaited first!");
16775         }
16776         const nativeResponseValue = wasm.TS_Ping_clone(orig);
16777         return nativeResponseValue;
16778 }
16779         // void Pong_free(struct LDKPong this_obj);
16780 /* @internal */
16781 export function Pong_free(this_obj: number): void {
16782         if(!isWasmInitialized) {
16783                 throw new Error("initializeWasm() must be awaited first!");
16784         }
16785         const nativeResponseValue = wasm.TS_Pong_free(this_obj);
16786         // debug statements here
16787 }
16788         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
16789 /* @internal */
16790 export function Pong_get_byteslen(this_ptr: number): number {
16791         if(!isWasmInitialized) {
16792                 throw new Error("initializeWasm() must be awaited first!");
16793         }
16794         const nativeResponseValue = wasm.TS_Pong_get_byteslen(this_ptr);
16795         return nativeResponseValue;
16796 }
16797         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
16798 /* @internal */
16799 export function Pong_set_byteslen(this_ptr: number, val: number): void {
16800         if(!isWasmInitialized) {
16801                 throw new Error("initializeWasm() must be awaited first!");
16802         }
16803         const nativeResponseValue = wasm.TS_Pong_set_byteslen(this_ptr, val);
16804         // debug statements here
16805 }
16806         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
16807 /* @internal */
16808 export function Pong_new(byteslen_arg: number): number {
16809         if(!isWasmInitialized) {
16810                 throw new Error("initializeWasm() must be awaited first!");
16811         }
16812         const nativeResponseValue = wasm.TS_Pong_new(byteslen_arg);
16813         return nativeResponseValue;
16814 }
16815         // uintptr_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
16816 /* @internal */
16817 export function Pong_clone_ptr(arg: number): number {
16818         if(!isWasmInitialized) {
16819                 throw new Error("initializeWasm() must be awaited first!");
16820         }
16821         const nativeResponseValue = wasm.TS_Pong_clone_ptr(arg);
16822         return nativeResponseValue;
16823 }
16824         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
16825 /* @internal */
16826 export function Pong_clone(orig: number): number {
16827         if(!isWasmInitialized) {
16828                 throw new Error("initializeWasm() must be awaited first!");
16829         }
16830         const nativeResponseValue = wasm.TS_Pong_clone(orig);
16831         return nativeResponseValue;
16832 }
16833         // void OpenChannel_free(struct LDKOpenChannel this_obj);
16834 /* @internal */
16835 export function OpenChannel_free(this_obj: number): void {
16836         if(!isWasmInitialized) {
16837                 throw new Error("initializeWasm() must be awaited first!");
16838         }
16839         const nativeResponseValue = wasm.TS_OpenChannel_free(this_obj);
16840         // debug statements here
16841 }
16842         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
16843 /* @internal */
16844 export function OpenChannel_get_chain_hash(this_ptr: number): number {
16845         if(!isWasmInitialized) {
16846                 throw new Error("initializeWasm() must be awaited first!");
16847         }
16848         const nativeResponseValue = wasm.TS_OpenChannel_get_chain_hash(this_ptr);
16849         return nativeResponseValue;
16850 }
16851         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16852 /* @internal */
16853 export function OpenChannel_set_chain_hash(this_ptr: number, val: number): void {
16854         if(!isWasmInitialized) {
16855                 throw new Error("initializeWasm() must be awaited first!");
16856         }
16857         const nativeResponseValue = wasm.TS_OpenChannel_set_chain_hash(this_ptr, val);
16858         // debug statements here
16859 }
16860         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
16861 /* @internal */
16862 export function OpenChannel_get_temporary_channel_id(this_ptr: number): number {
16863         if(!isWasmInitialized) {
16864                 throw new Error("initializeWasm() must be awaited first!");
16865         }
16866         const nativeResponseValue = wasm.TS_OpenChannel_get_temporary_channel_id(this_ptr);
16867         return nativeResponseValue;
16868 }
16869         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16870 /* @internal */
16871 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: number): void {
16872         if(!isWasmInitialized) {
16873                 throw new Error("initializeWasm() must be awaited first!");
16874         }
16875         const nativeResponseValue = wasm.TS_OpenChannel_set_temporary_channel_id(this_ptr, val);
16876         // debug statements here
16877 }
16878         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16879 /* @internal */
16880 export function OpenChannel_get_funding_satoshis(this_ptr: number): bigint {
16881         if(!isWasmInitialized) {
16882                 throw new Error("initializeWasm() must be awaited first!");
16883         }
16884         const nativeResponseValue = wasm.TS_OpenChannel_get_funding_satoshis(this_ptr);
16885         return nativeResponseValue;
16886 }
16887         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
16888 /* @internal */
16889 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: bigint): void {
16890         if(!isWasmInitialized) {
16891                 throw new Error("initializeWasm() must be awaited first!");
16892         }
16893         const nativeResponseValue = wasm.TS_OpenChannel_set_funding_satoshis(this_ptr, val);
16894         // debug statements here
16895 }
16896         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16897 /* @internal */
16898 export function OpenChannel_get_push_msat(this_ptr: number): bigint {
16899         if(!isWasmInitialized) {
16900                 throw new Error("initializeWasm() must be awaited first!");
16901         }
16902         const nativeResponseValue = wasm.TS_OpenChannel_get_push_msat(this_ptr);
16903         return nativeResponseValue;
16904 }
16905         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
16906 /* @internal */
16907 export function OpenChannel_set_push_msat(this_ptr: number, val: bigint): void {
16908         if(!isWasmInitialized) {
16909                 throw new Error("initializeWasm() must be awaited first!");
16910         }
16911         const nativeResponseValue = wasm.TS_OpenChannel_set_push_msat(this_ptr, val);
16912         // debug statements here
16913 }
16914         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16915 /* @internal */
16916 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): bigint {
16917         if(!isWasmInitialized) {
16918                 throw new Error("initializeWasm() must be awaited first!");
16919         }
16920         const nativeResponseValue = wasm.TS_OpenChannel_get_dust_limit_satoshis(this_ptr);
16921         return nativeResponseValue;
16922 }
16923         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
16924 /* @internal */
16925 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: bigint): void {
16926         if(!isWasmInitialized) {
16927                 throw new Error("initializeWasm() must be awaited first!");
16928         }
16929         const nativeResponseValue = wasm.TS_OpenChannel_set_dust_limit_satoshis(this_ptr, val);
16930         // debug statements here
16931 }
16932         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16933 /* @internal */
16934 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): bigint {
16935         if(!isWasmInitialized) {
16936                 throw new Error("initializeWasm() must be awaited first!");
16937         }
16938         const nativeResponseValue = wasm.TS_OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
16939         return nativeResponseValue;
16940 }
16941         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
16942 /* @internal */
16943 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: bigint): void {
16944         if(!isWasmInitialized) {
16945                 throw new Error("initializeWasm() must be awaited first!");
16946         }
16947         const nativeResponseValue = wasm.TS_OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
16948         // debug statements here
16949 }
16950         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16951 /* @internal */
16952 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): bigint {
16953         if(!isWasmInitialized) {
16954                 throw new Error("initializeWasm() must be awaited first!");
16955         }
16956         const nativeResponseValue = wasm.TS_OpenChannel_get_channel_reserve_satoshis(this_ptr);
16957         return nativeResponseValue;
16958 }
16959         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
16960 /* @internal */
16961 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: bigint): void {
16962         if(!isWasmInitialized) {
16963                 throw new Error("initializeWasm() must be awaited first!");
16964         }
16965         const nativeResponseValue = wasm.TS_OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
16966         // debug statements here
16967 }
16968         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16969 /* @internal */
16970 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): bigint {
16971         if(!isWasmInitialized) {
16972                 throw new Error("initializeWasm() must be awaited first!");
16973         }
16974         const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_minimum_msat(this_ptr);
16975         return nativeResponseValue;
16976 }
16977         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
16978 /* @internal */
16979 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
16980         if(!isWasmInitialized) {
16981                 throw new Error("initializeWasm() must be awaited first!");
16982         }
16983         const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_minimum_msat(this_ptr, val);
16984         // debug statements here
16985 }
16986         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
16987 /* @internal */
16988 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
16989         if(!isWasmInitialized) {
16990                 throw new Error("initializeWasm() must be awaited first!");
16991         }
16992         const nativeResponseValue = wasm.TS_OpenChannel_get_feerate_per_kw(this_ptr);
16993         return nativeResponseValue;
16994 }
16995         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
16996 /* @internal */
16997 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
16998         if(!isWasmInitialized) {
16999                 throw new Error("initializeWasm() must be awaited first!");
17000         }
17001         const nativeResponseValue = wasm.TS_OpenChannel_set_feerate_per_kw(this_ptr, val);
17002         // debug statements here
17003 }
17004         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17005 /* @internal */
17006 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
17007         if(!isWasmInitialized) {
17008                 throw new Error("initializeWasm() must be awaited first!");
17009         }
17010         const nativeResponseValue = wasm.TS_OpenChannel_get_to_self_delay(this_ptr);
17011         return nativeResponseValue;
17012 }
17013         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
17014 /* @internal */
17015 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
17016         if(!isWasmInitialized) {
17017                 throw new Error("initializeWasm() must be awaited first!");
17018         }
17019         const nativeResponseValue = wasm.TS_OpenChannel_set_to_self_delay(this_ptr, val);
17020         // debug statements here
17021 }
17022         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17023 /* @internal */
17024 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
17025         if(!isWasmInitialized) {
17026                 throw new Error("initializeWasm() must be awaited first!");
17027         }
17028         const nativeResponseValue = wasm.TS_OpenChannel_get_max_accepted_htlcs(this_ptr);
17029         return nativeResponseValue;
17030 }
17031         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
17032 /* @internal */
17033 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
17034         if(!isWasmInitialized) {
17035                 throw new Error("initializeWasm() must be awaited first!");
17036         }
17037         const nativeResponseValue = wasm.TS_OpenChannel_set_max_accepted_htlcs(this_ptr, val);
17038         // debug statements here
17039 }
17040         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17041 /* @internal */
17042 export function OpenChannel_get_funding_pubkey(this_ptr: number): number {
17043         if(!isWasmInitialized) {
17044                 throw new Error("initializeWasm() must be awaited first!");
17045         }
17046         const nativeResponseValue = wasm.TS_OpenChannel_get_funding_pubkey(this_ptr);
17047         return nativeResponseValue;
17048 }
17049         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17050 /* @internal */
17051 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: number): void {
17052         if(!isWasmInitialized) {
17053                 throw new Error("initializeWasm() must be awaited first!");
17054         }
17055         const nativeResponseValue = wasm.TS_OpenChannel_set_funding_pubkey(this_ptr, val);
17056         // debug statements here
17057 }
17058         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17059 /* @internal */
17060 export function OpenChannel_get_revocation_basepoint(this_ptr: number): number {
17061         if(!isWasmInitialized) {
17062                 throw new Error("initializeWasm() must be awaited first!");
17063         }
17064         const nativeResponseValue = wasm.TS_OpenChannel_get_revocation_basepoint(this_ptr);
17065         return nativeResponseValue;
17066 }
17067         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17068 /* @internal */
17069 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: number): void {
17070         if(!isWasmInitialized) {
17071                 throw new Error("initializeWasm() must be awaited first!");
17072         }
17073         const nativeResponseValue = wasm.TS_OpenChannel_set_revocation_basepoint(this_ptr, val);
17074         // debug statements here
17075 }
17076         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17077 /* @internal */
17078 export function OpenChannel_get_payment_point(this_ptr: number): number {
17079         if(!isWasmInitialized) {
17080                 throw new Error("initializeWasm() must be awaited first!");
17081         }
17082         const nativeResponseValue = wasm.TS_OpenChannel_get_payment_point(this_ptr);
17083         return nativeResponseValue;
17084 }
17085         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17086 /* @internal */
17087 export function OpenChannel_set_payment_point(this_ptr: number, val: number): void {
17088         if(!isWasmInitialized) {
17089                 throw new Error("initializeWasm() must be awaited first!");
17090         }
17091         const nativeResponseValue = wasm.TS_OpenChannel_set_payment_point(this_ptr, val);
17092         // debug statements here
17093 }
17094         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17095 /* @internal */
17096 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): number {
17097         if(!isWasmInitialized) {
17098                 throw new Error("initializeWasm() must be awaited first!");
17099         }
17100         const nativeResponseValue = wasm.TS_OpenChannel_get_delayed_payment_basepoint(this_ptr);
17101         return nativeResponseValue;
17102 }
17103         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17104 /* @internal */
17105 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: number): void {
17106         if(!isWasmInitialized) {
17107                 throw new Error("initializeWasm() must be awaited first!");
17108         }
17109         const nativeResponseValue = wasm.TS_OpenChannel_set_delayed_payment_basepoint(this_ptr, val);
17110         // debug statements here
17111 }
17112         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17113 /* @internal */
17114 export function OpenChannel_get_htlc_basepoint(this_ptr: number): number {
17115         if(!isWasmInitialized) {
17116                 throw new Error("initializeWasm() must be awaited first!");
17117         }
17118         const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_basepoint(this_ptr);
17119         return nativeResponseValue;
17120 }
17121         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17122 /* @internal */
17123 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: number): void {
17124         if(!isWasmInitialized) {
17125                 throw new Error("initializeWasm() must be awaited first!");
17126         }
17127         const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_basepoint(this_ptr, val);
17128         // debug statements here
17129 }
17130         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17131 /* @internal */
17132 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): number {
17133         if(!isWasmInitialized) {
17134                 throw new Error("initializeWasm() must be awaited first!");
17135         }
17136         const nativeResponseValue = wasm.TS_OpenChannel_get_first_per_commitment_point(this_ptr);
17137         return nativeResponseValue;
17138 }
17139         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17140 /* @internal */
17141 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: number): void {
17142         if(!isWasmInitialized) {
17143                 throw new Error("initializeWasm() must be awaited first!");
17144         }
17145         const nativeResponseValue = wasm.TS_OpenChannel_set_first_per_commitment_point(this_ptr, val);
17146         // debug statements here
17147 }
17148         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17149 /* @internal */
17150 export function OpenChannel_get_channel_flags(this_ptr: number): number {
17151         if(!isWasmInitialized) {
17152                 throw new Error("initializeWasm() must be awaited first!");
17153         }
17154         const nativeResponseValue = wasm.TS_OpenChannel_get_channel_flags(this_ptr);
17155         return nativeResponseValue;
17156 }
17157         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
17158 /* @internal */
17159 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
17160         if(!isWasmInitialized) {
17161                 throw new Error("initializeWasm() must be awaited first!");
17162         }
17163         const nativeResponseValue = wasm.TS_OpenChannel_set_channel_flags(this_ptr, val);
17164         // debug statements here
17165 }
17166         // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
17167 /* @internal */
17168 export function OpenChannel_get_channel_type(this_ptr: number): number {
17169         if(!isWasmInitialized) {
17170                 throw new Error("initializeWasm() must be awaited first!");
17171         }
17172         const nativeResponseValue = wasm.TS_OpenChannel_get_channel_type(this_ptr);
17173         return nativeResponseValue;
17174 }
17175         // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
17176 /* @internal */
17177 export function OpenChannel_set_channel_type(this_ptr: number, val: number): void {
17178         if(!isWasmInitialized) {
17179                 throw new Error("initializeWasm() must be awaited first!");
17180         }
17181         const nativeResponseValue = wasm.TS_OpenChannel_set_channel_type(this_ptr, val);
17182         // debug statements here
17183 }
17184         // uintptr_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
17185 /* @internal */
17186 export function OpenChannel_clone_ptr(arg: number): number {
17187         if(!isWasmInitialized) {
17188                 throw new Error("initializeWasm() must be awaited first!");
17189         }
17190         const nativeResponseValue = wasm.TS_OpenChannel_clone_ptr(arg);
17191         return nativeResponseValue;
17192 }
17193         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
17194 /* @internal */
17195 export function OpenChannel_clone(orig: number): number {
17196         if(!isWasmInitialized) {
17197                 throw new Error("initializeWasm() must be awaited first!");
17198         }
17199         const nativeResponseValue = wasm.TS_OpenChannel_clone(orig);
17200         return nativeResponseValue;
17201 }
17202         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
17203 /* @internal */
17204 export function AcceptChannel_free(this_obj: number): void {
17205         if(!isWasmInitialized) {
17206                 throw new Error("initializeWasm() must be awaited first!");
17207         }
17208         const nativeResponseValue = wasm.TS_AcceptChannel_free(this_obj);
17209         // debug statements here
17210 }
17211         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
17212 /* @internal */
17213 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): number {
17214         if(!isWasmInitialized) {
17215                 throw new Error("initializeWasm() must be awaited first!");
17216         }
17217         const nativeResponseValue = wasm.TS_AcceptChannel_get_temporary_channel_id(this_ptr);
17218         return nativeResponseValue;
17219 }
17220         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17221 /* @internal */
17222 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: number): void {
17223         if(!isWasmInitialized) {
17224                 throw new Error("initializeWasm() must be awaited first!");
17225         }
17226         const nativeResponseValue = wasm.TS_AcceptChannel_set_temporary_channel_id(this_ptr, val);
17227         // debug statements here
17228 }
17229         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17230 /* @internal */
17231 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): bigint {
17232         if(!isWasmInitialized) {
17233                 throw new Error("initializeWasm() must be awaited first!");
17234         }
17235         const nativeResponseValue = wasm.TS_AcceptChannel_get_dust_limit_satoshis(this_ptr);
17236         return nativeResponseValue;
17237 }
17238         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
17239 /* @internal */
17240 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: bigint): void {
17241         if(!isWasmInitialized) {
17242                 throw new Error("initializeWasm() must be awaited first!");
17243         }
17244         const nativeResponseValue = wasm.TS_AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
17245         // debug statements here
17246 }
17247         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17248 /* @internal */
17249 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): bigint {
17250         if(!isWasmInitialized) {
17251                 throw new Error("initializeWasm() must be awaited first!");
17252         }
17253         const nativeResponseValue = wasm.TS_AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
17254         return nativeResponseValue;
17255 }
17256         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
17257 /* @internal */
17258 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: bigint): void {
17259         if(!isWasmInitialized) {
17260                 throw new Error("initializeWasm() must be awaited first!");
17261         }
17262         const nativeResponseValue = wasm.TS_AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
17263         // debug statements here
17264 }
17265         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17266 /* @internal */
17267 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): bigint {
17268         if(!isWasmInitialized) {
17269                 throw new Error("initializeWasm() must be awaited first!");
17270         }
17271         const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_reserve_satoshis(this_ptr);
17272         return nativeResponseValue;
17273 }
17274         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
17275 /* @internal */
17276 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: bigint): void {
17277         if(!isWasmInitialized) {
17278                 throw new Error("initializeWasm() must be awaited first!");
17279         }
17280         const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
17281         // debug statements here
17282 }
17283         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17284 /* @internal */
17285 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): bigint {
17286         if(!isWasmInitialized) {
17287                 throw new Error("initializeWasm() must be awaited first!");
17288         }
17289         const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_minimum_msat(this_ptr);
17290         return nativeResponseValue;
17291 }
17292         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
17293 /* @internal */
17294 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
17295         if(!isWasmInitialized) {
17296                 throw new Error("initializeWasm() must be awaited first!");
17297         }
17298         const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
17299         // debug statements here
17300 }
17301         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17302 /* @internal */
17303 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
17304         if(!isWasmInitialized) {
17305                 throw new Error("initializeWasm() must be awaited first!");
17306         }
17307         const nativeResponseValue = wasm.TS_AcceptChannel_get_minimum_depth(this_ptr);
17308         return nativeResponseValue;
17309 }
17310         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
17311 /* @internal */
17312 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
17313         if(!isWasmInitialized) {
17314                 throw new Error("initializeWasm() must be awaited first!");
17315         }
17316         const nativeResponseValue = wasm.TS_AcceptChannel_set_minimum_depth(this_ptr, val);
17317         // debug statements here
17318 }
17319         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17320 /* @internal */
17321 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
17322         if(!isWasmInitialized) {
17323                 throw new Error("initializeWasm() must be awaited first!");
17324         }
17325         const nativeResponseValue = wasm.TS_AcceptChannel_get_to_self_delay(this_ptr);
17326         return nativeResponseValue;
17327 }
17328         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
17329 /* @internal */
17330 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
17331         if(!isWasmInitialized) {
17332                 throw new Error("initializeWasm() must be awaited first!");
17333         }
17334         const nativeResponseValue = wasm.TS_AcceptChannel_set_to_self_delay(this_ptr, val);
17335         // debug statements here
17336 }
17337         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17338 /* @internal */
17339 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
17340         if(!isWasmInitialized) {
17341                 throw new Error("initializeWasm() must be awaited first!");
17342         }
17343         const nativeResponseValue = wasm.TS_AcceptChannel_get_max_accepted_htlcs(this_ptr);
17344         return nativeResponseValue;
17345 }
17346         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
17347 /* @internal */
17348 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
17349         if(!isWasmInitialized) {
17350                 throw new Error("initializeWasm() must be awaited first!");
17351         }
17352         const nativeResponseValue = wasm.TS_AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
17353         // debug statements here
17354 }
17355         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17356 /* @internal */
17357 export function AcceptChannel_get_funding_pubkey(this_ptr: number): number {
17358         if(!isWasmInitialized) {
17359                 throw new Error("initializeWasm() must be awaited first!");
17360         }
17361         const nativeResponseValue = wasm.TS_AcceptChannel_get_funding_pubkey(this_ptr);
17362         return nativeResponseValue;
17363 }
17364         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17365 /* @internal */
17366 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: number): void {
17367         if(!isWasmInitialized) {
17368                 throw new Error("initializeWasm() must be awaited first!");
17369         }
17370         const nativeResponseValue = wasm.TS_AcceptChannel_set_funding_pubkey(this_ptr, val);
17371         // debug statements here
17372 }
17373         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17374 /* @internal */
17375 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): number {
17376         if(!isWasmInitialized) {
17377                 throw new Error("initializeWasm() must be awaited first!");
17378         }
17379         const nativeResponseValue = wasm.TS_AcceptChannel_get_revocation_basepoint(this_ptr);
17380         return nativeResponseValue;
17381 }
17382         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17383 /* @internal */
17384 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: number): void {
17385         if(!isWasmInitialized) {
17386                 throw new Error("initializeWasm() must be awaited first!");
17387         }
17388         const nativeResponseValue = wasm.TS_AcceptChannel_set_revocation_basepoint(this_ptr, val);
17389         // debug statements here
17390 }
17391         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17392 /* @internal */
17393 export function AcceptChannel_get_payment_point(this_ptr: number): number {
17394         if(!isWasmInitialized) {
17395                 throw new Error("initializeWasm() must be awaited first!");
17396         }
17397         const nativeResponseValue = wasm.TS_AcceptChannel_get_payment_point(this_ptr);
17398         return nativeResponseValue;
17399 }
17400         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17401 /* @internal */
17402 export function AcceptChannel_set_payment_point(this_ptr: number, val: number): void {
17403         if(!isWasmInitialized) {
17404                 throw new Error("initializeWasm() must be awaited first!");
17405         }
17406         const nativeResponseValue = wasm.TS_AcceptChannel_set_payment_point(this_ptr, val);
17407         // debug statements here
17408 }
17409         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17410 /* @internal */
17411 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): number {
17412         if(!isWasmInitialized) {
17413                 throw new Error("initializeWasm() must be awaited first!");
17414         }
17415         const nativeResponseValue = wasm.TS_AcceptChannel_get_delayed_payment_basepoint(this_ptr);
17416         return nativeResponseValue;
17417 }
17418         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17419 /* @internal */
17420 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: number): void {
17421         if(!isWasmInitialized) {
17422                 throw new Error("initializeWasm() must be awaited first!");
17423         }
17424         const nativeResponseValue = wasm.TS_AcceptChannel_set_delayed_payment_basepoint(this_ptr, val);
17425         // debug statements here
17426 }
17427         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17428 /* @internal */
17429 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): number {
17430         if(!isWasmInitialized) {
17431                 throw new Error("initializeWasm() must be awaited first!");
17432         }
17433         const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_basepoint(this_ptr);
17434         return nativeResponseValue;
17435 }
17436         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17437 /* @internal */
17438 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: number): void {
17439         if(!isWasmInitialized) {
17440                 throw new Error("initializeWasm() must be awaited first!");
17441         }
17442         const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_basepoint(this_ptr, val);
17443         // debug statements here
17444 }
17445         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
17446 /* @internal */
17447 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): number {
17448         if(!isWasmInitialized) {
17449                 throw new Error("initializeWasm() must be awaited first!");
17450         }
17451         const nativeResponseValue = wasm.TS_AcceptChannel_get_first_per_commitment_point(this_ptr);
17452         return nativeResponseValue;
17453 }
17454         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17455 /* @internal */
17456 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: number): void {
17457         if(!isWasmInitialized) {
17458                 throw new Error("initializeWasm() must be awaited first!");
17459         }
17460         const nativeResponseValue = wasm.TS_AcceptChannel_set_first_per_commitment_point(this_ptr, val);
17461         // debug statements here
17462 }
17463         // uintptr_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
17464 /* @internal */
17465 export function AcceptChannel_clone_ptr(arg: number): number {
17466         if(!isWasmInitialized) {
17467                 throw new Error("initializeWasm() must be awaited first!");
17468         }
17469         const nativeResponseValue = wasm.TS_AcceptChannel_clone_ptr(arg);
17470         return nativeResponseValue;
17471 }
17472         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
17473 /* @internal */
17474 export function AcceptChannel_clone(orig: number): number {
17475         if(!isWasmInitialized) {
17476                 throw new Error("initializeWasm() must be awaited first!");
17477         }
17478         const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig);
17479         return nativeResponseValue;
17480 }
17481         // void FundingCreated_free(struct LDKFundingCreated this_obj);
17482 /* @internal */
17483 export function FundingCreated_free(this_obj: number): void {
17484         if(!isWasmInitialized) {
17485                 throw new Error("initializeWasm() must be awaited first!");
17486         }
17487         const nativeResponseValue = wasm.TS_FundingCreated_free(this_obj);
17488         // debug statements here
17489 }
17490         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
17491 /* @internal */
17492 export function FundingCreated_get_temporary_channel_id(this_ptr: number): number {
17493         if(!isWasmInitialized) {
17494                 throw new Error("initializeWasm() must be awaited first!");
17495         }
17496         const nativeResponseValue = wasm.TS_FundingCreated_get_temporary_channel_id(this_ptr);
17497         return nativeResponseValue;
17498 }
17499         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17500 /* @internal */
17501 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: number): void {
17502         if(!isWasmInitialized) {
17503                 throw new Error("initializeWasm() must be awaited first!");
17504         }
17505         const nativeResponseValue = wasm.TS_FundingCreated_set_temporary_channel_id(this_ptr, val);
17506         // debug statements here
17507 }
17508         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
17509 /* @internal */
17510 export function FundingCreated_get_funding_txid(this_ptr: number): number {
17511         if(!isWasmInitialized) {
17512                 throw new Error("initializeWasm() must be awaited first!");
17513         }
17514         const nativeResponseValue = wasm.TS_FundingCreated_get_funding_txid(this_ptr);
17515         return nativeResponseValue;
17516 }
17517         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17518 /* @internal */
17519 export function FundingCreated_set_funding_txid(this_ptr: number, val: number): void {
17520         if(!isWasmInitialized) {
17521                 throw new Error("initializeWasm() must be awaited first!");
17522         }
17523         const nativeResponseValue = wasm.TS_FundingCreated_set_funding_txid(this_ptr, val);
17524         // debug statements here
17525 }
17526         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
17527 /* @internal */
17528 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
17529         if(!isWasmInitialized) {
17530                 throw new Error("initializeWasm() must be awaited first!");
17531         }
17532         const nativeResponseValue = wasm.TS_FundingCreated_get_funding_output_index(this_ptr);
17533         return nativeResponseValue;
17534 }
17535         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
17536 /* @internal */
17537 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
17538         if(!isWasmInitialized) {
17539                 throw new Error("initializeWasm() must be awaited first!");
17540         }
17541         const nativeResponseValue = wasm.TS_FundingCreated_set_funding_output_index(this_ptr, val);
17542         // debug statements here
17543 }
17544         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
17545 /* @internal */
17546 export function FundingCreated_get_signature(this_ptr: number): number {
17547         if(!isWasmInitialized) {
17548                 throw new Error("initializeWasm() must be awaited first!");
17549         }
17550         const nativeResponseValue = wasm.TS_FundingCreated_get_signature(this_ptr);
17551         return nativeResponseValue;
17552 }
17553         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
17554 /* @internal */
17555 export function FundingCreated_set_signature(this_ptr: number, val: number): void {
17556         if(!isWasmInitialized) {
17557                 throw new Error("initializeWasm() must be awaited first!");
17558         }
17559         const nativeResponseValue = wasm.TS_FundingCreated_set_signature(this_ptr, val);
17560         // debug statements here
17561 }
17562         // 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);
17563 /* @internal */
17564 export function FundingCreated_new(temporary_channel_id_arg: number, funding_txid_arg: number, funding_output_index_arg: number, signature_arg: number): number {
17565         if(!isWasmInitialized) {
17566                 throw new Error("initializeWasm() must be awaited first!");
17567         }
17568         const nativeResponseValue = wasm.TS_FundingCreated_new(temporary_channel_id_arg, funding_txid_arg, funding_output_index_arg, signature_arg);
17569         return nativeResponseValue;
17570 }
17571         // uintptr_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
17572 /* @internal */
17573 export function FundingCreated_clone_ptr(arg: number): number {
17574         if(!isWasmInitialized) {
17575                 throw new Error("initializeWasm() must be awaited first!");
17576         }
17577         const nativeResponseValue = wasm.TS_FundingCreated_clone_ptr(arg);
17578         return nativeResponseValue;
17579 }
17580         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
17581 /* @internal */
17582 export function FundingCreated_clone(orig: number): number {
17583         if(!isWasmInitialized) {
17584                 throw new Error("initializeWasm() must be awaited first!");
17585         }
17586         const nativeResponseValue = wasm.TS_FundingCreated_clone(orig);
17587         return nativeResponseValue;
17588 }
17589         // void FundingSigned_free(struct LDKFundingSigned this_obj);
17590 /* @internal */
17591 export function FundingSigned_free(this_obj: number): void {
17592         if(!isWasmInitialized) {
17593                 throw new Error("initializeWasm() must be awaited first!");
17594         }
17595         const nativeResponseValue = wasm.TS_FundingSigned_free(this_obj);
17596         // debug statements here
17597 }
17598         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
17599 /* @internal */
17600 export function FundingSigned_get_channel_id(this_ptr: number): number {
17601         if(!isWasmInitialized) {
17602                 throw new Error("initializeWasm() must be awaited first!");
17603         }
17604         const nativeResponseValue = wasm.TS_FundingSigned_get_channel_id(this_ptr);
17605         return nativeResponseValue;
17606 }
17607         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17608 /* @internal */
17609 export function FundingSigned_set_channel_id(this_ptr: number, val: number): void {
17610         if(!isWasmInitialized) {
17611                 throw new Error("initializeWasm() must be awaited first!");
17612         }
17613         const nativeResponseValue = wasm.TS_FundingSigned_set_channel_id(this_ptr, val);
17614         // debug statements here
17615 }
17616         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
17617 /* @internal */
17618 export function FundingSigned_get_signature(this_ptr: number): number {
17619         if(!isWasmInitialized) {
17620                 throw new Error("initializeWasm() must be awaited first!");
17621         }
17622         const nativeResponseValue = wasm.TS_FundingSigned_get_signature(this_ptr);
17623         return nativeResponseValue;
17624 }
17625         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
17626 /* @internal */
17627 export function FundingSigned_set_signature(this_ptr: number, val: number): void {
17628         if(!isWasmInitialized) {
17629                 throw new Error("initializeWasm() must be awaited first!");
17630         }
17631         const nativeResponseValue = wasm.TS_FundingSigned_set_signature(this_ptr, val);
17632         // debug statements here
17633 }
17634         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
17635 /* @internal */
17636 export function FundingSigned_new(channel_id_arg: number, signature_arg: number): number {
17637         if(!isWasmInitialized) {
17638                 throw new Error("initializeWasm() must be awaited first!");
17639         }
17640         const nativeResponseValue = wasm.TS_FundingSigned_new(channel_id_arg, signature_arg);
17641         return nativeResponseValue;
17642 }
17643         // uintptr_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
17644 /* @internal */
17645 export function FundingSigned_clone_ptr(arg: number): number {
17646         if(!isWasmInitialized) {
17647                 throw new Error("initializeWasm() must be awaited first!");
17648         }
17649         const nativeResponseValue = wasm.TS_FundingSigned_clone_ptr(arg);
17650         return nativeResponseValue;
17651 }
17652         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
17653 /* @internal */
17654 export function FundingSigned_clone(orig: number): number {
17655         if(!isWasmInitialized) {
17656                 throw new Error("initializeWasm() must be awaited first!");
17657         }
17658         const nativeResponseValue = wasm.TS_FundingSigned_clone(orig);
17659         return nativeResponseValue;
17660 }
17661         // void FundingLocked_free(struct LDKFundingLocked this_obj);
17662 /* @internal */
17663 export function FundingLocked_free(this_obj: number): void {
17664         if(!isWasmInitialized) {
17665                 throw new Error("initializeWasm() must be awaited first!");
17666         }
17667         const nativeResponseValue = wasm.TS_FundingLocked_free(this_obj);
17668         // debug statements here
17669 }
17670         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
17671 /* @internal */
17672 export function FundingLocked_get_channel_id(this_ptr: number): number {
17673         if(!isWasmInitialized) {
17674                 throw new Error("initializeWasm() must be awaited first!");
17675         }
17676         const nativeResponseValue = wasm.TS_FundingLocked_get_channel_id(this_ptr);
17677         return nativeResponseValue;
17678 }
17679         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17680 /* @internal */
17681 export function FundingLocked_set_channel_id(this_ptr: number, val: number): void {
17682         if(!isWasmInitialized) {
17683                 throw new Error("initializeWasm() must be awaited first!");
17684         }
17685         const nativeResponseValue = wasm.TS_FundingLocked_set_channel_id(this_ptr, val);
17686         // debug statements here
17687 }
17688         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
17689 /* @internal */
17690 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): number {
17691         if(!isWasmInitialized) {
17692                 throw new Error("initializeWasm() must be awaited first!");
17693         }
17694         const nativeResponseValue = wasm.TS_FundingLocked_get_next_per_commitment_point(this_ptr);
17695         return nativeResponseValue;
17696 }
17697         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17698 /* @internal */
17699 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: number): void {
17700         if(!isWasmInitialized) {
17701                 throw new Error("initializeWasm() must be awaited first!");
17702         }
17703         const nativeResponseValue = wasm.TS_FundingLocked_set_next_per_commitment_point(this_ptr, val);
17704         // debug statements here
17705 }
17706         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
17707 /* @internal */
17708 export function FundingLocked_new(channel_id_arg: number, next_per_commitment_point_arg: number): number {
17709         if(!isWasmInitialized) {
17710                 throw new Error("initializeWasm() must be awaited first!");
17711         }
17712         const nativeResponseValue = wasm.TS_FundingLocked_new(channel_id_arg, next_per_commitment_point_arg);
17713         return nativeResponseValue;
17714 }
17715         // uintptr_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
17716 /* @internal */
17717 export function FundingLocked_clone_ptr(arg: number): number {
17718         if(!isWasmInitialized) {
17719                 throw new Error("initializeWasm() must be awaited first!");
17720         }
17721         const nativeResponseValue = wasm.TS_FundingLocked_clone_ptr(arg);
17722         return nativeResponseValue;
17723 }
17724         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
17725 /* @internal */
17726 export function FundingLocked_clone(orig: number): number {
17727         if(!isWasmInitialized) {
17728                 throw new Error("initializeWasm() must be awaited first!");
17729         }
17730         const nativeResponseValue = wasm.TS_FundingLocked_clone(orig);
17731         return nativeResponseValue;
17732 }
17733         // void Shutdown_free(struct LDKShutdown this_obj);
17734 /* @internal */
17735 export function Shutdown_free(this_obj: number): void {
17736         if(!isWasmInitialized) {
17737                 throw new Error("initializeWasm() must be awaited first!");
17738         }
17739         const nativeResponseValue = wasm.TS_Shutdown_free(this_obj);
17740         // debug statements here
17741 }
17742         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
17743 /* @internal */
17744 export function Shutdown_get_channel_id(this_ptr: number): number {
17745         if(!isWasmInitialized) {
17746                 throw new Error("initializeWasm() must be awaited first!");
17747         }
17748         const nativeResponseValue = wasm.TS_Shutdown_get_channel_id(this_ptr);
17749         return nativeResponseValue;
17750 }
17751         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17752 /* @internal */
17753 export function Shutdown_set_channel_id(this_ptr: number, val: number): void {
17754         if(!isWasmInitialized) {
17755                 throw new Error("initializeWasm() must be awaited first!");
17756         }
17757         const nativeResponseValue = wasm.TS_Shutdown_set_channel_id(this_ptr, val);
17758         // debug statements here
17759 }
17760         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
17761 /* @internal */
17762 export function Shutdown_get_scriptpubkey(this_ptr: number): number {
17763         if(!isWasmInitialized) {
17764                 throw new Error("initializeWasm() must be awaited first!");
17765         }
17766         const nativeResponseValue = wasm.TS_Shutdown_get_scriptpubkey(this_ptr);
17767         return nativeResponseValue;
17768 }
17769         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
17770 /* @internal */
17771 export function Shutdown_set_scriptpubkey(this_ptr: number, val: number): void {
17772         if(!isWasmInitialized) {
17773                 throw new Error("initializeWasm() must be awaited first!");
17774         }
17775         const nativeResponseValue = wasm.TS_Shutdown_set_scriptpubkey(this_ptr, val);
17776         // debug statements here
17777 }
17778         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
17779 /* @internal */
17780 export function Shutdown_new(channel_id_arg: number, scriptpubkey_arg: number): number {
17781         if(!isWasmInitialized) {
17782                 throw new Error("initializeWasm() must be awaited first!");
17783         }
17784         const nativeResponseValue = wasm.TS_Shutdown_new(channel_id_arg, scriptpubkey_arg);
17785         return nativeResponseValue;
17786 }
17787         // uintptr_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
17788 /* @internal */
17789 export function Shutdown_clone_ptr(arg: number): number {
17790         if(!isWasmInitialized) {
17791                 throw new Error("initializeWasm() must be awaited first!");
17792         }
17793         const nativeResponseValue = wasm.TS_Shutdown_clone_ptr(arg);
17794         return nativeResponseValue;
17795 }
17796         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
17797 /* @internal */
17798 export function Shutdown_clone(orig: number): number {
17799         if(!isWasmInitialized) {
17800                 throw new Error("initializeWasm() must be awaited first!");
17801         }
17802         const nativeResponseValue = wasm.TS_Shutdown_clone(orig);
17803         return nativeResponseValue;
17804 }
17805         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
17806 /* @internal */
17807 export function ClosingSignedFeeRange_free(this_obj: number): void {
17808         if(!isWasmInitialized) {
17809                 throw new Error("initializeWasm() must be awaited first!");
17810         }
17811         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_free(this_obj);
17812         // debug statements here
17813 }
17814         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
17815 /* @internal */
17816 export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): bigint {
17817         if(!isWasmInitialized) {
17818                 throw new Error("initializeWasm() must be awaited first!");
17819         }
17820         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
17821         return nativeResponseValue;
17822 }
17823         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
17824 /* @internal */
17825 export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: bigint): void {
17826         if(!isWasmInitialized) {
17827                 throw new Error("initializeWasm() must be awaited first!");
17828         }
17829         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
17830         // debug statements here
17831 }
17832         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
17833 /* @internal */
17834 export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): bigint {
17835         if(!isWasmInitialized) {
17836                 throw new Error("initializeWasm() must be awaited first!");
17837         }
17838         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
17839         return nativeResponseValue;
17840 }
17841         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
17842 /* @internal */
17843 export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: bigint): void {
17844         if(!isWasmInitialized) {
17845                 throw new Error("initializeWasm() must be awaited first!");
17846         }
17847         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
17848         // debug statements here
17849 }
17850         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
17851 /* @internal */
17852 export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: bigint, max_fee_satoshis_arg: bigint): number {
17853         if(!isWasmInitialized) {
17854                 throw new Error("initializeWasm() must be awaited first!");
17855         }
17856         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
17857         return nativeResponseValue;
17858 }
17859         // uintptr_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
17860 /* @internal */
17861 export function ClosingSignedFeeRange_clone_ptr(arg: number): number {
17862         if(!isWasmInitialized) {
17863                 throw new Error("initializeWasm() must be awaited first!");
17864         }
17865         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone_ptr(arg);
17866         return nativeResponseValue;
17867 }
17868         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
17869 /* @internal */
17870 export function ClosingSignedFeeRange_clone(orig: number): number {
17871         if(!isWasmInitialized) {
17872                 throw new Error("initializeWasm() must be awaited first!");
17873         }
17874         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone(orig);
17875         return nativeResponseValue;
17876 }
17877         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
17878 /* @internal */
17879 export function ClosingSigned_free(this_obj: number): void {
17880         if(!isWasmInitialized) {
17881                 throw new Error("initializeWasm() must be awaited first!");
17882         }
17883         const nativeResponseValue = wasm.TS_ClosingSigned_free(this_obj);
17884         // debug statements here
17885 }
17886         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
17887 /* @internal */
17888 export function ClosingSigned_get_channel_id(this_ptr: number): number {
17889         if(!isWasmInitialized) {
17890                 throw new Error("initializeWasm() must be awaited first!");
17891         }
17892         const nativeResponseValue = wasm.TS_ClosingSigned_get_channel_id(this_ptr);
17893         return nativeResponseValue;
17894 }
17895         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17896 /* @internal */
17897 export function ClosingSigned_set_channel_id(this_ptr: number, val: number): void {
17898         if(!isWasmInitialized) {
17899                 throw new Error("initializeWasm() must be awaited first!");
17900         }
17901         const nativeResponseValue = wasm.TS_ClosingSigned_set_channel_id(this_ptr, val);
17902         // debug statements here
17903 }
17904         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
17905 /* @internal */
17906 export function ClosingSigned_get_fee_satoshis(this_ptr: number): bigint {
17907         if(!isWasmInitialized) {
17908                 throw new Error("initializeWasm() must be awaited first!");
17909         }
17910         const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_satoshis(this_ptr);
17911         return nativeResponseValue;
17912 }
17913         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
17914 /* @internal */
17915 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: bigint): void {
17916         if(!isWasmInitialized) {
17917                 throw new Error("initializeWasm() must be awaited first!");
17918         }
17919         const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_satoshis(this_ptr, val);
17920         // debug statements here
17921 }
17922         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
17923 /* @internal */
17924 export function ClosingSigned_get_signature(this_ptr: number): number {
17925         if(!isWasmInitialized) {
17926                 throw new Error("initializeWasm() must be awaited first!");
17927         }
17928         const nativeResponseValue = wasm.TS_ClosingSigned_get_signature(this_ptr);
17929         return nativeResponseValue;
17930 }
17931         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
17932 /* @internal */
17933 export function ClosingSigned_set_signature(this_ptr: number, val: number): void {
17934         if(!isWasmInitialized) {
17935                 throw new Error("initializeWasm() must be awaited first!");
17936         }
17937         const nativeResponseValue = wasm.TS_ClosingSigned_set_signature(this_ptr, val);
17938         // debug statements here
17939 }
17940         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
17941 /* @internal */
17942 export function ClosingSigned_get_fee_range(this_ptr: number): number {
17943         if(!isWasmInitialized) {
17944                 throw new Error("initializeWasm() must be awaited first!");
17945         }
17946         const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_range(this_ptr);
17947         return nativeResponseValue;
17948 }
17949         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
17950 /* @internal */
17951 export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
17952         if(!isWasmInitialized) {
17953                 throw new Error("initializeWasm() must be awaited first!");
17954         }
17955         const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_range(this_ptr, val);
17956         // debug statements here
17957 }
17958         // 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);
17959 /* @internal */
17960 export function ClosingSigned_new(channel_id_arg: number, fee_satoshis_arg: bigint, signature_arg: number, fee_range_arg: number): number {
17961         if(!isWasmInitialized) {
17962                 throw new Error("initializeWasm() must be awaited first!");
17963         }
17964         const nativeResponseValue = wasm.TS_ClosingSigned_new(channel_id_arg, fee_satoshis_arg, signature_arg, fee_range_arg);
17965         return nativeResponseValue;
17966 }
17967         // uintptr_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
17968 /* @internal */
17969 export function ClosingSigned_clone_ptr(arg: number): number {
17970         if(!isWasmInitialized) {
17971                 throw new Error("initializeWasm() must be awaited first!");
17972         }
17973         const nativeResponseValue = wasm.TS_ClosingSigned_clone_ptr(arg);
17974         return nativeResponseValue;
17975 }
17976         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
17977 /* @internal */
17978 export function ClosingSigned_clone(orig: number): number {
17979         if(!isWasmInitialized) {
17980                 throw new Error("initializeWasm() must be awaited first!");
17981         }
17982         const nativeResponseValue = wasm.TS_ClosingSigned_clone(orig);
17983         return nativeResponseValue;
17984 }
17985         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
17986 /* @internal */
17987 export function UpdateAddHTLC_free(this_obj: number): void {
17988         if(!isWasmInitialized) {
17989                 throw new Error("initializeWasm() must be awaited first!");
17990         }
17991         const nativeResponseValue = wasm.TS_UpdateAddHTLC_free(this_obj);
17992         // debug statements here
17993 }
17994         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
17995 /* @internal */
17996 export function UpdateAddHTLC_get_channel_id(this_ptr: number): number {
17997         if(!isWasmInitialized) {
17998                 throw new Error("initializeWasm() must be awaited first!");
17999         }
18000         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_channel_id(this_ptr);
18001         return nativeResponseValue;
18002 }
18003         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18004 /* @internal */
18005 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: number): void {
18006         if(!isWasmInitialized) {
18007                 throw new Error("initializeWasm() must be awaited first!");
18008         }
18009         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_channel_id(this_ptr, val);
18010         // debug statements here
18011 }
18012         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
18013 /* @internal */
18014 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): bigint {
18015         if(!isWasmInitialized) {
18016                 throw new Error("initializeWasm() must be awaited first!");
18017         }
18018         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_htlc_id(this_ptr);
18019         return nativeResponseValue;
18020 }
18021         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
18022 /* @internal */
18023 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
18024         if(!isWasmInitialized) {
18025                 throw new Error("initializeWasm() must be awaited first!");
18026         }
18027         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_htlc_id(this_ptr, val);
18028         // debug statements here
18029 }
18030         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
18031 /* @internal */
18032 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): bigint {
18033         if(!isWasmInitialized) {
18034                 throw new Error("initializeWasm() must be awaited first!");
18035         }
18036         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_amount_msat(this_ptr);
18037         return nativeResponseValue;
18038 }
18039         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
18040 /* @internal */
18041 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: bigint): void {
18042         if(!isWasmInitialized) {
18043                 throw new Error("initializeWasm() must be awaited first!");
18044         }
18045         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_amount_msat(this_ptr, val);
18046         // debug statements here
18047 }
18048         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
18049 /* @internal */
18050 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): number {
18051         if(!isWasmInitialized) {
18052                 throw new Error("initializeWasm() must be awaited first!");
18053         }
18054         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_payment_hash(this_ptr);
18055         return nativeResponseValue;
18056 }
18057         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18058 /* @internal */
18059 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: number): void {
18060         if(!isWasmInitialized) {
18061                 throw new Error("initializeWasm() must be awaited first!");
18062         }
18063         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_payment_hash(this_ptr, val);
18064         // debug statements here
18065 }
18066         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
18067 /* @internal */
18068 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
18069         if(!isWasmInitialized) {
18070                 throw new Error("initializeWasm() must be awaited first!");
18071         }
18072         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_cltv_expiry(this_ptr);
18073         return nativeResponseValue;
18074 }
18075         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
18076 /* @internal */
18077 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
18078         if(!isWasmInitialized) {
18079                 throw new Error("initializeWasm() must be awaited first!");
18080         }
18081         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
18082         // debug statements here
18083 }
18084         // uintptr_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
18085 /* @internal */
18086 export function UpdateAddHTLC_clone_ptr(arg: number): number {
18087         if(!isWasmInitialized) {
18088                 throw new Error("initializeWasm() must be awaited first!");
18089         }
18090         const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone_ptr(arg);
18091         return nativeResponseValue;
18092 }
18093         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
18094 /* @internal */
18095 export function UpdateAddHTLC_clone(orig: number): number {
18096         if(!isWasmInitialized) {
18097                 throw new Error("initializeWasm() must be awaited first!");
18098         }
18099         const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone(orig);
18100         return nativeResponseValue;
18101 }
18102         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
18103 /* @internal */
18104 export function UpdateFulfillHTLC_free(this_obj: number): void {
18105         if(!isWasmInitialized) {
18106                 throw new Error("initializeWasm() must be awaited first!");
18107         }
18108         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_free(this_obj);
18109         // debug statements here
18110 }
18111         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
18112 /* @internal */
18113 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): number {
18114         if(!isWasmInitialized) {
18115                 throw new Error("initializeWasm() must be awaited first!");
18116         }
18117         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_channel_id(this_ptr);
18118         return nativeResponseValue;
18119 }
18120         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18121 /* @internal */
18122 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: number): void {
18123         if(!isWasmInitialized) {
18124                 throw new Error("initializeWasm() must be awaited first!");
18125         }
18126         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_channel_id(this_ptr, val);
18127         // debug statements here
18128 }
18129         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
18130 /* @internal */
18131 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): bigint {
18132         if(!isWasmInitialized) {
18133                 throw new Error("initializeWasm() must be awaited first!");
18134         }
18135         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_htlc_id(this_ptr);
18136         return nativeResponseValue;
18137 }
18138         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
18139 /* @internal */
18140 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
18141         if(!isWasmInitialized) {
18142                 throw new Error("initializeWasm() must be awaited first!");
18143         }
18144         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
18145         // debug statements here
18146 }
18147         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
18148 /* @internal */
18149 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): number {
18150         if(!isWasmInitialized) {
18151                 throw new Error("initializeWasm() must be awaited first!");
18152         }
18153         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_payment_preimage(this_ptr);
18154         return nativeResponseValue;
18155 }
18156         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18157 /* @internal */
18158 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: number): void {
18159         if(!isWasmInitialized) {
18160                 throw new Error("initializeWasm() must be awaited first!");
18161         }
18162         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_payment_preimage(this_ptr, val);
18163         // debug statements here
18164 }
18165         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
18166 /* @internal */
18167 export function UpdateFulfillHTLC_new(channel_id_arg: number, htlc_id_arg: bigint, payment_preimage_arg: number): number {
18168         if(!isWasmInitialized) {
18169                 throw new Error("initializeWasm() must be awaited first!");
18170         }
18171         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_new(channel_id_arg, htlc_id_arg, payment_preimage_arg);
18172         return nativeResponseValue;
18173 }
18174         // uintptr_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
18175 /* @internal */
18176 export function UpdateFulfillHTLC_clone_ptr(arg: number): number {
18177         if(!isWasmInitialized) {
18178                 throw new Error("initializeWasm() must be awaited first!");
18179         }
18180         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone_ptr(arg);
18181         return nativeResponseValue;
18182 }
18183         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
18184 /* @internal */
18185 export function UpdateFulfillHTLC_clone(orig: number): number {
18186         if(!isWasmInitialized) {
18187                 throw new Error("initializeWasm() must be awaited first!");
18188         }
18189         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone(orig);
18190         return nativeResponseValue;
18191 }
18192         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
18193 /* @internal */
18194 export function UpdateFailHTLC_free(this_obj: number): void {
18195         if(!isWasmInitialized) {
18196                 throw new Error("initializeWasm() must be awaited first!");
18197         }
18198         const nativeResponseValue = wasm.TS_UpdateFailHTLC_free(this_obj);
18199         // debug statements here
18200 }
18201         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
18202 /* @internal */
18203 export function UpdateFailHTLC_get_channel_id(this_ptr: number): number {
18204         if(!isWasmInitialized) {
18205                 throw new Error("initializeWasm() must be awaited first!");
18206         }
18207         const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_channel_id(this_ptr);
18208         return nativeResponseValue;
18209 }
18210         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18211 /* @internal */
18212 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: number): void {
18213         if(!isWasmInitialized) {
18214                 throw new Error("initializeWasm() must be awaited first!");
18215         }
18216         const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_channel_id(this_ptr, val);
18217         // debug statements here
18218 }
18219         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
18220 /* @internal */
18221 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): bigint {
18222         if(!isWasmInitialized) {
18223                 throw new Error("initializeWasm() must be awaited first!");
18224         }
18225         const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_htlc_id(this_ptr);
18226         return nativeResponseValue;
18227 }
18228         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
18229 /* @internal */
18230 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
18231         if(!isWasmInitialized) {
18232                 throw new Error("initializeWasm() must be awaited first!");
18233         }
18234         const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_htlc_id(this_ptr, val);
18235         // debug statements here
18236 }
18237         // uintptr_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
18238 /* @internal */
18239 export function UpdateFailHTLC_clone_ptr(arg: number): number {
18240         if(!isWasmInitialized) {
18241                 throw new Error("initializeWasm() must be awaited first!");
18242         }
18243         const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone_ptr(arg);
18244         return nativeResponseValue;
18245 }
18246         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
18247 /* @internal */
18248 export function UpdateFailHTLC_clone(orig: number): number {
18249         if(!isWasmInitialized) {
18250                 throw new Error("initializeWasm() must be awaited first!");
18251         }
18252         const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone(orig);
18253         return nativeResponseValue;
18254 }
18255         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
18256 /* @internal */
18257 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
18258         if(!isWasmInitialized) {
18259                 throw new Error("initializeWasm() must be awaited first!");
18260         }
18261         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_free(this_obj);
18262         // debug statements here
18263 }
18264         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
18265 /* @internal */
18266 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): number {
18267         if(!isWasmInitialized) {
18268                 throw new Error("initializeWasm() must be awaited first!");
18269         }
18270         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_channel_id(this_ptr);
18271         return nativeResponseValue;
18272 }
18273         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18274 /* @internal */
18275 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: number): void {
18276         if(!isWasmInitialized) {
18277                 throw new Error("initializeWasm() must be awaited first!");
18278         }
18279         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_channel_id(this_ptr, val);
18280         // debug statements here
18281 }
18282         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
18283 /* @internal */
18284 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): bigint {
18285         if(!isWasmInitialized) {
18286                 throw new Error("initializeWasm() must be awaited first!");
18287         }
18288         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
18289         return nativeResponseValue;
18290 }
18291         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
18292 /* @internal */
18293 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
18294         if(!isWasmInitialized) {
18295                 throw new Error("initializeWasm() must be awaited first!");
18296         }
18297         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
18298         // debug statements here
18299 }
18300         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
18301 /* @internal */
18302 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
18303         if(!isWasmInitialized) {
18304                 throw new Error("initializeWasm() must be awaited first!");
18305         }
18306         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_failure_code(this_ptr);
18307         return nativeResponseValue;
18308 }
18309         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
18310 /* @internal */
18311 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
18312         if(!isWasmInitialized) {
18313                 throw new Error("initializeWasm() must be awaited first!");
18314         }
18315         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
18316         // debug statements here
18317 }
18318         // uintptr_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
18319 /* @internal */
18320 export function UpdateFailMalformedHTLC_clone_ptr(arg: number): number {
18321         if(!isWasmInitialized) {
18322                 throw new Error("initializeWasm() must be awaited first!");
18323         }
18324         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone_ptr(arg);
18325         return nativeResponseValue;
18326 }
18327         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
18328 /* @internal */
18329 export function UpdateFailMalformedHTLC_clone(orig: number): number {
18330         if(!isWasmInitialized) {
18331                 throw new Error("initializeWasm() must be awaited first!");
18332         }
18333         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone(orig);
18334         return nativeResponseValue;
18335 }
18336         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
18337 /* @internal */
18338 export function CommitmentSigned_free(this_obj: number): void {
18339         if(!isWasmInitialized) {
18340                 throw new Error("initializeWasm() must be awaited first!");
18341         }
18342         const nativeResponseValue = wasm.TS_CommitmentSigned_free(this_obj);
18343         // debug statements here
18344 }
18345         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
18346 /* @internal */
18347 export function CommitmentSigned_get_channel_id(this_ptr: number): number {
18348         if(!isWasmInitialized) {
18349                 throw new Error("initializeWasm() must be awaited first!");
18350         }
18351         const nativeResponseValue = wasm.TS_CommitmentSigned_get_channel_id(this_ptr);
18352         return nativeResponseValue;
18353 }
18354         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18355 /* @internal */
18356 export function CommitmentSigned_set_channel_id(this_ptr: number, val: number): void {
18357         if(!isWasmInitialized) {
18358                 throw new Error("initializeWasm() must be awaited first!");
18359         }
18360         const nativeResponseValue = wasm.TS_CommitmentSigned_set_channel_id(this_ptr, val);
18361         // debug statements here
18362 }
18363         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
18364 /* @internal */
18365 export function CommitmentSigned_get_signature(this_ptr: number): number {
18366         if(!isWasmInitialized) {
18367                 throw new Error("initializeWasm() must be awaited first!");
18368         }
18369         const nativeResponseValue = wasm.TS_CommitmentSigned_get_signature(this_ptr);
18370         return nativeResponseValue;
18371 }
18372         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
18373 /* @internal */
18374 export function CommitmentSigned_set_signature(this_ptr: number, val: number): void {
18375         if(!isWasmInitialized) {
18376                 throw new Error("initializeWasm() must be awaited first!");
18377         }
18378         const nativeResponseValue = wasm.TS_CommitmentSigned_set_signature(this_ptr, val);
18379         // debug statements here
18380 }
18381         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
18382 /* @internal */
18383 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: number): void {
18384         if(!isWasmInitialized) {
18385                 throw new Error("initializeWasm() must be awaited first!");
18386         }
18387         const nativeResponseValue = wasm.TS_CommitmentSigned_set_htlc_signatures(this_ptr, val);
18388         // debug statements here
18389 }
18390         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
18391 /* @internal */
18392 export function CommitmentSigned_new(channel_id_arg: number, signature_arg: number, htlc_signatures_arg: number): number {
18393         if(!isWasmInitialized) {
18394                 throw new Error("initializeWasm() must be awaited first!");
18395         }
18396         const nativeResponseValue = wasm.TS_CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg);
18397         return nativeResponseValue;
18398 }
18399         // uintptr_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
18400 /* @internal */
18401 export function CommitmentSigned_clone_ptr(arg: number): number {
18402         if(!isWasmInitialized) {
18403                 throw new Error("initializeWasm() must be awaited first!");
18404         }
18405         const nativeResponseValue = wasm.TS_CommitmentSigned_clone_ptr(arg);
18406         return nativeResponseValue;
18407 }
18408         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
18409 /* @internal */
18410 export function CommitmentSigned_clone(orig: number): number {
18411         if(!isWasmInitialized) {
18412                 throw new Error("initializeWasm() must be awaited first!");
18413         }
18414         const nativeResponseValue = wasm.TS_CommitmentSigned_clone(orig);
18415         return nativeResponseValue;
18416 }
18417         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
18418 /* @internal */
18419 export function RevokeAndACK_free(this_obj: number): void {
18420         if(!isWasmInitialized) {
18421                 throw new Error("initializeWasm() must be awaited first!");
18422         }
18423         const nativeResponseValue = wasm.TS_RevokeAndACK_free(this_obj);
18424         // debug statements here
18425 }
18426         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
18427 /* @internal */
18428 export function RevokeAndACK_get_channel_id(this_ptr: number): number {
18429         if(!isWasmInitialized) {
18430                 throw new Error("initializeWasm() must be awaited first!");
18431         }
18432         const nativeResponseValue = wasm.TS_RevokeAndACK_get_channel_id(this_ptr);
18433         return nativeResponseValue;
18434 }
18435         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18436 /* @internal */
18437 export function RevokeAndACK_set_channel_id(this_ptr: number, val: number): void {
18438         if(!isWasmInitialized) {
18439                 throw new Error("initializeWasm() must be awaited first!");
18440         }
18441         const nativeResponseValue = wasm.TS_RevokeAndACK_set_channel_id(this_ptr, val);
18442         // debug statements here
18443 }
18444         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
18445 /* @internal */
18446 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): number {
18447         if(!isWasmInitialized) {
18448                 throw new Error("initializeWasm() must be awaited first!");
18449         }
18450         const nativeResponseValue = wasm.TS_RevokeAndACK_get_per_commitment_secret(this_ptr);
18451         return nativeResponseValue;
18452 }
18453         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18454 /* @internal */
18455 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: number): void {
18456         if(!isWasmInitialized) {
18457                 throw new Error("initializeWasm() must be awaited first!");
18458         }
18459         const nativeResponseValue = wasm.TS_RevokeAndACK_set_per_commitment_secret(this_ptr, val);
18460         // debug statements here
18461 }
18462         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
18463 /* @internal */
18464 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): number {
18465         if(!isWasmInitialized) {
18466                 throw new Error("initializeWasm() must be awaited first!");
18467         }
18468         const nativeResponseValue = wasm.TS_RevokeAndACK_get_next_per_commitment_point(this_ptr);
18469         return nativeResponseValue;
18470 }
18471         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18472 /* @internal */
18473 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: number): void {
18474         if(!isWasmInitialized) {
18475                 throw new Error("initializeWasm() must be awaited first!");
18476         }
18477         const nativeResponseValue = wasm.TS_RevokeAndACK_set_next_per_commitment_point(this_ptr, val);
18478         // debug statements here
18479 }
18480         // 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);
18481 /* @internal */
18482 export function RevokeAndACK_new(channel_id_arg: number, per_commitment_secret_arg: number, next_per_commitment_point_arg: number): number {
18483         if(!isWasmInitialized) {
18484                 throw new Error("initializeWasm() must be awaited first!");
18485         }
18486         const nativeResponseValue = wasm.TS_RevokeAndACK_new(channel_id_arg, per_commitment_secret_arg, next_per_commitment_point_arg);
18487         return nativeResponseValue;
18488 }
18489         // uintptr_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
18490 /* @internal */
18491 export function RevokeAndACK_clone_ptr(arg: number): number {
18492         if(!isWasmInitialized) {
18493                 throw new Error("initializeWasm() must be awaited first!");
18494         }
18495         const nativeResponseValue = wasm.TS_RevokeAndACK_clone_ptr(arg);
18496         return nativeResponseValue;
18497 }
18498         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
18499 /* @internal */
18500 export function RevokeAndACK_clone(orig: number): number {
18501         if(!isWasmInitialized) {
18502                 throw new Error("initializeWasm() must be awaited first!");
18503         }
18504         const nativeResponseValue = wasm.TS_RevokeAndACK_clone(orig);
18505         return nativeResponseValue;
18506 }
18507         // void UpdateFee_free(struct LDKUpdateFee this_obj);
18508 /* @internal */
18509 export function UpdateFee_free(this_obj: number): void {
18510         if(!isWasmInitialized) {
18511                 throw new Error("initializeWasm() must be awaited first!");
18512         }
18513         const nativeResponseValue = wasm.TS_UpdateFee_free(this_obj);
18514         // debug statements here
18515 }
18516         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
18517 /* @internal */
18518 export function UpdateFee_get_channel_id(this_ptr: number): number {
18519         if(!isWasmInitialized) {
18520                 throw new Error("initializeWasm() must be awaited first!");
18521         }
18522         const nativeResponseValue = wasm.TS_UpdateFee_get_channel_id(this_ptr);
18523         return nativeResponseValue;
18524 }
18525         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18526 /* @internal */
18527 export function UpdateFee_set_channel_id(this_ptr: number, val: number): void {
18528         if(!isWasmInitialized) {
18529                 throw new Error("initializeWasm() must be awaited first!");
18530         }
18531         const nativeResponseValue = wasm.TS_UpdateFee_set_channel_id(this_ptr, val);
18532         // debug statements here
18533 }
18534         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
18535 /* @internal */
18536 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
18537         if(!isWasmInitialized) {
18538                 throw new Error("initializeWasm() must be awaited first!");
18539         }
18540         const nativeResponseValue = wasm.TS_UpdateFee_get_feerate_per_kw(this_ptr);
18541         return nativeResponseValue;
18542 }
18543         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
18544 /* @internal */
18545 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
18546         if(!isWasmInitialized) {
18547                 throw new Error("initializeWasm() must be awaited first!");
18548         }
18549         const nativeResponseValue = wasm.TS_UpdateFee_set_feerate_per_kw(this_ptr, val);
18550         // debug statements here
18551 }
18552         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
18553 /* @internal */
18554 export function UpdateFee_new(channel_id_arg: number, feerate_per_kw_arg: number): number {
18555         if(!isWasmInitialized) {
18556                 throw new Error("initializeWasm() must be awaited first!");
18557         }
18558         const nativeResponseValue = wasm.TS_UpdateFee_new(channel_id_arg, feerate_per_kw_arg);
18559         return nativeResponseValue;
18560 }
18561         // uintptr_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
18562 /* @internal */
18563 export function UpdateFee_clone_ptr(arg: number): number {
18564         if(!isWasmInitialized) {
18565                 throw new Error("initializeWasm() must be awaited first!");
18566         }
18567         const nativeResponseValue = wasm.TS_UpdateFee_clone_ptr(arg);
18568         return nativeResponseValue;
18569 }
18570         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
18571 /* @internal */
18572 export function UpdateFee_clone(orig: number): number {
18573         if(!isWasmInitialized) {
18574                 throw new Error("initializeWasm() must be awaited first!");
18575         }
18576         const nativeResponseValue = wasm.TS_UpdateFee_clone(orig);
18577         return nativeResponseValue;
18578 }
18579         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
18580 /* @internal */
18581 export function DataLossProtect_free(this_obj: number): void {
18582         if(!isWasmInitialized) {
18583                 throw new Error("initializeWasm() must be awaited first!");
18584         }
18585         const nativeResponseValue = wasm.TS_DataLossProtect_free(this_obj);
18586         // debug statements here
18587 }
18588         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
18589 /* @internal */
18590 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): number {
18591         if(!isWasmInitialized) {
18592                 throw new Error("initializeWasm() must be awaited first!");
18593         }
18594         const nativeResponseValue = wasm.TS_DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
18595         return nativeResponseValue;
18596 }
18597         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18598 /* @internal */
18599 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: number): void {
18600         if(!isWasmInitialized) {
18601                 throw new Error("initializeWasm() must be awaited first!");
18602         }
18603         const nativeResponseValue = wasm.TS_DataLossProtect_set_your_last_per_commitment_secret(this_ptr, val);
18604         // debug statements here
18605 }
18606         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
18607 /* @internal */
18608 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): number {
18609         if(!isWasmInitialized) {
18610                 throw new Error("initializeWasm() must be awaited first!");
18611         }
18612         const nativeResponseValue = wasm.TS_DataLossProtect_get_my_current_per_commitment_point(this_ptr);
18613         return nativeResponseValue;
18614 }
18615         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18616 /* @internal */
18617 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: number): void {
18618         if(!isWasmInitialized) {
18619                 throw new Error("initializeWasm() must be awaited first!");
18620         }
18621         const nativeResponseValue = wasm.TS_DataLossProtect_set_my_current_per_commitment_point(this_ptr, val);
18622         // debug statements here
18623 }
18624         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
18625 /* @internal */
18626 export function DataLossProtect_new(your_last_per_commitment_secret_arg: number, my_current_per_commitment_point_arg: number): number {
18627         if(!isWasmInitialized) {
18628                 throw new Error("initializeWasm() must be awaited first!");
18629         }
18630         const nativeResponseValue = wasm.TS_DataLossProtect_new(your_last_per_commitment_secret_arg, my_current_per_commitment_point_arg);
18631         return nativeResponseValue;
18632 }
18633         // uintptr_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
18634 /* @internal */
18635 export function DataLossProtect_clone_ptr(arg: number): number {
18636         if(!isWasmInitialized) {
18637                 throw new Error("initializeWasm() must be awaited first!");
18638         }
18639         const nativeResponseValue = wasm.TS_DataLossProtect_clone_ptr(arg);
18640         return nativeResponseValue;
18641 }
18642         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
18643 /* @internal */
18644 export function DataLossProtect_clone(orig: number): number {
18645         if(!isWasmInitialized) {
18646                 throw new Error("initializeWasm() must be awaited first!");
18647         }
18648         const nativeResponseValue = wasm.TS_DataLossProtect_clone(orig);
18649         return nativeResponseValue;
18650 }
18651         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
18652 /* @internal */
18653 export function ChannelReestablish_free(this_obj: number): void {
18654         if(!isWasmInitialized) {
18655                 throw new Error("initializeWasm() must be awaited first!");
18656         }
18657         const nativeResponseValue = wasm.TS_ChannelReestablish_free(this_obj);
18658         // debug statements here
18659 }
18660         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
18661 /* @internal */
18662 export function ChannelReestablish_get_channel_id(this_ptr: number): number {
18663         if(!isWasmInitialized) {
18664                 throw new Error("initializeWasm() must be awaited first!");
18665         }
18666         const nativeResponseValue = wasm.TS_ChannelReestablish_get_channel_id(this_ptr);
18667         return nativeResponseValue;
18668 }
18669         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18670 /* @internal */
18671 export function ChannelReestablish_set_channel_id(this_ptr: number, val: number): void {
18672         if(!isWasmInitialized) {
18673                 throw new Error("initializeWasm() must be awaited first!");
18674         }
18675         const nativeResponseValue = wasm.TS_ChannelReestablish_set_channel_id(this_ptr, val);
18676         // debug statements here
18677 }
18678         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
18679 /* @internal */
18680 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): bigint {
18681         if(!isWasmInitialized) {
18682                 throw new Error("initializeWasm() must be awaited first!");
18683         }
18684         const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_local_commitment_number(this_ptr);
18685         return nativeResponseValue;
18686 }
18687         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
18688 /* @internal */
18689 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: bigint): void {
18690         if(!isWasmInitialized) {
18691                 throw new Error("initializeWasm() must be awaited first!");
18692         }
18693         const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
18694         // debug statements here
18695 }
18696         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
18697 /* @internal */
18698 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): bigint {
18699         if(!isWasmInitialized) {
18700                 throw new Error("initializeWasm() must be awaited first!");
18701         }
18702         const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_remote_commitment_number(this_ptr);
18703         return nativeResponseValue;
18704 }
18705         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
18706 /* @internal */
18707 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: bigint): void {
18708         if(!isWasmInitialized) {
18709                 throw new Error("initializeWasm() must be awaited first!");
18710         }
18711         const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
18712         // debug statements here
18713 }
18714         // uintptr_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
18715 /* @internal */
18716 export function ChannelReestablish_clone_ptr(arg: number): number {
18717         if(!isWasmInitialized) {
18718                 throw new Error("initializeWasm() must be awaited first!");
18719         }
18720         const nativeResponseValue = wasm.TS_ChannelReestablish_clone_ptr(arg);
18721         return nativeResponseValue;
18722 }
18723         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
18724 /* @internal */
18725 export function ChannelReestablish_clone(orig: number): number {
18726         if(!isWasmInitialized) {
18727                 throw new Error("initializeWasm() must be awaited first!");
18728         }
18729         const nativeResponseValue = wasm.TS_ChannelReestablish_clone(orig);
18730         return nativeResponseValue;
18731 }
18732         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
18733 /* @internal */
18734 export function AnnouncementSignatures_free(this_obj: number): void {
18735         if(!isWasmInitialized) {
18736                 throw new Error("initializeWasm() must be awaited first!");
18737         }
18738         const nativeResponseValue = wasm.TS_AnnouncementSignatures_free(this_obj);
18739         // debug statements here
18740 }
18741         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
18742 /* @internal */
18743 export function AnnouncementSignatures_get_channel_id(this_ptr: number): number {
18744         if(!isWasmInitialized) {
18745                 throw new Error("initializeWasm() must be awaited first!");
18746         }
18747         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_channel_id(this_ptr);
18748         return nativeResponseValue;
18749 }
18750         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18751 /* @internal */
18752 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: number): void {
18753         if(!isWasmInitialized) {
18754                 throw new Error("initializeWasm() must be awaited first!");
18755         }
18756         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_channel_id(this_ptr, val);
18757         // debug statements here
18758 }
18759         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
18760 /* @internal */
18761 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): bigint {
18762         if(!isWasmInitialized) {
18763                 throw new Error("initializeWasm() must be awaited first!");
18764         }
18765         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_short_channel_id(this_ptr);
18766         return nativeResponseValue;
18767 }
18768         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
18769 /* @internal */
18770 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: bigint): void {
18771         if(!isWasmInitialized) {
18772                 throw new Error("initializeWasm() must be awaited first!");
18773         }
18774         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_short_channel_id(this_ptr, val);
18775         // debug statements here
18776 }
18777         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
18778 /* @internal */
18779 export function AnnouncementSignatures_get_node_signature(this_ptr: number): number {
18780         if(!isWasmInitialized) {
18781                 throw new Error("initializeWasm() must be awaited first!");
18782         }
18783         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_node_signature(this_ptr);
18784         return nativeResponseValue;
18785 }
18786         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
18787 /* @internal */
18788 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: number): void {
18789         if(!isWasmInitialized) {
18790                 throw new Error("initializeWasm() must be awaited first!");
18791         }
18792         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_node_signature(this_ptr, val);
18793         // debug statements here
18794 }
18795         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
18796 /* @internal */
18797 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): number {
18798         if(!isWasmInitialized) {
18799                 throw new Error("initializeWasm() must be awaited first!");
18800         }
18801         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_bitcoin_signature(this_ptr);
18802         return nativeResponseValue;
18803 }
18804         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
18805 /* @internal */
18806 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: number): void {
18807         if(!isWasmInitialized) {
18808                 throw new Error("initializeWasm() must be awaited first!");
18809         }
18810         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_bitcoin_signature(this_ptr, val);
18811         // debug statements here
18812 }
18813         // 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);
18814 /* @internal */
18815 export function AnnouncementSignatures_new(channel_id_arg: number, short_channel_id_arg: bigint, node_signature_arg: number, bitcoin_signature_arg: number): number {
18816         if(!isWasmInitialized) {
18817                 throw new Error("initializeWasm() must be awaited first!");
18818         }
18819         const nativeResponseValue = wasm.TS_AnnouncementSignatures_new(channel_id_arg, short_channel_id_arg, node_signature_arg, bitcoin_signature_arg);
18820         return nativeResponseValue;
18821 }
18822         // uintptr_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
18823 /* @internal */
18824 export function AnnouncementSignatures_clone_ptr(arg: number): number {
18825         if(!isWasmInitialized) {
18826                 throw new Error("initializeWasm() must be awaited first!");
18827         }
18828         const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone_ptr(arg);
18829         return nativeResponseValue;
18830 }
18831         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
18832 /* @internal */
18833 export function AnnouncementSignatures_clone(orig: number): number {
18834         if(!isWasmInitialized) {
18835                 throw new Error("initializeWasm() must be awaited first!");
18836         }
18837         const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone(orig);
18838         return nativeResponseValue;
18839 }
18840         // void NetAddress_free(struct LDKNetAddress this_ptr);
18841 /* @internal */
18842 export function NetAddress_free(this_ptr: number): void {
18843         if(!isWasmInitialized) {
18844                 throw new Error("initializeWasm() must be awaited first!");
18845         }
18846         const nativeResponseValue = wasm.TS_NetAddress_free(this_ptr);
18847         // debug statements here
18848 }
18849         // uintptr_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
18850 /* @internal */
18851 export function NetAddress_clone_ptr(arg: number): number {
18852         if(!isWasmInitialized) {
18853                 throw new Error("initializeWasm() must be awaited first!");
18854         }
18855         const nativeResponseValue = wasm.TS_NetAddress_clone_ptr(arg);
18856         return nativeResponseValue;
18857 }
18858         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
18859 /* @internal */
18860 export function NetAddress_clone(orig: number): number {
18861         if(!isWasmInitialized) {
18862                 throw new Error("initializeWasm() must be awaited first!");
18863         }
18864         const nativeResponseValue = wasm.TS_NetAddress_clone(orig);
18865         return nativeResponseValue;
18866 }
18867         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
18868 /* @internal */
18869 export function NetAddress_ipv4(addr: number, port: number): number {
18870         if(!isWasmInitialized) {
18871                 throw new Error("initializeWasm() must be awaited first!");
18872         }
18873         const nativeResponseValue = wasm.TS_NetAddress_ipv4(addr, port);
18874         return nativeResponseValue;
18875 }
18876         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
18877 /* @internal */
18878 export function NetAddress_ipv6(addr: number, port: number): number {
18879         if(!isWasmInitialized) {
18880                 throw new Error("initializeWasm() must be awaited first!");
18881         }
18882         const nativeResponseValue = wasm.TS_NetAddress_ipv6(addr, port);
18883         return nativeResponseValue;
18884 }
18885         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
18886 /* @internal */
18887 export function NetAddress_onion_v2(a: number): number {
18888         if(!isWasmInitialized) {
18889                 throw new Error("initializeWasm() must be awaited first!");
18890         }
18891         const nativeResponseValue = wasm.TS_NetAddress_onion_v2(a);
18892         return nativeResponseValue;
18893 }
18894         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
18895 /* @internal */
18896 export function NetAddress_onion_v3(ed25519_pubkey: number, checksum: number, version: number, port: number): number {
18897         if(!isWasmInitialized) {
18898                 throw new Error("initializeWasm() must be awaited first!");
18899         }
18900         const nativeResponseValue = wasm.TS_NetAddress_onion_v3(ed25519_pubkey, checksum, version, port);
18901         return nativeResponseValue;
18902 }
18903         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
18904 /* @internal */
18905 export function NetAddress_write(obj: number): number {
18906         if(!isWasmInitialized) {
18907                 throw new Error("initializeWasm() must be awaited first!");
18908         }
18909         const nativeResponseValue = wasm.TS_NetAddress_write(obj);
18910         return nativeResponseValue;
18911 }
18912         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
18913 /* @internal */
18914 export function NetAddress_read(ser: number): number {
18915         if(!isWasmInitialized) {
18916                 throw new Error("initializeWasm() must be awaited first!");
18917         }
18918         const nativeResponseValue = wasm.TS_NetAddress_read(ser);
18919         return nativeResponseValue;
18920 }
18921         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
18922 /* @internal */
18923 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
18924         if(!isWasmInitialized) {
18925                 throw new Error("initializeWasm() must be awaited first!");
18926         }
18927         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_free(this_obj);
18928         // debug statements here
18929 }
18930         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
18931 /* @internal */
18932 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
18933         if(!isWasmInitialized) {
18934                 throw new Error("initializeWasm() must be awaited first!");
18935         }
18936         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_features(this_ptr);
18937         return nativeResponseValue;
18938 }
18939         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
18940 /* @internal */
18941 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
18942         if(!isWasmInitialized) {
18943                 throw new Error("initializeWasm() must be awaited first!");
18944         }
18945         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_features(this_ptr, val);
18946         // debug statements here
18947 }
18948         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
18949 /* @internal */
18950 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
18951         if(!isWasmInitialized) {
18952                 throw new Error("initializeWasm() must be awaited first!");
18953         }
18954         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_timestamp(this_ptr);
18955         return nativeResponseValue;
18956 }
18957         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
18958 /* @internal */
18959 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
18960         if(!isWasmInitialized) {
18961                 throw new Error("initializeWasm() must be awaited first!");
18962         }
18963         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
18964         // debug statements here
18965 }
18966         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
18967 /* @internal */
18968 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): number {
18969         if(!isWasmInitialized) {
18970                 throw new Error("initializeWasm() must be awaited first!");
18971         }
18972         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_node_id(this_ptr);
18973         return nativeResponseValue;
18974 }
18975         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
18976 /* @internal */
18977 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: number): void {
18978         if(!isWasmInitialized) {
18979                 throw new Error("initializeWasm() must be awaited first!");
18980         }
18981         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_node_id(this_ptr, val);
18982         // debug statements here
18983 }
18984         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
18985 /* @internal */
18986 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): number {
18987         if(!isWasmInitialized) {
18988                 throw new Error("initializeWasm() must be awaited first!");
18989         }
18990         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_rgb(this_ptr);
18991         return nativeResponseValue;
18992 }
18993         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
18994 /* @internal */
18995 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: number): void {
18996         if(!isWasmInitialized) {
18997                 throw new Error("initializeWasm() must be awaited first!");
18998         }
18999         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_rgb(this_ptr, val);
19000         // debug statements here
19001 }
19002         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
19003 /* @internal */
19004 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): number {
19005         if(!isWasmInitialized) {
19006                 throw new Error("initializeWasm() must be awaited first!");
19007         }
19008         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_alias(this_ptr);
19009         return nativeResponseValue;
19010 }
19011         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19012 /* @internal */
19013 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: number): void {
19014         if(!isWasmInitialized) {
19015                 throw new Error("initializeWasm() must be awaited first!");
19016         }
19017         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_alias(this_ptr, val);
19018         // debug statements here
19019 }
19020         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
19021 /* @internal */
19022 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number): void {
19023         if(!isWasmInitialized) {
19024                 throw new Error("initializeWasm() must be awaited first!");
19025         }
19026         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
19027         // debug statements here
19028 }
19029         // uintptr_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
19030 /* @internal */
19031 export function UnsignedNodeAnnouncement_clone_ptr(arg: number): number {
19032         if(!isWasmInitialized) {
19033                 throw new Error("initializeWasm() must be awaited first!");
19034         }
19035         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone_ptr(arg);
19036         return nativeResponseValue;
19037 }
19038         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
19039 /* @internal */
19040 export function UnsignedNodeAnnouncement_clone(orig: number): number {
19041         if(!isWasmInitialized) {
19042                 throw new Error("initializeWasm() must be awaited first!");
19043         }
19044         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone(orig);
19045         return nativeResponseValue;
19046 }
19047         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
19048 /* @internal */
19049 export function NodeAnnouncement_free(this_obj: number): void {
19050         if(!isWasmInitialized) {
19051                 throw new Error("initializeWasm() must be awaited first!");
19052         }
19053         const nativeResponseValue = wasm.TS_NodeAnnouncement_free(this_obj);
19054         // debug statements here
19055 }
19056         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
19057 /* @internal */
19058 export function NodeAnnouncement_get_signature(this_ptr: number): number {
19059         if(!isWasmInitialized) {
19060                 throw new Error("initializeWasm() must be awaited first!");
19061         }
19062         const nativeResponseValue = wasm.TS_NodeAnnouncement_get_signature(this_ptr);
19063         return nativeResponseValue;
19064 }
19065         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
19066 /* @internal */
19067 export function NodeAnnouncement_set_signature(this_ptr: number, val: number): void {
19068         if(!isWasmInitialized) {
19069                 throw new Error("initializeWasm() must be awaited first!");
19070         }
19071         const nativeResponseValue = wasm.TS_NodeAnnouncement_set_signature(this_ptr, val);
19072         // debug statements here
19073 }
19074         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
19075 /* @internal */
19076 export function NodeAnnouncement_get_contents(this_ptr: number): number {
19077         if(!isWasmInitialized) {
19078                 throw new Error("initializeWasm() must be awaited first!");
19079         }
19080         const nativeResponseValue = wasm.TS_NodeAnnouncement_get_contents(this_ptr);
19081         return nativeResponseValue;
19082 }
19083         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
19084 /* @internal */
19085 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
19086         if(!isWasmInitialized) {
19087                 throw new Error("initializeWasm() must be awaited first!");
19088         }
19089         const nativeResponseValue = wasm.TS_NodeAnnouncement_set_contents(this_ptr, val);
19090         // debug statements here
19091 }
19092         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
19093 /* @internal */
19094 export function NodeAnnouncement_new(signature_arg: number, contents_arg: number): number {
19095         if(!isWasmInitialized) {
19096                 throw new Error("initializeWasm() must be awaited first!");
19097         }
19098         const nativeResponseValue = wasm.TS_NodeAnnouncement_new(signature_arg, contents_arg);
19099         return nativeResponseValue;
19100 }
19101         // uintptr_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
19102 /* @internal */
19103 export function NodeAnnouncement_clone_ptr(arg: number): number {
19104         if(!isWasmInitialized) {
19105                 throw new Error("initializeWasm() must be awaited first!");
19106         }
19107         const nativeResponseValue = wasm.TS_NodeAnnouncement_clone_ptr(arg);
19108         return nativeResponseValue;
19109 }
19110         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
19111 /* @internal */
19112 export function NodeAnnouncement_clone(orig: number): number {
19113         if(!isWasmInitialized) {
19114                 throw new Error("initializeWasm() must be awaited first!");
19115         }
19116         const nativeResponseValue = wasm.TS_NodeAnnouncement_clone(orig);
19117         return nativeResponseValue;
19118 }
19119         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
19120 /* @internal */
19121 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
19122         if(!isWasmInitialized) {
19123                 throw new Error("initializeWasm() must be awaited first!");
19124         }
19125         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_free(this_obj);
19126         // debug statements here
19127 }
19128         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
19129 /* @internal */
19130 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
19131         if(!isWasmInitialized) {
19132                 throw new Error("initializeWasm() must be awaited first!");
19133         }
19134         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_features(this_ptr);
19135         return nativeResponseValue;
19136 }
19137         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
19138 /* @internal */
19139 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
19140         if(!isWasmInitialized) {
19141                 throw new Error("initializeWasm() must be awaited first!");
19142         }
19143         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_features(this_ptr, val);
19144         // debug statements here
19145 }
19146         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
19147 /* @internal */
19148 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): number {
19149         if(!isWasmInitialized) {
19150                 throw new Error("initializeWasm() must be awaited first!");
19151         }
19152         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
19153         return nativeResponseValue;
19154 }
19155         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19156 /* @internal */
19157 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: number): void {
19158         if(!isWasmInitialized) {
19159                 throw new Error("initializeWasm() must be awaited first!");
19160         }
19161         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_chain_hash(this_ptr, val);
19162         // debug statements here
19163 }
19164         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
19165 /* @internal */
19166 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): bigint {
19167         if(!isWasmInitialized) {
19168                 throw new Error("initializeWasm() must be awaited first!");
19169         }
19170         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
19171         return nativeResponseValue;
19172 }
19173         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
19174 /* @internal */
19175 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: bigint): void {
19176         if(!isWasmInitialized) {
19177                 throw new Error("initializeWasm() must be awaited first!");
19178         }
19179         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
19180         // debug statements here
19181 }
19182         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
19183 /* @internal */
19184 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): number {
19185         if(!isWasmInitialized) {
19186                 throw new Error("initializeWasm() must be awaited first!");
19187         }
19188         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
19189         return nativeResponseValue;
19190 }
19191         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19192 /* @internal */
19193 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: number): void {
19194         if(!isWasmInitialized) {
19195                 throw new Error("initializeWasm() must be awaited first!");
19196         }
19197         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_1(this_ptr, val);
19198         // debug statements here
19199 }
19200         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
19201 /* @internal */
19202 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): number {
19203         if(!isWasmInitialized) {
19204                 throw new Error("initializeWasm() must be awaited first!");
19205         }
19206         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
19207         return nativeResponseValue;
19208 }
19209         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19210 /* @internal */
19211 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: number): void {
19212         if(!isWasmInitialized) {
19213                 throw new Error("initializeWasm() must be awaited first!");
19214         }
19215         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_2(this_ptr, val);
19216         // debug statements here
19217 }
19218         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
19219 /* @internal */
19220 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): number {
19221         if(!isWasmInitialized) {
19222                 throw new Error("initializeWasm() must be awaited first!");
19223         }
19224         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
19225         return nativeResponseValue;
19226 }
19227         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19228 /* @internal */
19229 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: number): void {
19230         if(!isWasmInitialized) {
19231                 throw new Error("initializeWasm() must be awaited first!");
19232         }
19233         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, val);
19234         // debug statements here
19235 }
19236         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
19237 /* @internal */
19238 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): number {
19239         if(!isWasmInitialized) {
19240                 throw new Error("initializeWasm() must be awaited first!");
19241         }
19242         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
19243         return nativeResponseValue;
19244 }
19245         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19246 /* @internal */
19247 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: number): void {
19248         if(!isWasmInitialized) {
19249                 throw new Error("initializeWasm() must be awaited first!");
19250         }
19251         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, val);
19252         // debug statements here
19253 }
19254         // uintptr_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
19255 /* @internal */
19256 export function UnsignedChannelAnnouncement_clone_ptr(arg: number): number {
19257         if(!isWasmInitialized) {
19258                 throw new Error("initializeWasm() must be awaited first!");
19259         }
19260         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone_ptr(arg);
19261         return nativeResponseValue;
19262 }
19263         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
19264 /* @internal */
19265 export function UnsignedChannelAnnouncement_clone(orig: number): number {
19266         if(!isWasmInitialized) {
19267                 throw new Error("initializeWasm() must be awaited first!");
19268         }
19269         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone(orig);
19270         return nativeResponseValue;
19271 }
19272         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
19273 /* @internal */
19274 export function ChannelAnnouncement_free(this_obj: number): void {
19275         if(!isWasmInitialized) {
19276                 throw new Error("initializeWasm() must be awaited first!");
19277         }
19278         const nativeResponseValue = wasm.TS_ChannelAnnouncement_free(this_obj);
19279         // debug statements here
19280 }
19281         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
19282 /* @internal */
19283 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): number {
19284         if(!isWasmInitialized) {
19285                 throw new Error("initializeWasm() must be awaited first!");
19286         }
19287         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_1(this_ptr);
19288         return nativeResponseValue;
19289 }
19290         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
19291 /* @internal */
19292 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: number): void {
19293         if(!isWasmInitialized) {
19294                 throw new Error("initializeWasm() must be awaited first!");
19295         }
19296         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_1(this_ptr, val);
19297         // debug statements here
19298 }
19299         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
19300 /* @internal */
19301 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): number {
19302         if(!isWasmInitialized) {
19303                 throw new Error("initializeWasm() must be awaited first!");
19304         }
19305         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_2(this_ptr);
19306         return nativeResponseValue;
19307 }
19308         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
19309 /* @internal */
19310 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: number): void {
19311         if(!isWasmInitialized) {
19312                 throw new Error("initializeWasm() must be awaited first!");
19313         }
19314         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_2(this_ptr, val);
19315         // debug statements here
19316 }
19317         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
19318 /* @internal */
19319 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): number {
19320         if(!isWasmInitialized) {
19321                 throw new Error("initializeWasm() must be awaited first!");
19322         }
19323         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
19324         return nativeResponseValue;
19325 }
19326         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
19327 /* @internal */
19328 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: number): void {
19329         if(!isWasmInitialized) {
19330                 throw new Error("initializeWasm() must be awaited first!");
19331         }
19332         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, val);
19333         // debug statements here
19334 }
19335         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
19336 /* @internal */
19337 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): number {
19338         if(!isWasmInitialized) {
19339                 throw new Error("initializeWasm() must be awaited first!");
19340         }
19341         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
19342         return nativeResponseValue;
19343 }
19344         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
19345 /* @internal */
19346 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: number): void {
19347         if(!isWasmInitialized) {
19348                 throw new Error("initializeWasm() must be awaited first!");
19349         }
19350         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, val);
19351         // debug statements here
19352 }
19353         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
19354 /* @internal */
19355 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
19356         if(!isWasmInitialized) {
19357                 throw new Error("initializeWasm() must be awaited first!");
19358         }
19359         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_contents(this_ptr);
19360         return nativeResponseValue;
19361 }
19362         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
19363 /* @internal */
19364 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
19365         if(!isWasmInitialized) {
19366                 throw new Error("initializeWasm() must be awaited first!");
19367         }
19368         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_contents(this_ptr, val);
19369         // debug statements here
19370 }
19371         // 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);
19372 /* @internal */
19373 export function ChannelAnnouncement_new(node_signature_1_arg: number, node_signature_2_arg: number, bitcoin_signature_1_arg: number, bitcoin_signature_2_arg: number, contents_arg: number): number {
19374         if(!isWasmInitialized) {
19375                 throw new Error("initializeWasm() must be awaited first!");
19376         }
19377         const nativeResponseValue = wasm.TS_ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg);
19378         return nativeResponseValue;
19379 }
19380         // uintptr_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
19381 /* @internal */
19382 export function ChannelAnnouncement_clone_ptr(arg: number): number {
19383         if(!isWasmInitialized) {
19384                 throw new Error("initializeWasm() must be awaited first!");
19385         }
19386         const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone_ptr(arg);
19387         return nativeResponseValue;
19388 }
19389         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
19390 /* @internal */
19391 export function ChannelAnnouncement_clone(orig: number): number {
19392         if(!isWasmInitialized) {
19393                 throw new Error("initializeWasm() must be awaited first!");
19394         }
19395         const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone(orig);
19396         return nativeResponseValue;
19397 }
19398         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
19399 /* @internal */
19400 export function UnsignedChannelUpdate_free(this_obj: number): void {
19401         if(!isWasmInitialized) {
19402                 throw new Error("initializeWasm() must be awaited first!");
19403         }
19404         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_free(this_obj);
19405         // debug statements here
19406 }
19407         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
19408 /* @internal */
19409 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): number {
19410         if(!isWasmInitialized) {
19411                 throw new Error("initializeWasm() must be awaited first!");
19412         }
19413         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_chain_hash(this_ptr);
19414         return nativeResponseValue;
19415 }
19416         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19417 /* @internal */
19418 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: number): void {
19419         if(!isWasmInitialized) {
19420                 throw new Error("initializeWasm() must be awaited first!");
19421         }
19422         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_chain_hash(this_ptr, val);
19423         // debug statements here
19424 }
19425         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19426 /* @internal */
19427 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): bigint {
19428         if(!isWasmInitialized) {
19429                 throw new Error("initializeWasm() must be awaited first!");
19430         }
19431         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_short_channel_id(this_ptr);
19432         return nativeResponseValue;
19433 }
19434         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
19435 /* @internal */
19436 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: bigint): void {
19437         if(!isWasmInitialized) {
19438                 throw new Error("initializeWasm() must be awaited first!");
19439         }
19440         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
19441         // debug statements here
19442 }
19443         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19444 /* @internal */
19445 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
19446         if(!isWasmInitialized) {
19447                 throw new Error("initializeWasm() must be awaited first!");
19448         }
19449         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_timestamp(this_ptr);
19450         return nativeResponseValue;
19451 }
19452         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
19453 /* @internal */
19454 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
19455         if(!isWasmInitialized) {
19456                 throw new Error("initializeWasm() must be awaited first!");
19457         }
19458         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_timestamp(this_ptr, val);
19459         // debug statements here
19460 }
19461         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19462 /* @internal */
19463 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
19464         if(!isWasmInitialized) {
19465                 throw new Error("initializeWasm() must be awaited first!");
19466         }
19467         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_flags(this_ptr);
19468         return nativeResponseValue;
19469 }
19470         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
19471 /* @internal */
19472 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
19473         if(!isWasmInitialized) {
19474                 throw new Error("initializeWasm() must be awaited first!");
19475         }
19476         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_flags(this_ptr, val);
19477         // debug statements here
19478 }
19479         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19480 /* @internal */
19481 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
19482         if(!isWasmInitialized) {
19483                 throw new Error("initializeWasm() must be awaited first!");
19484         }
19485         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
19486         return nativeResponseValue;
19487 }
19488         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
19489 /* @internal */
19490 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
19491         if(!isWasmInitialized) {
19492                 throw new Error("initializeWasm() must be awaited first!");
19493         }
19494         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
19495         // debug statements here
19496 }
19497         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19498 /* @internal */
19499 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): bigint {
19500         if(!isWasmInitialized) {
19501                 throw new Error("initializeWasm() must be awaited first!");
19502         }
19503         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
19504         return nativeResponseValue;
19505 }
19506         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
19507 /* @internal */
19508 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
19509         if(!isWasmInitialized) {
19510                 throw new Error("initializeWasm() must be awaited first!");
19511         }
19512         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
19513         // debug statements here
19514 }
19515         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19516 /* @internal */
19517 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
19518         if(!isWasmInitialized) {
19519                 throw new Error("initializeWasm() must be awaited first!");
19520         }
19521         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
19522         return nativeResponseValue;
19523 }
19524         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
19525 /* @internal */
19526 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
19527         if(!isWasmInitialized) {
19528                 throw new Error("initializeWasm() must be awaited first!");
19529         }
19530         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
19531         // debug statements here
19532 }
19533         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
19534 /* @internal */
19535 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
19536         if(!isWasmInitialized) {
19537                 throw new Error("initializeWasm() must be awaited first!");
19538         }
19539         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
19540         return nativeResponseValue;
19541 }
19542         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
19543 /* @internal */
19544 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
19545         if(!isWasmInitialized) {
19546                 throw new Error("initializeWasm() must be awaited first!");
19547         }
19548         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
19549         // debug statements here
19550 }
19551         // uintptr_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
19552 /* @internal */
19553 export function UnsignedChannelUpdate_clone_ptr(arg: number): number {
19554         if(!isWasmInitialized) {
19555                 throw new Error("initializeWasm() must be awaited first!");
19556         }
19557         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone_ptr(arg);
19558         return nativeResponseValue;
19559 }
19560         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
19561 /* @internal */
19562 export function UnsignedChannelUpdate_clone(orig: number): number {
19563         if(!isWasmInitialized) {
19564                 throw new Error("initializeWasm() must be awaited first!");
19565         }
19566         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone(orig);
19567         return nativeResponseValue;
19568 }
19569         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
19570 /* @internal */
19571 export function ChannelUpdate_free(this_obj: number): void {
19572         if(!isWasmInitialized) {
19573                 throw new Error("initializeWasm() must be awaited first!");
19574         }
19575         const nativeResponseValue = wasm.TS_ChannelUpdate_free(this_obj);
19576         // debug statements here
19577 }
19578         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
19579 /* @internal */
19580 export function ChannelUpdate_get_signature(this_ptr: number): number {
19581         if(!isWasmInitialized) {
19582                 throw new Error("initializeWasm() must be awaited first!");
19583         }
19584         const nativeResponseValue = wasm.TS_ChannelUpdate_get_signature(this_ptr);
19585         return nativeResponseValue;
19586 }
19587         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
19588 /* @internal */
19589 export function ChannelUpdate_set_signature(this_ptr: number, val: number): void {
19590         if(!isWasmInitialized) {
19591                 throw new Error("initializeWasm() must be awaited first!");
19592         }
19593         const nativeResponseValue = wasm.TS_ChannelUpdate_set_signature(this_ptr, val);
19594         // debug statements here
19595 }
19596         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
19597 /* @internal */
19598 export function ChannelUpdate_get_contents(this_ptr: number): number {
19599         if(!isWasmInitialized) {
19600                 throw new Error("initializeWasm() must be awaited first!");
19601         }
19602         const nativeResponseValue = wasm.TS_ChannelUpdate_get_contents(this_ptr);
19603         return nativeResponseValue;
19604 }
19605         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
19606 /* @internal */
19607 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
19608         if(!isWasmInitialized) {
19609                 throw new Error("initializeWasm() must be awaited first!");
19610         }
19611         const nativeResponseValue = wasm.TS_ChannelUpdate_set_contents(this_ptr, val);
19612         // debug statements here
19613 }
19614         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
19615 /* @internal */
19616 export function ChannelUpdate_new(signature_arg: number, contents_arg: number): number {
19617         if(!isWasmInitialized) {
19618                 throw new Error("initializeWasm() must be awaited first!");
19619         }
19620         const nativeResponseValue = wasm.TS_ChannelUpdate_new(signature_arg, contents_arg);
19621         return nativeResponseValue;
19622 }
19623         // uintptr_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
19624 /* @internal */
19625 export function ChannelUpdate_clone_ptr(arg: number): number {
19626         if(!isWasmInitialized) {
19627                 throw new Error("initializeWasm() must be awaited first!");
19628         }
19629         const nativeResponseValue = wasm.TS_ChannelUpdate_clone_ptr(arg);
19630         return nativeResponseValue;
19631 }
19632         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
19633 /* @internal */
19634 export function ChannelUpdate_clone(orig: number): number {
19635         if(!isWasmInitialized) {
19636                 throw new Error("initializeWasm() must be awaited first!");
19637         }
19638         const nativeResponseValue = wasm.TS_ChannelUpdate_clone(orig);
19639         return nativeResponseValue;
19640 }
19641         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
19642 /* @internal */
19643 export function QueryChannelRange_free(this_obj: number): void {
19644         if(!isWasmInitialized) {
19645                 throw new Error("initializeWasm() must be awaited first!");
19646         }
19647         const nativeResponseValue = wasm.TS_QueryChannelRange_free(this_obj);
19648         // debug statements here
19649 }
19650         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
19651 /* @internal */
19652 export function QueryChannelRange_get_chain_hash(this_ptr: number): number {
19653         if(!isWasmInitialized) {
19654                 throw new Error("initializeWasm() must be awaited first!");
19655         }
19656         const nativeResponseValue = wasm.TS_QueryChannelRange_get_chain_hash(this_ptr);
19657         return nativeResponseValue;
19658 }
19659         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19660 /* @internal */
19661 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: number): void {
19662         if(!isWasmInitialized) {
19663                 throw new Error("initializeWasm() must be awaited first!");
19664         }
19665         const nativeResponseValue = wasm.TS_QueryChannelRange_set_chain_hash(this_ptr, val);
19666         // debug statements here
19667 }
19668         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
19669 /* @internal */
19670 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
19671         if(!isWasmInitialized) {
19672                 throw new Error("initializeWasm() must be awaited first!");
19673         }
19674         const nativeResponseValue = wasm.TS_QueryChannelRange_get_first_blocknum(this_ptr);
19675         return nativeResponseValue;
19676 }
19677         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
19678 /* @internal */
19679 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
19680         if(!isWasmInitialized) {
19681                 throw new Error("initializeWasm() must be awaited first!");
19682         }
19683         const nativeResponseValue = wasm.TS_QueryChannelRange_set_first_blocknum(this_ptr, val);
19684         // debug statements here
19685 }
19686         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
19687 /* @internal */
19688 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
19689         if(!isWasmInitialized) {
19690                 throw new Error("initializeWasm() must be awaited first!");
19691         }
19692         const nativeResponseValue = wasm.TS_QueryChannelRange_get_number_of_blocks(this_ptr);
19693         return nativeResponseValue;
19694 }
19695         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
19696 /* @internal */
19697 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
19698         if(!isWasmInitialized) {
19699                 throw new Error("initializeWasm() must be awaited first!");
19700         }
19701         const nativeResponseValue = wasm.TS_QueryChannelRange_set_number_of_blocks(this_ptr, val);
19702         // debug statements here
19703 }
19704         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
19705 /* @internal */
19706 export function QueryChannelRange_new(chain_hash_arg: number, first_blocknum_arg: number, number_of_blocks_arg: number): number {
19707         if(!isWasmInitialized) {
19708                 throw new Error("initializeWasm() must be awaited first!");
19709         }
19710         const nativeResponseValue = wasm.TS_QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg);
19711         return nativeResponseValue;
19712 }
19713         // uintptr_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
19714 /* @internal */
19715 export function QueryChannelRange_clone_ptr(arg: number): number {
19716         if(!isWasmInitialized) {
19717                 throw new Error("initializeWasm() must be awaited first!");
19718         }
19719         const nativeResponseValue = wasm.TS_QueryChannelRange_clone_ptr(arg);
19720         return nativeResponseValue;
19721 }
19722         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
19723 /* @internal */
19724 export function QueryChannelRange_clone(orig: number): number {
19725         if(!isWasmInitialized) {
19726                 throw new Error("initializeWasm() must be awaited first!");
19727         }
19728         const nativeResponseValue = wasm.TS_QueryChannelRange_clone(orig);
19729         return nativeResponseValue;
19730 }
19731         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
19732 /* @internal */
19733 export function ReplyChannelRange_free(this_obj: number): void {
19734         if(!isWasmInitialized) {
19735                 throw new Error("initializeWasm() must be awaited first!");
19736         }
19737         const nativeResponseValue = wasm.TS_ReplyChannelRange_free(this_obj);
19738         // debug statements here
19739 }
19740         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
19741 /* @internal */
19742 export function ReplyChannelRange_get_chain_hash(this_ptr: number): number {
19743         if(!isWasmInitialized) {
19744                 throw new Error("initializeWasm() must be awaited first!");
19745         }
19746         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_chain_hash(this_ptr);
19747         return nativeResponseValue;
19748 }
19749         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19750 /* @internal */
19751 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: number): void {
19752         if(!isWasmInitialized) {
19753                 throw new Error("initializeWasm() must be awaited first!");
19754         }
19755         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_chain_hash(this_ptr, val);
19756         // debug statements here
19757 }
19758         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
19759 /* @internal */
19760 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
19761         if(!isWasmInitialized) {
19762                 throw new Error("initializeWasm() must be awaited first!");
19763         }
19764         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_first_blocknum(this_ptr);
19765         return nativeResponseValue;
19766 }
19767         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
19768 /* @internal */
19769 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
19770         if(!isWasmInitialized) {
19771                 throw new Error("initializeWasm() must be awaited first!");
19772         }
19773         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_first_blocknum(this_ptr, val);
19774         // debug statements here
19775 }
19776         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
19777 /* @internal */
19778 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
19779         if(!isWasmInitialized) {
19780                 throw new Error("initializeWasm() must be awaited first!");
19781         }
19782         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_number_of_blocks(this_ptr);
19783         return nativeResponseValue;
19784 }
19785         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
19786 /* @internal */
19787 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
19788         if(!isWasmInitialized) {
19789                 throw new Error("initializeWasm() must be awaited first!");
19790         }
19791         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_number_of_blocks(this_ptr, val);
19792         // debug statements here
19793 }
19794         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
19795 /* @internal */
19796 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
19797         if(!isWasmInitialized) {
19798                 throw new Error("initializeWasm() must be awaited first!");
19799         }
19800         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_sync_complete(this_ptr);
19801         return nativeResponseValue;
19802 }
19803         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
19804 /* @internal */
19805 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
19806         if(!isWasmInitialized) {
19807                 throw new Error("initializeWasm() must be awaited first!");
19808         }
19809         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_sync_complete(this_ptr, val);
19810         // debug statements here
19811 }
19812         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
19813 /* @internal */
19814 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number): void {
19815         if(!isWasmInitialized) {
19816                 throw new Error("initializeWasm() must be awaited first!");
19817         }
19818         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_short_channel_ids(this_ptr, val);
19819         // debug statements here
19820 }
19821         // 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);
19822 /* @internal */
19823 export function ReplyChannelRange_new(chain_hash_arg: number, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number): number {
19824         if(!isWasmInitialized) {
19825                 throw new Error("initializeWasm() must be awaited first!");
19826         }
19827         const nativeResponseValue = wasm.TS_ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
19828         return nativeResponseValue;
19829 }
19830         // uintptr_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
19831 /* @internal */
19832 export function ReplyChannelRange_clone_ptr(arg: number): number {
19833         if(!isWasmInitialized) {
19834                 throw new Error("initializeWasm() must be awaited first!");
19835         }
19836         const nativeResponseValue = wasm.TS_ReplyChannelRange_clone_ptr(arg);
19837         return nativeResponseValue;
19838 }
19839         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
19840 /* @internal */
19841 export function ReplyChannelRange_clone(orig: number): number {
19842         if(!isWasmInitialized) {
19843                 throw new Error("initializeWasm() must be awaited first!");
19844         }
19845         const nativeResponseValue = wasm.TS_ReplyChannelRange_clone(orig);
19846         return nativeResponseValue;
19847 }
19848         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
19849 /* @internal */
19850 export function QueryShortChannelIds_free(this_obj: number): void {
19851         if(!isWasmInitialized) {
19852                 throw new Error("initializeWasm() must be awaited first!");
19853         }
19854         const nativeResponseValue = wasm.TS_QueryShortChannelIds_free(this_obj);
19855         // debug statements here
19856 }
19857         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
19858 /* @internal */
19859 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): number {
19860         if(!isWasmInitialized) {
19861                 throw new Error("initializeWasm() must be awaited first!");
19862         }
19863         const nativeResponseValue = wasm.TS_QueryShortChannelIds_get_chain_hash(this_ptr);
19864         return nativeResponseValue;
19865 }
19866         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19867 /* @internal */
19868 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: number): void {
19869         if(!isWasmInitialized) {
19870                 throw new Error("initializeWasm() must be awaited first!");
19871         }
19872         const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_chain_hash(this_ptr, val);
19873         // debug statements here
19874 }
19875         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
19876 /* @internal */
19877 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number): void {
19878         if(!isWasmInitialized) {
19879                 throw new Error("initializeWasm() must be awaited first!");
19880         }
19881         const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
19882         // debug statements here
19883 }
19884         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
19885 /* @internal */
19886 export function QueryShortChannelIds_new(chain_hash_arg: number, short_channel_ids_arg: number): number {
19887         if(!isWasmInitialized) {
19888                 throw new Error("initializeWasm() must be awaited first!");
19889         }
19890         const nativeResponseValue = wasm.TS_QueryShortChannelIds_new(chain_hash_arg, short_channel_ids_arg);
19891         return nativeResponseValue;
19892 }
19893         // uintptr_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
19894 /* @internal */
19895 export function QueryShortChannelIds_clone_ptr(arg: number): number {
19896         if(!isWasmInitialized) {
19897                 throw new Error("initializeWasm() must be awaited first!");
19898         }
19899         const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone_ptr(arg);
19900         return nativeResponseValue;
19901 }
19902         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
19903 /* @internal */
19904 export function QueryShortChannelIds_clone(orig: number): number {
19905         if(!isWasmInitialized) {
19906                 throw new Error("initializeWasm() must be awaited first!");
19907         }
19908         const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone(orig);
19909         return nativeResponseValue;
19910 }
19911         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
19912 /* @internal */
19913 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
19914         if(!isWasmInitialized) {
19915                 throw new Error("initializeWasm() must be awaited first!");
19916         }
19917         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_free(this_obj);
19918         // debug statements here
19919 }
19920         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
19921 /* @internal */
19922 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): number {
19923         if(!isWasmInitialized) {
19924                 throw new Error("initializeWasm() must be awaited first!");
19925         }
19926         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
19927         return nativeResponseValue;
19928 }
19929         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19930 /* @internal */
19931 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: number): void {
19932         if(!isWasmInitialized) {
19933                 throw new Error("initializeWasm() must be awaited first!");
19934         }
19935         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, val);
19936         // debug statements here
19937 }
19938         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
19939 /* @internal */
19940 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
19941         if(!isWasmInitialized) {
19942                 throw new Error("initializeWasm() must be awaited first!");
19943         }
19944         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_full_information(this_ptr);
19945         return nativeResponseValue;
19946 }
19947         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
19948 /* @internal */
19949 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
19950         if(!isWasmInitialized) {
19951                 throw new Error("initializeWasm() must be awaited first!");
19952         }
19953         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
19954         // debug statements here
19955 }
19956         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
19957 /* @internal */
19958 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: number, full_information_arg: boolean): number {
19959         if(!isWasmInitialized) {
19960                 throw new Error("initializeWasm() must be awaited first!");
19961         }
19962         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg);
19963         return nativeResponseValue;
19964 }
19965         // uintptr_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
19966 /* @internal */
19967 export function ReplyShortChannelIdsEnd_clone_ptr(arg: number): number {
19968         if(!isWasmInitialized) {
19969                 throw new Error("initializeWasm() must be awaited first!");
19970         }
19971         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone_ptr(arg);
19972         return nativeResponseValue;
19973 }
19974         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
19975 /* @internal */
19976 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
19977         if(!isWasmInitialized) {
19978                 throw new Error("initializeWasm() must be awaited first!");
19979         }
19980         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone(orig);
19981         return nativeResponseValue;
19982 }
19983         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
19984 /* @internal */
19985 export function GossipTimestampFilter_free(this_obj: number): void {
19986         if(!isWasmInitialized) {
19987                 throw new Error("initializeWasm() must be awaited first!");
19988         }
19989         const nativeResponseValue = wasm.TS_GossipTimestampFilter_free(this_obj);
19990         // debug statements here
19991 }
19992         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
19993 /* @internal */
19994 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): number {
19995         if(!isWasmInitialized) {
19996                 throw new Error("initializeWasm() must be awaited first!");
19997         }
19998         const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_chain_hash(this_ptr);
19999         return nativeResponseValue;
20000 }
20001         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
20002 /* @internal */
20003 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: number): void {
20004         if(!isWasmInitialized) {
20005                 throw new Error("initializeWasm() must be awaited first!");
20006         }
20007         const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_chain_hash(this_ptr, val);
20008         // debug statements here
20009 }
20010         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
20011 /* @internal */
20012 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
20013         if(!isWasmInitialized) {
20014                 throw new Error("initializeWasm() must be awaited first!");
20015         }
20016         const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_first_timestamp(this_ptr);
20017         return nativeResponseValue;
20018 }
20019         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
20020 /* @internal */
20021 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
20022         if(!isWasmInitialized) {
20023                 throw new Error("initializeWasm() must be awaited first!");
20024         }
20025         const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_first_timestamp(this_ptr, val);
20026         // debug statements here
20027 }
20028         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
20029 /* @internal */
20030 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
20031         if(!isWasmInitialized) {
20032                 throw new Error("initializeWasm() must be awaited first!");
20033         }
20034         const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_timestamp_range(this_ptr);
20035         return nativeResponseValue;
20036 }
20037         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
20038 /* @internal */
20039 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
20040         if(!isWasmInitialized) {
20041                 throw new Error("initializeWasm() must be awaited first!");
20042         }
20043         const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_timestamp_range(this_ptr, val);
20044         // debug statements here
20045 }
20046         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
20047 /* @internal */
20048 export function GossipTimestampFilter_new(chain_hash_arg: number, first_timestamp_arg: number, timestamp_range_arg: number): number {
20049         if(!isWasmInitialized) {
20050                 throw new Error("initializeWasm() must be awaited first!");
20051         }
20052         const nativeResponseValue = wasm.TS_GossipTimestampFilter_new(chain_hash_arg, first_timestamp_arg, timestamp_range_arg);
20053         return nativeResponseValue;
20054 }
20055         // uintptr_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
20056 /* @internal */
20057 export function GossipTimestampFilter_clone_ptr(arg: number): number {
20058         if(!isWasmInitialized) {
20059                 throw new Error("initializeWasm() must be awaited first!");
20060         }
20061         const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone_ptr(arg);
20062         return nativeResponseValue;
20063 }
20064         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
20065 /* @internal */
20066 export function GossipTimestampFilter_clone(orig: number): number {
20067         if(!isWasmInitialized) {
20068                 throw new Error("initializeWasm() must be awaited first!");
20069         }
20070         const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone(orig);
20071         return nativeResponseValue;
20072 }
20073         // void ErrorAction_free(struct LDKErrorAction this_ptr);
20074 /* @internal */
20075 export function ErrorAction_free(this_ptr: number): void {
20076         if(!isWasmInitialized) {
20077                 throw new Error("initializeWasm() must be awaited first!");
20078         }
20079         const nativeResponseValue = wasm.TS_ErrorAction_free(this_ptr);
20080         // debug statements here
20081 }
20082         // uintptr_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
20083 /* @internal */
20084 export function ErrorAction_clone_ptr(arg: number): number {
20085         if(!isWasmInitialized) {
20086                 throw new Error("initializeWasm() must be awaited first!");
20087         }
20088         const nativeResponseValue = wasm.TS_ErrorAction_clone_ptr(arg);
20089         return nativeResponseValue;
20090 }
20091         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
20092 /* @internal */
20093 export function ErrorAction_clone(orig: number): number {
20094         if(!isWasmInitialized) {
20095                 throw new Error("initializeWasm() must be awaited first!");
20096         }
20097         const nativeResponseValue = wasm.TS_ErrorAction_clone(orig);
20098         return nativeResponseValue;
20099 }
20100         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
20101 /* @internal */
20102 export function ErrorAction_disconnect_peer(msg: number): number {
20103         if(!isWasmInitialized) {
20104                 throw new Error("initializeWasm() must be awaited first!");
20105         }
20106         const nativeResponseValue = wasm.TS_ErrorAction_disconnect_peer(msg);
20107         return nativeResponseValue;
20108 }
20109         // struct LDKErrorAction ErrorAction_ignore_error(void);
20110 /* @internal */
20111 export function ErrorAction_ignore_error(): number {
20112         if(!isWasmInitialized) {
20113                 throw new Error("initializeWasm() must be awaited first!");
20114         }
20115         const nativeResponseValue = wasm.TS_ErrorAction_ignore_error();
20116         return nativeResponseValue;
20117 }
20118         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
20119 /* @internal */
20120 export function ErrorAction_ignore_and_log(a: Level): number {
20121         if(!isWasmInitialized) {
20122                 throw new Error("initializeWasm() must be awaited first!");
20123         }
20124         const nativeResponseValue = wasm.TS_ErrorAction_ignore_and_log(a);
20125         return nativeResponseValue;
20126 }
20127         // struct LDKErrorAction ErrorAction_ignore_duplicate_gossip(void);
20128 /* @internal */
20129 export function ErrorAction_ignore_duplicate_gossip(): number {
20130         if(!isWasmInitialized) {
20131                 throw new Error("initializeWasm() must be awaited first!");
20132         }
20133         const nativeResponseValue = wasm.TS_ErrorAction_ignore_duplicate_gossip();
20134         return nativeResponseValue;
20135 }
20136         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
20137 /* @internal */
20138 export function ErrorAction_send_error_message(msg: number): number {
20139         if(!isWasmInitialized) {
20140                 throw new Error("initializeWasm() must be awaited first!");
20141         }
20142         const nativeResponseValue = wasm.TS_ErrorAction_send_error_message(msg);
20143         return nativeResponseValue;
20144 }
20145         // void LightningError_free(struct LDKLightningError this_obj);
20146 /* @internal */
20147 export function LightningError_free(this_obj: number): void {
20148         if(!isWasmInitialized) {
20149                 throw new Error("initializeWasm() must be awaited first!");
20150         }
20151         const nativeResponseValue = wasm.TS_LightningError_free(this_obj);
20152         // debug statements here
20153 }
20154         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
20155 /* @internal */
20156 export function LightningError_get_err(this_ptr: number): number {
20157         if(!isWasmInitialized) {
20158                 throw new Error("initializeWasm() must be awaited first!");
20159         }
20160         const nativeResponseValue = wasm.TS_LightningError_get_err(this_ptr);
20161         return nativeResponseValue;
20162 }
20163         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
20164 /* @internal */
20165 export function LightningError_set_err(this_ptr: number, val: number): void {
20166         if(!isWasmInitialized) {
20167                 throw new Error("initializeWasm() must be awaited first!");
20168         }
20169         const nativeResponseValue = wasm.TS_LightningError_set_err(this_ptr, val);
20170         // debug statements here
20171 }
20172         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
20173 /* @internal */
20174 export function LightningError_get_action(this_ptr: number): number {
20175         if(!isWasmInitialized) {
20176                 throw new Error("initializeWasm() must be awaited first!");
20177         }
20178         const nativeResponseValue = wasm.TS_LightningError_get_action(this_ptr);
20179         return nativeResponseValue;
20180 }
20181         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
20182 /* @internal */
20183 export function LightningError_set_action(this_ptr: number, val: number): void {
20184         if(!isWasmInitialized) {
20185                 throw new Error("initializeWasm() must be awaited first!");
20186         }
20187         const nativeResponseValue = wasm.TS_LightningError_set_action(this_ptr, val);
20188         // debug statements here
20189 }
20190         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
20191 /* @internal */
20192 export function LightningError_new(err_arg: number, action_arg: number): number {
20193         if(!isWasmInitialized) {
20194                 throw new Error("initializeWasm() must be awaited first!");
20195         }
20196         const nativeResponseValue = wasm.TS_LightningError_new(err_arg, action_arg);
20197         return nativeResponseValue;
20198 }
20199         // uintptr_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
20200 /* @internal */
20201 export function LightningError_clone_ptr(arg: number): number {
20202         if(!isWasmInitialized) {
20203                 throw new Error("initializeWasm() must be awaited first!");
20204         }
20205         const nativeResponseValue = wasm.TS_LightningError_clone_ptr(arg);
20206         return nativeResponseValue;
20207 }
20208         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
20209 /* @internal */
20210 export function LightningError_clone(orig: number): number {
20211         if(!isWasmInitialized) {
20212                 throw new Error("initializeWasm() must be awaited first!");
20213         }
20214         const nativeResponseValue = wasm.TS_LightningError_clone(orig);
20215         return nativeResponseValue;
20216 }
20217         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
20218 /* @internal */
20219 export function CommitmentUpdate_free(this_obj: number): void {
20220         if(!isWasmInitialized) {
20221                 throw new Error("initializeWasm() must be awaited first!");
20222         }
20223         const nativeResponseValue = wasm.TS_CommitmentUpdate_free(this_obj);
20224         // debug statements here
20225 }
20226         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
20227 /* @internal */
20228 export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number {
20229         if(!isWasmInitialized) {
20230                 throw new Error("initializeWasm() must be awaited first!");
20231         }
20232         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_add_htlcs(this_ptr);
20233         return nativeResponseValue;
20234 }
20235         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
20236 /* @internal */
20237 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number): void {
20238         if(!isWasmInitialized) {
20239                 throw new Error("initializeWasm() must be awaited first!");
20240         }
20241         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
20242         // debug statements here
20243 }
20244         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
20245 /* @internal */
20246 export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number {
20247         if(!isWasmInitialized) {
20248                 throw new Error("initializeWasm() must be awaited first!");
20249         }
20250         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
20251         return nativeResponseValue;
20252 }
20253         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
20254 /* @internal */
20255 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number): void {
20256         if(!isWasmInitialized) {
20257                 throw new Error("initializeWasm() must be awaited first!");
20258         }
20259         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
20260         // debug statements here
20261 }
20262         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
20263 /* @internal */
20264 export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number {
20265         if(!isWasmInitialized) {
20266                 throw new Error("initializeWasm() must be awaited first!");
20267         }
20268         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_htlcs(this_ptr);
20269         return nativeResponseValue;
20270 }
20271         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
20272 /* @internal */
20273 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number): void {
20274         if(!isWasmInitialized) {
20275                 throw new Error("initializeWasm() must be awaited first!");
20276         }
20277         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
20278         // debug statements here
20279 }
20280         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
20281 /* @internal */
20282 export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number {
20283         if(!isWasmInitialized) {
20284                 throw new Error("initializeWasm() must be awaited first!");
20285         }
20286         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
20287         return nativeResponseValue;
20288 }
20289         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
20290 /* @internal */
20291 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number): void {
20292         if(!isWasmInitialized) {
20293                 throw new Error("initializeWasm() must be awaited first!");
20294         }
20295         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
20296         // debug statements here
20297 }
20298         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
20299 /* @internal */
20300 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
20301         if(!isWasmInitialized) {
20302                 throw new Error("initializeWasm() must be awaited first!");
20303         }
20304         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fee(this_ptr);
20305         return nativeResponseValue;
20306 }
20307         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
20308 /* @internal */
20309 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
20310         if(!isWasmInitialized) {
20311                 throw new Error("initializeWasm() must be awaited first!");
20312         }
20313         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fee(this_ptr, val);
20314         // debug statements here
20315 }
20316         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
20317 /* @internal */
20318 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
20319         if(!isWasmInitialized) {
20320                 throw new Error("initializeWasm() must be awaited first!");
20321         }
20322         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_commitment_signed(this_ptr);
20323         return nativeResponseValue;
20324 }
20325         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
20326 /* @internal */
20327 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
20328         if(!isWasmInitialized) {
20329                 throw new Error("initializeWasm() must be awaited first!");
20330         }
20331         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_commitment_signed(this_ptr, val);
20332         // debug statements here
20333 }
20334         // 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);
20335 /* @internal */
20336 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 {
20337         if(!isWasmInitialized) {
20338                 throw new Error("initializeWasm() must be awaited first!");
20339         }
20340         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);
20341         return nativeResponseValue;
20342 }
20343         // uintptr_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
20344 /* @internal */
20345 export function CommitmentUpdate_clone_ptr(arg: number): number {
20346         if(!isWasmInitialized) {
20347                 throw new Error("initializeWasm() must be awaited first!");
20348         }
20349         const nativeResponseValue = wasm.TS_CommitmentUpdate_clone_ptr(arg);
20350         return nativeResponseValue;
20351 }
20352         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
20353 /* @internal */
20354 export function CommitmentUpdate_clone(orig: number): number {
20355         if(!isWasmInitialized) {
20356                 throw new Error("initializeWasm() must be awaited first!");
20357         }
20358         const nativeResponseValue = wasm.TS_CommitmentUpdate_clone(orig);
20359         return nativeResponseValue;
20360 }
20361         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
20362 /* @internal */
20363 export function ChannelMessageHandler_free(this_ptr: number): void {
20364         if(!isWasmInitialized) {
20365                 throw new Error("initializeWasm() must be awaited first!");
20366         }
20367         const nativeResponseValue = wasm.TS_ChannelMessageHandler_free(this_ptr);
20368         // debug statements here
20369 }
20370         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
20371 /* @internal */
20372 export function RoutingMessageHandler_free(this_ptr: number): void {
20373         if(!isWasmInitialized) {
20374                 throw new Error("initializeWasm() must be awaited first!");
20375         }
20376         const nativeResponseValue = wasm.TS_RoutingMessageHandler_free(this_ptr);
20377         // debug statements here
20378 }
20379         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
20380 /* @internal */
20381 export function AcceptChannel_write(obj: number): number {
20382         if(!isWasmInitialized) {
20383                 throw new Error("initializeWasm() must be awaited first!");
20384         }
20385         const nativeResponseValue = wasm.TS_AcceptChannel_write(obj);
20386         return nativeResponseValue;
20387 }
20388         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
20389 /* @internal */
20390 export function AcceptChannel_read(ser: number): number {
20391         if(!isWasmInitialized) {
20392                 throw new Error("initializeWasm() must be awaited first!");
20393         }
20394         const nativeResponseValue = wasm.TS_AcceptChannel_read(ser);
20395         return nativeResponseValue;
20396 }
20397         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
20398 /* @internal */
20399 export function AnnouncementSignatures_write(obj: number): number {
20400         if(!isWasmInitialized) {
20401                 throw new Error("initializeWasm() must be awaited first!");
20402         }
20403         const nativeResponseValue = wasm.TS_AnnouncementSignatures_write(obj);
20404         return nativeResponseValue;
20405 }
20406         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
20407 /* @internal */
20408 export function AnnouncementSignatures_read(ser: number): number {
20409         if(!isWasmInitialized) {
20410                 throw new Error("initializeWasm() must be awaited first!");
20411         }
20412         const nativeResponseValue = wasm.TS_AnnouncementSignatures_read(ser);
20413         return nativeResponseValue;
20414 }
20415         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
20416 /* @internal */
20417 export function ChannelReestablish_write(obj: number): number {
20418         if(!isWasmInitialized) {
20419                 throw new Error("initializeWasm() must be awaited first!");
20420         }
20421         const nativeResponseValue = wasm.TS_ChannelReestablish_write(obj);
20422         return nativeResponseValue;
20423 }
20424         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
20425 /* @internal */
20426 export function ChannelReestablish_read(ser: number): number {
20427         if(!isWasmInitialized) {
20428                 throw new Error("initializeWasm() must be awaited first!");
20429         }
20430         const nativeResponseValue = wasm.TS_ChannelReestablish_read(ser);
20431         return nativeResponseValue;
20432 }
20433         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
20434 /* @internal */
20435 export function ClosingSigned_write(obj: number): number {
20436         if(!isWasmInitialized) {
20437                 throw new Error("initializeWasm() must be awaited first!");
20438         }
20439         const nativeResponseValue = wasm.TS_ClosingSigned_write(obj);
20440         return nativeResponseValue;
20441 }
20442         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
20443 /* @internal */
20444 export function ClosingSigned_read(ser: number): number {
20445         if(!isWasmInitialized) {
20446                 throw new Error("initializeWasm() must be awaited first!");
20447         }
20448         const nativeResponseValue = wasm.TS_ClosingSigned_read(ser);
20449         return nativeResponseValue;
20450 }
20451         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
20452 /* @internal */
20453 export function ClosingSignedFeeRange_write(obj: number): number {
20454         if(!isWasmInitialized) {
20455                 throw new Error("initializeWasm() must be awaited first!");
20456         }
20457         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_write(obj);
20458         return nativeResponseValue;
20459 }
20460         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
20461 /* @internal */
20462 export function ClosingSignedFeeRange_read(ser: number): number {
20463         if(!isWasmInitialized) {
20464                 throw new Error("initializeWasm() must be awaited first!");
20465         }
20466         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_read(ser);
20467         return nativeResponseValue;
20468 }
20469         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
20470 /* @internal */
20471 export function CommitmentSigned_write(obj: number): number {
20472         if(!isWasmInitialized) {
20473                 throw new Error("initializeWasm() must be awaited first!");
20474         }
20475         const nativeResponseValue = wasm.TS_CommitmentSigned_write(obj);
20476         return nativeResponseValue;
20477 }
20478         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
20479 /* @internal */
20480 export function CommitmentSigned_read(ser: number): number {
20481         if(!isWasmInitialized) {
20482                 throw new Error("initializeWasm() must be awaited first!");
20483         }
20484         const nativeResponseValue = wasm.TS_CommitmentSigned_read(ser);
20485         return nativeResponseValue;
20486 }
20487         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
20488 /* @internal */
20489 export function FundingCreated_write(obj: number): number {
20490         if(!isWasmInitialized) {
20491                 throw new Error("initializeWasm() must be awaited first!");
20492         }
20493         const nativeResponseValue = wasm.TS_FundingCreated_write(obj);
20494         return nativeResponseValue;
20495 }
20496         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
20497 /* @internal */
20498 export function FundingCreated_read(ser: number): number {
20499         if(!isWasmInitialized) {
20500                 throw new Error("initializeWasm() must be awaited first!");
20501         }
20502         const nativeResponseValue = wasm.TS_FundingCreated_read(ser);
20503         return nativeResponseValue;
20504 }
20505         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
20506 /* @internal */
20507 export function FundingSigned_write(obj: number): number {
20508         if(!isWasmInitialized) {
20509                 throw new Error("initializeWasm() must be awaited first!");
20510         }
20511         const nativeResponseValue = wasm.TS_FundingSigned_write(obj);
20512         return nativeResponseValue;
20513 }
20514         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
20515 /* @internal */
20516 export function FundingSigned_read(ser: number): number {
20517         if(!isWasmInitialized) {
20518                 throw new Error("initializeWasm() must be awaited first!");
20519         }
20520         const nativeResponseValue = wasm.TS_FundingSigned_read(ser);
20521         return nativeResponseValue;
20522 }
20523         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
20524 /* @internal */
20525 export function FundingLocked_write(obj: number): number {
20526         if(!isWasmInitialized) {
20527                 throw new Error("initializeWasm() must be awaited first!");
20528         }
20529         const nativeResponseValue = wasm.TS_FundingLocked_write(obj);
20530         return nativeResponseValue;
20531 }
20532         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
20533 /* @internal */
20534 export function FundingLocked_read(ser: number): number {
20535         if(!isWasmInitialized) {
20536                 throw new Error("initializeWasm() must be awaited first!");
20537         }
20538         const nativeResponseValue = wasm.TS_FundingLocked_read(ser);
20539         return nativeResponseValue;
20540 }
20541         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
20542 /* @internal */
20543 export function Init_write(obj: number): number {
20544         if(!isWasmInitialized) {
20545                 throw new Error("initializeWasm() must be awaited first!");
20546         }
20547         const nativeResponseValue = wasm.TS_Init_write(obj);
20548         return nativeResponseValue;
20549 }
20550         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
20551 /* @internal */
20552 export function Init_read(ser: number): number {
20553         if(!isWasmInitialized) {
20554                 throw new Error("initializeWasm() must be awaited first!");
20555         }
20556         const nativeResponseValue = wasm.TS_Init_read(ser);
20557         return nativeResponseValue;
20558 }
20559         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
20560 /* @internal */
20561 export function OpenChannel_write(obj: number): number {
20562         if(!isWasmInitialized) {
20563                 throw new Error("initializeWasm() must be awaited first!");
20564         }
20565         const nativeResponseValue = wasm.TS_OpenChannel_write(obj);
20566         return nativeResponseValue;
20567 }
20568         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
20569 /* @internal */
20570 export function OpenChannel_read(ser: number): number {
20571         if(!isWasmInitialized) {
20572                 throw new Error("initializeWasm() must be awaited first!");
20573         }
20574         const nativeResponseValue = wasm.TS_OpenChannel_read(ser);
20575         return nativeResponseValue;
20576 }
20577         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
20578 /* @internal */
20579 export function RevokeAndACK_write(obj: number): number {
20580         if(!isWasmInitialized) {
20581                 throw new Error("initializeWasm() must be awaited first!");
20582         }
20583         const nativeResponseValue = wasm.TS_RevokeAndACK_write(obj);
20584         return nativeResponseValue;
20585 }
20586         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
20587 /* @internal */
20588 export function RevokeAndACK_read(ser: number): number {
20589         if(!isWasmInitialized) {
20590                 throw new Error("initializeWasm() must be awaited first!");
20591         }
20592         const nativeResponseValue = wasm.TS_RevokeAndACK_read(ser);
20593         return nativeResponseValue;
20594 }
20595         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
20596 /* @internal */
20597 export function Shutdown_write(obj: number): number {
20598         if(!isWasmInitialized) {
20599                 throw new Error("initializeWasm() must be awaited first!");
20600         }
20601         const nativeResponseValue = wasm.TS_Shutdown_write(obj);
20602         return nativeResponseValue;
20603 }
20604         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
20605 /* @internal */
20606 export function Shutdown_read(ser: number): number {
20607         if(!isWasmInitialized) {
20608                 throw new Error("initializeWasm() must be awaited first!");
20609         }
20610         const nativeResponseValue = wasm.TS_Shutdown_read(ser);
20611         return nativeResponseValue;
20612 }
20613         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
20614 /* @internal */
20615 export function UpdateFailHTLC_write(obj: number): number {
20616         if(!isWasmInitialized) {
20617                 throw new Error("initializeWasm() must be awaited first!");
20618         }
20619         const nativeResponseValue = wasm.TS_UpdateFailHTLC_write(obj);
20620         return nativeResponseValue;
20621 }
20622         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
20623 /* @internal */
20624 export function UpdateFailHTLC_read(ser: number): number {
20625         if(!isWasmInitialized) {
20626                 throw new Error("initializeWasm() must be awaited first!");
20627         }
20628         const nativeResponseValue = wasm.TS_UpdateFailHTLC_read(ser);
20629         return nativeResponseValue;
20630 }
20631         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
20632 /* @internal */
20633 export function UpdateFailMalformedHTLC_write(obj: number): number {
20634         if(!isWasmInitialized) {
20635                 throw new Error("initializeWasm() must be awaited first!");
20636         }
20637         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_write(obj);
20638         return nativeResponseValue;
20639 }
20640         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
20641 /* @internal */
20642 export function UpdateFailMalformedHTLC_read(ser: number): number {
20643         if(!isWasmInitialized) {
20644                 throw new Error("initializeWasm() must be awaited first!");
20645         }
20646         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_read(ser);
20647         return nativeResponseValue;
20648 }
20649         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
20650 /* @internal */
20651 export function UpdateFee_write(obj: number): number {
20652         if(!isWasmInitialized) {
20653                 throw new Error("initializeWasm() must be awaited first!");
20654         }
20655         const nativeResponseValue = wasm.TS_UpdateFee_write(obj);
20656         return nativeResponseValue;
20657 }
20658         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
20659 /* @internal */
20660 export function UpdateFee_read(ser: number): number {
20661         if(!isWasmInitialized) {
20662                 throw new Error("initializeWasm() must be awaited first!");
20663         }
20664         const nativeResponseValue = wasm.TS_UpdateFee_read(ser);
20665         return nativeResponseValue;
20666 }
20667         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
20668 /* @internal */
20669 export function UpdateFulfillHTLC_write(obj: number): number {
20670         if(!isWasmInitialized) {
20671                 throw new Error("initializeWasm() must be awaited first!");
20672         }
20673         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_write(obj);
20674         return nativeResponseValue;
20675 }
20676         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
20677 /* @internal */
20678 export function UpdateFulfillHTLC_read(ser: number): number {
20679         if(!isWasmInitialized) {
20680                 throw new Error("initializeWasm() must be awaited first!");
20681         }
20682         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_read(ser);
20683         return nativeResponseValue;
20684 }
20685         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
20686 /* @internal */
20687 export function UpdateAddHTLC_write(obj: number): number {
20688         if(!isWasmInitialized) {
20689                 throw new Error("initializeWasm() must be awaited first!");
20690         }
20691         const nativeResponseValue = wasm.TS_UpdateAddHTLC_write(obj);
20692         return nativeResponseValue;
20693 }
20694         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
20695 /* @internal */
20696 export function UpdateAddHTLC_read(ser: number): number {
20697         if(!isWasmInitialized) {
20698                 throw new Error("initializeWasm() must be awaited first!");
20699         }
20700         const nativeResponseValue = wasm.TS_UpdateAddHTLC_read(ser);
20701         return nativeResponseValue;
20702 }
20703         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
20704 /* @internal */
20705 export function Ping_write(obj: number): number {
20706         if(!isWasmInitialized) {
20707                 throw new Error("initializeWasm() must be awaited first!");
20708         }
20709         const nativeResponseValue = wasm.TS_Ping_write(obj);
20710         return nativeResponseValue;
20711 }
20712         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
20713 /* @internal */
20714 export function Ping_read(ser: number): number {
20715         if(!isWasmInitialized) {
20716                 throw new Error("initializeWasm() must be awaited first!");
20717         }
20718         const nativeResponseValue = wasm.TS_Ping_read(ser);
20719         return nativeResponseValue;
20720 }
20721         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
20722 /* @internal */
20723 export function Pong_write(obj: number): number {
20724         if(!isWasmInitialized) {
20725                 throw new Error("initializeWasm() must be awaited first!");
20726         }
20727         const nativeResponseValue = wasm.TS_Pong_write(obj);
20728         return nativeResponseValue;
20729 }
20730         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
20731 /* @internal */
20732 export function Pong_read(ser: number): number {
20733         if(!isWasmInitialized) {
20734                 throw new Error("initializeWasm() must be awaited first!");
20735         }
20736         const nativeResponseValue = wasm.TS_Pong_read(ser);
20737         return nativeResponseValue;
20738 }
20739         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
20740 /* @internal */
20741 export function UnsignedChannelAnnouncement_write(obj: number): number {
20742         if(!isWasmInitialized) {
20743                 throw new Error("initializeWasm() must be awaited first!");
20744         }
20745         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_write(obj);
20746         return nativeResponseValue;
20747 }
20748         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
20749 /* @internal */
20750 export function UnsignedChannelAnnouncement_read(ser: number): number {
20751         if(!isWasmInitialized) {
20752                 throw new Error("initializeWasm() must be awaited first!");
20753         }
20754         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_read(ser);
20755         return nativeResponseValue;
20756 }
20757         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
20758 /* @internal */
20759 export function ChannelAnnouncement_write(obj: number): number {
20760         if(!isWasmInitialized) {
20761                 throw new Error("initializeWasm() must be awaited first!");
20762         }
20763         const nativeResponseValue = wasm.TS_ChannelAnnouncement_write(obj);
20764         return nativeResponseValue;
20765 }
20766         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
20767 /* @internal */
20768 export function ChannelAnnouncement_read(ser: number): number {
20769         if(!isWasmInitialized) {
20770                 throw new Error("initializeWasm() must be awaited first!");
20771         }
20772         const nativeResponseValue = wasm.TS_ChannelAnnouncement_read(ser);
20773         return nativeResponseValue;
20774 }
20775         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
20776 /* @internal */
20777 export function UnsignedChannelUpdate_write(obj: number): number {
20778         if(!isWasmInitialized) {
20779                 throw new Error("initializeWasm() must be awaited first!");
20780         }
20781         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_write(obj);
20782         return nativeResponseValue;
20783 }
20784         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
20785 /* @internal */
20786 export function UnsignedChannelUpdate_read(ser: number): number {
20787         if(!isWasmInitialized) {
20788                 throw new Error("initializeWasm() must be awaited first!");
20789         }
20790         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_read(ser);
20791         return nativeResponseValue;
20792 }
20793         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
20794 /* @internal */
20795 export function ChannelUpdate_write(obj: number): number {
20796         if(!isWasmInitialized) {
20797                 throw new Error("initializeWasm() must be awaited first!");
20798         }
20799         const nativeResponseValue = wasm.TS_ChannelUpdate_write(obj);
20800         return nativeResponseValue;
20801 }
20802         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
20803 /* @internal */
20804 export function ChannelUpdate_read(ser: number): number {
20805         if(!isWasmInitialized) {
20806                 throw new Error("initializeWasm() must be awaited first!");
20807         }
20808         const nativeResponseValue = wasm.TS_ChannelUpdate_read(ser);
20809         return nativeResponseValue;
20810 }
20811         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
20812 /* @internal */
20813 export function ErrorMessage_write(obj: number): number {
20814         if(!isWasmInitialized) {
20815                 throw new Error("initializeWasm() must be awaited first!");
20816         }
20817         const nativeResponseValue = wasm.TS_ErrorMessage_write(obj);
20818         return nativeResponseValue;
20819 }
20820         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
20821 /* @internal */
20822 export function ErrorMessage_read(ser: number): number {
20823         if(!isWasmInitialized) {
20824                 throw new Error("initializeWasm() must be awaited first!");
20825         }
20826         const nativeResponseValue = wasm.TS_ErrorMessage_read(ser);
20827         return nativeResponseValue;
20828 }
20829         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
20830 /* @internal */
20831 export function UnsignedNodeAnnouncement_write(obj: number): number {
20832         if(!isWasmInitialized) {
20833                 throw new Error("initializeWasm() must be awaited first!");
20834         }
20835         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_write(obj);
20836         return nativeResponseValue;
20837 }
20838         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
20839 /* @internal */
20840 export function UnsignedNodeAnnouncement_read(ser: number): number {
20841         if(!isWasmInitialized) {
20842                 throw new Error("initializeWasm() must be awaited first!");
20843         }
20844         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_read(ser);
20845         return nativeResponseValue;
20846 }
20847         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
20848 /* @internal */
20849 export function NodeAnnouncement_write(obj: number): number {
20850         if(!isWasmInitialized) {
20851                 throw new Error("initializeWasm() must be awaited first!");
20852         }
20853         const nativeResponseValue = wasm.TS_NodeAnnouncement_write(obj);
20854         return nativeResponseValue;
20855 }
20856         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
20857 /* @internal */
20858 export function NodeAnnouncement_read(ser: number): number {
20859         if(!isWasmInitialized) {
20860                 throw new Error("initializeWasm() must be awaited first!");
20861         }
20862         const nativeResponseValue = wasm.TS_NodeAnnouncement_read(ser);
20863         return nativeResponseValue;
20864 }
20865         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
20866 /* @internal */
20867 export function QueryShortChannelIds_read(ser: number): number {
20868         if(!isWasmInitialized) {
20869                 throw new Error("initializeWasm() must be awaited first!");
20870         }
20871         const nativeResponseValue = wasm.TS_QueryShortChannelIds_read(ser);
20872         return nativeResponseValue;
20873 }
20874         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
20875 /* @internal */
20876 export function QueryShortChannelIds_write(obj: number): number {
20877         if(!isWasmInitialized) {
20878                 throw new Error("initializeWasm() must be awaited first!");
20879         }
20880         const nativeResponseValue = wasm.TS_QueryShortChannelIds_write(obj);
20881         return nativeResponseValue;
20882 }
20883         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
20884 /* @internal */
20885 export function ReplyShortChannelIdsEnd_write(obj: number): number {
20886         if(!isWasmInitialized) {
20887                 throw new Error("initializeWasm() must be awaited first!");
20888         }
20889         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_write(obj);
20890         return nativeResponseValue;
20891 }
20892         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
20893 /* @internal */
20894 export function ReplyShortChannelIdsEnd_read(ser: number): number {
20895         if(!isWasmInitialized) {
20896                 throw new Error("initializeWasm() must be awaited first!");
20897         }
20898         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_read(ser);
20899         return nativeResponseValue;
20900 }
20901         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
20902 /* @internal */
20903 export function QueryChannelRange_end_blocknum(this_arg: number): number {
20904         if(!isWasmInitialized) {
20905                 throw new Error("initializeWasm() must be awaited first!");
20906         }
20907         const nativeResponseValue = wasm.TS_QueryChannelRange_end_blocknum(this_arg);
20908         return nativeResponseValue;
20909 }
20910         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
20911 /* @internal */
20912 export function QueryChannelRange_write(obj: number): number {
20913         if(!isWasmInitialized) {
20914                 throw new Error("initializeWasm() must be awaited first!");
20915         }
20916         const nativeResponseValue = wasm.TS_QueryChannelRange_write(obj);
20917         return nativeResponseValue;
20918 }
20919         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
20920 /* @internal */
20921 export function QueryChannelRange_read(ser: number): number {
20922         if(!isWasmInitialized) {
20923                 throw new Error("initializeWasm() must be awaited first!");
20924         }
20925         const nativeResponseValue = wasm.TS_QueryChannelRange_read(ser);
20926         return nativeResponseValue;
20927 }
20928         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
20929 /* @internal */
20930 export function ReplyChannelRange_read(ser: number): number {
20931         if(!isWasmInitialized) {
20932                 throw new Error("initializeWasm() must be awaited first!");
20933         }
20934         const nativeResponseValue = wasm.TS_ReplyChannelRange_read(ser);
20935         return nativeResponseValue;
20936 }
20937         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
20938 /* @internal */
20939 export function ReplyChannelRange_write(obj: number): number {
20940         if(!isWasmInitialized) {
20941                 throw new Error("initializeWasm() must be awaited first!");
20942         }
20943         const nativeResponseValue = wasm.TS_ReplyChannelRange_write(obj);
20944         return nativeResponseValue;
20945 }
20946         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
20947 /* @internal */
20948 export function GossipTimestampFilter_write(obj: number): number {
20949         if(!isWasmInitialized) {
20950                 throw new Error("initializeWasm() must be awaited first!");
20951         }
20952         const nativeResponseValue = wasm.TS_GossipTimestampFilter_write(obj);
20953         return nativeResponseValue;
20954 }
20955         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
20956 /* @internal */
20957 export function GossipTimestampFilter_read(ser: number): number {
20958         if(!isWasmInitialized) {
20959                 throw new Error("initializeWasm() must be awaited first!");
20960         }
20961         const nativeResponseValue = wasm.TS_GossipTimestampFilter_read(ser);
20962         return nativeResponseValue;
20963 }
20964         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
20965 /* @internal */
20966 export function CustomMessageHandler_free(this_ptr: number): void {
20967         if(!isWasmInitialized) {
20968                 throw new Error("initializeWasm() must be awaited first!");
20969         }
20970         const nativeResponseValue = wasm.TS_CustomMessageHandler_free(this_ptr);
20971         // debug statements here
20972 }
20973         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
20974 /* @internal */
20975 export function IgnoringMessageHandler_free(this_obj: number): void {
20976         if(!isWasmInitialized) {
20977                 throw new Error("initializeWasm() must be awaited first!");
20978         }
20979         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_free(this_obj);
20980         // debug statements here
20981 }
20982         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
20983 /* @internal */
20984 export function IgnoringMessageHandler_new(): number {
20985         if(!isWasmInitialized) {
20986                 throw new Error("initializeWasm() must be awaited first!");
20987         }
20988         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_new();
20989         return nativeResponseValue;
20990 }
20991         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
20992 /* @internal */
20993 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
20994         if(!isWasmInitialized) {
20995                 throw new Error("initializeWasm() must be awaited first!");
20996         }
20997         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
20998         return nativeResponseValue;
20999 }
21000         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
21001 /* @internal */
21002 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
21003         if(!isWasmInitialized) {
21004                 throw new Error("initializeWasm() must be awaited first!");
21005         }
21006         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
21007         return nativeResponseValue;
21008 }
21009         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
21010 /* @internal */
21011 export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
21012         if(!isWasmInitialized) {
21013                 throw new Error("initializeWasm() must be awaited first!");
21014         }
21015         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageReader(this_arg);
21016         return nativeResponseValue;
21017 }
21018         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
21019 /* @internal */
21020 export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
21021         if(!isWasmInitialized) {
21022                 throw new Error("initializeWasm() must be awaited first!");
21023         }
21024         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
21025         return nativeResponseValue;
21026 }
21027         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
21028 /* @internal */
21029 export function ErroringMessageHandler_free(this_obj: number): void {
21030         if(!isWasmInitialized) {
21031                 throw new Error("initializeWasm() must be awaited first!");
21032         }
21033         const nativeResponseValue = wasm.TS_ErroringMessageHandler_free(this_obj);
21034         // debug statements here
21035 }
21036         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
21037 /* @internal */
21038 export function ErroringMessageHandler_new(): number {
21039         if(!isWasmInitialized) {
21040                 throw new Error("initializeWasm() must be awaited first!");
21041         }
21042         const nativeResponseValue = wasm.TS_ErroringMessageHandler_new();
21043         return nativeResponseValue;
21044 }
21045         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
21046 /* @internal */
21047 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
21048         if(!isWasmInitialized) {
21049                 throw new Error("initializeWasm() must be awaited first!");
21050         }
21051         const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
21052         return nativeResponseValue;
21053 }
21054         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
21055 /* @internal */
21056 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
21057         if(!isWasmInitialized) {
21058                 throw new Error("initializeWasm() must be awaited first!");
21059         }
21060         const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
21061         return nativeResponseValue;
21062 }
21063         // void MessageHandler_free(struct LDKMessageHandler this_obj);
21064 /* @internal */
21065 export function MessageHandler_free(this_obj: number): void {
21066         if(!isWasmInitialized) {
21067                 throw new Error("initializeWasm() must be awaited first!");
21068         }
21069         const nativeResponseValue = wasm.TS_MessageHandler_free(this_obj);
21070         // debug statements here
21071 }
21072         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
21073 /* @internal */
21074 export function MessageHandler_get_chan_handler(this_ptr: number): number {
21075         if(!isWasmInitialized) {
21076                 throw new Error("initializeWasm() must be awaited first!");
21077         }
21078         const nativeResponseValue = wasm.TS_MessageHandler_get_chan_handler(this_ptr);
21079         return nativeResponseValue;
21080 }
21081         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
21082 /* @internal */
21083 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
21084         if(!isWasmInitialized) {
21085                 throw new Error("initializeWasm() must be awaited first!");
21086         }
21087         const nativeResponseValue = wasm.TS_MessageHandler_set_chan_handler(this_ptr, val);
21088         // debug statements here
21089 }
21090         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
21091 /* @internal */
21092 export function MessageHandler_get_route_handler(this_ptr: number): number {
21093         if(!isWasmInitialized) {
21094                 throw new Error("initializeWasm() must be awaited first!");
21095         }
21096         const nativeResponseValue = wasm.TS_MessageHandler_get_route_handler(this_ptr);
21097         return nativeResponseValue;
21098 }
21099         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
21100 /* @internal */
21101 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
21102         if(!isWasmInitialized) {
21103                 throw new Error("initializeWasm() must be awaited first!");
21104         }
21105         const nativeResponseValue = wasm.TS_MessageHandler_set_route_handler(this_ptr, val);
21106         // debug statements here
21107 }
21108         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
21109 /* @internal */
21110 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
21111         if(!isWasmInitialized) {
21112                 throw new Error("initializeWasm() must be awaited first!");
21113         }
21114         const nativeResponseValue = wasm.TS_MessageHandler_new(chan_handler_arg, route_handler_arg);
21115         return nativeResponseValue;
21116 }
21117         // uintptr_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
21118 /* @internal */
21119 export function SocketDescriptor_clone_ptr(arg: number): number {
21120         if(!isWasmInitialized) {
21121                 throw new Error("initializeWasm() must be awaited first!");
21122         }
21123         const nativeResponseValue = wasm.TS_SocketDescriptor_clone_ptr(arg);
21124         return nativeResponseValue;
21125 }
21126         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
21127 /* @internal */
21128 export function SocketDescriptor_clone(orig: number): number {
21129         if(!isWasmInitialized) {
21130                 throw new Error("initializeWasm() must be awaited first!");
21131         }
21132         const nativeResponseValue = wasm.TS_SocketDescriptor_clone(orig);
21133         return nativeResponseValue;
21134 }
21135         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
21136 /* @internal */
21137 export function SocketDescriptor_free(this_ptr: number): void {
21138         if(!isWasmInitialized) {
21139                 throw new Error("initializeWasm() must be awaited first!");
21140         }
21141         const nativeResponseValue = wasm.TS_SocketDescriptor_free(this_ptr);
21142         // debug statements here
21143 }
21144         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
21145 /* @internal */
21146 export function PeerHandleError_free(this_obj: number): void {
21147         if(!isWasmInitialized) {
21148                 throw new Error("initializeWasm() must be awaited first!");
21149         }
21150         const nativeResponseValue = wasm.TS_PeerHandleError_free(this_obj);
21151         // debug statements here
21152 }
21153         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
21154 /* @internal */
21155 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
21156         if(!isWasmInitialized) {
21157                 throw new Error("initializeWasm() must be awaited first!");
21158         }
21159         const nativeResponseValue = wasm.TS_PeerHandleError_get_no_connection_possible(this_ptr);
21160         return nativeResponseValue;
21161 }
21162         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
21163 /* @internal */
21164 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
21165         if(!isWasmInitialized) {
21166                 throw new Error("initializeWasm() must be awaited first!");
21167         }
21168         const nativeResponseValue = wasm.TS_PeerHandleError_set_no_connection_possible(this_ptr, val);
21169         // debug statements here
21170 }
21171         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
21172 /* @internal */
21173 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
21174         if(!isWasmInitialized) {
21175                 throw new Error("initializeWasm() must be awaited first!");
21176         }
21177         const nativeResponseValue = wasm.TS_PeerHandleError_new(no_connection_possible_arg);
21178         return nativeResponseValue;
21179 }
21180         // uintptr_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
21181 /* @internal */
21182 export function PeerHandleError_clone_ptr(arg: number): number {
21183         if(!isWasmInitialized) {
21184                 throw new Error("initializeWasm() must be awaited first!");
21185         }
21186         const nativeResponseValue = wasm.TS_PeerHandleError_clone_ptr(arg);
21187         return nativeResponseValue;
21188 }
21189         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
21190 /* @internal */
21191 export function PeerHandleError_clone(orig: number): number {
21192         if(!isWasmInitialized) {
21193                 throw new Error("initializeWasm() must be awaited first!");
21194         }
21195         const nativeResponseValue = wasm.TS_PeerHandleError_clone(orig);
21196         return nativeResponseValue;
21197 }
21198         // void PeerManager_free(struct LDKPeerManager this_obj);
21199 /* @internal */
21200 export function PeerManager_free(this_obj: number): void {
21201         if(!isWasmInitialized) {
21202                 throw new Error("initializeWasm() must be awaited first!");
21203         }
21204         const nativeResponseValue = wasm.TS_PeerManager_free(this_obj);
21205         // debug statements here
21206 }
21207         // 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);
21208 /* @internal */
21209 export function PeerManager_new(message_handler: number, our_node_secret: number, ephemeral_random_data: number, logger: number, custom_message_handler: number): number {
21210         if(!isWasmInitialized) {
21211                 throw new Error("initializeWasm() must be awaited first!");
21212         }
21213         const nativeResponseValue = wasm.TS_PeerManager_new(message_handler, our_node_secret, ephemeral_random_data, logger, custom_message_handler);
21214         return nativeResponseValue;
21215 }
21216         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
21217 /* @internal */
21218 export function PeerManager_get_peer_node_ids(this_arg: number): number {
21219         if(!isWasmInitialized) {
21220                 throw new Error("initializeWasm() must be awaited first!");
21221         }
21222         const nativeResponseValue = wasm.TS_PeerManager_get_peer_node_ids(this_arg);
21223         return nativeResponseValue;
21224 }
21225         // 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);
21226 /* @internal */
21227 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: number, descriptor: number): number {
21228         if(!isWasmInitialized) {
21229                 throw new Error("initializeWasm() must be awaited first!");
21230         }
21231         const nativeResponseValue = wasm.TS_PeerManager_new_outbound_connection(this_arg, their_node_id, descriptor);
21232         return nativeResponseValue;
21233 }
21234         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
21235 /* @internal */
21236 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
21237         if(!isWasmInitialized) {
21238                 throw new Error("initializeWasm() must be awaited first!");
21239         }
21240         const nativeResponseValue = wasm.TS_PeerManager_new_inbound_connection(this_arg, descriptor);
21241         return nativeResponseValue;
21242 }
21243         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
21244 /* @internal */
21245 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
21246         if(!isWasmInitialized) {
21247                 throw new Error("initializeWasm() must be awaited first!");
21248         }
21249         const nativeResponseValue = wasm.TS_PeerManager_write_buffer_space_avail(this_arg, descriptor);
21250         return nativeResponseValue;
21251 }
21252         // 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);
21253 /* @internal */
21254 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: number): number {
21255         if(!isWasmInitialized) {
21256                 throw new Error("initializeWasm() must be awaited first!");
21257         }
21258         const nativeResponseValue = wasm.TS_PeerManager_read_event(this_arg, peer_descriptor, data);
21259         return nativeResponseValue;
21260 }
21261         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
21262 /* @internal */
21263 export function PeerManager_process_events(this_arg: number): void {
21264         if(!isWasmInitialized) {
21265                 throw new Error("initializeWasm() must be awaited first!");
21266         }
21267         const nativeResponseValue = wasm.TS_PeerManager_process_events(this_arg);
21268         // debug statements here
21269 }
21270         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
21271 /* @internal */
21272 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
21273         if(!isWasmInitialized) {
21274                 throw new Error("initializeWasm() must be awaited first!");
21275         }
21276         const nativeResponseValue = wasm.TS_PeerManager_socket_disconnected(this_arg, descriptor);
21277         // debug statements here
21278 }
21279         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
21280 /* @internal */
21281 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: number, no_connection_possible: boolean): void {
21282         if(!isWasmInitialized) {
21283                 throw new Error("initializeWasm() must be awaited first!");
21284         }
21285         const nativeResponseValue = wasm.TS_PeerManager_disconnect_by_node_id(this_arg, node_id, no_connection_possible);
21286         // debug statements here
21287 }
21288         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
21289 /* @internal */
21290 export function PeerManager_disconnect_all_peers(this_arg: number): void {
21291         if(!isWasmInitialized) {
21292                 throw new Error("initializeWasm() must be awaited first!");
21293         }
21294         const nativeResponseValue = wasm.TS_PeerManager_disconnect_all_peers(this_arg);
21295         // debug statements here
21296 }
21297         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
21298 /* @internal */
21299 export function PeerManager_timer_tick_occurred(this_arg: number): void {
21300         if(!isWasmInitialized) {
21301                 throw new Error("initializeWasm() must be awaited first!");
21302         }
21303         const nativeResponseValue = wasm.TS_PeerManager_timer_tick_occurred(this_arg);
21304         // debug statements here
21305 }
21306         // uint64_t htlc_success_tx_weight(bool opt_anchors);
21307 /* @internal */
21308 export function htlc_success_tx_weight(opt_anchors: boolean): bigint {
21309         if(!isWasmInitialized) {
21310                 throw new Error("initializeWasm() must be awaited first!");
21311         }
21312         const nativeResponseValue = wasm.TS_htlc_success_tx_weight(opt_anchors);
21313         return nativeResponseValue;
21314 }
21315         // uint64_t htlc_timeout_tx_weight(bool opt_anchors);
21316 /* @internal */
21317 export function htlc_timeout_tx_weight(opt_anchors: boolean): bigint {
21318         if(!isWasmInitialized) {
21319                 throw new Error("initializeWasm() must be awaited first!");
21320         }
21321         const nativeResponseValue = wasm.TS_htlc_timeout_tx_weight(opt_anchors);
21322         return nativeResponseValue;
21323 }
21324         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
21325 /* @internal */
21326 export function build_commitment_secret(commitment_seed: number, idx: bigint): number {
21327         if(!isWasmInitialized) {
21328                 throw new Error("initializeWasm() must be awaited first!");
21329         }
21330         const nativeResponseValue = wasm.TS_build_commitment_secret(commitment_seed, idx);
21331         return nativeResponseValue;
21332 }
21333         // 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);
21334 /* @internal */
21335 export function build_closing_transaction(to_holder_value_sat: bigint, to_counterparty_value_sat: bigint, to_holder_script: number, to_counterparty_script: number, funding_outpoint: number): number {
21336         if(!isWasmInitialized) {
21337                 throw new Error("initializeWasm() must be awaited first!");
21338         }
21339         const nativeResponseValue = wasm.TS_build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint);
21340         return nativeResponseValue;
21341 }
21342         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
21343 /* @internal */
21344 export function derive_private_key(per_commitment_point: number, base_secret: number): number {
21345         if(!isWasmInitialized) {
21346                 throw new Error("initializeWasm() must be awaited first!");
21347         }
21348         const nativeResponseValue = wasm.TS_derive_private_key(per_commitment_point, base_secret);
21349         return nativeResponseValue;
21350 }
21351         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
21352 /* @internal */
21353 export function derive_public_key(per_commitment_point: number, base_point: number): number {
21354         if(!isWasmInitialized) {
21355                 throw new Error("initializeWasm() must be awaited first!");
21356         }
21357         const nativeResponseValue = wasm.TS_derive_public_key(per_commitment_point, base_point);
21358         return nativeResponseValue;
21359 }
21360         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
21361 /* @internal */
21362 export function derive_private_revocation_key(per_commitment_secret: number, countersignatory_revocation_base_secret: number): number {
21363         if(!isWasmInitialized) {
21364                 throw new Error("initializeWasm() must be awaited first!");
21365         }
21366         const nativeResponseValue = wasm.TS_derive_private_revocation_key(per_commitment_secret, countersignatory_revocation_base_secret);
21367         return nativeResponseValue;
21368 }
21369         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
21370 /* @internal */
21371 export function derive_public_revocation_key(per_commitment_point: number, countersignatory_revocation_base_point: number): number {
21372         if(!isWasmInitialized) {
21373                 throw new Error("initializeWasm() must be awaited first!");
21374         }
21375         const nativeResponseValue = wasm.TS_derive_public_revocation_key(per_commitment_point, countersignatory_revocation_base_point);
21376         return nativeResponseValue;
21377 }
21378         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
21379 /* @internal */
21380 export function TxCreationKeys_free(this_obj: number): void {
21381         if(!isWasmInitialized) {
21382                 throw new Error("initializeWasm() must be awaited first!");
21383         }
21384         const nativeResponseValue = wasm.TS_TxCreationKeys_free(this_obj);
21385         // debug statements here
21386 }
21387         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
21388 /* @internal */
21389 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): number {
21390         if(!isWasmInitialized) {
21391                 throw new Error("initializeWasm() must be awaited first!");
21392         }
21393         const nativeResponseValue = wasm.TS_TxCreationKeys_get_per_commitment_point(this_ptr);
21394         return nativeResponseValue;
21395 }
21396         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21397 /* @internal */
21398 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: number): void {
21399         if(!isWasmInitialized) {
21400                 throw new Error("initializeWasm() must be awaited first!");
21401         }
21402         const nativeResponseValue = wasm.TS_TxCreationKeys_set_per_commitment_point(this_ptr, val);
21403         // debug statements here
21404 }
21405         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
21406 /* @internal */
21407 export function TxCreationKeys_get_revocation_key(this_ptr: number): number {
21408         if(!isWasmInitialized) {
21409                 throw new Error("initializeWasm() must be awaited first!");
21410         }
21411         const nativeResponseValue = wasm.TS_TxCreationKeys_get_revocation_key(this_ptr);
21412         return nativeResponseValue;
21413 }
21414         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21415 /* @internal */
21416 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: number): void {
21417         if(!isWasmInitialized) {
21418                 throw new Error("initializeWasm() must be awaited first!");
21419         }
21420         const nativeResponseValue = wasm.TS_TxCreationKeys_set_revocation_key(this_ptr, val);
21421         // debug statements here
21422 }
21423         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
21424 /* @internal */
21425 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): number {
21426         if(!isWasmInitialized) {
21427                 throw new Error("initializeWasm() must be awaited first!");
21428         }
21429         const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
21430         return nativeResponseValue;
21431 }
21432         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21433 /* @internal */
21434 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: number): void {
21435         if(!isWasmInitialized) {
21436                 throw new Error("initializeWasm() must be awaited first!");
21437         }
21438         const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_htlc_key(this_ptr, val);
21439         // debug statements here
21440 }
21441         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
21442 /* @internal */
21443 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): number {
21444         if(!isWasmInitialized) {
21445                 throw new Error("initializeWasm() must be awaited first!");
21446         }
21447         const nativeResponseValue = wasm.TS_TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
21448         return nativeResponseValue;
21449 }
21450         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21451 /* @internal */
21452 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: number): void {
21453         if(!isWasmInitialized) {
21454                 throw new Error("initializeWasm() must be awaited first!");
21455         }
21456         const nativeResponseValue = wasm.TS_TxCreationKeys_set_countersignatory_htlc_key(this_ptr, val);
21457         // debug statements here
21458 }
21459         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
21460 /* @internal */
21461 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): number {
21462         if(!isWasmInitialized) {
21463                 throw new Error("initializeWasm() must be awaited first!");
21464         }
21465         const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
21466         return nativeResponseValue;
21467 }
21468         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21469 /* @internal */
21470 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: number): void {
21471         if(!isWasmInitialized) {
21472                 throw new Error("initializeWasm() must be awaited first!");
21473         }
21474         const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, val);
21475         // debug statements here
21476 }
21477         // 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);
21478 /* @internal */
21479 export function TxCreationKeys_new(per_commitment_point_arg: number, revocation_key_arg: number, broadcaster_htlc_key_arg: number, countersignatory_htlc_key_arg: number, broadcaster_delayed_payment_key_arg: number): number {
21480         if(!isWasmInitialized) {
21481                 throw new Error("initializeWasm() must be awaited first!");
21482         }
21483         const nativeResponseValue = wasm.TS_TxCreationKeys_new(per_commitment_point_arg, revocation_key_arg, broadcaster_htlc_key_arg, countersignatory_htlc_key_arg, broadcaster_delayed_payment_key_arg);
21484         return nativeResponseValue;
21485 }
21486         // uintptr_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
21487 /* @internal */
21488 export function TxCreationKeys_clone_ptr(arg: number): number {
21489         if(!isWasmInitialized) {
21490                 throw new Error("initializeWasm() must be awaited first!");
21491         }
21492         const nativeResponseValue = wasm.TS_TxCreationKeys_clone_ptr(arg);
21493         return nativeResponseValue;
21494 }
21495         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
21496 /* @internal */
21497 export function TxCreationKeys_clone(orig: number): number {
21498         if(!isWasmInitialized) {
21499                 throw new Error("initializeWasm() must be awaited first!");
21500         }
21501         const nativeResponseValue = wasm.TS_TxCreationKeys_clone(orig);
21502         return nativeResponseValue;
21503 }
21504         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
21505 /* @internal */
21506 export function TxCreationKeys_write(obj: number): number {
21507         if(!isWasmInitialized) {
21508                 throw new Error("initializeWasm() must be awaited first!");
21509         }
21510         const nativeResponseValue = wasm.TS_TxCreationKeys_write(obj);
21511         return nativeResponseValue;
21512 }
21513         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
21514 /* @internal */
21515 export function TxCreationKeys_read(ser: number): number {
21516         if(!isWasmInitialized) {
21517                 throw new Error("initializeWasm() must be awaited first!");
21518         }
21519         const nativeResponseValue = wasm.TS_TxCreationKeys_read(ser);
21520         return nativeResponseValue;
21521 }
21522         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
21523 /* @internal */
21524 export function ChannelPublicKeys_free(this_obj: number): void {
21525         if(!isWasmInitialized) {
21526                 throw new Error("initializeWasm() must be awaited first!");
21527         }
21528         const nativeResponseValue = wasm.TS_ChannelPublicKeys_free(this_obj);
21529         // debug statements here
21530 }
21531         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
21532 /* @internal */
21533 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): number {
21534         if(!isWasmInitialized) {
21535                 throw new Error("initializeWasm() must be awaited first!");
21536         }
21537         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_funding_pubkey(this_ptr);
21538         return nativeResponseValue;
21539 }
21540         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21541 /* @internal */
21542 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: number): void {
21543         if(!isWasmInitialized) {
21544                 throw new Error("initializeWasm() must be awaited first!");
21545         }
21546         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_funding_pubkey(this_ptr, val);
21547         // debug statements here
21548 }
21549         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
21550 /* @internal */
21551 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): number {
21552         if(!isWasmInitialized) {
21553                 throw new Error("initializeWasm() must be awaited first!");
21554         }
21555         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_revocation_basepoint(this_ptr);
21556         return nativeResponseValue;
21557 }
21558         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21559 /* @internal */
21560 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: number): void {
21561         if(!isWasmInitialized) {
21562                 throw new Error("initializeWasm() must be awaited first!");
21563         }
21564         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_revocation_basepoint(this_ptr, val);
21565         // debug statements here
21566 }
21567         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
21568 /* @internal */
21569 export function ChannelPublicKeys_get_payment_point(this_ptr: number): number {
21570         if(!isWasmInitialized) {
21571                 throw new Error("initializeWasm() must be awaited first!");
21572         }
21573         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_payment_point(this_ptr);
21574         return nativeResponseValue;
21575 }
21576         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21577 /* @internal */
21578 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: number): void {
21579         if(!isWasmInitialized) {
21580                 throw new Error("initializeWasm() must be awaited first!");
21581         }
21582         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_payment_point(this_ptr, val);
21583         // debug statements here
21584 }
21585         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
21586 /* @internal */
21587 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): number {
21588         if(!isWasmInitialized) {
21589                 throw new Error("initializeWasm() must be awaited first!");
21590         }
21591         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
21592         return nativeResponseValue;
21593 }
21594         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21595 /* @internal */
21596 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: number): void {
21597         if(!isWasmInitialized) {
21598                 throw new Error("initializeWasm() must be awaited first!");
21599         }
21600         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, val);
21601         // debug statements here
21602 }
21603         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
21604 /* @internal */
21605 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): number {
21606         if(!isWasmInitialized) {
21607                 throw new Error("initializeWasm() must be awaited first!");
21608         }
21609         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_htlc_basepoint(this_ptr);
21610         return nativeResponseValue;
21611 }
21612         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21613 /* @internal */
21614 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: number): void {
21615         if(!isWasmInitialized) {
21616                 throw new Error("initializeWasm() must be awaited first!");
21617         }
21618         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_htlc_basepoint(this_ptr, val);
21619         // debug statements here
21620 }
21621         // 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);
21622 /* @internal */
21623 export function ChannelPublicKeys_new(funding_pubkey_arg: number, revocation_basepoint_arg: number, payment_point_arg: number, delayed_payment_basepoint_arg: number, htlc_basepoint_arg: number): number {
21624         if(!isWasmInitialized) {
21625                 throw new Error("initializeWasm() must be awaited first!");
21626         }
21627         const nativeResponseValue = wasm.TS_ChannelPublicKeys_new(funding_pubkey_arg, revocation_basepoint_arg, payment_point_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg);
21628         return nativeResponseValue;
21629 }
21630         // uintptr_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
21631 /* @internal */
21632 export function ChannelPublicKeys_clone_ptr(arg: number): number {
21633         if(!isWasmInitialized) {
21634                 throw new Error("initializeWasm() must be awaited first!");
21635         }
21636         const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone_ptr(arg);
21637         return nativeResponseValue;
21638 }
21639         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
21640 /* @internal */
21641 export function ChannelPublicKeys_clone(orig: number): number {
21642         if(!isWasmInitialized) {
21643                 throw new Error("initializeWasm() must be awaited first!");
21644         }
21645         const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone(orig);
21646         return nativeResponseValue;
21647 }
21648         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
21649 /* @internal */
21650 export function ChannelPublicKeys_write(obj: number): number {
21651         if(!isWasmInitialized) {
21652                 throw new Error("initializeWasm() must be awaited first!");
21653         }
21654         const nativeResponseValue = wasm.TS_ChannelPublicKeys_write(obj);
21655         return nativeResponseValue;
21656 }
21657         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
21658 /* @internal */
21659 export function ChannelPublicKeys_read(ser: number): number {
21660         if(!isWasmInitialized) {
21661                 throw new Error("initializeWasm() must be awaited first!");
21662         }
21663         const nativeResponseValue = wasm.TS_ChannelPublicKeys_read(ser);
21664         return nativeResponseValue;
21665 }
21666         // 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);
21667 /* @internal */
21668 export function TxCreationKeys_derive_new(per_commitment_point: number, broadcaster_delayed_payment_base: number, broadcaster_htlc_base: number, countersignatory_revocation_base: number, countersignatory_htlc_base: number): number {
21669         if(!isWasmInitialized) {
21670                 throw new Error("initializeWasm() must be awaited first!");
21671         }
21672         const nativeResponseValue = wasm.TS_TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
21673         return nativeResponseValue;
21674 }
21675         // 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);
21676 /* @internal */
21677 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: number, broadcaster_keys: number, countersignatory_keys: number): number {
21678         if(!isWasmInitialized) {
21679                 throw new Error("initializeWasm() must be awaited first!");
21680         }
21681         const nativeResponseValue = wasm.TS_TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys, countersignatory_keys);
21682         return nativeResponseValue;
21683 }
21684         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
21685 /* @internal */
21686 export function get_revokeable_redeemscript(revocation_key: number, contest_delay: number, broadcaster_delayed_payment_key: number): number {
21687         if(!isWasmInitialized) {
21688                 throw new Error("initializeWasm() must be awaited first!");
21689         }
21690         const nativeResponseValue = wasm.TS_get_revokeable_redeemscript(revocation_key, contest_delay, broadcaster_delayed_payment_key);
21691         return nativeResponseValue;
21692 }
21693         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
21694 /* @internal */
21695 export function HTLCOutputInCommitment_free(this_obj: number): void {
21696         if(!isWasmInitialized) {
21697                 throw new Error("initializeWasm() must be awaited first!");
21698         }
21699         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_free(this_obj);
21700         // debug statements here
21701 }
21702         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
21703 /* @internal */
21704 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
21705         if(!isWasmInitialized) {
21706                 throw new Error("initializeWasm() must be awaited first!");
21707         }
21708         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_offered(this_ptr);
21709         return nativeResponseValue;
21710 }
21711         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
21712 /* @internal */
21713 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
21714         if(!isWasmInitialized) {
21715                 throw new Error("initializeWasm() must be awaited first!");
21716         }
21717         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_offered(this_ptr, val);
21718         // debug statements here
21719 }
21720         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
21721 /* @internal */
21722 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): bigint {
21723         if(!isWasmInitialized) {
21724                 throw new Error("initializeWasm() must be awaited first!");
21725         }
21726         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_amount_msat(this_ptr);
21727         return nativeResponseValue;
21728 }
21729         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
21730 /* @internal */
21731 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: bigint): void {
21732         if(!isWasmInitialized) {
21733                 throw new Error("initializeWasm() must be awaited first!");
21734         }
21735         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
21736         // debug statements here
21737 }
21738         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
21739 /* @internal */
21740 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
21741         if(!isWasmInitialized) {
21742                 throw new Error("initializeWasm() must be awaited first!");
21743         }
21744         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
21745         return nativeResponseValue;
21746 }
21747         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
21748 /* @internal */
21749 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
21750         if(!isWasmInitialized) {
21751                 throw new Error("initializeWasm() must be awaited first!");
21752         }
21753         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
21754         // debug statements here
21755 }
21756         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
21757 /* @internal */
21758 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): number {
21759         if(!isWasmInitialized) {
21760                 throw new Error("initializeWasm() must be awaited first!");
21761         }
21762         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_payment_hash(this_ptr);
21763         return nativeResponseValue;
21764 }
21765         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
21766 /* @internal */
21767 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: number): void {
21768         if(!isWasmInitialized) {
21769                 throw new Error("initializeWasm() must be awaited first!");
21770         }
21771         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_payment_hash(this_ptr, val);
21772         // debug statements here
21773 }
21774         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
21775 /* @internal */
21776 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
21777         if(!isWasmInitialized) {
21778                 throw new Error("initializeWasm() must be awaited first!");
21779         }
21780         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
21781         return nativeResponseValue;
21782 }
21783         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
21784 /* @internal */
21785 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
21786         if(!isWasmInitialized) {
21787                 throw new Error("initializeWasm() must be awaited first!");
21788         }
21789         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
21790         // debug statements here
21791 }
21792         // 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);
21793 /* @internal */
21794 export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: bigint, cltv_expiry_arg: number, payment_hash_arg: number, transaction_output_index_arg: number): number {
21795         if(!isWasmInitialized) {
21796                 throw new Error("initializeWasm() must be awaited first!");
21797         }
21798         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg);
21799         return nativeResponseValue;
21800 }
21801         // uintptr_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
21802 /* @internal */
21803 export function HTLCOutputInCommitment_clone_ptr(arg: number): number {
21804         if(!isWasmInitialized) {
21805                 throw new Error("initializeWasm() must be awaited first!");
21806         }
21807         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone_ptr(arg);
21808         return nativeResponseValue;
21809 }
21810         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
21811 /* @internal */
21812 export function HTLCOutputInCommitment_clone(orig: number): number {
21813         if(!isWasmInitialized) {
21814                 throw new Error("initializeWasm() must be awaited first!");
21815         }
21816         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone(orig);
21817         return nativeResponseValue;
21818 }
21819         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
21820 /* @internal */
21821 export function HTLCOutputInCommitment_write(obj: number): number {
21822         if(!isWasmInitialized) {
21823                 throw new Error("initializeWasm() must be awaited first!");
21824         }
21825         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_write(obj);
21826         return nativeResponseValue;
21827 }
21828         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
21829 /* @internal */
21830 export function HTLCOutputInCommitment_read(ser: number): number {
21831         if(!isWasmInitialized) {
21832                 throw new Error("initializeWasm() must be awaited first!");
21833         }
21834         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_read(ser);
21835         return nativeResponseValue;
21836 }
21837         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, const struct LDKTxCreationKeys *NONNULL_PTR keys);
21838 /* @internal */
21839 export function get_htlc_redeemscript(htlc: number, opt_anchors: boolean, keys: number): number {
21840         if(!isWasmInitialized) {
21841                 throw new Error("initializeWasm() must be awaited first!");
21842         }
21843         const nativeResponseValue = wasm.TS_get_htlc_redeemscript(htlc, opt_anchors, keys);
21844         return nativeResponseValue;
21845 }
21846         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
21847 /* @internal */
21848 export function make_funding_redeemscript(broadcaster: number, countersignatory: number): number {
21849         if(!isWasmInitialized) {
21850                 throw new Error("initializeWasm() must be awaited first!");
21851         }
21852         const nativeResponseValue = wasm.TS_make_funding_redeemscript(broadcaster, countersignatory);
21853         return nativeResponseValue;
21854 }
21855         // 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);
21856 /* @internal */
21857 export function build_htlc_transaction(commitment_txid: number, feerate_per_kw: number, contest_delay: number, htlc: number, opt_anchors: boolean, broadcaster_delayed_payment_key: number, revocation_key: number): number {
21858         if(!isWasmInitialized) {
21859                 throw new Error("initializeWasm() must be awaited first!");
21860         }
21861         const nativeResponseValue = wasm.TS_build_htlc_transaction(commitment_txid, feerate_per_kw, contest_delay, htlc, opt_anchors, broadcaster_delayed_payment_key, revocation_key);
21862         return nativeResponseValue;
21863 }
21864         // struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
21865 /* @internal */
21866 export function get_anchor_redeemscript(funding_pubkey: number): number {
21867         if(!isWasmInitialized) {
21868                 throw new Error("initializeWasm() must be awaited first!");
21869         }
21870         const nativeResponseValue = wasm.TS_get_anchor_redeemscript(funding_pubkey);
21871         return nativeResponseValue;
21872 }
21873         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
21874 /* @internal */
21875 export function ChannelTransactionParameters_free(this_obj: number): void {
21876         if(!isWasmInitialized) {
21877                 throw new Error("initializeWasm() must be awaited first!");
21878         }
21879         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_free(this_obj);
21880         // debug statements here
21881 }
21882         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
21883 /* @internal */
21884 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
21885         if(!isWasmInitialized) {
21886                 throw new Error("initializeWasm() must be awaited first!");
21887         }
21888         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
21889         return nativeResponseValue;
21890 }
21891         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
21892 /* @internal */
21893 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
21894         if(!isWasmInitialized) {
21895                 throw new Error("initializeWasm() must be awaited first!");
21896         }
21897         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
21898         // debug statements here
21899 }
21900         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
21901 /* @internal */
21902 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
21903         if(!isWasmInitialized) {
21904                 throw new Error("initializeWasm() must be awaited first!");
21905         }
21906         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
21907         return nativeResponseValue;
21908 }
21909         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
21910 /* @internal */
21911 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
21912         if(!isWasmInitialized) {
21913                 throw new Error("initializeWasm() must be awaited first!");
21914         }
21915         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
21916         // debug statements here
21917 }
21918         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
21919 /* @internal */
21920 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
21921         if(!isWasmInitialized) {
21922                 throw new Error("initializeWasm() must be awaited first!");
21923         }
21924         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
21925         return nativeResponseValue;
21926 }
21927         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
21928 /* @internal */
21929 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
21930         if(!isWasmInitialized) {
21931                 throw new Error("initializeWasm() must be awaited first!");
21932         }
21933         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
21934         // debug statements here
21935 }
21936         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
21937 /* @internal */
21938 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
21939         if(!isWasmInitialized) {
21940                 throw new Error("initializeWasm() must be awaited first!");
21941         }
21942         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
21943         return nativeResponseValue;
21944 }
21945         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
21946 /* @internal */
21947 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
21948         if(!isWasmInitialized) {
21949                 throw new Error("initializeWasm() must be awaited first!");
21950         }
21951         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
21952         // debug statements here
21953 }
21954         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
21955 /* @internal */
21956 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
21957         if(!isWasmInitialized) {
21958                 throw new Error("initializeWasm() must be awaited first!");
21959         }
21960         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_funding_outpoint(this_ptr);
21961         return nativeResponseValue;
21962 }
21963         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
21964 /* @internal */
21965 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
21966         if(!isWasmInitialized) {
21967                 throw new Error("initializeWasm() must be awaited first!");
21968         }
21969         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
21970         // debug statements here
21971 }
21972         // enum LDKCOption_NoneZ ChannelTransactionParameters_get_opt_anchors(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
21973 /* @internal */
21974 export function ChannelTransactionParameters_get_opt_anchors(this_ptr: number): COption_NoneZ {
21975         if(!isWasmInitialized) {
21976                 throw new Error("initializeWasm() must be awaited first!");
21977         }
21978         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_opt_anchors(this_ptr);
21979         return nativeResponseValue;
21980 }
21981         // void ChannelTransactionParameters_set_opt_anchors(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
21982 /* @internal */
21983 export function ChannelTransactionParameters_set_opt_anchors(this_ptr: number, val: COption_NoneZ): void {
21984         if(!isWasmInitialized) {
21985                 throw new Error("initializeWasm() must be awaited first!");
21986         }
21987         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_opt_anchors(this_ptr, val);
21988         // debug statements here
21989 }
21990         // 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);
21991 /* @internal */
21992 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 {
21993         if(!isWasmInitialized) {
21994                 throw new Error("initializeWasm() must be awaited first!");
21995         }
21996         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);
21997         return nativeResponseValue;
21998 }
21999         // uintptr_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
22000 /* @internal */
22001 export function ChannelTransactionParameters_clone_ptr(arg: number): number {
22002         if(!isWasmInitialized) {
22003                 throw new Error("initializeWasm() must be awaited first!");
22004         }
22005         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone_ptr(arg);
22006         return nativeResponseValue;
22007 }
22008         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
22009 /* @internal */
22010 export function ChannelTransactionParameters_clone(orig: number): number {
22011         if(!isWasmInitialized) {
22012                 throw new Error("initializeWasm() must be awaited first!");
22013         }
22014         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone(orig);
22015         return nativeResponseValue;
22016 }
22017         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
22018 /* @internal */
22019 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
22020         if(!isWasmInitialized) {
22021                 throw new Error("initializeWasm() must be awaited first!");
22022         }
22023         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_free(this_obj);
22024         // debug statements here
22025 }
22026         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
22027 /* @internal */
22028 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
22029         if(!isWasmInitialized) {
22030                 throw new Error("initializeWasm() must be awaited first!");
22031         }
22032         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
22033         return nativeResponseValue;
22034 }
22035         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
22036 /* @internal */
22037 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
22038         if(!isWasmInitialized) {
22039                 throw new Error("initializeWasm() must be awaited first!");
22040         }
22041         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
22042         // debug statements here
22043 }
22044         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
22045 /* @internal */
22046 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
22047         if(!isWasmInitialized) {
22048                 throw new Error("initializeWasm() must be awaited first!");
22049         }
22050         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
22051         return nativeResponseValue;
22052 }
22053         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
22054 /* @internal */
22055 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
22056         if(!isWasmInitialized) {
22057                 throw new Error("initializeWasm() must be awaited first!");
22058         }
22059         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
22060         // debug statements here
22061 }
22062         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
22063 /* @internal */
22064 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
22065         if(!isWasmInitialized) {
22066                 throw new Error("initializeWasm() must be awaited first!");
22067         }
22068         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
22069         return nativeResponseValue;
22070 }
22071         // uintptr_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
22072 /* @internal */
22073 export function CounterpartyChannelTransactionParameters_clone_ptr(arg: number): number {
22074         if(!isWasmInitialized) {
22075                 throw new Error("initializeWasm() must be awaited first!");
22076         }
22077         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone_ptr(arg);
22078         return nativeResponseValue;
22079 }
22080         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
22081 /* @internal */
22082 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
22083         if(!isWasmInitialized) {
22084                 throw new Error("initializeWasm() must be awaited first!");
22085         }
22086         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone(orig);
22087         return nativeResponseValue;
22088 }
22089         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
22090 /* @internal */
22091 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
22092         if(!isWasmInitialized) {
22093                 throw new Error("initializeWasm() must be awaited first!");
22094         }
22095         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_is_populated(this_arg);
22096         return nativeResponseValue;
22097 }
22098         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
22099 /* @internal */
22100 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
22101         if(!isWasmInitialized) {
22102                 throw new Error("initializeWasm() must be awaited first!");
22103         }
22104         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_holder_broadcastable(this_arg);
22105         return nativeResponseValue;
22106 }
22107         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
22108 /* @internal */
22109 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
22110         if(!isWasmInitialized) {
22111                 throw new Error("initializeWasm() must be awaited first!");
22112         }
22113         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
22114         return nativeResponseValue;
22115 }
22116         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
22117 /* @internal */
22118 export function CounterpartyChannelTransactionParameters_write(obj: number): number {
22119         if(!isWasmInitialized) {
22120                 throw new Error("initializeWasm() must be awaited first!");
22121         }
22122         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_write(obj);
22123         return nativeResponseValue;
22124 }
22125         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
22126 /* @internal */
22127 export function CounterpartyChannelTransactionParameters_read(ser: number): number {
22128         if(!isWasmInitialized) {
22129                 throw new Error("initializeWasm() must be awaited first!");
22130         }
22131         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_read(ser);
22132         return nativeResponseValue;
22133 }
22134         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
22135 /* @internal */
22136 export function ChannelTransactionParameters_write(obj: number): number {
22137         if(!isWasmInitialized) {
22138                 throw new Error("initializeWasm() must be awaited first!");
22139         }
22140         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_write(obj);
22141         return nativeResponseValue;
22142 }
22143         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
22144 /* @internal */
22145 export function ChannelTransactionParameters_read(ser: number): number {
22146         if(!isWasmInitialized) {
22147                 throw new Error("initializeWasm() must be awaited first!");
22148         }
22149         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_read(ser);
22150         return nativeResponseValue;
22151 }
22152         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
22153 /* @internal */
22154 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
22155         if(!isWasmInitialized) {
22156                 throw new Error("initializeWasm() must be awaited first!");
22157         }
22158         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_free(this_obj);
22159         // debug statements here
22160 }
22161         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
22162 /* @internal */
22163 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
22164         if(!isWasmInitialized) {
22165                 throw new Error("initializeWasm() must be awaited first!");
22166         }
22167         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
22168         return nativeResponseValue;
22169 }
22170         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
22171 /* @internal */
22172 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
22173         if(!isWasmInitialized) {
22174                 throw new Error("initializeWasm() must be awaited first!");
22175         }
22176         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
22177         return nativeResponseValue;
22178 }
22179         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
22180 /* @internal */
22181 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
22182         if(!isWasmInitialized) {
22183                 throw new Error("initializeWasm() must be awaited first!");
22184         }
22185         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_contest_delay(this_arg);
22186         return nativeResponseValue;
22187 }
22188         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
22189 /* @internal */
22190 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
22191         if(!isWasmInitialized) {
22192                 throw new Error("initializeWasm() must be awaited first!");
22193         }
22194         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_is_outbound(this_arg);
22195         return nativeResponseValue;
22196 }
22197         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
22198 /* @internal */
22199 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
22200         if(!isWasmInitialized) {
22201                 throw new Error("initializeWasm() must be awaited first!");
22202         }
22203         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_funding_outpoint(this_arg);
22204         return nativeResponseValue;
22205 }
22206         // MUST_USE_RES bool DirectedChannelTransactionParameters_opt_anchors(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
22207 /* @internal */
22208 export function DirectedChannelTransactionParameters_opt_anchors(this_arg: number): boolean {
22209         if(!isWasmInitialized) {
22210                 throw new Error("initializeWasm() must be awaited first!");
22211         }
22212         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_opt_anchors(this_arg);
22213         return nativeResponseValue;
22214 }
22215         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
22216 /* @internal */
22217 export function HolderCommitmentTransaction_free(this_obj: number): void {
22218         if(!isWasmInitialized) {
22219                 throw new Error("initializeWasm() must be awaited first!");
22220         }
22221         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_free(this_obj);
22222         // debug statements here
22223 }
22224         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
22225 /* @internal */
22226 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): number {
22227         if(!isWasmInitialized) {
22228                 throw new Error("initializeWasm() must be awaited first!");
22229         }
22230         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
22231         return nativeResponseValue;
22232 }
22233         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
22234 /* @internal */
22235 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: number): void {
22236         if(!isWasmInitialized) {
22237                 throw new Error("initializeWasm() must be awaited first!");
22238         }
22239         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_sig(this_ptr, val);
22240         // debug statements here
22241 }
22242         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
22243 /* @internal */
22244 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: number): void {
22245         if(!isWasmInitialized) {
22246                 throw new Error("initializeWasm() must be awaited first!");
22247         }
22248         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
22249         // debug statements here
22250 }
22251         // uintptr_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
22252 /* @internal */
22253 export function HolderCommitmentTransaction_clone_ptr(arg: number): number {
22254         if(!isWasmInitialized) {
22255                 throw new Error("initializeWasm() must be awaited first!");
22256         }
22257         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone_ptr(arg);
22258         return nativeResponseValue;
22259 }
22260         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
22261 /* @internal */
22262 export function HolderCommitmentTransaction_clone(orig: number): number {
22263         if(!isWasmInitialized) {
22264                 throw new Error("initializeWasm() must be awaited first!");
22265         }
22266         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone(orig);
22267         return nativeResponseValue;
22268 }
22269         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
22270 /* @internal */
22271 export function HolderCommitmentTransaction_write(obj: number): number {
22272         if(!isWasmInitialized) {
22273                 throw new Error("initializeWasm() must be awaited first!");
22274         }
22275         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_write(obj);
22276         return nativeResponseValue;
22277 }
22278         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
22279 /* @internal */
22280 export function HolderCommitmentTransaction_read(ser: number): number {
22281         if(!isWasmInitialized) {
22282                 throw new Error("initializeWasm() must be awaited first!");
22283         }
22284         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_read(ser);
22285         return nativeResponseValue;
22286 }
22287         // 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);
22288 /* @internal */
22289 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: number, counterparty_htlc_sigs: number, holder_funding_key: number, counterparty_funding_key: number): number {
22290         if(!isWasmInitialized) {
22291                 throw new Error("initializeWasm() must be awaited first!");
22292         }
22293         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_new(commitment_tx, counterparty_sig, counterparty_htlc_sigs, holder_funding_key, counterparty_funding_key);
22294         return nativeResponseValue;
22295 }
22296         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
22297 /* @internal */
22298 export function BuiltCommitmentTransaction_free(this_obj: number): void {
22299         if(!isWasmInitialized) {
22300                 throw new Error("initializeWasm() must be awaited first!");
22301         }
22302         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_free(this_obj);
22303         // debug statements here
22304 }
22305         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
22306 /* @internal */
22307 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): number {
22308         if(!isWasmInitialized) {
22309                 throw new Error("initializeWasm() must be awaited first!");
22310         }
22311         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_transaction(this_ptr);
22312         return nativeResponseValue;
22313 }
22314         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
22315 /* @internal */
22316 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: number): void {
22317         if(!isWasmInitialized) {
22318                 throw new Error("initializeWasm() must be awaited first!");
22319         }
22320         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_transaction(this_ptr, val);
22321         // debug statements here
22322 }
22323         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
22324 /* @internal */
22325 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): number {
22326         if(!isWasmInitialized) {
22327                 throw new Error("initializeWasm() must be awaited first!");
22328         }
22329         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_txid(this_ptr);
22330         return nativeResponseValue;
22331 }
22332         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
22333 /* @internal */
22334 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: number): void {
22335         if(!isWasmInitialized) {
22336                 throw new Error("initializeWasm() must be awaited first!");
22337         }
22338         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_txid(this_ptr, val);
22339         // debug statements here
22340 }
22341         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
22342 /* @internal */
22343 export function BuiltCommitmentTransaction_new(transaction_arg: number, txid_arg: number): number {
22344         if(!isWasmInitialized) {
22345                 throw new Error("initializeWasm() must be awaited first!");
22346         }
22347         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_new(transaction_arg, txid_arg);
22348         return nativeResponseValue;
22349 }
22350         // uintptr_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
22351 /* @internal */
22352 export function BuiltCommitmentTransaction_clone_ptr(arg: number): number {
22353         if(!isWasmInitialized) {
22354                 throw new Error("initializeWasm() must be awaited first!");
22355         }
22356         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone_ptr(arg);
22357         return nativeResponseValue;
22358 }
22359         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
22360 /* @internal */
22361 export function BuiltCommitmentTransaction_clone(orig: number): number {
22362         if(!isWasmInitialized) {
22363                 throw new Error("initializeWasm() must be awaited first!");
22364         }
22365         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone(orig);
22366         return nativeResponseValue;
22367 }
22368         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
22369 /* @internal */
22370 export function BuiltCommitmentTransaction_write(obj: number): number {
22371         if(!isWasmInitialized) {
22372                 throw new Error("initializeWasm() must be awaited first!");
22373         }
22374         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_write(obj);
22375         return nativeResponseValue;
22376 }
22377         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
22378 /* @internal */
22379 export function BuiltCommitmentTransaction_read(ser: number): number {
22380         if(!isWasmInitialized) {
22381                 throw new Error("initializeWasm() must be awaited first!");
22382         }
22383         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_read(ser);
22384         return nativeResponseValue;
22385 }
22386         // 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);
22387 /* @internal */
22388 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
22389         if(!isWasmInitialized) {
22390                 throw new Error("initializeWasm() must be awaited first!");
22391         }
22392         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_sighash_all(this_arg, funding_redeemscript, channel_value_satoshis);
22393         return nativeResponseValue;
22394 }
22395         // 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);
22396 /* @internal */
22397 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
22398         if(!isWasmInitialized) {
22399                 throw new Error("initializeWasm() must be awaited first!");
22400         }
22401         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_sign(this_arg, funding_key, funding_redeemscript, channel_value_satoshis);
22402         return nativeResponseValue;
22403 }
22404         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
22405 /* @internal */
22406 export function ClosingTransaction_free(this_obj: number): void {
22407         if(!isWasmInitialized) {
22408                 throw new Error("initializeWasm() must be awaited first!");
22409         }
22410         const nativeResponseValue = wasm.TS_ClosingTransaction_free(this_obj);
22411         // debug statements here
22412 }
22413         // uintptr_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
22414 /* @internal */
22415 export function ClosingTransaction_clone_ptr(arg: number): number {
22416         if(!isWasmInitialized) {
22417                 throw new Error("initializeWasm() must be awaited first!");
22418         }
22419         const nativeResponseValue = wasm.TS_ClosingTransaction_clone_ptr(arg);
22420         return nativeResponseValue;
22421 }
22422         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
22423 /* @internal */
22424 export function ClosingTransaction_clone(orig: number): number {
22425         if(!isWasmInitialized) {
22426                 throw new Error("initializeWasm() must be awaited first!");
22427         }
22428         const nativeResponseValue = wasm.TS_ClosingTransaction_clone(orig);
22429         return nativeResponseValue;
22430 }
22431         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
22432 /* @internal */
22433 export function ClosingTransaction_hash(o: number): bigint {
22434         if(!isWasmInitialized) {
22435                 throw new Error("initializeWasm() must be awaited first!");
22436         }
22437         const nativeResponseValue = wasm.TS_ClosingTransaction_hash(o);
22438         return nativeResponseValue;
22439 }
22440         // 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);
22441 /* @internal */
22442 export function ClosingTransaction_new(to_holder_value_sat: bigint, to_counterparty_value_sat: bigint, to_holder_script: number, to_counterparty_script: number, funding_outpoint: number): number {
22443         if(!isWasmInitialized) {
22444                 throw new Error("initializeWasm() must be awaited first!");
22445         }
22446         const nativeResponseValue = wasm.TS_ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint);
22447         return nativeResponseValue;
22448 }
22449         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
22450 /* @internal */
22451 export function ClosingTransaction_trust(this_arg: number): number {
22452         if(!isWasmInitialized) {
22453                 throw new Error("initializeWasm() must be awaited first!");
22454         }
22455         const nativeResponseValue = wasm.TS_ClosingTransaction_trust(this_arg);
22456         return nativeResponseValue;
22457 }
22458         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
22459 /* @internal */
22460 export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
22461         if(!isWasmInitialized) {
22462                 throw new Error("initializeWasm() must be awaited first!");
22463         }
22464         const nativeResponseValue = wasm.TS_ClosingTransaction_verify(this_arg, funding_outpoint);
22465         return nativeResponseValue;
22466 }
22467         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
22468 /* @internal */
22469 export function ClosingTransaction_to_holder_value_sat(this_arg: number): bigint {
22470         if(!isWasmInitialized) {
22471                 throw new Error("initializeWasm() must be awaited first!");
22472         }
22473         const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_value_sat(this_arg);
22474         return nativeResponseValue;
22475 }
22476         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
22477 /* @internal */
22478 export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): bigint {
22479         if(!isWasmInitialized) {
22480                 throw new Error("initializeWasm() must be awaited first!");
22481         }
22482         const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_value_sat(this_arg);
22483         return nativeResponseValue;
22484 }
22485         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
22486 /* @internal */
22487 export function ClosingTransaction_to_holder_script(this_arg: number): number {
22488         if(!isWasmInitialized) {
22489                 throw new Error("initializeWasm() must be awaited first!");
22490         }
22491         const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_script(this_arg);
22492         return nativeResponseValue;
22493 }
22494         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
22495 /* @internal */
22496 export function ClosingTransaction_to_counterparty_script(this_arg: number): number {
22497         if(!isWasmInitialized) {
22498                 throw new Error("initializeWasm() must be awaited first!");
22499         }
22500         const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_script(this_arg);
22501         return nativeResponseValue;
22502 }
22503         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
22504 /* @internal */
22505 export function TrustedClosingTransaction_free(this_obj: number): void {
22506         if(!isWasmInitialized) {
22507                 throw new Error("initializeWasm() must be awaited first!");
22508         }
22509         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_free(this_obj);
22510         // debug statements here
22511 }
22512         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
22513 /* @internal */
22514 export function TrustedClosingTransaction_built_transaction(this_arg: number): number {
22515         if(!isWasmInitialized) {
22516                 throw new Error("initializeWasm() must be awaited first!");
22517         }
22518         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_built_transaction(this_arg);
22519         return nativeResponseValue;
22520 }
22521         // 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);
22522 /* @internal */
22523 export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
22524         if(!isWasmInitialized) {
22525                 throw new Error("initializeWasm() must be awaited first!");
22526         }
22527         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_get_sighash_all(this_arg, funding_redeemscript, channel_value_satoshis);
22528         return nativeResponseValue;
22529 }
22530         // 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);
22531 /* @internal */
22532 export function TrustedClosingTransaction_sign(this_arg: number, funding_key: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
22533         if(!isWasmInitialized) {
22534                 throw new Error("initializeWasm() must be awaited first!");
22535         }
22536         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_sign(this_arg, funding_key, funding_redeemscript, channel_value_satoshis);
22537         return nativeResponseValue;
22538 }
22539         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
22540 /* @internal */
22541 export function CommitmentTransaction_free(this_obj: number): void {
22542         if(!isWasmInitialized) {
22543                 throw new Error("initializeWasm() must be awaited first!");
22544         }
22545         const nativeResponseValue = wasm.TS_CommitmentTransaction_free(this_obj);
22546         // debug statements here
22547 }
22548         // uintptr_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
22549 /* @internal */
22550 export function CommitmentTransaction_clone_ptr(arg: number): number {
22551         if(!isWasmInitialized) {
22552                 throw new Error("initializeWasm() must be awaited first!");
22553         }
22554         const nativeResponseValue = wasm.TS_CommitmentTransaction_clone_ptr(arg);
22555         return nativeResponseValue;
22556 }
22557         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
22558 /* @internal */
22559 export function CommitmentTransaction_clone(orig: number): number {
22560         if(!isWasmInitialized) {
22561                 throw new Error("initializeWasm() must be awaited first!");
22562         }
22563         const nativeResponseValue = wasm.TS_CommitmentTransaction_clone(orig);
22564         return nativeResponseValue;
22565 }
22566         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
22567 /* @internal */
22568 export function CommitmentTransaction_write(obj: number): number {
22569         if(!isWasmInitialized) {
22570                 throw new Error("initializeWasm() must be awaited first!");
22571         }
22572         const nativeResponseValue = wasm.TS_CommitmentTransaction_write(obj);
22573         return nativeResponseValue;
22574 }
22575         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
22576 /* @internal */
22577 export function CommitmentTransaction_read(ser: number): number {
22578         if(!isWasmInitialized) {
22579                 throw new Error("initializeWasm() must be awaited first!");
22580         }
22581         const nativeResponseValue = wasm.TS_CommitmentTransaction_read(ser);
22582         return nativeResponseValue;
22583 }
22584         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
22585 /* @internal */
22586 export function CommitmentTransaction_commitment_number(this_arg: number): bigint {
22587         if(!isWasmInitialized) {
22588                 throw new Error("initializeWasm() must be awaited first!");
22589         }
22590         const nativeResponseValue = wasm.TS_CommitmentTransaction_commitment_number(this_arg);
22591         return nativeResponseValue;
22592 }
22593         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
22594 /* @internal */
22595 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): bigint {
22596         if(!isWasmInitialized) {
22597                 throw new Error("initializeWasm() must be awaited first!");
22598         }
22599         const nativeResponseValue = wasm.TS_CommitmentTransaction_to_broadcaster_value_sat(this_arg);
22600         return nativeResponseValue;
22601 }
22602         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
22603 /* @internal */
22604 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): bigint {
22605         if(!isWasmInitialized) {
22606                 throw new Error("initializeWasm() must be awaited first!");
22607         }
22608         const nativeResponseValue = wasm.TS_CommitmentTransaction_to_countersignatory_value_sat(this_arg);
22609         return nativeResponseValue;
22610 }
22611         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
22612 /* @internal */
22613 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
22614         if(!isWasmInitialized) {
22615                 throw new Error("initializeWasm() must be awaited first!");
22616         }
22617         const nativeResponseValue = wasm.TS_CommitmentTransaction_feerate_per_kw(this_arg);
22618         return nativeResponseValue;
22619 }
22620         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
22621 /* @internal */
22622 export function CommitmentTransaction_trust(this_arg: number): number {
22623         if(!isWasmInitialized) {
22624                 throw new Error("initializeWasm() must be awaited first!");
22625         }
22626         const nativeResponseValue = wasm.TS_CommitmentTransaction_trust(this_arg);
22627         return nativeResponseValue;
22628 }
22629         // 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);
22630 /* @internal */
22631 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
22632         if(!isWasmInitialized) {
22633                 throw new Error("initializeWasm() must be awaited first!");
22634         }
22635         const nativeResponseValue = wasm.TS_CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
22636         return nativeResponseValue;
22637 }
22638         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
22639 /* @internal */
22640 export function TrustedCommitmentTransaction_free(this_obj: number): void {
22641         if(!isWasmInitialized) {
22642                 throw new Error("initializeWasm() must be awaited first!");
22643         }
22644         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_free(this_obj);
22645         // debug statements here
22646 }
22647         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
22648 /* @internal */
22649 export function TrustedCommitmentTransaction_txid(this_arg: number): number {
22650         if(!isWasmInitialized) {
22651                 throw new Error("initializeWasm() must be awaited first!");
22652         }
22653         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_txid(this_arg);
22654         return nativeResponseValue;
22655 }
22656         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
22657 /* @internal */
22658 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
22659         if(!isWasmInitialized) {
22660                 throw new Error("initializeWasm() must be awaited first!");
22661         }
22662         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_built_transaction(this_arg);
22663         return nativeResponseValue;
22664 }
22665         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
22666 /* @internal */
22667 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
22668         if(!isWasmInitialized) {
22669                 throw new Error("initializeWasm() must be awaited first!");
22670         }
22671         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_keys(this_arg);
22672         return nativeResponseValue;
22673 }
22674         // MUST_USE_RES bool TrustedCommitmentTransaction_opt_anchors(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
22675 /* @internal */
22676 export function TrustedCommitmentTransaction_opt_anchors(this_arg: number): boolean {
22677         if(!isWasmInitialized) {
22678                 throw new Error("initializeWasm() must be awaited first!");
22679         }
22680         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_opt_anchors(this_arg);
22681         return nativeResponseValue;
22682 }
22683         // 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);
22684 /* @internal */
22685 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: number, channel_parameters: number): number {
22686         if(!isWasmInitialized) {
22687                 throw new Error("initializeWasm() must be awaited first!");
22688         }
22689         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_get_htlc_sigs(this_arg, htlc_base_key, channel_parameters);
22690         return nativeResponseValue;
22691 }
22692         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
22693 /* @internal */
22694 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: number, countersignatory_payment_basepoint: number, outbound_from_broadcaster: boolean): bigint {
22695         if(!isWasmInitialized) {
22696                 throw new Error("initializeWasm() must be awaited first!");
22697         }
22698         const nativeResponseValue = wasm.TS_get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint, countersignatory_payment_basepoint, outbound_from_broadcaster);
22699         return nativeResponseValue;
22700 }
22701         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
22702 /* @internal */
22703 export function InitFeatures_eq(a: number, b: number): boolean {
22704         if(!isWasmInitialized) {
22705                 throw new Error("initializeWasm() must be awaited first!");
22706         }
22707         const nativeResponseValue = wasm.TS_InitFeatures_eq(a, b);
22708         return nativeResponseValue;
22709 }
22710         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
22711 /* @internal */
22712 export function NodeFeatures_eq(a: number, b: number): boolean {
22713         if(!isWasmInitialized) {
22714                 throw new Error("initializeWasm() must be awaited first!");
22715         }
22716         const nativeResponseValue = wasm.TS_NodeFeatures_eq(a, b);
22717         return nativeResponseValue;
22718 }
22719         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
22720 /* @internal */
22721 export function ChannelFeatures_eq(a: number, b: number): boolean {
22722         if(!isWasmInitialized) {
22723                 throw new Error("initializeWasm() must be awaited first!");
22724         }
22725         const nativeResponseValue = wasm.TS_ChannelFeatures_eq(a, b);
22726         return nativeResponseValue;
22727 }
22728         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
22729 /* @internal */
22730 export function InvoiceFeatures_eq(a: number, b: number): boolean {
22731         if(!isWasmInitialized) {
22732                 throw new Error("initializeWasm() must be awaited first!");
22733         }
22734         const nativeResponseValue = wasm.TS_InvoiceFeatures_eq(a, b);
22735         return nativeResponseValue;
22736 }
22737         // bool ChannelTypeFeatures_eq(const struct LDKChannelTypeFeatures *NONNULL_PTR a, const struct LDKChannelTypeFeatures *NONNULL_PTR b);
22738 /* @internal */
22739 export function ChannelTypeFeatures_eq(a: number, b: number): boolean {
22740         if(!isWasmInitialized) {
22741                 throw new Error("initializeWasm() must be awaited first!");
22742         }
22743         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_eq(a, b);
22744         return nativeResponseValue;
22745 }
22746         // uintptr_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
22747 /* @internal */
22748 export function InitFeatures_clone_ptr(arg: number): number {
22749         if(!isWasmInitialized) {
22750                 throw new Error("initializeWasm() must be awaited first!");
22751         }
22752         const nativeResponseValue = wasm.TS_InitFeatures_clone_ptr(arg);
22753         return nativeResponseValue;
22754 }
22755         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
22756 /* @internal */
22757 export function InitFeatures_clone(orig: number): number {
22758         if(!isWasmInitialized) {
22759                 throw new Error("initializeWasm() must be awaited first!");
22760         }
22761         const nativeResponseValue = wasm.TS_InitFeatures_clone(orig);
22762         return nativeResponseValue;
22763 }
22764         // uintptr_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
22765 /* @internal */
22766 export function NodeFeatures_clone_ptr(arg: number): number {
22767         if(!isWasmInitialized) {
22768                 throw new Error("initializeWasm() must be awaited first!");
22769         }
22770         const nativeResponseValue = wasm.TS_NodeFeatures_clone_ptr(arg);
22771         return nativeResponseValue;
22772 }
22773         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
22774 /* @internal */
22775 export function NodeFeatures_clone(orig: number): number {
22776         if(!isWasmInitialized) {
22777                 throw new Error("initializeWasm() must be awaited first!");
22778         }
22779         const nativeResponseValue = wasm.TS_NodeFeatures_clone(orig);
22780         return nativeResponseValue;
22781 }
22782         // uintptr_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
22783 /* @internal */
22784 export function ChannelFeatures_clone_ptr(arg: number): number {
22785         if(!isWasmInitialized) {
22786                 throw new Error("initializeWasm() must be awaited first!");
22787         }
22788         const nativeResponseValue = wasm.TS_ChannelFeatures_clone_ptr(arg);
22789         return nativeResponseValue;
22790 }
22791         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
22792 /* @internal */
22793 export function ChannelFeatures_clone(orig: number): number {
22794         if(!isWasmInitialized) {
22795                 throw new Error("initializeWasm() must be awaited first!");
22796         }
22797         const nativeResponseValue = wasm.TS_ChannelFeatures_clone(orig);
22798         return nativeResponseValue;
22799 }
22800         // uintptr_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
22801 /* @internal */
22802 export function InvoiceFeatures_clone_ptr(arg: number): number {
22803         if(!isWasmInitialized) {
22804                 throw new Error("initializeWasm() must be awaited first!");
22805         }
22806         const nativeResponseValue = wasm.TS_InvoiceFeatures_clone_ptr(arg);
22807         return nativeResponseValue;
22808 }
22809         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
22810 /* @internal */
22811 export function InvoiceFeatures_clone(orig: number): number {
22812         if(!isWasmInitialized) {
22813                 throw new Error("initializeWasm() must be awaited first!");
22814         }
22815         const nativeResponseValue = wasm.TS_InvoiceFeatures_clone(orig);
22816         return nativeResponseValue;
22817 }
22818         // uintptr_t ChannelTypeFeatures_clone_ptr(LDKChannelTypeFeatures *NONNULL_PTR arg);
22819 /* @internal */
22820 export function ChannelTypeFeatures_clone_ptr(arg: number): number {
22821         if(!isWasmInitialized) {
22822                 throw new Error("initializeWasm() must be awaited first!");
22823         }
22824         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone_ptr(arg);
22825         return nativeResponseValue;
22826 }
22827         // struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
22828 /* @internal */
22829 export function ChannelTypeFeatures_clone(orig: number): number {
22830         if(!isWasmInitialized) {
22831                 throw new Error("initializeWasm() must be awaited first!");
22832         }
22833         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone(orig);
22834         return nativeResponseValue;
22835 }
22836         // void InitFeatures_free(struct LDKInitFeatures this_obj);
22837 /* @internal */
22838 export function InitFeatures_free(this_obj: number): void {
22839         if(!isWasmInitialized) {
22840                 throw new Error("initializeWasm() must be awaited first!");
22841         }
22842         const nativeResponseValue = wasm.TS_InitFeatures_free(this_obj);
22843         // debug statements here
22844 }
22845         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
22846 /* @internal */
22847 export function NodeFeatures_free(this_obj: number): void {
22848         if(!isWasmInitialized) {
22849                 throw new Error("initializeWasm() must be awaited first!");
22850         }
22851         const nativeResponseValue = wasm.TS_NodeFeatures_free(this_obj);
22852         // debug statements here
22853 }
22854         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
22855 /* @internal */
22856 export function ChannelFeatures_free(this_obj: number): void {
22857         if(!isWasmInitialized) {
22858                 throw new Error("initializeWasm() must be awaited first!");
22859         }
22860         const nativeResponseValue = wasm.TS_ChannelFeatures_free(this_obj);
22861         // debug statements here
22862 }
22863         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
22864 /* @internal */
22865 export function InvoiceFeatures_free(this_obj: number): void {
22866         if(!isWasmInitialized) {
22867                 throw new Error("initializeWasm() must be awaited first!");
22868         }
22869         const nativeResponseValue = wasm.TS_InvoiceFeatures_free(this_obj);
22870         // debug statements here
22871 }
22872         // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
22873 /* @internal */
22874 export function ChannelTypeFeatures_free(this_obj: number): void {
22875         if(!isWasmInitialized) {
22876                 throw new Error("initializeWasm() must be awaited first!");
22877         }
22878         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_free(this_obj);
22879         // debug statements here
22880 }
22881         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
22882 /* @internal */
22883 export function InitFeatures_empty(): number {
22884         if(!isWasmInitialized) {
22885                 throw new Error("initializeWasm() must be awaited first!");
22886         }
22887         const nativeResponseValue = wasm.TS_InitFeatures_empty();
22888         return nativeResponseValue;
22889 }
22890         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
22891 /* @internal */
22892 export function InitFeatures_known(): number {
22893         if(!isWasmInitialized) {
22894                 throw new Error("initializeWasm() must be awaited first!");
22895         }
22896         const nativeResponseValue = wasm.TS_InitFeatures_known();
22897         return nativeResponseValue;
22898 }
22899         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
22900 /* @internal */
22901 export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
22902         if(!isWasmInitialized) {
22903                 throw new Error("initializeWasm() must be awaited first!");
22904         }
22905         const nativeResponseValue = wasm.TS_InitFeatures_requires_unknown_bits(this_arg);
22906         return nativeResponseValue;
22907 }
22908         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
22909 /* @internal */
22910 export function NodeFeatures_empty(): number {
22911         if(!isWasmInitialized) {
22912                 throw new Error("initializeWasm() must be awaited first!");
22913         }
22914         const nativeResponseValue = wasm.TS_NodeFeatures_empty();
22915         return nativeResponseValue;
22916 }
22917         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
22918 /* @internal */
22919 export function NodeFeatures_known(): number {
22920         if(!isWasmInitialized) {
22921                 throw new Error("initializeWasm() must be awaited first!");
22922         }
22923         const nativeResponseValue = wasm.TS_NodeFeatures_known();
22924         return nativeResponseValue;
22925 }
22926         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
22927 /* @internal */
22928 export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
22929         if(!isWasmInitialized) {
22930                 throw new Error("initializeWasm() must be awaited first!");
22931         }
22932         const nativeResponseValue = wasm.TS_NodeFeatures_requires_unknown_bits(this_arg);
22933         return nativeResponseValue;
22934 }
22935         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
22936 /* @internal */
22937 export function ChannelFeatures_empty(): number {
22938         if(!isWasmInitialized) {
22939                 throw new Error("initializeWasm() must be awaited first!");
22940         }
22941         const nativeResponseValue = wasm.TS_ChannelFeatures_empty();
22942         return nativeResponseValue;
22943 }
22944         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
22945 /* @internal */
22946 export function ChannelFeatures_known(): number {
22947         if(!isWasmInitialized) {
22948                 throw new Error("initializeWasm() must be awaited first!");
22949         }
22950         const nativeResponseValue = wasm.TS_ChannelFeatures_known();
22951         return nativeResponseValue;
22952 }
22953         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
22954 /* @internal */
22955 export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
22956         if(!isWasmInitialized) {
22957                 throw new Error("initializeWasm() must be awaited first!");
22958         }
22959         const nativeResponseValue = wasm.TS_ChannelFeatures_requires_unknown_bits(this_arg);
22960         return nativeResponseValue;
22961 }
22962         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
22963 /* @internal */
22964 export function InvoiceFeatures_empty(): number {
22965         if(!isWasmInitialized) {
22966                 throw new Error("initializeWasm() must be awaited first!");
22967         }
22968         const nativeResponseValue = wasm.TS_InvoiceFeatures_empty();
22969         return nativeResponseValue;
22970 }
22971         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
22972 /* @internal */
22973 export function InvoiceFeatures_known(): number {
22974         if(!isWasmInitialized) {
22975                 throw new Error("initializeWasm() must be awaited first!");
22976         }
22977         const nativeResponseValue = wasm.TS_InvoiceFeatures_known();
22978         return nativeResponseValue;
22979 }
22980         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
22981 /* @internal */
22982 export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
22983         if(!isWasmInitialized) {
22984                 throw new Error("initializeWasm() must be awaited first!");
22985         }
22986         const nativeResponseValue = wasm.TS_InvoiceFeatures_requires_unknown_bits(this_arg);
22987         return nativeResponseValue;
22988 }
22989         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
22990 /* @internal */
22991 export function ChannelTypeFeatures_empty(): number {
22992         if(!isWasmInitialized) {
22993                 throw new Error("initializeWasm() must be awaited first!");
22994         }
22995         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_empty();
22996         return nativeResponseValue;
22997 }
22998         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
22999 /* @internal */
23000 export function ChannelTypeFeatures_known(): number {
23001         if(!isWasmInitialized) {
23002                 throw new Error("initializeWasm() must be awaited first!");
23003         }
23004         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_known();
23005         return nativeResponseValue;
23006 }
23007         // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
23008 /* @internal */
23009 export function ChannelTypeFeatures_requires_unknown_bits(this_arg: number): boolean {
23010         if(!isWasmInitialized) {
23011                 throw new Error("initializeWasm() must be awaited first!");
23012         }
23013         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_requires_unknown_bits(this_arg);
23014         return nativeResponseValue;
23015 }
23016         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
23017 /* @internal */
23018 export function InitFeatures_write(obj: number): number {
23019         if(!isWasmInitialized) {
23020                 throw new Error("initializeWasm() must be awaited first!");
23021         }
23022         const nativeResponseValue = wasm.TS_InitFeatures_write(obj);
23023         return nativeResponseValue;
23024 }
23025         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
23026 /* @internal */
23027 export function InitFeatures_read(ser: number): number {
23028         if(!isWasmInitialized) {
23029                 throw new Error("initializeWasm() must be awaited first!");
23030         }
23031         const nativeResponseValue = wasm.TS_InitFeatures_read(ser);
23032         return nativeResponseValue;
23033 }
23034         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
23035 /* @internal */
23036 export function ChannelFeatures_write(obj: number): number {
23037         if(!isWasmInitialized) {
23038                 throw new Error("initializeWasm() must be awaited first!");
23039         }
23040         const nativeResponseValue = wasm.TS_ChannelFeatures_write(obj);
23041         return nativeResponseValue;
23042 }
23043         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
23044 /* @internal */
23045 export function ChannelFeatures_read(ser: number): number {
23046         if(!isWasmInitialized) {
23047                 throw new Error("initializeWasm() must be awaited first!");
23048         }
23049         const nativeResponseValue = wasm.TS_ChannelFeatures_read(ser);
23050         return nativeResponseValue;
23051 }
23052         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
23053 /* @internal */
23054 export function NodeFeatures_write(obj: number): number {
23055         if(!isWasmInitialized) {
23056                 throw new Error("initializeWasm() must be awaited first!");
23057         }
23058         const nativeResponseValue = wasm.TS_NodeFeatures_write(obj);
23059         return nativeResponseValue;
23060 }
23061         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
23062 /* @internal */
23063 export function NodeFeatures_read(ser: number): number {
23064         if(!isWasmInitialized) {
23065                 throw new Error("initializeWasm() must be awaited first!");
23066         }
23067         const nativeResponseValue = wasm.TS_NodeFeatures_read(ser);
23068         return nativeResponseValue;
23069 }
23070         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
23071 /* @internal */
23072 export function InvoiceFeatures_write(obj: number): number {
23073         if(!isWasmInitialized) {
23074                 throw new Error("initializeWasm() must be awaited first!");
23075         }
23076         const nativeResponseValue = wasm.TS_InvoiceFeatures_write(obj);
23077         return nativeResponseValue;
23078 }
23079         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
23080 /* @internal */
23081 export function InvoiceFeatures_read(ser: number): number {
23082         if(!isWasmInitialized) {
23083                 throw new Error("initializeWasm() must be awaited first!");
23084         }
23085         const nativeResponseValue = wasm.TS_InvoiceFeatures_read(ser);
23086         return nativeResponseValue;
23087 }
23088         // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
23089 /* @internal */
23090 export function ChannelTypeFeatures_write(obj: number): number {
23091         if(!isWasmInitialized) {
23092                 throw new Error("initializeWasm() must be awaited first!");
23093         }
23094         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_write(obj);
23095         return nativeResponseValue;
23096 }
23097         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
23098 /* @internal */
23099 export function ChannelTypeFeatures_read(ser: number): number {
23100         if(!isWasmInitialized) {
23101                 throw new Error("initializeWasm() must be awaited first!");
23102         }
23103         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_read(ser);
23104         return nativeResponseValue;
23105 }
23106         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
23107 /* @internal */
23108 export function ShutdownScript_free(this_obj: number): void {
23109         if(!isWasmInitialized) {
23110                 throw new Error("initializeWasm() must be awaited first!");
23111         }
23112         const nativeResponseValue = wasm.TS_ShutdownScript_free(this_obj);
23113         // debug statements here
23114 }
23115         // uintptr_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
23116 /* @internal */
23117 export function ShutdownScript_clone_ptr(arg: number): number {
23118         if(!isWasmInitialized) {
23119                 throw new Error("initializeWasm() must be awaited first!");
23120         }
23121         const nativeResponseValue = wasm.TS_ShutdownScript_clone_ptr(arg);
23122         return nativeResponseValue;
23123 }
23124         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
23125 /* @internal */
23126 export function ShutdownScript_clone(orig: number): number {
23127         if(!isWasmInitialized) {
23128                 throw new Error("initializeWasm() must be awaited first!");
23129         }
23130         const nativeResponseValue = wasm.TS_ShutdownScript_clone(orig);
23131         return nativeResponseValue;
23132 }
23133         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
23134 /* @internal */
23135 export function InvalidShutdownScript_free(this_obj: number): void {
23136         if(!isWasmInitialized) {
23137                 throw new Error("initializeWasm() must be awaited first!");
23138         }
23139         const nativeResponseValue = wasm.TS_InvalidShutdownScript_free(this_obj);
23140         // debug statements here
23141 }
23142         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
23143 /* @internal */
23144 export function InvalidShutdownScript_get_script(this_ptr: number): number {
23145         if(!isWasmInitialized) {
23146                 throw new Error("initializeWasm() must be awaited first!");
23147         }
23148         const nativeResponseValue = wasm.TS_InvalidShutdownScript_get_script(this_ptr);
23149         return nativeResponseValue;
23150 }
23151         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
23152 /* @internal */
23153 export function InvalidShutdownScript_set_script(this_ptr: number, val: number): void {
23154         if(!isWasmInitialized) {
23155                 throw new Error("initializeWasm() must be awaited first!");
23156         }
23157         const nativeResponseValue = wasm.TS_InvalidShutdownScript_set_script(this_ptr, val);
23158         // debug statements here
23159 }
23160         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
23161 /* @internal */
23162 export function InvalidShutdownScript_new(script_arg: number): number {
23163         if(!isWasmInitialized) {
23164                 throw new Error("initializeWasm() must be awaited first!");
23165         }
23166         const nativeResponseValue = wasm.TS_InvalidShutdownScript_new(script_arg);
23167         return nativeResponseValue;
23168 }
23169         // uintptr_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
23170 /* @internal */
23171 export function InvalidShutdownScript_clone_ptr(arg: number): number {
23172         if(!isWasmInitialized) {
23173                 throw new Error("initializeWasm() must be awaited first!");
23174         }
23175         const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone_ptr(arg);
23176         return nativeResponseValue;
23177 }
23178         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
23179 /* @internal */
23180 export function InvalidShutdownScript_clone(orig: number): number {
23181         if(!isWasmInitialized) {
23182                 throw new Error("initializeWasm() must be awaited first!");
23183         }
23184         const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone(orig);
23185         return nativeResponseValue;
23186 }
23187         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
23188 /* @internal */
23189 export function ShutdownScript_write(obj: number): number {
23190         if(!isWasmInitialized) {
23191                 throw new Error("initializeWasm() must be awaited first!");
23192         }
23193         const nativeResponseValue = wasm.TS_ShutdownScript_write(obj);
23194         return nativeResponseValue;
23195 }
23196         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
23197 /* @internal */
23198 export function ShutdownScript_read(ser: number): number {
23199         if(!isWasmInitialized) {
23200                 throw new Error("initializeWasm() must be awaited first!");
23201         }
23202         const nativeResponseValue = wasm.TS_ShutdownScript_read(ser);
23203         return nativeResponseValue;
23204 }
23205         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
23206 /* @internal */
23207 export function ShutdownScript_new_p2wpkh(pubkey_hash: number): number {
23208         if(!isWasmInitialized) {
23209                 throw new Error("initializeWasm() must be awaited first!");
23210         }
23211         const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wpkh(pubkey_hash);
23212         return nativeResponseValue;
23213 }
23214         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
23215 /* @internal */
23216 export function ShutdownScript_new_p2wsh(script_hash: number): number {
23217         if(!isWasmInitialized) {
23218                 throw new Error("initializeWasm() must be awaited first!");
23219         }
23220         const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wsh(script_hash);
23221         return nativeResponseValue;
23222 }
23223         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
23224 /* @internal */
23225 export function ShutdownScript_new_witness_program(version: number, program: number): number {
23226         if(!isWasmInitialized) {
23227                 throw new Error("initializeWasm() must be awaited first!");
23228         }
23229         const nativeResponseValue = wasm.TS_ShutdownScript_new_witness_program(version, program);
23230         return nativeResponseValue;
23231 }
23232         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
23233 /* @internal */
23234 export function ShutdownScript_into_inner(this_arg: number): number {
23235         if(!isWasmInitialized) {
23236                 throw new Error("initializeWasm() must be awaited first!");
23237         }
23238         const nativeResponseValue = wasm.TS_ShutdownScript_into_inner(this_arg);
23239         return nativeResponseValue;
23240 }
23241         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
23242 /* @internal */
23243 export function ShutdownScript_as_legacy_pubkey(this_arg: number): number {
23244         if(!isWasmInitialized) {
23245                 throw new Error("initializeWasm() must be awaited first!");
23246         }
23247         const nativeResponseValue = wasm.TS_ShutdownScript_as_legacy_pubkey(this_arg);
23248         return nativeResponseValue;
23249 }
23250         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
23251 /* @internal */
23252 export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
23253         if(!isWasmInitialized) {
23254                 throw new Error("initializeWasm() must be awaited first!");
23255         }
23256         const nativeResponseValue = wasm.TS_ShutdownScript_is_compatible(this_arg, features);
23257         return nativeResponseValue;
23258 }
23259         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
23260 /* @internal */
23261 export function CustomMessageReader_free(this_ptr: number): void {
23262         if(!isWasmInitialized) {
23263                 throw new Error("initializeWasm() must be awaited first!");
23264         }
23265         const nativeResponseValue = wasm.TS_CustomMessageReader_free(this_ptr);
23266         // debug statements here
23267 }
23268         // uintptr_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
23269 /* @internal */
23270 export function Type_clone_ptr(arg: number): number {
23271         if(!isWasmInitialized) {
23272                 throw new Error("initializeWasm() must be awaited first!");
23273         }
23274         const nativeResponseValue = wasm.TS_Type_clone_ptr(arg);
23275         return nativeResponseValue;
23276 }
23277         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
23278 /* @internal */
23279 export function Type_clone(orig: number): number {
23280         if(!isWasmInitialized) {
23281                 throw new Error("initializeWasm() must be awaited first!");
23282         }
23283         const nativeResponseValue = wasm.TS_Type_clone(orig);
23284         return nativeResponseValue;
23285 }
23286         // void Type_free(struct LDKType this_ptr);
23287 /* @internal */
23288 export function Type_free(this_ptr: number): void {
23289         if(!isWasmInitialized) {
23290                 throw new Error("initializeWasm() must be awaited first!");
23291         }
23292         const nativeResponseValue = wasm.TS_Type_free(this_ptr);
23293         // debug statements here
23294 }
23295         // void NodeId_free(struct LDKNodeId this_obj);
23296 /* @internal */
23297 export function NodeId_free(this_obj: number): void {
23298         if(!isWasmInitialized) {
23299                 throw new Error("initializeWasm() must be awaited first!");
23300         }
23301         const nativeResponseValue = wasm.TS_NodeId_free(this_obj);
23302         // debug statements here
23303 }
23304         // uintptr_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
23305 /* @internal */
23306 export function NodeId_clone_ptr(arg: number): number {
23307         if(!isWasmInitialized) {
23308                 throw new Error("initializeWasm() must be awaited first!");
23309         }
23310         const nativeResponseValue = wasm.TS_NodeId_clone_ptr(arg);
23311         return nativeResponseValue;
23312 }
23313         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
23314 /* @internal */
23315 export function NodeId_clone(orig: number): number {
23316         if(!isWasmInitialized) {
23317                 throw new Error("initializeWasm() must be awaited first!");
23318         }
23319         const nativeResponseValue = wasm.TS_NodeId_clone(orig);
23320         return nativeResponseValue;
23321 }
23322         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
23323 /* @internal */
23324 export function NodeId_from_pubkey(pubkey: number): number {
23325         if(!isWasmInitialized) {
23326                 throw new Error("initializeWasm() must be awaited first!");
23327         }
23328         const nativeResponseValue = wasm.TS_NodeId_from_pubkey(pubkey);
23329         return nativeResponseValue;
23330 }
23331         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
23332 /* @internal */
23333 export function NodeId_as_slice(this_arg: number): number {
23334         if(!isWasmInitialized) {
23335                 throw new Error("initializeWasm() must be awaited first!");
23336         }
23337         const nativeResponseValue = wasm.TS_NodeId_as_slice(this_arg);
23338         return nativeResponseValue;
23339 }
23340         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
23341 /* @internal */
23342 export function NodeId_hash(o: number): bigint {
23343         if(!isWasmInitialized) {
23344                 throw new Error("initializeWasm() must be awaited first!");
23345         }
23346         const nativeResponseValue = wasm.TS_NodeId_hash(o);
23347         return nativeResponseValue;
23348 }
23349         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
23350 /* @internal */
23351 export function NodeId_write(obj: number): number {
23352         if(!isWasmInitialized) {
23353                 throw new Error("initializeWasm() must be awaited first!");
23354         }
23355         const nativeResponseValue = wasm.TS_NodeId_write(obj);
23356         return nativeResponseValue;
23357 }
23358         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
23359 /* @internal */
23360 export function NodeId_read(ser: number): number {
23361         if(!isWasmInitialized) {
23362                 throw new Error("initializeWasm() must be awaited first!");
23363         }
23364         const nativeResponseValue = wasm.TS_NodeId_read(ser);
23365         return nativeResponseValue;
23366 }
23367         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
23368 /* @internal */
23369 export function NetworkGraph_free(this_obj: number): void {
23370         if(!isWasmInitialized) {
23371                 throw new Error("initializeWasm() must be awaited first!");
23372         }
23373         const nativeResponseValue = wasm.TS_NetworkGraph_free(this_obj);
23374         // debug statements here
23375 }
23376         // uintptr_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
23377 /* @internal */
23378 export function NetworkGraph_clone_ptr(arg: number): number {
23379         if(!isWasmInitialized) {
23380                 throw new Error("initializeWasm() must be awaited first!");
23381         }
23382         const nativeResponseValue = wasm.TS_NetworkGraph_clone_ptr(arg);
23383         return nativeResponseValue;
23384 }
23385         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
23386 /* @internal */
23387 export function NetworkGraph_clone(orig: number): number {
23388         if(!isWasmInitialized) {
23389                 throw new Error("initializeWasm() must be awaited first!");
23390         }
23391         const nativeResponseValue = wasm.TS_NetworkGraph_clone(orig);
23392         return nativeResponseValue;
23393 }
23394         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
23395 /* @internal */
23396 export function ReadOnlyNetworkGraph_free(this_obj: number): void {
23397         if(!isWasmInitialized) {
23398                 throw new Error("initializeWasm() must be awaited first!");
23399         }
23400         const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_free(this_obj);
23401         // debug statements here
23402 }
23403         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
23404 /* @internal */
23405 export function NetworkUpdate_free(this_ptr: number): void {
23406         if(!isWasmInitialized) {
23407                 throw new Error("initializeWasm() must be awaited first!");
23408         }
23409         const nativeResponseValue = wasm.TS_NetworkUpdate_free(this_ptr);
23410         // debug statements here
23411 }
23412         // uintptr_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
23413 /* @internal */
23414 export function NetworkUpdate_clone_ptr(arg: number): number {
23415         if(!isWasmInitialized) {
23416                 throw new Error("initializeWasm() must be awaited first!");
23417         }
23418         const nativeResponseValue = wasm.TS_NetworkUpdate_clone_ptr(arg);
23419         return nativeResponseValue;
23420 }
23421         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
23422 /* @internal */
23423 export function NetworkUpdate_clone(orig: number): number {
23424         if(!isWasmInitialized) {
23425                 throw new Error("initializeWasm() must be awaited first!");
23426         }
23427         const nativeResponseValue = wasm.TS_NetworkUpdate_clone(orig);
23428         return nativeResponseValue;
23429 }
23430         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
23431 /* @internal */
23432 export function NetworkUpdate_channel_update_message(msg: number): number {
23433         if(!isWasmInitialized) {
23434                 throw new Error("initializeWasm() must be awaited first!");
23435         }
23436         const nativeResponseValue = wasm.TS_NetworkUpdate_channel_update_message(msg);
23437         return nativeResponseValue;
23438 }
23439         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
23440 /* @internal */
23441 export function NetworkUpdate_channel_closed(short_channel_id: bigint, is_permanent: boolean): number {
23442         if(!isWasmInitialized) {
23443                 throw new Error("initializeWasm() must be awaited first!");
23444         }
23445         const nativeResponseValue = wasm.TS_NetworkUpdate_channel_closed(short_channel_id, is_permanent);
23446         return nativeResponseValue;
23447 }
23448         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
23449 /* @internal */
23450 export function NetworkUpdate_node_failure(node_id: number, is_permanent: boolean): number {
23451         if(!isWasmInitialized) {
23452                 throw new Error("initializeWasm() must be awaited first!");
23453         }
23454         const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(node_id, is_permanent);
23455         return nativeResponseValue;
23456 }
23457         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
23458 /* @internal */
23459 export function NetworkUpdate_write(obj: number): number {
23460         if(!isWasmInitialized) {
23461                 throw new Error("initializeWasm() must be awaited first!");
23462         }
23463         const nativeResponseValue = wasm.TS_NetworkUpdate_write(obj);
23464         return nativeResponseValue;
23465 }
23466         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
23467 /* @internal */
23468 export function NetworkUpdate_read(ser: number): number {
23469         if(!isWasmInitialized) {
23470                 throw new Error("initializeWasm() must be awaited first!");
23471         }
23472         const nativeResponseValue = wasm.TS_NetworkUpdate_read(ser);
23473         return nativeResponseValue;
23474 }
23475         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
23476 /* @internal */
23477 export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
23478         if(!isWasmInitialized) {
23479                 throw new Error("initializeWasm() must be awaited first!");
23480         }
23481         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_EventHandler(this_arg);
23482         return nativeResponseValue;
23483 }
23484         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
23485 /* @internal */
23486 export function NetGraphMsgHandler_free(this_obj: number): void {
23487         if(!isWasmInitialized) {
23488                 throw new Error("initializeWasm() must be awaited first!");
23489         }
23490         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_free(this_obj);
23491         // debug statements here
23492 }
23493         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
23494 /* @internal */
23495 export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
23496         if(!isWasmInitialized) {
23497                 throw new Error("initializeWasm() must be awaited first!");
23498         }
23499         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_new(network_graph, chain_access, logger);
23500         return nativeResponseValue;
23501 }
23502         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
23503 /* @internal */
23504 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
23505         if(!isWasmInitialized) {
23506                 throw new Error("initializeWasm() must be awaited first!");
23507         }
23508         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
23509         // debug statements here
23510 }
23511         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
23512 /* @internal */
23513 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
23514         if(!isWasmInitialized) {
23515                 throw new Error("initializeWasm() must be awaited first!");
23516         }
23517         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
23518         return nativeResponseValue;
23519 }
23520         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
23521 /* @internal */
23522 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
23523         if(!isWasmInitialized) {
23524                 throw new Error("initializeWasm() must be awaited first!");
23525         }
23526         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
23527         return nativeResponseValue;
23528 }
23529         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
23530 /* @internal */
23531 export function DirectionalChannelInfo_free(this_obj: number): void {
23532         if(!isWasmInitialized) {
23533                 throw new Error("initializeWasm() must be awaited first!");
23534         }
23535         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_free(this_obj);
23536         // debug statements here
23537 }
23538         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23539 /* @internal */
23540 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
23541         if(!isWasmInitialized) {
23542                 throw new Error("initializeWasm() must be awaited first!");
23543         }
23544         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update(this_ptr);
23545         return nativeResponseValue;
23546 }
23547         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
23548 /* @internal */
23549 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
23550         if(!isWasmInitialized) {
23551                 throw new Error("initializeWasm() must be awaited first!");
23552         }
23553         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update(this_ptr, val);
23554         // debug statements here
23555 }
23556         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23557 /* @internal */
23558 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
23559         if(!isWasmInitialized) {
23560                 throw new Error("initializeWasm() must be awaited first!");
23561         }
23562         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_enabled(this_ptr);
23563         return nativeResponseValue;
23564 }
23565         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
23566 /* @internal */
23567 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
23568         if(!isWasmInitialized) {
23569                 throw new Error("initializeWasm() must be awaited first!");
23570         }
23571         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_enabled(this_ptr, val);
23572         // debug statements here
23573 }
23574         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23575 /* @internal */
23576 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
23577         if(!isWasmInitialized) {
23578                 throw new Error("initializeWasm() must be awaited first!");
23579         }
23580         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
23581         return nativeResponseValue;
23582 }
23583         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
23584 /* @internal */
23585 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
23586         if(!isWasmInitialized) {
23587                 throw new Error("initializeWasm() must be awaited first!");
23588         }
23589         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
23590         // debug statements here
23591 }
23592         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23593 /* @internal */
23594 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): bigint {
23595         if(!isWasmInitialized) {
23596                 throw new Error("initializeWasm() must be awaited first!");
23597         }
23598         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
23599         return nativeResponseValue;
23600 }
23601         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
23602 /* @internal */
23603 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
23604         if(!isWasmInitialized) {
23605                 throw new Error("initializeWasm() must be awaited first!");
23606         }
23607         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
23608         // debug statements here
23609 }
23610         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23611 /* @internal */
23612 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
23613         if(!isWasmInitialized) {
23614                 throw new Error("initializeWasm() must be awaited first!");
23615         }
23616         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
23617         return nativeResponseValue;
23618 }
23619         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
23620 /* @internal */
23621 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
23622         if(!isWasmInitialized) {
23623                 throw new Error("initializeWasm() must be awaited first!");
23624         }
23625         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
23626         // debug statements here
23627 }
23628         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23629 /* @internal */
23630 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
23631         if(!isWasmInitialized) {
23632                 throw new Error("initializeWasm() must be awaited first!");
23633         }
23634         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_fees(this_ptr);
23635         return nativeResponseValue;
23636 }
23637         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
23638 /* @internal */
23639 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
23640         if(!isWasmInitialized) {
23641                 throw new Error("initializeWasm() must be awaited first!");
23642         }
23643         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_fees(this_ptr, val);
23644         // debug statements here
23645 }
23646         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
23647 /* @internal */
23648 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
23649         if(!isWasmInitialized) {
23650                 throw new Error("initializeWasm() must be awaited first!");
23651         }
23652         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update_message(this_ptr);
23653         return nativeResponseValue;
23654 }
23655         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
23656 /* @internal */
23657 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
23658         if(!isWasmInitialized) {
23659                 throw new Error("initializeWasm() must be awaited first!");
23660         }
23661         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update_message(this_ptr, val);
23662         // debug statements here
23663 }
23664         // 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);
23665 /* @internal */
23666 export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: bigint, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
23667         if(!isWasmInitialized) {
23668                 throw new Error("initializeWasm() must be awaited first!");
23669         }
23670         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);
23671         return nativeResponseValue;
23672 }
23673         // uintptr_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
23674 /* @internal */
23675 export function DirectionalChannelInfo_clone_ptr(arg: number): number {
23676         if(!isWasmInitialized) {
23677                 throw new Error("initializeWasm() must be awaited first!");
23678         }
23679         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone_ptr(arg);
23680         return nativeResponseValue;
23681 }
23682         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
23683 /* @internal */
23684 export function DirectionalChannelInfo_clone(orig: number): number {
23685         if(!isWasmInitialized) {
23686                 throw new Error("initializeWasm() must be awaited first!");
23687         }
23688         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone(orig);
23689         return nativeResponseValue;
23690 }
23691         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
23692 /* @internal */
23693 export function DirectionalChannelInfo_write(obj: number): number {
23694         if(!isWasmInitialized) {
23695                 throw new Error("initializeWasm() must be awaited first!");
23696         }
23697         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_write(obj);
23698         return nativeResponseValue;
23699 }
23700         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
23701 /* @internal */
23702 export function DirectionalChannelInfo_read(ser: number): number {
23703         if(!isWasmInitialized) {
23704                 throw new Error("initializeWasm() must be awaited first!");
23705         }
23706         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_read(ser);
23707         return nativeResponseValue;
23708 }
23709         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
23710 /* @internal */
23711 export function ChannelInfo_free(this_obj: number): void {
23712         if(!isWasmInitialized) {
23713                 throw new Error("initializeWasm() must be awaited first!");
23714         }
23715         const nativeResponseValue = wasm.TS_ChannelInfo_free(this_obj);
23716         // debug statements here
23717 }
23718         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23719 /* @internal */
23720 export function ChannelInfo_get_features(this_ptr: number): number {
23721         if(!isWasmInitialized) {
23722                 throw new Error("initializeWasm() must be awaited first!");
23723         }
23724         const nativeResponseValue = wasm.TS_ChannelInfo_get_features(this_ptr);
23725         return nativeResponseValue;
23726 }
23727         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
23728 /* @internal */
23729 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
23730         if(!isWasmInitialized) {
23731                 throw new Error("initializeWasm() must be awaited first!");
23732         }
23733         const nativeResponseValue = wasm.TS_ChannelInfo_set_features(this_ptr, val);
23734         // debug statements here
23735 }
23736         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23737 /* @internal */
23738 export function ChannelInfo_get_node_one(this_ptr: number): number {
23739         if(!isWasmInitialized) {
23740                 throw new Error("initializeWasm() must be awaited first!");
23741         }
23742         const nativeResponseValue = wasm.TS_ChannelInfo_get_node_one(this_ptr);
23743         return nativeResponseValue;
23744 }
23745         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
23746 /* @internal */
23747 export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
23748         if(!isWasmInitialized) {
23749                 throw new Error("initializeWasm() must be awaited first!");
23750         }
23751         const nativeResponseValue = wasm.TS_ChannelInfo_set_node_one(this_ptr, val);
23752         // debug statements here
23753 }
23754         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23755 /* @internal */
23756 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
23757         if(!isWasmInitialized) {
23758                 throw new Error("initializeWasm() must be awaited first!");
23759         }
23760         const nativeResponseValue = wasm.TS_ChannelInfo_get_one_to_two(this_ptr);
23761         return nativeResponseValue;
23762 }
23763         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
23764 /* @internal */
23765 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
23766         if(!isWasmInitialized) {
23767                 throw new Error("initializeWasm() must be awaited first!");
23768         }
23769         const nativeResponseValue = wasm.TS_ChannelInfo_set_one_to_two(this_ptr, val);
23770         // debug statements here
23771 }
23772         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23773 /* @internal */
23774 export function ChannelInfo_get_node_two(this_ptr: number): number {
23775         if(!isWasmInitialized) {
23776                 throw new Error("initializeWasm() must be awaited first!");
23777         }
23778         const nativeResponseValue = wasm.TS_ChannelInfo_get_node_two(this_ptr);
23779         return nativeResponseValue;
23780 }
23781         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
23782 /* @internal */
23783 export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
23784         if(!isWasmInitialized) {
23785                 throw new Error("initializeWasm() must be awaited first!");
23786         }
23787         const nativeResponseValue = wasm.TS_ChannelInfo_set_node_two(this_ptr, val);
23788         // debug statements here
23789 }
23790         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23791 /* @internal */
23792 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
23793         if(!isWasmInitialized) {
23794                 throw new Error("initializeWasm() must be awaited first!");
23795         }
23796         const nativeResponseValue = wasm.TS_ChannelInfo_get_two_to_one(this_ptr);
23797         return nativeResponseValue;
23798 }
23799         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
23800 /* @internal */
23801 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
23802         if(!isWasmInitialized) {
23803                 throw new Error("initializeWasm() must be awaited first!");
23804         }
23805         const nativeResponseValue = wasm.TS_ChannelInfo_set_two_to_one(this_ptr, val);
23806         // debug statements here
23807 }
23808         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23809 /* @internal */
23810 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
23811         if(!isWasmInitialized) {
23812                 throw new Error("initializeWasm() must be awaited first!");
23813         }
23814         const nativeResponseValue = wasm.TS_ChannelInfo_get_capacity_sats(this_ptr);
23815         return nativeResponseValue;
23816 }
23817         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
23818 /* @internal */
23819 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
23820         if(!isWasmInitialized) {
23821                 throw new Error("initializeWasm() must be awaited first!");
23822         }
23823         const nativeResponseValue = wasm.TS_ChannelInfo_set_capacity_sats(this_ptr, val);
23824         // debug statements here
23825 }
23826         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
23827 /* @internal */
23828 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
23829         if(!isWasmInitialized) {
23830                 throw new Error("initializeWasm() must be awaited first!");
23831         }
23832         const nativeResponseValue = wasm.TS_ChannelInfo_get_announcement_message(this_ptr);
23833         return nativeResponseValue;
23834 }
23835         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
23836 /* @internal */
23837 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
23838         if(!isWasmInitialized) {
23839                 throw new Error("initializeWasm() must be awaited first!");
23840         }
23841         const nativeResponseValue = wasm.TS_ChannelInfo_set_announcement_message(this_ptr, val);
23842         // debug statements here
23843 }
23844         // uintptr_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
23845 /* @internal */
23846 export function ChannelInfo_clone_ptr(arg: number): number {
23847         if(!isWasmInitialized) {
23848                 throw new Error("initializeWasm() must be awaited first!");
23849         }
23850         const nativeResponseValue = wasm.TS_ChannelInfo_clone_ptr(arg);
23851         return nativeResponseValue;
23852 }
23853         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
23854 /* @internal */
23855 export function ChannelInfo_clone(orig: number): number {
23856         if(!isWasmInitialized) {
23857                 throw new Error("initializeWasm() must be awaited first!");
23858         }
23859         const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
23860         return nativeResponseValue;
23861 }
23862         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
23863 /* @internal */
23864 export function ChannelInfo_write(obj: number): number {
23865         if(!isWasmInitialized) {
23866                 throw new Error("initializeWasm() must be awaited first!");
23867         }
23868         const nativeResponseValue = wasm.TS_ChannelInfo_write(obj);
23869         return nativeResponseValue;
23870 }
23871         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
23872 /* @internal */
23873 export function ChannelInfo_read(ser: number): number {
23874         if(!isWasmInitialized) {
23875                 throw new Error("initializeWasm() must be awaited first!");
23876         }
23877         const nativeResponseValue = wasm.TS_ChannelInfo_read(ser);
23878         return nativeResponseValue;
23879 }
23880         // void RoutingFees_free(struct LDKRoutingFees this_obj);
23881 /* @internal */
23882 export function RoutingFees_free(this_obj: number): void {
23883         if(!isWasmInitialized) {
23884                 throw new Error("initializeWasm() must be awaited first!");
23885         }
23886         const nativeResponseValue = wasm.TS_RoutingFees_free(this_obj);
23887         // debug statements here
23888 }
23889         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
23890 /* @internal */
23891 export function RoutingFees_get_base_msat(this_ptr: number): number {
23892         if(!isWasmInitialized) {
23893                 throw new Error("initializeWasm() must be awaited first!");
23894         }
23895         const nativeResponseValue = wasm.TS_RoutingFees_get_base_msat(this_ptr);
23896         return nativeResponseValue;
23897 }
23898         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
23899 /* @internal */
23900 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
23901         if(!isWasmInitialized) {
23902                 throw new Error("initializeWasm() must be awaited first!");
23903         }
23904         const nativeResponseValue = wasm.TS_RoutingFees_set_base_msat(this_ptr, val);
23905         // debug statements here
23906 }
23907         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
23908 /* @internal */
23909 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
23910         if(!isWasmInitialized) {
23911                 throw new Error("initializeWasm() must be awaited first!");
23912         }
23913         const nativeResponseValue = wasm.TS_RoutingFees_get_proportional_millionths(this_ptr);
23914         return nativeResponseValue;
23915 }
23916         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
23917 /* @internal */
23918 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
23919         if(!isWasmInitialized) {
23920                 throw new Error("initializeWasm() must be awaited first!");
23921         }
23922         const nativeResponseValue = wasm.TS_RoutingFees_set_proportional_millionths(this_ptr, val);
23923         // debug statements here
23924 }
23925         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
23926 /* @internal */
23927 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
23928         if(!isWasmInitialized) {
23929                 throw new Error("initializeWasm() must be awaited first!");
23930         }
23931         const nativeResponseValue = wasm.TS_RoutingFees_new(base_msat_arg, proportional_millionths_arg);
23932         return nativeResponseValue;
23933 }
23934         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
23935 /* @internal */
23936 export function RoutingFees_eq(a: number, b: number): boolean {
23937         if(!isWasmInitialized) {
23938                 throw new Error("initializeWasm() must be awaited first!");
23939         }
23940         const nativeResponseValue = wasm.TS_RoutingFees_eq(a, b);
23941         return nativeResponseValue;
23942 }
23943         // uintptr_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
23944 /* @internal */
23945 export function RoutingFees_clone_ptr(arg: number): number {
23946         if(!isWasmInitialized) {
23947                 throw new Error("initializeWasm() must be awaited first!");
23948         }
23949         const nativeResponseValue = wasm.TS_RoutingFees_clone_ptr(arg);
23950         return nativeResponseValue;
23951 }
23952         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
23953 /* @internal */
23954 export function RoutingFees_clone(orig: number): number {
23955         if(!isWasmInitialized) {
23956                 throw new Error("initializeWasm() must be awaited first!");
23957         }
23958         const nativeResponseValue = wasm.TS_RoutingFees_clone(orig);
23959         return nativeResponseValue;
23960 }
23961         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
23962 /* @internal */
23963 export function RoutingFees_hash(o: number): bigint {
23964         if(!isWasmInitialized) {
23965                 throw new Error("initializeWasm() must be awaited first!");
23966         }
23967         const nativeResponseValue = wasm.TS_RoutingFees_hash(o);
23968         return nativeResponseValue;
23969 }
23970         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
23971 /* @internal */
23972 export function RoutingFees_write(obj: number): number {
23973         if(!isWasmInitialized) {
23974                 throw new Error("initializeWasm() must be awaited first!");
23975         }
23976         const nativeResponseValue = wasm.TS_RoutingFees_write(obj);
23977         return nativeResponseValue;
23978 }
23979         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
23980 /* @internal */
23981 export function RoutingFees_read(ser: number): number {
23982         if(!isWasmInitialized) {
23983                 throw new Error("initializeWasm() must be awaited first!");
23984         }
23985         const nativeResponseValue = wasm.TS_RoutingFees_read(ser);
23986         return nativeResponseValue;
23987 }
23988         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
23989 /* @internal */
23990 export function NodeAnnouncementInfo_free(this_obj: number): void {
23991         if(!isWasmInitialized) {
23992                 throw new Error("initializeWasm() must be awaited first!");
23993         }
23994         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_free(this_obj);
23995         // debug statements here
23996 }
23997         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
23998 /* @internal */
23999 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
24000         if(!isWasmInitialized) {
24001                 throw new Error("initializeWasm() must be awaited first!");
24002         }
24003         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_features(this_ptr);
24004         return nativeResponseValue;
24005 }
24006         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
24007 /* @internal */
24008 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
24009         if(!isWasmInitialized) {
24010                 throw new Error("initializeWasm() must be awaited first!");
24011         }
24012         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_features(this_ptr, val);
24013         // debug statements here
24014 }
24015         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
24016 /* @internal */
24017 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
24018         if(!isWasmInitialized) {
24019                 throw new Error("initializeWasm() must be awaited first!");
24020         }
24021         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_last_update(this_ptr);
24022         return nativeResponseValue;
24023 }
24024         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
24025 /* @internal */
24026 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
24027         if(!isWasmInitialized) {
24028                 throw new Error("initializeWasm() must be awaited first!");
24029         }
24030         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_last_update(this_ptr, val);
24031         // debug statements here
24032 }
24033         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
24034 /* @internal */
24035 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): number {
24036         if(!isWasmInitialized) {
24037                 throw new Error("initializeWasm() must be awaited first!");
24038         }
24039         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_rgb(this_ptr);
24040         return nativeResponseValue;
24041 }
24042         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
24043 /* @internal */
24044 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: number): void {
24045         if(!isWasmInitialized) {
24046                 throw new Error("initializeWasm() must be awaited first!");
24047         }
24048         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_rgb(this_ptr, val);
24049         // debug statements here
24050 }
24051         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
24052 /* @internal */
24053 export function NodeAnnouncementInfo_get_alias(this_ptr: number): number {
24054         if(!isWasmInitialized) {
24055                 throw new Error("initializeWasm() must be awaited first!");
24056         }
24057         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_alias(this_ptr);
24058         return nativeResponseValue;
24059 }
24060         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
24061 /* @internal */
24062 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: number): void {
24063         if(!isWasmInitialized) {
24064                 throw new Error("initializeWasm() must be awaited first!");
24065         }
24066         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, val);
24067         // debug statements here
24068 }
24069         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
24070 /* @internal */
24071 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number): void {
24072         if(!isWasmInitialized) {
24073                 throw new Error("initializeWasm() must be awaited first!");
24074         }
24075         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_addresses(this_ptr, val);
24076         // debug statements here
24077 }
24078         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
24079 /* @internal */
24080 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
24081         if(!isWasmInitialized) {
24082                 throw new Error("initializeWasm() must be awaited first!");
24083         }
24084         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_announcement_message(this_ptr);
24085         return nativeResponseValue;
24086 }
24087         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
24088 /* @internal */
24089 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
24090         if(!isWasmInitialized) {
24091                 throw new Error("initializeWasm() must be awaited first!");
24092         }
24093         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
24094         // debug statements here
24095 }
24096         // 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);
24097 /* @internal */
24098 export function NodeAnnouncementInfo_new(features_arg: number, last_update_arg: number, rgb_arg: number, alias_arg: number, addresses_arg: number, announcement_message_arg: number): number {
24099         if(!isWasmInitialized) {
24100                 throw new Error("initializeWasm() must be awaited first!");
24101         }
24102         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_new(features_arg, last_update_arg, rgb_arg, alias_arg, addresses_arg, announcement_message_arg);
24103         return nativeResponseValue;
24104 }
24105         // uintptr_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
24106 /* @internal */
24107 export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
24108         if(!isWasmInitialized) {
24109                 throw new Error("initializeWasm() must be awaited first!");
24110         }
24111         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone_ptr(arg);
24112         return nativeResponseValue;
24113 }
24114         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
24115 /* @internal */
24116 export function NodeAnnouncementInfo_clone(orig: number): number {
24117         if(!isWasmInitialized) {
24118                 throw new Error("initializeWasm() must be awaited first!");
24119         }
24120         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
24121         return nativeResponseValue;
24122 }
24123         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
24124 /* @internal */
24125 export function NodeAnnouncementInfo_write(obj: number): number {
24126         if(!isWasmInitialized) {
24127                 throw new Error("initializeWasm() must be awaited first!");
24128         }
24129         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_write(obj);
24130         return nativeResponseValue;
24131 }
24132         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
24133 /* @internal */
24134 export function NodeAnnouncementInfo_read(ser: number): number {
24135         if(!isWasmInitialized) {
24136                 throw new Error("initializeWasm() must be awaited first!");
24137         }
24138         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_read(ser);
24139         return nativeResponseValue;
24140 }
24141         // void NodeInfo_free(struct LDKNodeInfo this_obj);
24142 /* @internal */
24143 export function NodeInfo_free(this_obj: number): void {
24144         if(!isWasmInitialized) {
24145                 throw new Error("initializeWasm() must be awaited first!");
24146         }
24147         const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
24148         // debug statements here
24149 }
24150         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
24151 /* @internal */
24152 export function NodeInfo_set_channels(this_ptr: number, val: number): void {
24153         if(!isWasmInitialized) {
24154                 throw new Error("initializeWasm() must be awaited first!");
24155         }
24156         const nativeResponseValue = wasm.TS_NodeInfo_set_channels(this_ptr, val);
24157         // debug statements here
24158 }
24159         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
24160 /* @internal */
24161 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
24162         if(!isWasmInitialized) {
24163                 throw new Error("initializeWasm() must be awaited first!");
24164         }
24165         const nativeResponseValue = wasm.TS_NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
24166         return nativeResponseValue;
24167 }
24168         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
24169 /* @internal */
24170 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
24171         if(!isWasmInitialized) {
24172                 throw new Error("initializeWasm() must be awaited first!");
24173         }
24174         const nativeResponseValue = wasm.TS_NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
24175         // debug statements here
24176 }
24177         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
24178 /* @internal */
24179 export function NodeInfo_get_announcement_info(this_ptr: number): number {
24180         if(!isWasmInitialized) {
24181                 throw new Error("initializeWasm() must be awaited first!");
24182         }
24183         const nativeResponseValue = wasm.TS_NodeInfo_get_announcement_info(this_ptr);
24184         return nativeResponseValue;
24185 }
24186         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
24187 /* @internal */
24188 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
24189         if(!isWasmInitialized) {
24190                 throw new Error("initializeWasm() must be awaited first!");
24191         }
24192         const nativeResponseValue = wasm.TS_NodeInfo_set_announcement_info(this_ptr, val);
24193         // debug statements here
24194 }
24195         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
24196 /* @internal */
24197 export function NodeInfo_new(channels_arg: number, lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
24198         if(!isWasmInitialized) {
24199                 throw new Error("initializeWasm() must be awaited first!");
24200         }
24201         const nativeResponseValue = wasm.TS_NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
24202         return nativeResponseValue;
24203 }
24204         // uintptr_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
24205 /* @internal */
24206 export function NodeInfo_clone_ptr(arg: number): number {
24207         if(!isWasmInitialized) {
24208                 throw new Error("initializeWasm() must be awaited first!");
24209         }
24210         const nativeResponseValue = wasm.TS_NodeInfo_clone_ptr(arg);
24211         return nativeResponseValue;
24212 }
24213         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
24214 /* @internal */
24215 export function NodeInfo_clone(orig: number): number {
24216         if(!isWasmInitialized) {
24217                 throw new Error("initializeWasm() must be awaited first!");
24218         }
24219         const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
24220         return nativeResponseValue;
24221 }
24222         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
24223 /* @internal */
24224 export function NodeInfo_write(obj: number): number {
24225         if(!isWasmInitialized) {
24226                 throw new Error("initializeWasm() must be awaited first!");
24227         }
24228         const nativeResponseValue = wasm.TS_NodeInfo_write(obj);
24229         return nativeResponseValue;
24230 }
24231         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
24232 /* @internal */
24233 export function NodeInfo_read(ser: number): number {
24234         if(!isWasmInitialized) {
24235                 throw new Error("initializeWasm() must be awaited first!");
24236         }
24237         const nativeResponseValue = wasm.TS_NodeInfo_read(ser);
24238         return nativeResponseValue;
24239 }
24240         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
24241 /* @internal */
24242 export function NetworkGraph_write(obj: number): number {
24243         if(!isWasmInitialized) {
24244                 throw new Error("initializeWasm() must be awaited first!");
24245         }
24246         const nativeResponseValue = wasm.TS_NetworkGraph_write(obj);
24247         return nativeResponseValue;
24248 }
24249         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
24250 /* @internal */
24251 export function NetworkGraph_read(ser: number): number {
24252         if(!isWasmInitialized) {
24253                 throw new Error("initializeWasm() must be awaited first!");
24254         }
24255         const nativeResponseValue = wasm.TS_NetworkGraph_read(ser);
24256         return nativeResponseValue;
24257 }
24258         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
24259 /* @internal */
24260 export function NetworkGraph_new(genesis_hash: number): number {
24261         if(!isWasmInitialized) {
24262                 throw new Error("initializeWasm() must be awaited first!");
24263         }
24264         const nativeResponseValue = wasm.TS_NetworkGraph_new(genesis_hash);
24265         return nativeResponseValue;
24266 }
24267         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
24268 /* @internal */
24269 export function NetworkGraph_read_only(this_arg: number): number {
24270         if(!isWasmInitialized) {
24271                 throw new Error("initializeWasm() must be awaited first!");
24272         }
24273         const nativeResponseValue = wasm.TS_NetworkGraph_read_only(this_arg);
24274         return nativeResponseValue;
24275 }
24276         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
24277 /* @internal */
24278 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
24279         if(!isWasmInitialized) {
24280                 throw new Error("initializeWasm() must be awaited first!");
24281         }
24282         const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_announcement(this_arg, msg);
24283         return nativeResponseValue;
24284 }
24285         // 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);
24286 /* @internal */
24287 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
24288         if(!isWasmInitialized) {
24289                 throw new Error("initializeWasm() must be awaited first!");
24290         }
24291         const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
24292         return nativeResponseValue;
24293 }
24294         // 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);
24295 /* @internal */
24296 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
24297         if(!isWasmInitialized) {
24298                 throw new Error("initializeWasm() must be awaited first!");
24299         }
24300         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
24301         return nativeResponseValue;
24302 }
24303         // 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);
24304 /* @internal */
24305 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
24306         if(!isWasmInitialized) {
24307                 throw new Error("initializeWasm() must be awaited first!");
24308         }
24309         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
24310         return nativeResponseValue;
24311 }
24312         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
24313 /* @internal */
24314 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: bigint, is_permanent: boolean): void {
24315         if(!isWasmInitialized) {
24316                 throw new Error("initializeWasm() must be awaited first!");
24317         }
24318         const nativeResponseValue = wasm.TS_NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
24319         // debug statements here
24320 }
24321         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
24322 /* @internal */
24323 export function NetworkGraph_fail_node(this_arg: number, _node_id: number, is_permanent: boolean): void {
24324         if(!isWasmInitialized) {
24325                 throw new Error("initializeWasm() must be awaited first!");
24326         }
24327         const nativeResponseValue = wasm.TS_NetworkGraph_fail_node(this_arg, _node_id, is_permanent);
24328         // debug statements here
24329 }
24330         // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
24331 /* @internal */
24332 export function NetworkGraph_remove_stale_channels_with_time(this_arg: number, current_time_unix: bigint): void {
24333         if(!isWasmInitialized) {
24334                 throw new Error("initializeWasm() must be awaited first!");
24335         }
24336         const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
24337         // debug statements here
24338 }
24339         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
24340 /* @internal */
24341 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
24342         if(!isWasmInitialized) {
24343                 throw new Error("initializeWasm() must be awaited first!");
24344         }
24345         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel(this_arg, msg);
24346         return nativeResponseValue;
24347 }
24348         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
24349 /* @internal */
24350 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
24351         if(!isWasmInitialized) {
24352                 throw new Error("initializeWasm() must be awaited first!");
24353         }
24354         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_unsigned(this_arg, msg);
24355         return nativeResponseValue;
24356 }
24357         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
24358 /* @internal */
24359 export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: number): number {
24360         if(!isWasmInitialized) {
24361                 throw new Error("initializeWasm() must be awaited first!");
24362         }
24363         const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_get_addresses(this_arg, pubkey);
24364         return nativeResponseValue;
24365 }
24366         // void RouteHop_free(struct LDKRouteHop this_obj);
24367 /* @internal */
24368 export function RouteHop_free(this_obj: number): void {
24369         if(!isWasmInitialized) {
24370                 throw new Error("initializeWasm() must be awaited first!");
24371         }
24372         const nativeResponseValue = wasm.TS_RouteHop_free(this_obj);
24373         // debug statements here
24374 }
24375         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
24376 /* @internal */
24377 export function RouteHop_get_pubkey(this_ptr: number): number {
24378         if(!isWasmInitialized) {
24379                 throw new Error("initializeWasm() must be awaited first!");
24380         }
24381         const nativeResponseValue = wasm.TS_RouteHop_get_pubkey(this_ptr);
24382         return nativeResponseValue;
24383 }
24384         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
24385 /* @internal */
24386 export function RouteHop_set_pubkey(this_ptr: number, val: number): void {
24387         if(!isWasmInitialized) {
24388                 throw new Error("initializeWasm() must be awaited first!");
24389         }
24390         const nativeResponseValue = wasm.TS_RouteHop_set_pubkey(this_ptr, val);
24391         // debug statements here
24392 }
24393         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
24394 /* @internal */
24395 export function RouteHop_get_node_features(this_ptr: number): number {
24396         if(!isWasmInitialized) {
24397                 throw new Error("initializeWasm() must be awaited first!");
24398         }
24399         const nativeResponseValue = wasm.TS_RouteHop_get_node_features(this_ptr);
24400         return nativeResponseValue;
24401 }
24402         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
24403 /* @internal */
24404 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
24405         if(!isWasmInitialized) {
24406                 throw new Error("initializeWasm() must be awaited first!");
24407         }
24408         const nativeResponseValue = wasm.TS_RouteHop_set_node_features(this_ptr, val);
24409         // debug statements here
24410 }
24411         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
24412 /* @internal */
24413 export function RouteHop_get_short_channel_id(this_ptr: number): bigint {
24414         if(!isWasmInitialized) {
24415                 throw new Error("initializeWasm() must be awaited first!");
24416         }
24417         const nativeResponseValue = wasm.TS_RouteHop_get_short_channel_id(this_ptr);
24418         return nativeResponseValue;
24419 }
24420         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
24421 /* @internal */
24422 export function RouteHop_set_short_channel_id(this_ptr: number, val: bigint): void {
24423         if(!isWasmInitialized) {
24424                 throw new Error("initializeWasm() must be awaited first!");
24425         }
24426         const nativeResponseValue = wasm.TS_RouteHop_set_short_channel_id(this_ptr, val);
24427         // debug statements here
24428 }
24429         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
24430 /* @internal */
24431 export function RouteHop_get_channel_features(this_ptr: number): number {
24432         if(!isWasmInitialized) {
24433                 throw new Error("initializeWasm() must be awaited first!");
24434         }
24435         const nativeResponseValue = wasm.TS_RouteHop_get_channel_features(this_ptr);
24436         return nativeResponseValue;
24437 }
24438         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
24439 /* @internal */
24440 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
24441         if(!isWasmInitialized) {
24442                 throw new Error("initializeWasm() must be awaited first!");
24443         }
24444         const nativeResponseValue = wasm.TS_RouteHop_set_channel_features(this_ptr, val);
24445         // debug statements here
24446 }
24447         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
24448 /* @internal */
24449 export function RouteHop_get_fee_msat(this_ptr: number): bigint {
24450         if(!isWasmInitialized) {
24451                 throw new Error("initializeWasm() must be awaited first!");
24452         }
24453         const nativeResponseValue = wasm.TS_RouteHop_get_fee_msat(this_ptr);
24454         return nativeResponseValue;
24455 }
24456         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
24457 /* @internal */
24458 export function RouteHop_set_fee_msat(this_ptr: number, val: bigint): void {
24459         if(!isWasmInitialized) {
24460                 throw new Error("initializeWasm() must be awaited first!");
24461         }
24462         const nativeResponseValue = wasm.TS_RouteHop_set_fee_msat(this_ptr, val);
24463         // debug statements here
24464 }
24465         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
24466 /* @internal */
24467 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
24468         if(!isWasmInitialized) {
24469                 throw new Error("initializeWasm() must be awaited first!");
24470         }
24471         const nativeResponseValue = wasm.TS_RouteHop_get_cltv_expiry_delta(this_ptr);
24472         return nativeResponseValue;
24473 }
24474         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
24475 /* @internal */
24476 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
24477         if(!isWasmInitialized) {
24478                 throw new Error("initializeWasm() must be awaited first!");
24479         }
24480         const nativeResponseValue = wasm.TS_RouteHop_set_cltv_expiry_delta(this_ptr, val);
24481         // debug statements here
24482 }
24483         // 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);
24484 /* @internal */
24485 export function RouteHop_new(pubkey_arg: number, node_features_arg: number, short_channel_id_arg: bigint, channel_features_arg: number, fee_msat_arg: bigint, cltv_expiry_delta_arg: number): number {
24486         if(!isWasmInitialized) {
24487                 throw new Error("initializeWasm() must be awaited first!");
24488         }
24489         const nativeResponseValue = wasm.TS_RouteHop_new(pubkey_arg, node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
24490         return nativeResponseValue;
24491 }
24492         // uintptr_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
24493 /* @internal */
24494 export function RouteHop_clone_ptr(arg: number): number {
24495         if(!isWasmInitialized) {
24496                 throw new Error("initializeWasm() must be awaited first!");
24497         }
24498         const nativeResponseValue = wasm.TS_RouteHop_clone_ptr(arg);
24499         return nativeResponseValue;
24500 }
24501         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
24502 /* @internal */
24503 export function RouteHop_clone(orig: number): number {
24504         if(!isWasmInitialized) {
24505                 throw new Error("initializeWasm() must be awaited first!");
24506         }
24507         const nativeResponseValue = wasm.TS_RouteHop_clone(orig);
24508         return nativeResponseValue;
24509 }
24510         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
24511 /* @internal */
24512 export function RouteHop_hash(o: number): bigint {
24513         if(!isWasmInitialized) {
24514                 throw new Error("initializeWasm() must be awaited first!");
24515         }
24516         const nativeResponseValue = wasm.TS_RouteHop_hash(o);
24517         return nativeResponseValue;
24518 }
24519         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
24520 /* @internal */
24521 export function RouteHop_eq(a: number, b: number): boolean {
24522         if(!isWasmInitialized) {
24523                 throw new Error("initializeWasm() must be awaited first!");
24524         }
24525         const nativeResponseValue = wasm.TS_RouteHop_eq(a, b);
24526         return nativeResponseValue;
24527 }
24528         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
24529 /* @internal */
24530 export function RouteHop_write(obj: number): number {
24531         if(!isWasmInitialized) {
24532                 throw new Error("initializeWasm() must be awaited first!");
24533         }
24534         const nativeResponseValue = wasm.TS_RouteHop_write(obj);
24535         return nativeResponseValue;
24536 }
24537         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
24538 /* @internal */
24539 export function RouteHop_read(ser: number): number {
24540         if(!isWasmInitialized) {
24541                 throw new Error("initializeWasm() must be awaited first!");
24542         }
24543         const nativeResponseValue = wasm.TS_RouteHop_read(ser);
24544         return nativeResponseValue;
24545 }
24546         // void Route_free(struct LDKRoute this_obj);
24547 /* @internal */
24548 export function Route_free(this_obj: number): void {
24549         if(!isWasmInitialized) {
24550                 throw new Error("initializeWasm() must be awaited first!");
24551         }
24552         const nativeResponseValue = wasm.TS_Route_free(this_obj);
24553         // debug statements here
24554 }
24555         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
24556 /* @internal */
24557 export function Route_get_paths(this_ptr: number): number {
24558         if(!isWasmInitialized) {
24559                 throw new Error("initializeWasm() must be awaited first!");
24560         }
24561         const nativeResponseValue = wasm.TS_Route_get_paths(this_ptr);
24562         return nativeResponseValue;
24563 }
24564         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
24565 /* @internal */
24566 export function Route_set_paths(this_ptr: number, val: number): void {
24567         if(!isWasmInitialized) {
24568                 throw new Error("initializeWasm() must be awaited first!");
24569         }
24570         const nativeResponseValue = wasm.TS_Route_set_paths(this_ptr, val);
24571         // debug statements here
24572 }
24573         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
24574 /* @internal */
24575 export function Route_get_payee(this_ptr: number): number {
24576         if(!isWasmInitialized) {
24577                 throw new Error("initializeWasm() must be awaited first!");
24578         }
24579         const nativeResponseValue = wasm.TS_Route_get_payee(this_ptr);
24580         return nativeResponseValue;
24581 }
24582         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
24583 /* @internal */
24584 export function Route_set_payee(this_ptr: number, val: number): void {
24585         if(!isWasmInitialized) {
24586                 throw new Error("initializeWasm() must be awaited first!");
24587         }
24588         const nativeResponseValue = wasm.TS_Route_set_payee(this_ptr, val);
24589         // debug statements here
24590 }
24591         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
24592 /* @internal */
24593 export function Route_new(paths_arg: number, payee_arg: number): number {
24594         if(!isWasmInitialized) {
24595                 throw new Error("initializeWasm() must be awaited first!");
24596         }
24597         const nativeResponseValue = wasm.TS_Route_new(paths_arg, payee_arg);
24598         return nativeResponseValue;
24599 }
24600         // uintptr_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
24601 /* @internal */
24602 export function Route_clone_ptr(arg: number): number {
24603         if(!isWasmInitialized) {
24604                 throw new Error("initializeWasm() must be awaited first!");
24605         }
24606         const nativeResponseValue = wasm.TS_Route_clone_ptr(arg);
24607         return nativeResponseValue;
24608 }
24609         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
24610 /* @internal */
24611 export function Route_clone(orig: number): number {
24612         if(!isWasmInitialized) {
24613                 throw new Error("initializeWasm() must be awaited first!");
24614         }
24615         const nativeResponseValue = wasm.TS_Route_clone(orig);
24616         return nativeResponseValue;
24617 }
24618         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
24619 /* @internal */
24620 export function Route_hash(o: number): bigint {
24621         if(!isWasmInitialized) {
24622                 throw new Error("initializeWasm() must be awaited first!");
24623         }
24624         const nativeResponseValue = wasm.TS_Route_hash(o);
24625         return nativeResponseValue;
24626 }
24627         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
24628 /* @internal */
24629 export function Route_eq(a: number, b: number): boolean {
24630         if(!isWasmInitialized) {
24631                 throw new Error("initializeWasm() must be awaited first!");
24632         }
24633         const nativeResponseValue = wasm.TS_Route_eq(a, b);
24634         return nativeResponseValue;
24635 }
24636         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
24637 /* @internal */
24638 export function Route_get_total_fees(this_arg: number): bigint {
24639         if(!isWasmInitialized) {
24640                 throw new Error("initializeWasm() must be awaited first!");
24641         }
24642         const nativeResponseValue = wasm.TS_Route_get_total_fees(this_arg);
24643         return nativeResponseValue;
24644 }
24645         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
24646 /* @internal */
24647 export function Route_get_total_amount(this_arg: number): bigint {
24648         if(!isWasmInitialized) {
24649                 throw new Error("initializeWasm() must be awaited first!");
24650         }
24651         const nativeResponseValue = wasm.TS_Route_get_total_amount(this_arg);
24652         return nativeResponseValue;
24653 }
24654         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
24655 /* @internal */
24656 export function Route_write(obj: number): number {
24657         if(!isWasmInitialized) {
24658                 throw new Error("initializeWasm() must be awaited first!");
24659         }
24660         const nativeResponseValue = wasm.TS_Route_write(obj);
24661         return nativeResponseValue;
24662 }
24663         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
24664 /* @internal */
24665 export function Route_read(ser: number): number {
24666         if(!isWasmInitialized) {
24667                 throw new Error("initializeWasm() must be awaited first!");
24668         }
24669         const nativeResponseValue = wasm.TS_Route_read(ser);
24670         return nativeResponseValue;
24671 }
24672         // void RouteParameters_free(struct LDKRouteParameters this_obj);
24673 /* @internal */
24674 export function RouteParameters_free(this_obj: number): void {
24675         if(!isWasmInitialized) {
24676                 throw new Error("initializeWasm() must be awaited first!");
24677         }
24678         const nativeResponseValue = wasm.TS_RouteParameters_free(this_obj);
24679         // debug statements here
24680 }
24681         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
24682 /* @internal */
24683 export function RouteParameters_get_payee(this_ptr: number): number {
24684         if(!isWasmInitialized) {
24685                 throw new Error("initializeWasm() must be awaited first!");
24686         }
24687         const nativeResponseValue = wasm.TS_RouteParameters_get_payee(this_ptr);
24688         return nativeResponseValue;
24689 }
24690         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
24691 /* @internal */
24692 export function RouteParameters_set_payee(this_ptr: number, val: number): void {
24693         if(!isWasmInitialized) {
24694                 throw new Error("initializeWasm() must be awaited first!");
24695         }
24696         const nativeResponseValue = wasm.TS_RouteParameters_set_payee(this_ptr, val);
24697         // debug statements here
24698 }
24699         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
24700 /* @internal */
24701 export function RouteParameters_get_final_value_msat(this_ptr: number): bigint {
24702         if(!isWasmInitialized) {
24703                 throw new Error("initializeWasm() must be awaited first!");
24704         }
24705         const nativeResponseValue = wasm.TS_RouteParameters_get_final_value_msat(this_ptr);
24706         return nativeResponseValue;
24707 }
24708         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
24709 /* @internal */
24710 export function RouteParameters_set_final_value_msat(this_ptr: number, val: bigint): void {
24711         if(!isWasmInitialized) {
24712                 throw new Error("initializeWasm() must be awaited first!");
24713         }
24714         const nativeResponseValue = wasm.TS_RouteParameters_set_final_value_msat(this_ptr, val);
24715         // debug statements here
24716 }
24717         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
24718 /* @internal */
24719 export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
24720         if(!isWasmInitialized) {
24721                 throw new Error("initializeWasm() must be awaited first!");
24722         }
24723         const nativeResponseValue = wasm.TS_RouteParameters_get_final_cltv_expiry_delta(this_ptr);
24724         return nativeResponseValue;
24725 }
24726         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
24727 /* @internal */
24728 export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
24729         if(!isWasmInitialized) {
24730                 throw new Error("initializeWasm() must be awaited first!");
24731         }
24732         const nativeResponseValue = wasm.TS_RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
24733         // debug statements here
24734 }
24735         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
24736 /* @internal */
24737 export function RouteParameters_new(payee_arg: number, final_value_msat_arg: bigint, final_cltv_expiry_delta_arg: number): number {
24738         if(!isWasmInitialized) {
24739                 throw new Error("initializeWasm() must be awaited first!");
24740         }
24741         const nativeResponseValue = wasm.TS_RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
24742         return nativeResponseValue;
24743 }
24744         // uintptr_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
24745 /* @internal */
24746 export function RouteParameters_clone_ptr(arg: number): number {
24747         if(!isWasmInitialized) {
24748                 throw new Error("initializeWasm() must be awaited first!");
24749         }
24750         const nativeResponseValue = wasm.TS_RouteParameters_clone_ptr(arg);
24751         return nativeResponseValue;
24752 }
24753         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
24754 /* @internal */
24755 export function RouteParameters_clone(orig: number): number {
24756         if(!isWasmInitialized) {
24757                 throw new Error("initializeWasm() must be awaited first!");
24758         }
24759         const nativeResponseValue = wasm.TS_RouteParameters_clone(orig);
24760         return nativeResponseValue;
24761 }
24762         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
24763 /* @internal */
24764 export function RouteParameters_write(obj: number): number {
24765         if(!isWasmInitialized) {
24766                 throw new Error("initializeWasm() must be awaited first!");
24767         }
24768         const nativeResponseValue = wasm.TS_RouteParameters_write(obj);
24769         return nativeResponseValue;
24770 }
24771         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
24772 /* @internal */
24773 export function RouteParameters_read(ser: number): number {
24774         if(!isWasmInitialized) {
24775                 throw new Error("initializeWasm() must be awaited first!");
24776         }
24777         const nativeResponseValue = wasm.TS_RouteParameters_read(ser);
24778         return nativeResponseValue;
24779 }
24780         // void Payee_free(struct LDKPayee this_obj);
24781 /* @internal */
24782 export function Payee_free(this_obj: number): void {
24783         if(!isWasmInitialized) {
24784                 throw new Error("initializeWasm() must be awaited first!");
24785         }
24786         const nativeResponseValue = wasm.TS_Payee_free(this_obj);
24787         // debug statements here
24788 }
24789         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
24790 /* @internal */
24791 export function Payee_get_pubkey(this_ptr: number): number {
24792         if(!isWasmInitialized) {
24793                 throw new Error("initializeWasm() must be awaited first!");
24794         }
24795         const nativeResponseValue = wasm.TS_Payee_get_pubkey(this_ptr);
24796         return nativeResponseValue;
24797 }
24798         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
24799 /* @internal */
24800 export function Payee_set_pubkey(this_ptr: number, val: number): void {
24801         if(!isWasmInitialized) {
24802                 throw new Error("initializeWasm() must be awaited first!");
24803         }
24804         const nativeResponseValue = wasm.TS_Payee_set_pubkey(this_ptr, val);
24805         // debug statements here
24806 }
24807         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
24808 /* @internal */
24809 export function Payee_get_features(this_ptr: number): number {
24810         if(!isWasmInitialized) {
24811                 throw new Error("initializeWasm() must be awaited first!");
24812         }
24813         const nativeResponseValue = wasm.TS_Payee_get_features(this_ptr);
24814         return nativeResponseValue;
24815 }
24816         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
24817 /* @internal */
24818 export function Payee_set_features(this_ptr: number, val: number): void {
24819         if(!isWasmInitialized) {
24820                 throw new Error("initializeWasm() must be awaited first!");
24821         }
24822         const nativeResponseValue = wasm.TS_Payee_set_features(this_ptr, val);
24823         // debug statements here
24824 }
24825         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
24826 /* @internal */
24827 export function Payee_get_route_hints(this_ptr: number): number {
24828         if(!isWasmInitialized) {
24829                 throw new Error("initializeWasm() must be awaited first!");
24830         }
24831         const nativeResponseValue = wasm.TS_Payee_get_route_hints(this_ptr);
24832         return nativeResponseValue;
24833 }
24834         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
24835 /* @internal */
24836 export function Payee_set_route_hints(this_ptr: number, val: number): void {
24837         if(!isWasmInitialized) {
24838                 throw new Error("initializeWasm() must be awaited first!");
24839         }
24840         const nativeResponseValue = wasm.TS_Payee_set_route_hints(this_ptr, val);
24841         // debug statements here
24842 }
24843         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
24844 /* @internal */
24845 export function Payee_get_expiry_time(this_ptr: number): number {
24846         if(!isWasmInitialized) {
24847                 throw new Error("initializeWasm() must be awaited first!");
24848         }
24849         const nativeResponseValue = wasm.TS_Payee_get_expiry_time(this_ptr);
24850         return nativeResponseValue;
24851 }
24852         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
24853 /* @internal */
24854 export function Payee_set_expiry_time(this_ptr: number, val: number): void {
24855         if(!isWasmInitialized) {
24856                 throw new Error("initializeWasm() must be awaited first!");
24857         }
24858         const nativeResponseValue = wasm.TS_Payee_set_expiry_time(this_ptr, val);
24859         // debug statements here
24860 }
24861         // 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);
24862 /* @internal */
24863 export function Payee_new(pubkey_arg: number, features_arg: number, route_hints_arg: number, expiry_time_arg: number): number {
24864         if(!isWasmInitialized) {
24865                 throw new Error("initializeWasm() must be awaited first!");
24866         }
24867         const nativeResponseValue = wasm.TS_Payee_new(pubkey_arg, features_arg, route_hints_arg, expiry_time_arg);
24868         return nativeResponseValue;
24869 }
24870         // uintptr_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
24871 /* @internal */
24872 export function Payee_clone_ptr(arg: number): number {
24873         if(!isWasmInitialized) {
24874                 throw new Error("initializeWasm() must be awaited first!");
24875         }
24876         const nativeResponseValue = wasm.TS_Payee_clone_ptr(arg);
24877         return nativeResponseValue;
24878 }
24879         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
24880 /* @internal */
24881 export function Payee_clone(orig: number): number {
24882         if(!isWasmInitialized) {
24883                 throw new Error("initializeWasm() must be awaited first!");
24884         }
24885         const nativeResponseValue = wasm.TS_Payee_clone(orig);
24886         return nativeResponseValue;
24887 }
24888         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
24889 /* @internal */
24890 export function Payee_hash(o: number): bigint {
24891         if(!isWasmInitialized) {
24892                 throw new Error("initializeWasm() must be awaited first!");
24893         }
24894         const nativeResponseValue = wasm.TS_Payee_hash(o);
24895         return nativeResponseValue;
24896 }
24897         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
24898 /* @internal */
24899 export function Payee_eq(a: number, b: number): boolean {
24900         if(!isWasmInitialized) {
24901                 throw new Error("initializeWasm() must be awaited first!");
24902         }
24903         const nativeResponseValue = wasm.TS_Payee_eq(a, b);
24904         return nativeResponseValue;
24905 }
24906         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
24907 /* @internal */
24908 export function Payee_write(obj: number): number {
24909         if(!isWasmInitialized) {
24910                 throw new Error("initializeWasm() must be awaited first!");
24911         }
24912         const nativeResponseValue = wasm.TS_Payee_write(obj);
24913         return nativeResponseValue;
24914 }
24915         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
24916 /* @internal */
24917 export function Payee_read(ser: number): number {
24918         if(!isWasmInitialized) {
24919                 throw new Error("initializeWasm() must be awaited first!");
24920         }
24921         const nativeResponseValue = wasm.TS_Payee_read(ser);
24922         return nativeResponseValue;
24923 }
24924         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
24925 /* @internal */
24926 export function Payee_from_node_id(pubkey: number): number {
24927         if(!isWasmInitialized) {
24928                 throw new Error("initializeWasm() must be awaited first!");
24929         }
24930         const nativeResponseValue = wasm.TS_Payee_from_node_id(pubkey);
24931         return nativeResponseValue;
24932 }
24933         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
24934 /* @internal */
24935 export function Payee_for_keysend(pubkey: number): number {
24936         if(!isWasmInitialized) {
24937                 throw new Error("initializeWasm() must be awaited first!");
24938         }
24939         const nativeResponseValue = wasm.TS_Payee_for_keysend(pubkey);
24940         return nativeResponseValue;
24941 }
24942         // void RouteHint_free(struct LDKRouteHint this_obj);
24943 /* @internal */
24944 export function RouteHint_free(this_obj: number): void {
24945         if(!isWasmInitialized) {
24946                 throw new Error("initializeWasm() must be awaited first!");
24947         }
24948         const nativeResponseValue = wasm.TS_RouteHint_free(this_obj);
24949         // debug statements here
24950 }
24951         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
24952 /* @internal */
24953 export function RouteHint_get_a(this_ptr: number): number {
24954         if(!isWasmInitialized) {
24955                 throw new Error("initializeWasm() must be awaited first!");
24956         }
24957         const nativeResponseValue = wasm.TS_RouteHint_get_a(this_ptr);
24958         return nativeResponseValue;
24959 }
24960         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
24961 /* @internal */
24962 export function RouteHint_set_a(this_ptr: number, val: number): void {
24963         if(!isWasmInitialized) {
24964                 throw new Error("initializeWasm() must be awaited first!");
24965         }
24966         const nativeResponseValue = wasm.TS_RouteHint_set_a(this_ptr, val);
24967         // debug statements here
24968 }
24969         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
24970 /* @internal */
24971 export function RouteHint_new(a_arg: number): number {
24972         if(!isWasmInitialized) {
24973                 throw new Error("initializeWasm() must be awaited first!");
24974         }
24975         const nativeResponseValue = wasm.TS_RouteHint_new(a_arg);
24976         return nativeResponseValue;
24977 }
24978         // uintptr_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
24979 /* @internal */
24980 export function RouteHint_clone_ptr(arg: number): number {
24981         if(!isWasmInitialized) {
24982                 throw new Error("initializeWasm() must be awaited first!");
24983         }
24984         const nativeResponseValue = wasm.TS_RouteHint_clone_ptr(arg);
24985         return nativeResponseValue;
24986 }
24987         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
24988 /* @internal */
24989 export function RouteHint_clone(orig: number): number {
24990         if(!isWasmInitialized) {
24991                 throw new Error("initializeWasm() must be awaited first!");
24992         }
24993         const nativeResponseValue = wasm.TS_RouteHint_clone(orig);
24994         return nativeResponseValue;
24995 }
24996         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
24997 /* @internal */
24998 export function RouteHint_hash(o: number): bigint {
24999         if(!isWasmInitialized) {
25000                 throw new Error("initializeWasm() must be awaited first!");
25001         }
25002         const nativeResponseValue = wasm.TS_RouteHint_hash(o);
25003         return nativeResponseValue;
25004 }
25005         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
25006 /* @internal */
25007 export function RouteHint_eq(a: number, b: number): boolean {
25008         if(!isWasmInitialized) {
25009                 throw new Error("initializeWasm() must be awaited first!");
25010         }
25011         const nativeResponseValue = wasm.TS_RouteHint_eq(a, b);
25012         return nativeResponseValue;
25013 }
25014         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
25015 /* @internal */
25016 export function RouteHint_write(obj: number): number {
25017         if(!isWasmInitialized) {
25018                 throw new Error("initializeWasm() must be awaited first!");
25019         }
25020         const nativeResponseValue = wasm.TS_RouteHint_write(obj);
25021         return nativeResponseValue;
25022 }
25023         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
25024 /* @internal */
25025 export function RouteHint_read(ser: number): number {
25026         if(!isWasmInitialized) {
25027                 throw new Error("initializeWasm() must be awaited first!");
25028         }
25029         const nativeResponseValue = wasm.TS_RouteHint_read(ser);
25030         return nativeResponseValue;
25031 }
25032         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
25033 /* @internal */
25034 export function RouteHintHop_free(this_obj: number): void {
25035         if(!isWasmInitialized) {
25036                 throw new Error("initializeWasm() must be awaited first!");
25037         }
25038         const nativeResponseValue = wasm.TS_RouteHintHop_free(this_obj);
25039         // debug statements here
25040 }
25041         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
25042 /* @internal */
25043 export function RouteHintHop_get_src_node_id(this_ptr: number): number {
25044         if(!isWasmInitialized) {
25045                 throw new Error("initializeWasm() must be awaited first!");
25046         }
25047         const nativeResponseValue = wasm.TS_RouteHintHop_get_src_node_id(this_ptr);
25048         return nativeResponseValue;
25049 }
25050         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
25051 /* @internal */
25052 export function RouteHintHop_set_src_node_id(this_ptr: number, val: number): void {
25053         if(!isWasmInitialized) {
25054                 throw new Error("initializeWasm() must be awaited first!");
25055         }
25056         const nativeResponseValue = wasm.TS_RouteHintHop_set_src_node_id(this_ptr, val);
25057         // debug statements here
25058 }
25059         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
25060 /* @internal */
25061 export function RouteHintHop_get_short_channel_id(this_ptr: number): bigint {
25062         if(!isWasmInitialized) {
25063                 throw new Error("initializeWasm() must be awaited first!");
25064         }
25065         const nativeResponseValue = wasm.TS_RouteHintHop_get_short_channel_id(this_ptr);
25066         return nativeResponseValue;
25067 }
25068         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
25069 /* @internal */
25070 export function RouteHintHop_set_short_channel_id(this_ptr: number, val: bigint): void {
25071         if(!isWasmInitialized) {
25072                 throw new Error("initializeWasm() must be awaited first!");
25073         }
25074         const nativeResponseValue = wasm.TS_RouteHintHop_set_short_channel_id(this_ptr, val);
25075         // debug statements here
25076 }
25077         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
25078 /* @internal */
25079 export function RouteHintHop_get_fees(this_ptr: number): number {
25080         if(!isWasmInitialized) {
25081                 throw new Error("initializeWasm() must be awaited first!");
25082         }
25083         const nativeResponseValue = wasm.TS_RouteHintHop_get_fees(this_ptr);
25084         return nativeResponseValue;
25085 }
25086         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
25087 /* @internal */
25088 export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
25089         if(!isWasmInitialized) {
25090                 throw new Error("initializeWasm() must be awaited first!");
25091         }
25092         const nativeResponseValue = wasm.TS_RouteHintHop_set_fees(this_ptr, val);
25093         // debug statements here
25094 }
25095         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
25096 /* @internal */
25097 export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
25098         if(!isWasmInitialized) {
25099                 throw new Error("initializeWasm() must be awaited first!");
25100         }
25101         const nativeResponseValue = wasm.TS_RouteHintHop_get_cltv_expiry_delta(this_ptr);
25102         return nativeResponseValue;
25103 }
25104         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
25105 /* @internal */
25106 export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
25107         if(!isWasmInitialized) {
25108                 throw new Error("initializeWasm() must be awaited first!");
25109         }
25110         const nativeResponseValue = wasm.TS_RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
25111         // debug statements here
25112 }
25113         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
25114 /* @internal */
25115 export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
25116         if(!isWasmInitialized) {
25117                 throw new Error("initializeWasm() must be awaited first!");
25118         }
25119         const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_minimum_msat(this_ptr);
25120         return nativeResponseValue;
25121 }
25122         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
25123 /* @internal */
25124 export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
25125         if(!isWasmInitialized) {
25126                 throw new Error("initializeWasm() must be awaited first!");
25127         }
25128         const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
25129         // debug statements here
25130 }
25131         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
25132 /* @internal */
25133 export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
25134         if(!isWasmInitialized) {
25135                 throw new Error("initializeWasm() must be awaited first!");
25136         }
25137         const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_maximum_msat(this_ptr);
25138         return nativeResponseValue;
25139 }
25140         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
25141 /* @internal */
25142 export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
25143         if(!isWasmInitialized) {
25144                 throw new Error("initializeWasm() must be awaited first!");
25145         }
25146         const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
25147         // debug statements here
25148 }
25149         // 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);
25150 /* @internal */
25151 export function RouteHintHop_new(src_node_id_arg: number, short_channel_id_arg: bigint, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
25152         if(!isWasmInitialized) {
25153                 throw new Error("initializeWasm() must be awaited first!");
25154         }
25155         const nativeResponseValue = wasm.TS_RouteHintHop_new(src_node_id_arg, short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
25156         return nativeResponseValue;
25157 }
25158         // uintptr_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
25159 /* @internal */
25160 export function RouteHintHop_clone_ptr(arg: number): number {
25161         if(!isWasmInitialized) {
25162                 throw new Error("initializeWasm() must be awaited first!");
25163         }
25164         const nativeResponseValue = wasm.TS_RouteHintHop_clone_ptr(arg);
25165         return nativeResponseValue;
25166 }
25167         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
25168 /* @internal */
25169 export function RouteHintHop_clone(orig: number): number {
25170         if(!isWasmInitialized) {
25171                 throw new Error("initializeWasm() must be awaited first!");
25172         }
25173         const nativeResponseValue = wasm.TS_RouteHintHop_clone(orig);
25174         return nativeResponseValue;
25175 }
25176         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
25177 /* @internal */
25178 export function RouteHintHop_hash(o: number): bigint {
25179         if(!isWasmInitialized) {
25180                 throw new Error("initializeWasm() must be awaited first!");
25181         }
25182         const nativeResponseValue = wasm.TS_RouteHintHop_hash(o);
25183         return nativeResponseValue;
25184 }
25185         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
25186 /* @internal */
25187 export function RouteHintHop_eq(a: number, b: number): boolean {
25188         if(!isWasmInitialized) {
25189                 throw new Error("initializeWasm() must be awaited first!");
25190         }
25191         const nativeResponseValue = wasm.TS_RouteHintHop_eq(a, b);
25192         return nativeResponseValue;
25193 }
25194         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
25195 /* @internal */
25196 export function RouteHintHop_write(obj: number): number {
25197         if(!isWasmInitialized) {
25198                 throw new Error("initializeWasm() must be awaited first!");
25199         }
25200         const nativeResponseValue = wasm.TS_RouteHintHop_write(obj);
25201         return nativeResponseValue;
25202 }
25203         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
25204 /* @internal */
25205 export function RouteHintHop_read(ser: number): number {
25206         if(!isWasmInitialized) {
25207                 throw new Error("initializeWasm() must be awaited first!");
25208         }
25209         const nativeResponseValue = wasm.TS_RouteHintHop_read(ser);
25210         return nativeResponseValue;
25211 }
25212         // 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);
25213 /* @internal */
25214 export function find_route(our_node_pubkey: number, params: number, network: number, first_hops: number, logger: number, scorer: number): number {
25215         if(!isWasmInitialized) {
25216                 throw new Error("initializeWasm() must be awaited first!");
25217         }
25218         const nativeResponseValue = wasm.TS_find_route(our_node_pubkey, params, network, first_hops, logger, scorer);
25219         return nativeResponseValue;
25220 }
25221         // void Score_free(struct LDKScore this_ptr);
25222 /* @internal */
25223 export function Score_free(this_ptr: number): void {
25224         if(!isWasmInitialized) {
25225                 throw new Error("initializeWasm() must be awaited first!");
25226         }
25227         const nativeResponseValue = wasm.TS_Score_free(this_ptr);
25228         // debug statements here
25229 }
25230         // void LockableScore_free(struct LDKLockableScore this_ptr);
25231 /* @internal */
25232 export function LockableScore_free(this_ptr: number): void {
25233         if(!isWasmInitialized) {
25234                 throw new Error("initializeWasm() must be awaited first!");
25235         }
25236         const nativeResponseValue = wasm.TS_LockableScore_free(this_ptr);
25237         // debug statements here
25238 }
25239         // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
25240 /* @internal */
25241 export function MultiThreadedLockableScore_free(this_obj: number): void {
25242         if(!isWasmInitialized) {
25243                 throw new Error("initializeWasm() must be awaited first!");
25244         }
25245         const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_free(this_obj);
25246         // debug statements here
25247 }
25248         // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
25249 /* @internal */
25250 export function MultiThreadedLockableScore_new(score: number): number {
25251         if(!isWasmInitialized) {
25252                 throw new Error("initializeWasm() must be awaited first!");
25253         }
25254         const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_new(score);
25255         return nativeResponseValue;
25256 }
25257         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
25258 /* @internal */
25259 export function ScoringParameters_free(this_obj: number): void {
25260         if(!isWasmInitialized) {
25261                 throw new Error("initializeWasm() must be awaited first!");
25262         }
25263         const nativeResponseValue = wasm.TS_ScoringParameters_free(this_obj);
25264         // debug statements here
25265 }
25266         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
25267 /* @internal */
25268 export function ScoringParameters_get_base_penalty_msat(this_ptr: number): bigint {
25269         if(!isWasmInitialized) {
25270                 throw new Error("initializeWasm() must be awaited first!");
25271         }
25272         const nativeResponseValue = wasm.TS_ScoringParameters_get_base_penalty_msat(this_ptr);
25273         return nativeResponseValue;
25274 }
25275         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
25276 /* @internal */
25277 export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: bigint): void {
25278         if(!isWasmInitialized) {
25279                 throw new Error("initializeWasm() must be awaited first!");
25280         }
25281         const nativeResponseValue = wasm.TS_ScoringParameters_set_base_penalty_msat(this_ptr, val);
25282         // debug statements here
25283 }
25284         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
25285 /* @internal */
25286 export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): bigint {
25287         if(!isWasmInitialized) {
25288                 throw new Error("initializeWasm() must be awaited first!");
25289         }
25290         const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_msat(this_ptr);
25291         return nativeResponseValue;
25292 }
25293         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
25294 /* @internal */
25295 export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: bigint): void {
25296         if(!isWasmInitialized) {
25297                 throw new Error("initializeWasm() must be awaited first!");
25298         }
25299         const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_msat(this_ptr, val);
25300         // debug statements here
25301 }
25302         // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
25303 /* @internal */
25304 export function ScoringParameters_get_overuse_penalty_start_1024th(this_ptr: number): number {
25305         if(!isWasmInitialized) {
25306                 throw new Error("initializeWasm() must be awaited first!");
25307         }
25308         const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_start_1024th(this_ptr);
25309         return nativeResponseValue;
25310 }
25311         // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
25312 /* @internal */
25313 export function ScoringParameters_set_overuse_penalty_start_1024th(this_ptr: number, val: number): void {
25314         if(!isWasmInitialized) {
25315                 throw new Error("initializeWasm() must be awaited first!");
25316         }
25317         const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_start_1024th(this_ptr, val);
25318         // debug statements here
25319 }
25320         // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
25321 /* @internal */
25322 export function ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr: number): bigint {
25323         if(!isWasmInitialized) {
25324                 throw new Error("initializeWasm() must be awaited first!");
25325         }
25326         const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr);
25327         return nativeResponseValue;
25328 }
25329         // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
25330 /* @internal */
25331 export function ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr: number, val: bigint): void {
25332         if(!isWasmInitialized) {
25333                 throw new Error("initializeWasm() must be awaited first!");
25334         }
25335         const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr, val);
25336         // debug statements here
25337 }
25338         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
25339 /* @internal */
25340 export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): bigint {
25341         if(!isWasmInitialized) {
25342                 throw new Error("initializeWasm() must be awaited first!");
25343         }
25344         const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_half_life(this_ptr);
25345         return nativeResponseValue;
25346 }
25347         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
25348 /* @internal */
25349 export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: bigint): void {
25350         if(!isWasmInitialized) {
25351                 throw new Error("initializeWasm() must be awaited first!");
25352         }
25353         const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
25354         // debug statements here
25355 }
25356         // 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);
25357 /* @internal */
25358 export function ScoringParameters_new(base_penalty_msat_arg: bigint, failure_penalty_msat_arg: bigint, overuse_penalty_start_1024th_arg: number, overuse_penalty_msat_per_1024th_arg: bigint, failure_penalty_half_life_arg: bigint): number {
25359         if(!isWasmInitialized) {
25360                 throw new Error("initializeWasm() must be awaited first!");
25361         }
25362         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);
25363         return nativeResponseValue;
25364 }
25365         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
25366 /* @internal */
25367 export function ScoringParameters_write(obj: number): number {
25368         if(!isWasmInitialized) {
25369                 throw new Error("initializeWasm() must be awaited first!");
25370         }
25371         const nativeResponseValue = wasm.TS_ScoringParameters_write(obj);
25372         return nativeResponseValue;
25373 }
25374         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
25375 /* @internal */
25376 export function ScoringParameters_read(ser: number): number {
25377         if(!isWasmInitialized) {
25378                 throw new Error("initializeWasm() must be awaited first!");
25379         }
25380         const nativeResponseValue = wasm.TS_ScoringParameters_read(ser);
25381         return nativeResponseValue;
25382 }
25383         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
25384 /* @internal */
25385 export function ScoringParameters_default(): number {
25386         if(!isWasmInitialized) {
25387                 throw new Error("initializeWasm() must be awaited first!");
25388         }
25389         const nativeResponseValue = wasm.TS_ScoringParameters_default();
25390         return nativeResponseValue;
25391 }
25392
25393
25394 js_invoke = function(obj_ptr: number, fn_id: number, arg1: number, arg2: number, arg3: number, arg4: number, arg5: number, arg6: number, arg7: number, arg8: number, arg9: number, arg10: number) {
25395         const weak: WeakRef<object> = js_objs[obj_ptr];
25396         if (weak == null || weak == undefined) {
25397                 console.error("Got function call on unknown/free'd JS object!");
25398                 throw new Error("Got function call on unknown/free'd JS object!");
25399         }
25400         const obj: object = weak.deref();
25401         if (obj == null || obj == undefined) {
25402                 console.error("Got function call on GC'd JS object!");
25403                 throw new Error("Got function call on GC'd JS object!");
25404         }
25405         var fn;
25406         switch (fn_id) {
25407                 case 0: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
25408                 case 1: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
25409                 case 2: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
25410                 case 3: fn = Object.getOwnPropertyDescriptor(obj, "get_per_commitment_point"); break;
25411                 case 4: fn = Object.getOwnPropertyDescriptor(obj, "release_commitment_secret"); break;
25412                 case 5: fn = Object.getOwnPropertyDescriptor(obj, "validate_holder_commitment"); break;
25413                 case 6: fn = Object.getOwnPropertyDescriptor(obj, "channel_keys_id"); break;
25414                 case 7: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_commitment"); break;
25415                 case 8: fn = Object.getOwnPropertyDescriptor(obj, "validate_counterparty_revocation"); break;
25416                 case 9: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_commitment_and_htlcs"); break;
25417                 case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_output"); break;
25418                 case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
25419                 case 12: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
25420                 case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
25421                 case 14: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
25422                 case 15: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
25423                 case 16: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
25424                 case 17: fn = Object.getOwnPropertyDescriptor(obj, "get_utxo"); break;
25425                 case 18: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
25426                 case 19: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
25427                 case 20: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
25428                 case 21: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
25429                 case 22: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
25430                 case 23: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
25431                 case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
25432                 case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
25433                 case 26: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
25434                 case 27: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
25435                 case 28: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
25436                 case 29: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
25437                 case 30: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
25438                 case 31: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
25439                 case 32: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
25440                 case 33: fn = Object.getOwnPropertyDescriptor(obj, "log"); break;
25441                 case 34: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
25442                 case 35: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
25443                 case 36: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
25444                 case 37: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
25445                 case 38: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
25446                 case 39: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
25447                 case 40: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
25448                 case 41: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
25449                 case 42: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
25450                 case 43: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
25451                 case 44: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
25452                 case 45: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
25453                 case 46: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
25454                 case 47: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
25455                 case 48: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
25456                 case 49: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_locked"); break;
25457                 case 50: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
25458                 case 51: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
25459                 case 52: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
25460                 case 53: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
25461                 case 54: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
25462                 case 55: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
25463                 case 56: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
25464                 case 57: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
25465                 case 58: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
25466                 case 59: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
25467                 case 60: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
25468                 case 61: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
25469                 case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
25470                 case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
25471                 case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
25472                 case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
25473                 case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
25474                 case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
25475                 case 68: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcements"); break;
25476                 case 69: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcements"); break;
25477                 case 70: fn = Object.getOwnPropertyDescriptor(obj, "sync_routing_table"); break;
25478                 case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
25479                 case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
25480                 case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
25481                 case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
25482                 case 75: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
25483                 case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
25484                 case 77: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
25485                 case 78: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
25486                 case 79: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
25487                 case 80: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
25488                 case 81: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
25489                 case 82: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
25490                 case 83: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
25491                 case 84: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
25492                 case 85: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
25493                 case 86: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
25494                 default:
25495                         console.error("Got unknown function call from C!");
25496                         throw new Error("Got unknown function call from C!");
25497         }
25498         if (fn == null || fn == undefined) {
25499                 console.error("Got function call on incorrect JS object!");
25500                 throw new Error("Got function call on incorrect JS object!");
25501         }
25502         return fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
25503 }