Update auto-generated TypeScript Bindings
[ldk-java] / ts / bindings.mts
1
2 const imports: any = {};
3 imports.env = {};
4
5 var js_objs: Array<WeakRef<object>> = [];
6 var js_invoke: Function;
7
8 imports.wasi_snapshot_preview1 = {
9         "fd_write": (fd: number, iovec_array_ptr: number, iovec_array_len: number) => {
10                 // This should generally only be used to print panic messages
11                 console.log("FD_WRITE to " + fd + " in " + iovec_array_len + " chunks.");
12                 const ptr_len_view = new Uint32Array(wasm.memory.buffer, iovec_array_ptr, iovec_array_len * 2);
13                 for (var i = 0; i < iovec_array_len; i++) {
14                         const bytes_view = new Uint8Array(wasm.memory.buffer, ptr_len_view[i*2], ptr_len_view[i*2+1]);
15                         console.log(String.fromCharCode(...bytes_view));
16                 }
17                 return 0;
18         },
19         "random_get": (buf_ptr: number, buf_len: number) => {
20                 const buf = new Uint8Array(wasm.memory.buffer, buf_ptr, buf_len);
21                 crypto.getRandomValues(buf);
22                 return 0;
23         },
24         "environ_sizes_get": (environ_var_count_ptr: number, environ_len_ptr: number) => {
25                 // This is called before fd_write to format + print panic messages
26                 console.log("wasi_snapshot_preview1:environ_sizes_get");
27                 const out_count_view = new Uint32Array(wasm.memory.buffer, environ_var_count_ptr, 1);
28                 out_count_view[0] = 1;
29                 const out_len_view = new Uint32Array(wasm.memory.buffer, environ_len_ptr, 1);
30                 out_len_view[0] = "RUST_BACKTRACE=1".length + 1; // Note that string must be NULL-terminated
31                 return 0;
32         },
33         "environ_get": (environ_ptr: number, environ_buf_ptr: number) => {
34                 // This is called before fd_write to format + print panic messages
35                 console.log("wasi_snapshot_preview1:environ_get");
36                 const out_ptrs = new Uint32Array(wasm.memory.buffer, environ_ptr, 2);
37                 out_ptrs[0] = environ_buf_ptr;
38                 out_ptrs[1] = "RUST_BACKTRACE=1".length;
39                 const out_environ = new Uint8Array(wasm.memory.buffer, environ_buf_ptr, out_ptrs[1]);
40                 for (var i = 0; i < out_ptrs[1]; i++) { out_environ[i] = "RUST_BACKTRACE=1".codePointAt(i); }
41                 out_environ[out_ptrs[1]] = 0;
42                 return 0;
43         },
44         "proc_exit" : () => {
45                 console.log("wasi_snapshot_preview1:proc_exit");
46         },
47 };
48
49 var wasm: any = null;
50 let isWasmInitialized: boolean = false;
51
52 export async function initializeWasm(uri: string) {
53         const stream = fetch(uri);
54         imports.env["js_invoke_function"] = js_invoke;
55         const { instance: wasmInstance } = await WebAssembly.instantiateStreaming(stream, imports);
56         wasm = wasmInstance.exports;
57         if (!wasm.test_bigint_pass_deadbeef0badf00d(BigInt("0xdeadbeef0badf00d"))) {
58                 throw new Error("Currently need BigInt-as-u64 support, try ----experimental-wasm-bigint");
59         }
60         isWasmInitialized = true;
61 };
62
63
64
65
66 // WASM CODEC
67
68 const nextMultipleOfFour = (value: number) => {
69         return Math.ceil(value / 4) * 4;
70 }
71
72 export function encodeUint8Array (inputArray: Uint8Array): number {
73         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
74         const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
75         arrayLengthView[0] = inputArray.length;
76         const arrayMemoryView = new Uint8Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
77         arrayMemoryView.set(inputArray);
78         return cArrayPointer;
79 }
80 export function encodeUint32Array (inputArray: Uint32Array|Array<number>): number {
81         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
82         const arrayMemoryView = new Uint32Array(wasm.memory.buffer, cArrayPointer, inputArray.length);
83         arrayMemoryView.set(inputArray, 1);
84         arrayMemoryView[0] = inputArray.length;
85         return cArrayPointer;
86 }
87 export function encodeUint64Array (inputArray: BigUint64Array|Array<bigint>): number {
88         const cArrayPointer = wasm.TS_malloc(inputArray.length * 8 + 1);
89         const arrayLengthView = new Uint32Array(wasm.memory.buffer, cArrayPointer, 1);
90         arrayLengthView[0] = inputArray.length;
91         const arrayMemoryView = new BigUint64Array(wasm.memory.buffer, cArrayPointer + 4, inputArray.length);
92         arrayMemoryView.set(inputArray);
93         return cArrayPointer;
94 }
95
96 export function check_arr_len(arr: Uint8Array, len: number): Uint8Array {
97         if (arr.length != len) { throw new Error("Expected array of length " + len + "got " + arr.length); }
98         return arr;
99 }
100
101 export function getArrayLength(arrayPointer: number): number {
102         const arraySizeViewer = new Uint32Array(wasm.memory.buffer, arrayPointer, 1);
103         return arraySizeViewer[0];
104 }
105 export function decodeUint8Array (arrayPointer: number, free = true): Uint8Array {
106         const arraySize = getArrayLength(arrayPointer);
107         const actualArrayViewer = new Uint8Array(wasm.memory.buffer, arrayPointer + 4, arraySize);
108         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
109         // will free the underlying memory when it becomes unreachable instead of copying here.
110         // Note that doing so may have edge-case interactions with memory resizing (invalidating the buffer).
111         const actualArray = actualArrayViewer.slice(0, arraySize);
112         if (free) {
113                 wasm.TS_free(arrayPointer);
114         }
115         return actualArray;
116 }
117 const decodeUint32Array = (arrayPointer: number, free = true) => {
118         const arraySize = getArrayLength(arrayPointer);
119         const actualArrayViewer = new Uint32Array(
120                 wasm.memory.buffer, // value
121                 arrayPointer + 4, // offset (ignoring length bytes)
122                 arraySize // uint32 count
123         );
124         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
125         // will free the underlying memory when it becomes unreachable instead of copying here.
126         const actualArray = actualArrayViewer.slice(0, arraySize);
127         if (free) {
128                 wasm.TS_free(arrayPointer);
129         }
130         return actualArray;
131 }
132
133 export function getU32ArrayElem(arrayPointer: number, idx: number): number {
134         const actualArrayViewer = new Uint32Array(wasm.memory.buffer, arrayPointer + 4, idx + 1);
135         return actualArrayViewer[idx];
136 }
137
138 export function encodeString(str: string): number {
139         const charArray = new TextEncoder().encode(str);
140         return encodeUint8Array(charArray);
141 }
142
143 export function decodeString(stringPointer: number, free = true): string {
144         const arraySize = getArrayLength(stringPointer);
145         const memoryView = new Uint8Array(wasm.memory.buffer, stringPointer + 4, arraySize);
146         const result = new TextDecoder("utf-8").decode(memoryView);
147
148         if (free) {
149                 wasm.TS_free(stringPointer);
150         }
151
152         return result;
153 }
154
155             export enum AccessError {
156                 /**
157  * The requested chain is unknown.
158  */
159 LDKAccessError_UnknownChain,
160                                 /**
161  * The requested transaction doesn't exist or hasn't confirmed.
162  */
163 LDKAccessError_UnknownTx,
164                                 
165             }
166
167             export enum COption_NoneZ {
168                 /**
169  * When we're in this state, this COption_NoneZ contains a
170  */
171 LDKCOption_NoneZ_Some,
172                                 /**
173  * When we're in this state, this COption_NoneZ contains nothing
174  */
175 LDKCOption_NoneZ_None,
176                                 
177             }
178
179             export enum ChannelMonitorUpdateErr {
180                 /**
181  * Used to indicate a temporary failure (eg connection to a watchtower or remote backup of
182 our state failed, but is expected to succeed at some point in the future).
183
184 Such a failure will \"freeze\" a channel, preventing us from revoking old states or
185 submitting new commitment transactions to the counterparty. Once the update(s) that failed
186 have been successfully applied, a [`MonitorEvent::UpdateCompleted`] event should be returned
187 via [`Watch::release_pending_monitor_events`] which will then restore the channel to an
188 operational state.
189
190 Note that a given ChannelManager will *never* re-generate a given ChannelMonitorUpdate. If
191 you return a TemporaryFailure you must ensure that it is written to disk safely before
192 writing out the latest ChannelManager state.
193
194 Even when a channel has been \"frozen\" updates to the ChannelMonitor can continue to occur
195 (eg if an inbound HTLC which we forwarded was claimed upstream resulting in us attempting
196 to claim it on this channel) and those updates must be applied wherever they can be. At
197 least one such updated ChannelMonitor must be persisted otherwise PermanentFailure should
198 be returned to get things on-chain ASAP using only the in-memory copy. Obviously updates to
199 the channel which would invalidate previous ChannelMonitors are not made when a channel has
200 been \"frozen\".
201
202 Note that even if updates made after TemporaryFailure succeed you must still provide a
203 [`MonitorEvent::UpdateCompleted`] to ensure you have the latest monitor and re-enable
204 normal channel operation. Note that this is normally generated through a call to
205 [`ChainMonitor::channel_monitor_updated`].
206
207 Note that the update being processed here will not be replayed for you when you return a
208 [`MonitorEvent::UpdateCompleted`] event via [`Watch::release_pending_monitor_events`], so
209 you must store the update itself on your own local disk prior to returning a
210 TemporaryFailure. You may, of course, employ a journaling approach, storing only the
211 ChannelMonitorUpdate on disk without updating the monitor itself, replaying the journal at
212 reload-time.
213
214 For deployments where a copy of ChannelMonitors and other local state are backed up in a
215 remote location (with local copies persisted immediately), it is anticipated that all
216 updates will return TemporaryFailure until the remote copies could be updated.
217
218 [`ChainMonitor::channel_monitor_updated`]: chainmonitor::ChainMonitor::channel_monitor_updated
219  */
220 LDKChannelMonitorUpdateErr_TemporaryFailure,
221                                 /**
222  * Used to indicate no further channel monitor updates will be allowed (eg we've moved on to a
223 different watchtower and cannot update with all watchtowers that were previously informed
224 of this channel).
225
226 At reception of this error, ChannelManager will force-close the channel and return at
227 least a final ChannelMonitorUpdate::ChannelForceClosed which must be delivered to at
228 least one ChannelMonitor copy. Revocation secret MUST NOT be released and offchain channel
229 update must be rejected.
230
231 This failure may also signal a failure to update the local persisted copy of one of
232 the channel monitor instance.
233
234 Note that even when you fail a holder commitment transaction update, you must store the
235 update to ensure you can claim from it in case of a duplicate copy of this ChannelMonitor
236 broadcasts it (e.g distributed channel-monitor deployment)
237
238 In case of distributed watchtowers deployment, the new version must be written to disk, as
239 state may have been stored but rejected due to a block forcing a commitment broadcast. This
240 storage is used to claim outputs of rejected state confirmed onchain by another watchtower,
241 lagging behind on block processing.
242  */
243 LDKChannelMonitorUpdateErr_PermanentFailure,
244                                 
245             }
246
247             export enum ConfirmationTarget {
248                 /**
249  * We are happy with this transaction confirming slowly when feerate drops some.
250  */
251 LDKConfirmationTarget_Background,
252                                 /**
253  * We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
254  */
255 LDKConfirmationTarget_Normal,
256                                 /**
257  * We'd like this transaction to confirm in the next few blocks.
258  */
259 LDKConfirmationTarget_HighPriority,
260                                 
261             }
262
263             export enum Level {
264                 /**
265  * Designates extremely verbose information, including gossip-induced messages
266  */
267 LDKLevel_Gossip,
268                                 /**
269  * Designates very low priority, often extremely verbose, information
270  */
271 LDKLevel_Trace,
272                                 /**
273  * Designates lower priority information
274  */
275 LDKLevel_Debug,
276                                 /**
277  * Designates useful information
278  */
279 LDKLevel_Info,
280                                 /**
281  * Designates hazardous situations
282  */
283 LDKLevel_Warn,
284                                 /**
285  * Designates very serious errors
286  */
287 LDKLevel_Error,
288                                 
289             }
290
291             export enum Network {
292                 /**
293  * The main Bitcoin blockchain.
294  */
295 LDKNetwork_Bitcoin,
296                                 /**
297  * The testnet3 blockchain.
298  */
299 LDKNetwork_Testnet,
300                                 /**
301  * A local test blockchain.
302  */
303 LDKNetwork_Regtest,
304                                 /**
305  * A blockchain on which blocks are signed instead of mined.
306  */
307 LDKNetwork_Signet,
308                                 
309             }
310
311             export enum Secp256k1Error {
312                 /**
313  * Signature failed verification
314  */
315 LDKSecp256k1Error_IncorrectSignature,
316                                 /**
317  * Badly sized message ("messages" are actually fixed-sized digests; see the MESSAGE_SIZE constant)
318  */
319 LDKSecp256k1Error_InvalidMessage,
320                                 /**
321  * Bad public key
322  */
323 LDKSecp256k1Error_InvalidPublicKey,
324                                 /**
325  * Bad signature
326  */
327 LDKSecp256k1Error_InvalidSignature,
328                                 /**
329  * Bad secret key
330  */
331 LDKSecp256k1Error_InvalidSecretKey,
332                                 /**
333  * Bad recovery id
334  */
335 LDKSecp256k1Error_InvalidRecoveryId,
336                                 /**
337  * Invalid tweak for add_assign or mul_assign
338  */
339 LDKSecp256k1Error_InvalidTweak,
340                                 /**
341  * tweak_add_check failed on an xonly public key
342  */
343 LDKSecp256k1Error_TweakCheckFailed,
344                                 /**
345  * Didn't pass enough memory to context creation with preallocated memory
346  */
347 LDKSecp256k1Error_NotEnoughMemory,
348                                 
349             }
350         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
351 export function TxOut_get_script_pubkey(thing: number): number {
352         if(!isWasmInitialized) {
353                 throw new Error("initializeWasm() must be awaited first!");
354         }
355         const nativeResponseValue = wasm.TS_TxOut_get_script_pubkey(thing);
356         return nativeResponseValue;
357 }
358         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
359 export function TxOut_get_value(thing: number): bigint {
360         if(!isWasmInitialized) {
361                 throw new Error("initializeWasm() must be awaited first!");
362         }
363         const nativeResponseValue = wasm.TS_TxOut_get_value(thing);
364         return nativeResponseValue;
365 }
366         // struct LDKChannelConfig CResult_ChannelConfigDecodeErrorZ_get_ok(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
367 export function CResult_ChannelConfigDecodeErrorZ_get_ok(owner: number): number {
368         if(!isWasmInitialized) {
369                 throw new Error("initializeWasm() must be awaited first!");
370         }
371         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_ok(owner);
372         return nativeResponseValue;
373 }
374         // struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
375 export function CResult_ChannelConfigDecodeErrorZ_get_err(owner: number): number {
376         if(!isWasmInitialized) {
377                 throw new Error("initializeWasm() must be awaited first!");
378         }
379         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_get_err(owner);
380         return nativeResponseValue;
381 }
382         // struct LDKOutPoint CResult_OutPointDecodeErrorZ_get_ok(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
383 export function CResult_OutPointDecodeErrorZ_get_ok(owner: number): number {
384         if(!isWasmInitialized) {
385                 throw new Error("initializeWasm() must be awaited first!");
386         }
387         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_ok(owner);
388         return nativeResponseValue;
389 }
390         // struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
391 export function CResult_OutPointDecodeErrorZ_get_err(owner: number): number {
392         if(!isWasmInitialized) {
393                 throw new Error("initializeWasm() must be awaited first!");
394         }
395         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_get_err(owner);
396         return nativeResponseValue;
397 }
398         // struct LDKSecretKey CResult_SecretKeyErrorZ_get_ok(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
399 export function CResult_SecretKeyErrorZ_get_ok(owner: number): number {
400         if(!isWasmInitialized) {
401                 throw new Error("initializeWasm() must be awaited first!");
402         }
403         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_ok(owner);
404         return nativeResponseValue;
405 }
406         // enum LDKSecp256k1Error CResult_SecretKeyErrorZ_get_err(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
407 export function CResult_SecretKeyErrorZ_get_err(owner: number): Secp256k1Error {
408         if(!isWasmInitialized) {
409                 throw new Error("initializeWasm() must be awaited first!");
410         }
411         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_get_err(owner);
412         return nativeResponseValue;
413 }
414         // struct LDKPublicKey CResult_PublicKeyErrorZ_get_ok(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
415 export function CResult_PublicKeyErrorZ_get_ok(owner: number): number {
416         if(!isWasmInitialized) {
417                 throw new Error("initializeWasm() must be awaited first!");
418         }
419         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_ok(owner);
420         return nativeResponseValue;
421 }
422         // enum LDKSecp256k1Error CResult_PublicKeyErrorZ_get_err(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
423 export function CResult_PublicKeyErrorZ_get_err(owner: number): Secp256k1Error {
424         if(!isWasmInitialized) {
425                 throw new Error("initializeWasm() must be awaited first!");
426         }
427         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_get_err(owner);
428         return nativeResponseValue;
429 }
430         // struct LDKTxCreationKeys CResult_TxCreationKeysDecodeErrorZ_get_ok(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
431 export function CResult_TxCreationKeysDecodeErrorZ_get_ok(owner: number): number {
432         if(!isWasmInitialized) {
433                 throw new Error("initializeWasm() must be awaited first!");
434         }
435         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_ok(owner);
436         return nativeResponseValue;
437 }
438         // struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
439 export function CResult_TxCreationKeysDecodeErrorZ_get_err(owner: number): number {
440         if(!isWasmInitialized) {
441                 throw new Error("initializeWasm() must be awaited first!");
442         }
443         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_get_err(owner);
444         return nativeResponseValue;
445 }
446         // struct LDKChannelPublicKeys CResult_ChannelPublicKeysDecodeErrorZ_get_ok(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
447 export function CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner: number): number {
448         if(!isWasmInitialized) {
449                 throw new Error("initializeWasm() must be awaited first!");
450         }
451         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_ok(owner);
452         return nativeResponseValue;
453 }
454         // struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
455 export function CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner: number): number {
456         if(!isWasmInitialized) {
457                 throw new Error("initializeWasm() must be awaited first!");
458         }
459         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_get_err(owner);
460         return nativeResponseValue;
461 }
462         // struct LDKTxCreationKeys CResult_TxCreationKeysErrorZ_get_ok(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
463 export function CResult_TxCreationKeysErrorZ_get_ok(owner: number): number {
464         if(!isWasmInitialized) {
465                 throw new Error("initializeWasm() must be awaited first!");
466         }
467         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_ok(owner);
468         return nativeResponseValue;
469 }
470         // enum LDKSecp256k1Error CResult_TxCreationKeysErrorZ_get_err(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
471 export function CResult_TxCreationKeysErrorZ_get_err(owner: number): Secp256k1Error {
472         if(!isWasmInitialized) {
473                 throw new Error("initializeWasm() must be awaited first!");
474         }
475         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_get_err(owner);
476         return nativeResponseValue;
477 }
478 export class LDKCOption_u32Z {
479         protected constructor() {}
480 }
481 export function LDKCOption_u32Z_ty_from_ptr(ptr: number): number {
482         if(!isWasmInitialized) {
483                 throw new Error("initializeWasm() must be awaited first!");
484         }
485         const nativeResponseValue = wasm.TS_LDKCOption_u32Z_ty_from_ptr(ptr);
486         return nativeResponseValue;
487 }
488 export function LDKCOption_u32Z_Some_get_some(ptr: number): number {
489         if(!isWasmInitialized) {
490                 throw new Error("initializeWasm() must be awaited first!");
491         }
492         const nativeResponseValue = wasm.TS_LDKCOption_u32Z_Some_get_some(ptr);
493         return nativeResponseValue;
494 }
495         // struct LDKHTLCOutputInCommitment CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
496 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner: number): number {
497         if(!isWasmInitialized) {
498                 throw new Error("initializeWasm() must be awaited first!");
499         }
500         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(owner);
501         return nativeResponseValue;
502 }
503         // struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
504 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner: number): number {
505         if(!isWasmInitialized) {
506                 throw new Error("initializeWasm() must be awaited first!");
507         }
508         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(owner);
509         return nativeResponseValue;
510 }
511         // struct LDKCounterpartyChannelTransactionParameters CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
512 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
513         if(!isWasmInitialized) {
514                 throw new Error("initializeWasm() must be awaited first!");
515         }
516         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(owner);
517         return nativeResponseValue;
518 }
519         // struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
520 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
521         if(!isWasmInitialized) {
522                 throw new Error("initializeWasm() must be awaited first!");
523         }
524         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(owner);
525         return nativeResponseValue;
526 }
527         // struct LDKChannelTransactionParameters CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
528 export function CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner: number): number {
529         if(!isWasmInitialized) {
530                 throw new Error("initializeWasm() must be awaited first!");
531         }
532         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(owner);
533         return nativeResponseValue;
534 }
535         // struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
536 export function CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner: number): number {
537         if(!isWasmInitialized) {
538                 throw new Error("initializeWasm() must be awaited first!");
539         }
540         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_get_err(owner);
541         return nativeResponseValue;
542 }
543         // struct LDKHolderCommitmentTransaction CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
544 export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
545         if(!isWasmInitialized) {
546                 throw new Error("initializeWasm() must be awaited first!");
547         }
548         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(owner);
549         return nativeResponseValue;
550 }
551         // struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
552 export function CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
553         if(!isWasmInitialized) {
554                 throw new Error("initializeWasm() must be awaited first!");
555         }
556         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(owner);
557         return nativeResponseValue;
558 }
559         // struct LDKBuiltCommitmentTransaction CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
560 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
561         if(!isWasmInitialized) {
562                 throw new Error("initializeWasm() must be awaited first!");
563         }
564         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(owner);
565         return nativeResponseValue;
566 }
567         // struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
568 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
569         if(!isWasmInitialized) {
570                 throw new Error("initializeWasm() must be awaited first!");
571         }
572         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(owner);
573         return nativeResponseValue;
574 }
575         // struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
576 export function CResult_TrustedClosingTransactionNoneZ_get_ok(owner: number): number {
577         if(!isWasmInitialized) {
578                 throw new Error("initializeWasm() must be awaited first!");
579         }
580         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_ok(owner);
581         return nativeResponseValue;
582 }
583         // void CResult_TrustedClosingTransactionNoneZ_get_err(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
584 export function CResult_TrustedClosingTransactionNoneZ_get_err(owner: number): void {
585         if(!isWasmInitialized) {
586                 throw new Error("initializeWasm() must be awaited first!");
587         }
588         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_get_err(owner);
589         // debug statements here
590 }
591         // struct LDKCommitmentTransaction CResult_CommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
592 export function CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner: number): number {
593         if(!isWasmInitialized) {
594                 throw new Error("initializeWasm() must be awaited first!");
595         }
596         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_ok(owner);
597         return nativeResponseValue;
598 }
599         // struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
600 export function CResult_CommitmentTransactionDecodeErrorZ_get_err(owner: number): number {
601         if(!isWasmInitialized) {
602                 throw new Error("initializeWasm() must be awaited first!");
603         }
604         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_get_err(owner);
605         return nativeResponseValue;
606 }
607         // struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
608 export function CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner: number): number {
609         if(!isWasmInitialized) {
610                 throw new Error("initializeWasm() must be awaited first!");
611         }
612         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_ok(owner);
613         return nativeResponseValue;
614 }
615         // void CResult_TrustedCommitmentTransactionNoneZ_get_err(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
616 export function CResult_TrustedCommitmentTransactionNoneZ_get_err(owner: number): void {
617         if(!isWasmInitialized) {
618                 throw new Error("initializeWasm() must be awaited first!");
619         }
620         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_get_err(owner);
621         // debug statements here
622 }
623         // struct LDKCVec_SignatureZ CResult_CVec_SignatureZNoneZ_get_ok(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
624 export function CResult_CVec_SignatureZNoneZ_get_ok(owner: number): number {
625         if(!isWasmInitialized) {
626                 throw new Error("initializeWasm() must be awaited first!");
627         }
628         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_ok(owner);
629         return nativeResponseValue;
630 }
631         // void CResult_CVec_SignatureZNoneZ_get_err(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
632 export function CResult_CVec_SignatureZNoneZ_get_err(owner: number): void {
633         if(!isWasmInitialized) {
634                 throw new Error("initializeWasm() must be awaited first!");
635         }
636         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_get_err(owner);
637         // debug statements here
638 }
639         // struct LDKShutdownScript CResult_ShutdownScriptDecodeErrorZ_get_ok(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
640 export function CResult_ShutdownScriptDecodeErrorZ_get_ok(owner: number): number {
641         if(!isWasmInitialized) {
642                 throw new Error("initializeWasm() must be awaited first!");
643         }
644         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_ok(owner);
645         return nativeResponseValue;
646 }
647         // struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
648 export function CResult_ShutdownScriptDecodeErrorZ_get_err(owner: number): number {
649         if(!isWasmInitialized) {
650                 throw new Error("initializeWasm() must be awaited first!");
651         }
652         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_get_err(owner);
653         return nativeResponseValue;
654 }
655         // struct LDKShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
656 export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner: number): number {
657         if(!isWasmInitialized) {
658                 throw new Error("initializeWasm() must be awaited first!");
659         }
660         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(owner);
661         return nativeResponseValue;
662 }
663         // struct LDKInvalidShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
664 export function CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner: number): number {
665         if(!isWasmInitialized) {
666                 throw new Error("initializeWasm() must be awaited first!");
667         }
668         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(owner);
669         return nativeResponseValue;
670 }
671
672
673
674 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
675
676 export interface LDKType {
677         type_id (): number;
678         debug_str (): number;
679         write (): number;
680 }
681
682 export function LDKType_new(impl: LDKType): number {
683         if(!isWasmInitialized) {
684                 throw new Error("initializeWasm() must be awaited first!");
685         }
686         var new_obj_idx = js_objs.length;
687         for (var i = 0; i < js_objs.length; i++) {
688                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
689         }
690         js_objs[i] = new WeakRef(impl);
691         return wasm.TS_LDKType_new(i);
692 }
693
694 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
695
696
697         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
698 export function Type_type_id(this_arg: number): number {
699         if(!isWasmInitialized) {
700                 throw new Error("initializeWasm() must be awaited first!");
701         }
702         const nativeResponseValue = wasm.TS_Type_type_id(this_arg);
703         return nativeResponseValue;
704 }
705         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
706 export function Type_debug_str(this_arg: number): number {
707         if(!isWasmInitialized) {
708                 throw new Error("initializeWasm() must be awaited first!");
709         }
710         const nativeResponseValue = wasm.TS_Type_debug_str(this_arg);
711         return nativeResponseValue;
712 }
713         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
714 export function Type_write(this_arg: number): number {
715         if(!isWasmInitialized) {
716                 throw new Error("initializeWasm() must be awaited first!");
717         }
718         const nativeResponseValue = wasm.TS_Type_write(this_arg);
719         return nativeResponseValue;
720 }
721 export class LDKCOption_TypeZ {
722         protected constructor() {}
723 }
724 export function LDKCOption_TypeZ_ty_from_ptr(ptr: number): number {
725         if(!isWasmInitialized) {
726                 throw new Error("initializeWasm() must be awaited first!");
727         }
728         const nativeResponseValue = wasm.TS_LDKCOption_TypeZ_ty_from_ptr(ptr);
729         return nativeResponseValue;
730 }
731 export function LDKCOption_TypeZ_Some_get_some(ptr: number): number {
732         if(!isWasmInitialized) {
733                 throw new Error("initializeWasm() must be awaited first!");
734         }
735         const nativeResponseValue = wasm.TS_LDKCOption_TypeZ_Some_get_some(ptr);
736         return nativeResponseValue;
737 }
738         // struct LDKCOption_TypeZ CResult_COption_TypeZDecodeErrorZ_get_ok(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
739 export function CResult_COption_TypeZDecodeErrorZ_get_ok(owner: number): number {
740         if(!isWasmInitialized) {
741                 throw new Error("initializeWasm() must be awaited first!");
742         }
743         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_ok(owner);
744         return nativeResponseValue;
745 }
746         // struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
747 export function CResult_COption_TypeZDecodeErrorZ_get_err(owner: number): number {
748         if(!isWasmInitialized) {
749                 throw new Error("initializeWasm() must be awaited first!");
750         }
751         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_get_err(owner);
752         return nativeResponseValue;
753 }
754         // struct LDKStr CResult_StringErrorZ_get_ok(LDKCResult_StringErrorZ *NONNULL_PTR owner);
755 export function CResult_StringErrorZ_get_ok(owner: number): number {
756         if(!isWasmInitialized) {
757                 throw new Error("initializeWasm() must be awaited first!");
758         }
759         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_ok(owner);
760         return nativeResponseValue;
761 }
762         // enum LDKSecp256k1Error CResult_StringErrorZ_get_err(LDKCResult_StringErrorZ *NONNULL_PTR owner);
763 export function CResult_StringErrorZ_get_err(owner: number): Secp256k1Error {
764         if(!isWasmInitialized) {
765                 throw new Error("initializeWasm() must be awaited first!");
766         }
767         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_get_err(owner);
768         return nativeResponseValue;
769 }
770         // struct LDKChannelMonitorUpdate CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
771 export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner: number): number {
772         if(!isWasmInitialized) {
773                 throw new Error("initializeWasm() must be awaited first!");
774         }
775         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(owner);
776         return nativeResponseValue;
777 }
778         // struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
779 export function CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner: number): number {
780         if(!isWasmInitialized) {
781                 throw new Error("initializeWasm() must be awaited first!");
782         }
783         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(owner);
784         return nativeResponseValue;
785 }
786 export class LDKMonitorEvent {
787         protected constructor() {}
788 }
789 export function LDKMonitorEvent_ty_from_ptr(ptr: number): number {
790         if(!isWasmInitialized) {
791                 throw new Error("initializeWasm() must be awaited first!");
792         }
793         const nativeResponseValue = wasm.TS_LDKMonitorEvent_ty_from_ptr(ptr);
794         return nativeResponseValue;
795 }
796 export function LDKMonitorEvent_HTLCEvent_get_htlc_event(ptr: number): number {
797         if(!isWasmInitialized) {
798                 throw new Error("initializeWasm() must be awaited first!");
799         }
800         const nativeResponseValue = wasm.TS_LDKMonitorEvent_HTLCEvent_get_htlc_event(ptr);
801         return nativeResponseValue;
802 }
803 export function LDKMonitorEvent_CommitmentTxConfirmed_get_commitment_tx_confirmed(ptr: number): number {
804         if(!isWasmInitialized) {
805                 throw new Error("initializeWasm() must be awaited first!");
806         }
807         const nativeResponseValue = wasm.TS_LDKMonitorEvent_CommitmentTxConfirmed_get_commitment_tx_confirmed(ptr);
808         return nativeResponseValue;
809 }
810 export function LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr: number): number {
811         if(!isWasmInitialized) {
812                 throw new Error("initializeWasm() must be awaited first!");
813         }
814         const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_funding_txo(ptr);
815         return nativeResponseValue;
816 }
817 export function LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr: number): bigint {
818         if(!isWasmInitialized) {
819                 throw new Error("initializeWasm() must be awaited first!");
820         }
821         const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateCompleted_get_monitor_update_id(ptr);
822         return nativeResponseValue;
823 }
824 export function LDKMonitorEvent_UpdateFailed_get_update_failed(ptr: number): number {
825         if(!isWasmInitialized) {
826                 throw new Error("initializeWasm() must be awaited first!");
827         }
828         const nativeResponseValue = wasm.TS_LDKMonitorEvent_UpdateFailed_get_update_failed(ptr);
829         return nativeResponseValue;
830 }
831 export class LDKCOption_MonitorEventZ {
832         protected constructor() {}
833 }
834 export function LDKCOption_MonitorEventZ_ty_from_ptr(ptr: number): number {
835         if(!isWasmInitialized) {
836                 throw new Error("initializeWasm() must be awaited first!");
837         }
838         const nativeResponseValue = wasm.TS_LDKCOption_MonitorEventZ_ty_from_ptr(ptr);
839         return nativeResponseValue;
840 }
841 export function LDKCOption_MonitorEventZ_Some_get_some(ptr: number): number {
842         if(!isWasmInitialized) {
843                 throw new Error("initializeWasm() must be awaited first!");
844         }
845         const nativeResponseValue = wasm.TS_LDKCOption_MonitorEventZ_Some_get_some(ptr);
846         return nativeResponseValue;
847 }
848         // struct LDKCOption_MonitorEventZ CResult_COption_MonitorEventZDecodeErrorZ_get_ok(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
849 export function CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner: number): number {
850         if(!isWasmInitialized) {
851                 throw new Error("initializeWasm() must be awaited first!");
852         }
853         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_ok(owner);
854         return nativeResponseValue;
855 }
856         // struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
857 export function CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner: number): number {
858         if(!isWasmInitialized) {
859                 throw new Error("initializeWasm() must be awaited first!");
860         }
861         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_get_err(owner);
862         return nativeResponseValue;
863 }
864         // struct LDKHTLCUpdate CResult_HTLCUpdateDecodeErrorZ_get_ok(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
865 export function CResult_HTLCUpdateDecodeErrorZ_get_ok(owner: number): number {
866         if(!isWasmInitialized) {
867                 throw new Error("initializeWasm() must be awaited first!");
868         }
869         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_ok(owner);
870         return nativeResponseValue;
871 }
872         // struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
873 export function CResult_HTLCUpdateDecodeErrorZ_get_err(owner: number): number {
874         if(!isWasmInitialized) {
875                 throw new Error("initializeWasm() must be awaited first!");
876         }
877         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_get_err(owner);
878         return nativeResponseValue;
879 }
880         // void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
881 export function CResult_NoneNoneZ_get_ok(owner: number): void {
882         if(!isWasmInitialized) {
883                 throw new Error("initializeWasm() must be awaited first!");
884         }
885         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_ok(owner);
886         // debug statements here
887 }
888         // void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
889 export function CResult_NoneNoneZ_get_err(owner: number): void {
890         if(!isWasmInitialized) {
891                 throw new Error("initializeWasm() must be awaited first!");
892         }
893         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_get_err(owner);
894         // debug statements here
895 }
896         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
897 export function C2Tuple_OutPointScriptZ_get_a(owner: number): number {
898         if(!isWasmInitialized) {
899                 throw new Error("initializeWasm() must be awaited first!");
900         }
901         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_a(owner);
902         return nativeResponseValue;
903 }
904         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
905 export function C2Tuple_OutPointScriptZ_get_b(owner: number): number {
906         if(!isWasmInitialized) {
907                 throw new Error("initializeWasm() must be awaited first!");
908         }
909         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_get_b(owner);
910         return nativeResponseValue;
911 }
912         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
913 export function C2Tuple_u32ScriptZ_get_a(owner: number): number {
914         if(!isWasmInitialized) {
915                 throw new Error("initializeWasm() must be awaited first!");
916         }
917         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_a(owner);
918         return nativeResponseValue;
919 }
920         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
921 export function C2Tuple_u32ScriptZ_get_b(owner: number): number {
922         if(!isWasmInitialized) {
923                 throw new Error("initializeWasm() must be awaited first!");
924         }
925         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_get_b(owner);
926         return nativeResponseValue;
927 }
928         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
929 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner: number): number {
930         if(!isWasmInitialized) {
931                 throw new Error("initializeWasm() must be awaited first!");
932         }
933         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(owner);
934         return nativeResponseValue;
935 }
936         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
937 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner: number): number {
938         if(!isWasmInitialized) {
939                 throw new Error("initializeWasm() must be awaited first!");
940         }
941         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(owner);
942         return nativeResponseValue;
943 }
944 export class LDKPaymentPurpose {
945         protected constructor() {}
946 }
947 export function LDKPaymentPurpose_ty_from_ptr(ptr: number): number {
948         if(!isWasmInitialized) {
949                 throw new Error("initializeWasm() must be awaited first!");
950         }
951         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_ty_from_ptr(ptr);
952         return nativeResponseValue;
953 }
954 export function LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr: number): number {
955         if(!isWasmInitialized) {
956                 throw new Error("initializeWasm() must be awaited first!");
957         }
958         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_InvoicePayment_get_payment_preimage(ptr);
959         return nativeResponseValue;
960 }
961 export function LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr: number): number {
962         if(!isWasmInitialized) {
963                 throw new Error("initializeWasm() must be awaited first!");
964         }
965         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_InvoicePayment_get_payment_secret(ptr);
966         return nativeResponseValue;
967 }
968 export function LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(ptr: number): number {
969         if(!isWasmInitialized) {
970                 throw new Error("initializeWasm() must be awaited first!");
971         }
972         const nativeResponseValue = wasm.TS_LDKPaymentPurpose_SpontaneousPayment_get_spontaneous_payment(ptr);
973         return nativeResponseValue;
974 }
975 export class LDKCOption_u64Z {
976         protected constructor() {}
977 }
978 export function LDKCOption_u64Z_ty_from_ptr(ptr: number): number {
979         if(!isWasmInitialized) {
980                 throw new Error("initializeWasm() must be awaited first!");
981         }
982         const nativeResponseValue = wasm.TS_LDKCOption_u64Z_ty_from_ptr(ptr);
983         return nativeResponseValue;
984 }
985 export function LDKCOption_u64Z_Some_get_some(ptr: number): bigint {
986         if(!isWasmInitialized) {
987                 throw new Error("initializeWasm() must be awaited first!");
988         }
989         const nativeResponseValue = wasm.TS_LDKCOption_u64Z_Some_get_some(ptr);
990         return nativeResponseValue;
991 }
992 export class LDKNetworkUpdate {
993         protected constructor() {}
994 }
995 export function LDKNetworkUpdate_ty_from_ptr(ptr: number): number {
996         if(!isWasmInitialized) {
997                 throw new Error("initializeWasm() must be awaited first!");
998         }
999         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ty_from_ptr(ptr);
1000         return nativeResponseValue;
1001 }
1002 export function LDKNetworkUpdate_ChannelUpdateMessage_get_msg(ptr: number): number {
1003         if(!isWasmInitialized) {
1004                 throw new Error("initializeWasm() must be awaited first!");
1005         }
1006         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ChannelUpdateMessage_get_msg(ptr);
1007         return nativeResponseValue;
1008 }
1009 export function LDKNetworkUpdate_ChannelClosed_get_short_channel_id(ptr: number): bigint {
1010         if(!isWasmInitialized) {
1011                 throw new Error("initializeWasm() must be awaited first!");
1012         }
1013         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ChannelClosed_get_short_channel_id(ptr);
1014         return nativeResponseValue;
1015 }
1016 export function LDKNetworkUpdate_ChannelClosed_get_is_permanent(ptr: number): boolean {
1017         if(!isWasmInitialized) {
1018                 throw new Error("initializeWasm() must be awaited first!");
1019         }
1020         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_ChannelClosed_get_is_permanent(ptr);
1021         return nativeResponseValue;
1022 }
1023 export function LDKNetworkUpdate_NodeFailure_get_node_id(ptr: number): number {
1024         if(!isWasmInitialized) {
1025                 throw new Error("initializeWasm() must be awaited first!");
1026         }
1027         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_NodeFailure_get_node_id(ptr);
1028         return nativeResponseValue;
1029 }
1030 export function LDKNetworkUpdate_NodeFailure_get_is_permanent(ptr: number): boolean {
1031         if(!isWasmInitialized) {
1032                 throw new Error("initializeWasm() must be awaited first!");
1033         }
1034         const nativeResponseValue = wasm.TS_LDKNetworkUpdate_NodeFailure_get_is_permanent(ptr);
1035         return nativeResponseValue;
1036 }
1037 export class LDKCOption_NetworkUpdateZ {
1038         protected constructor() {}
1039 }
1040 export function LDKCOption_NetworkUpdateZ_ty_from_ptr(ptr: number): number {
1041         if(!isWasmInitialized) {
1042                 throw new Error("initializeWasm() must be awaited first!");
1043         }
1044         const nativeResponseValue = wasm.TS_LDKCOption_NetworkUpdateZ_ty_from_ptr(ptr);
1045         return nativeResponseValue;
1046 }
1047 export function LDKCOption_NetworkUpdateZ_Some_get_some(ptr: number): number {
1048         if(!isWasmInitialized) {
1049                 throw new Error("initializeWasm() must be awaited first!");
1050         }
1051         const nativeResponseValue = wasm.TS_LDKCOption_NetworkUpdateZ_Some_get_some(ptr);
1052         return nativeResponseValue;
1053 }
1054 export class LDKSpendableOutputDescriptor {
1055         protected constructor() {}
1056 }
1057 export function LDKSpendableOutputDescriptor_ty_from_ptr(ptr: number): number {
1058         if(!isWasmInitialized) {
1059                 throw new Error("initializeWasm() must be awaited first!");
1060         }
1061         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_ty_from_ptr(ptr);
1062         return nativeResponseValue;
1063 }
1064 export function LDKSpendableOutputDescriptor_StaticOutput_get_outpoint(ptr: number): number {
1065         if(!isWasmInitialized) {
1066                 throw new Error("initializeWasm() must be awaited first!");
1067         }
1068         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_StaticOutput_get_outpoint(ptr);
1069         return nativeResponseValue;
1070 }
1071 export function LDKSpendableOutputDescriptor_StaticOutput_get_output(ptr: number): number {
1072         if(!isWasmInitialized) {
1073                 throw new Error("initializeWasm() must be awaited first!");
1074         }
1075         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_StaticOutput_get_output(ptr);
1076         return nativeResponseValue;
1077 }
1078 export function LDKSpendableOutputDescriptor_DelayedPaymentOutput_get_delayed_payment_output(ptr: number): number {
1079         if(!isWasmInitialized) {
1080                 throw new Error("initializeWasm() must be awaited first!");
1081         }
1082         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_DelayedPaymentOutput_get_delayed_payment_output(ptr);
1083         return nativeResponseValue;
1084 }
1085 export function LDKSpendableOutputDescriptor_StaticPaymentOutput_get_static_payment_output(ptr: number): number {
1086         if(!isWasmInitialized) {
1087                 throw new Error("initializeWasm() must be awaited first!");
1088         }
1089         const nativeResponseValue = wasm.TS_LDKSpendableOutputDescriptor_StaticPaymentOutput_get_static_payment_output(ptr);
1090         return nativeResponseValue;
1091 }
1092 export class LDKClosureReason {
1093         protected constructor() {}
1094 }
1095 export function LDKClosureReason_ty_from_ptr(ptr: number): number {
1096         if(!isWasmInitialized) {
1097                 throw new Error("initializeWasm() must be awaited first!");
1098         }
1099         const nativeResponseValue = wasm.TS_LDKClosureReason_ty_from_ptr(ptr);
1100         return nativeResponseValue;
1101 }
1102 export function LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr: number): number {
1103         if(!isWasmInitialized) {
1104                 throw new Error("initializeWasm() must be awaited first!");
1105         }
1106         const nativeResponseValue = wasm.TS_LDKClosureReason_CounterpartyForceClosed_get_peer_msg(ptr);
1107         return nativeResponseValue;
1108 }
1109 export function LDKClosureReason_ProcessingError_get_err(ptr: number): number {
1110         if(!isWasmInitialized) {
1111                 throw new Error("initializeWasm() must be awaited first!");
1112         }
1113         const nativeResponseValue = wasm.TS_LDKClosureReason_ProcessingError_get_err(ptr);
1114         return nativeResponseValue;
1115 }
1116 export class LDKEvent {
1117         protected constructor() {}
1118 }
1119 export function LDKEvent_ty_from_ptr(ptr: number): number {
1120         if(!isWasmInitialized) {
1121                 throw new Error("initializeWasm() must be awaited first!");
1122         }
1123         const nativeResponseValue = wasm.TS_LDKEvent_ty_from_ptr(ptr);
1124         return nativeResponseValue;
1125 }
1126 export function LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr: number): number {
1127         if(!isWasmInitialized) {
1128                 throw new Error("initializeWasm() must be awaited first!");
1129         }
1130         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_temporary_channel_id(ptr);
1131         return nativeResponseValue;
1132 }
1133 export function LDKEvent_FundingGenerationReady_get_channel_value_satoshis(ptr: number): bigint {
1134         if(!isWasmInitialized) {
1135                 throw new Error("initializeWasm() must be awaited first!");
1136         }
1137         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_channel_value_satoshis(ptr);
1138         return nativeResponseValue;
1139 }
1140 export function LDKEvent_FundingGenerationReady_get_output_script(ptr: number): number {
1141         if(!isWasmInitialized) {
1142                 throw new Error("initializeWasm() must be awaited first!");
1143         }
1144         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_output_script(ptr);
1145         return nativeResponseValue;
1146 }
1147 export function LDKEvent_FundingGenerationReady_get_user_channel_id(ptr: number): bigint {
1148         if(!isWasmInitialized) {
1149                 throw new Error("initializeWasm() must be awaited first!");
1150         }
1151         const nativeResponseValue = wasm.TS_LDKEvent_FundingGenerationReady_get_user_channel_id(ptr);
1152         return nativeResponseValue;
1153 }
1154 export function LDKEvent_PaymentReceived_get_payment_hash(ptr: number): number {
1155         if(!isWasmInitialized) {
1156                 throw new Error("initializeWasm() must be awaited first!");
1157         }
1158         const nativeResponseValue = wasm.TS_LDKEvent_PaymentReceived_get_payment_hash(ptr);
1159         return nativeResponseValue;
1160 }
1161 export function LDKEvent_PaymentReceived_get_amt(ptr: number): bigint {
1162         if(!isWasmInitialized) {
1163                 throw new Error("initializeWasm() must be awaited first!");
1164         }
1165         const nativeResponseValue = wasm.TS_LDKEvent_PaymentReceived_get_amt(ptr);
1166         return nativeResponseValue;
1167 }
1168 export function LDKEvent_PaymentReceived_get_purpose(ptr: number): number {
1169         if(!isWasmInitialized) {
1170                 throw new Error("initializeWasm() must be awaited first!");
1171         }
1172         const nativeResponseValue = wasm.TS_LDKEvent_PaymentReceived_get_purpose(ptr);
1173         return nativeResponseValue;
1174 }
1175 export function LDKEvent_PaymentSent_get_payment_id(ptr: number): number {
1176         if(!isWasmInitialized) {
1177                 throw new Error("initializeWasm() must be awaited first!");
1178         }
1179         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_payment_id(ptr);
1180         return nativeResponseValue;
1181 }
1182 export function LDKEvent_PaymentSent_get_payment_preimage(ptr: number): number {
1183         if(!isWasmInitialized) {
1184                 throw new Error("initializeWasm() must be awaited first!");
1185         }
1186         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_payment_preimage(ptr);
1187         return nativeResponseValue;
1188 }
1189 export function LDKEvent_PaymentSent_get_payment_hash(ptr: number): number {
1190         if(!isWasmInitialized) {
1191                 throw new Error("initializeWasm() must be awaited first!");
1192         }
1193         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_payment_hash(ptr);
1194         return nativeResponseValue;
1195 }
1196 export function LDKEvent_PaymentSent_get_fee_paid_msat(ptr: number): number {
1197         if(!isWasmInitialized) {
1198                 throw new Error("initializeWasm() must be awaited first!");
1199         }
1200         const nativeResponseValue = wasm.TS_LDKEvent_PaymentSent_get_fee_paid_msat(ptr);
1201         return nativeResponseValue;
1202 }
1203 export function LDKEvent_PaymentPathFailed_get_payment_id(ptr: number): number {
1204         if(!isWasmInitialized) {
1205                 throw new Error("initializeWasm() must be awaited first!");
1206         }
1207         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_payment_id(ptr);
1208         return nativeResponseValue;
1209 }
1210 export function LDKEvent_PaymentPathFailed_get_payment_hash(ptr: number): number {
1211         if(!isWasmInitialized) {
1212                 throw new Error("initializeWasm() must be awaited first!");
1213         }
1214         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_payment_hash(ptr);
1215         return nativeResponseValue;
1216 }
1217 export function LDKEvent_PaymentPathFailed_get_rejected_by_dest(ptr: number): boolean {
1218         if(!isWasmInitialized) {
1219                 throw new Error("initializeWasm() must be awaited first!");
1220         }
1221         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_rejected_by_dest(ptr);
1222         return nativeResponseValue;
1223 }
1224 export function LDKEvent_PaymentPathFailed_get_network_update(ptr: number): number {
1225         if(!isWasmInitialized) {
1226                 throw new Error("initializeWasm() must be awaited first!");
1227         }
1228         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_network_update(ptr);
1229         return nativeResponseValue;
1230 }
1231 export function LDKEvent_PaymentPathFailed_get_all_paths_failed(ptr: number): boolean {
1232         if(!isWasmInitialized) {
1233                 throw new Error("initializeWasm() must be awaited first!");
1234         }
1235         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_all_paths_failed(ptr);
1236         return nativeResponseValue;
1237 }
1238 export function LDKEvent_PaymentPathFailed_get_path(ptr: number): number {
1239         if(!isWasmInitialized) {
1240                 throw new Error("initializeWasm() must be awaited first!");
1241         }
1242         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_path(ptr);
1243         return nativeResponseValue;
1244 }
1245 export function LDKEvent_PaymentPathFailed_get_short_channel_id(ptr: number): number {
1246         if(!isWasmInitialized) {
1247                 throw new Error("initializeWasm() must be awaited first!");
1248         }
1249         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_short_channel_id(ptr);
1250         return nativeResponseValue;
1251 }
1252 export function LDKEvent_PaymentPathFailed_get_retry(ptr: number): number {
1253         if(!isWasmInitialized) {
1254                 throw new Error("initializeWasm() must be awaited first!");
1255         }
1256         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathFailed_get_retry(ptr);
1257         return nativeResponseValue;
1258 }
1259 export function LDKEvent_PaymentFailed_get_payment_id(ptr: number): number {
1260         if(!isWasmInitialized) {
1261                 throw new Error("initializeWasm() must be awaited first!");
1262         }
1263         const nativeResponseValue = wasm.TS_LDKEvent_PaymentFailed_get_payment_id(ptr);
1264         return nativeResponseValue;
1265 }
1266 export function LDKEvent_PaymentFailed_get_payment_hash(ptr: number): number {
1267         if(!isWasmInitialized) {
1268                 throw new Error("initializeWasm() must be awaited first!");
1269         }
1270         const nativeResponseValue = wasm.TS_LDKEvent_PaymentFailed_get_payment_hash(ptr);
1271         return nativeResponseValue;
1272 }
1273 export function LDKEvent_PendingHTLCsForwardable_get_time_forwardable(ptr: number): bigint {
1274         if(!isWasmInitialized) {
1275                 throw new Error("initializeWasm() must be awaited first!");
1276         }
1277         const nativeResponseValue = wasm.TS_LDKEvent_PendingHTLCsForwardable_get_time_forwardable(ptr);
1278         return nativeResponseValue;
1279 }
1280 export function LDKEvent_SpendableOutputs_get_outputs(ptr: number): number {
1281         if(!isWasmInitialized) {
1282                 throw new Error("initializeWasm() must be awaited first!");
1283         }
1284         const nativeResponseValue = wasm.TS_LDKEvent_SpendableOutputs_get_outputs(ptr);
1285         return nativeResponseValue;
1286 }
1287 export function LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr: number): number {
1288         if(!isWasmInitialized) {
1289                 throw new Error("initializeWasm() must be awaited first!");
1290         }
1291         const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_fee_earned_msat(ptr);
1292         return nativeResponseValue;
1293 }
1294 export function LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr: number): boolean {
1295         if(!isWasmInitialized) {
1296                 throw new Error("initializeWasm() must be awaited first!");
1297         }
1298         const nativeResponseValue = wasm.TS_LDKEvent_PaymentForwarded_get_claim_from_onchain_tx(ptr);
1299         return nativeResponseValue;
1300 }
1301 export function LDKEvent_ChannelClosed_get_channel_id(ptr: number): number {
1302         if(!isWasmInitialized) {
1303                 throw new Error("initializeWasm() must be awaited first!");
1304         }
1305         const nativeResponseValue = wasm.TS_LDKEvent_ChannelClosed_get_channel_id(ptr);
1306         return nativeResponseValue;
1307 }
1308 export function LDKEvent_ChannelClosed_get_user_channel_id(ptr: number): bigint {
1309         if(!isWasmInitialized) {
1310                 throw new Error("initializeWasm() must be awaited first!");
1311         }
1312         const nativeResponseValue = wasm.TS_LDKEvent_ChannelClosed_get_user_channel_id(ptr);
1313         return nativeResponseValue;
1314 }
1315 export function LDKEvent_ChannelClosed_get_reason(ptr: number): number {
1316         if(!isWasmInitialized) {
1317                 throw new Error("initializeWasm() must be awaited first!");
1318         }
1319         const nativeResponseValue = wasm.TS_LDKEvent_ChannelClosed_get_reason(ptr);
1320         return nativeResponseValue;
1321 }
1322 export function LDKEvent_DiscardFunding_get_channel_id(ptr: number): number {
1323         if(!isWasmInitialized) {
1324                 throw new Error("initializeWasm() must be awaited first!");
1325         }
1326         const nativeResponseValue = wasm.TS_LDKEvent_DiscardFunding_get_channel_id(ptr);
1327         return nativeResponseValue;
1328 }
1329 export function LDKEvent_DiscardFunding_get_transaction(ptr: number): number {
1330         if(!isWasmInitialized) {
1331                 throw new Error("initializeWasm() must be awaited first!");
1332         }
1333         const nativeResponseValue = wasm.TS_LDKEvent_DiscardFunding_get_transaction(ptr);
1334         return nativeResponseValue;
1335 }
1336 export function LDKEvent_PaymentPathSuccessful_get_payment_id(ptr: number): number {
1337         if(!isWasmInitialized) {
1338                 throw new Error("initializeWasm() must be awaited first!");
1339         }
1340         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathSuccessful_get_payment_id(ptr);
1341         return nativeResponseValue;
1342 }
1343 export function LDKEvent_PaymentPathSuccessful_get_payment_hash(ptr: number): number {
1344         if(!isWasmInitialized) {
1345                 throw new Error("initializeWasm() must be awaited first!");
1346         }
1347         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathSuccessful_get_payment_hash(ptr);
1348         return nativeResponseValue;
1349 }
1350 export function LDKEvent_PaymentPathSuccessful_get_path(ptr: number): number {
1351         if(!isWasmInitialized) {
1352                 throw new Error("initializeWasm() must be awaited first!");
1353         }
1354         const nativeResponseValue = wasm.TS_LDKEvent_PaymentPathSuccessful_get_path(ptr);
1355         return nativeResponseValue;
1356 }
1357         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1358 export function C2Tuple_usizeTransactionZ_get_a(owner: number): number {
1359         if(!isWasmInitialized) {
1360                 throw new Error("initializeWasm() must be awaited first!");
1361         }
1362         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_a(owner);
1363         return nativeResponseValue;
1364 }
1365         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
1366 export function C2Tuple_usizeTransactionZ_get_b(owner: number): number {
1367         if(!isWasmInitialized) {
1368                 throw new Error("initializeWasm() must be awaited first!");
1369         }
1370         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_get_b(owner);
1371         return nativeResponseValue;
1372 }
1373         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1374 export function C2Tuple_u32TxOutZ_get_a(owner: number): number {
1375         if(!isWasmInitialized) {
1376                 throw new Error("initializeWasm() must be awaited first!");
1377         }
1378         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_a(owner);
1379         return nativeResponseValue;
1380 }
1381         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1382 export function C2Tuple_u32TxOutZ_get_b(owner: number): number {
1383         if(!isWasmInitialized) {
1384                 throw new Error("initializeWasm() must be awaited first!");
1385         }
1386         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_get_b(owner);
1387         return nativeResponseValue;
1388 }
1389         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1390 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner: number): number {
1391         if(!isWasmInitialized) {
1392                 throw new Error("initializeWasm() must be awaited first!");
1393         }
1394         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(owner);
1395         return nativeResponseValue;
1396 }
1397         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1398 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner: number): number {
1399         if(!isWasmInitialized) {
1400                 throw new Error("initializeWasm() must be awaited first!");
1401         }
1402         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(owner);
1403         return nativeResponseValue;
1404 }
1405 export class LDKBalance {
1406         protected constructor() {}
1407 }
1408 export function LDKBalance_ty_from_ptr(ptr: number): number {
1409         if(!isWasmInitialized) {
1410                 throw new Error("initializeWasm() must be awaited first!");
1411         }
1412         const nativeResponseValue = wasm.TS_LDKBalance_ty_from_ptr(ptr);
1413         return nativeResponseValue;
1414 }
1415 export function LDKBalance_ClaimableOnChannelClose_get_claimable_amount_satoshis(ptr: number): bigint {
1416         if(!isWasmInitialized) {
1417                 throw new Error("initializeWasm() must be awaited first!");
1418         }
1419         const nativeResponseValue = wasm.TS_LDKBalance_ClaimableOnChannelClose_get_claimable_amount_satoshis(ptr);
1420         return nativeResponseValue;
1421 }
1422 export function LDKBalance_ClaimableAwaitingConfirmations_get_claimable_amount_satoshis(ptr: number): bigint {
1423         if(!isWasmInitialized) {
1424                 throw new Error("initializeWasm() must be awaited first!");
1425         }
1426         const nativeResponseValue = wasm.TS_LDKBalance_ClaimableAwaitingConfirmations_get_claimable_amount_satoshis(ptr);
1427         return nativeResponseValue;
1428 }
1429 export function LDKBalance_ClaimableAwaitingConfirmations_get_confirmation_height(ptr: number): number {
1430         if(!isWasmInitialized) {
1431                 throw new Error("initializeWasm() must be awaited first!");
1432         }
1433         const nativeResponseValue = wasm.TS_LDKBalance_ClaimableAwaitingConfirmations_get_confirmation_height(ptr);
1434         return nativeResponseValue;
1435 }
1436 export function LDKBalance_ContentiousClaimable_get_claimable_amount_satoshis(ptr: number): bigint {
1437         if(!isWasmInitialized) {
1438                 throw new Error("initializeWasm() must be awaited first!");
1439         }
1440         const nativeResponseValue = wasm.TS_LDKBalance_ContentiousClaimable_get_claimable_amount_satoshis(ptr);
1441         return nativeResponseValue;
1442 }
1443 export function LDKBalance_ContentiousClaimable_get_timeout_height(ptr: number): number {
1444         if(!isWasmInitialized) {
1445                 throw new Error("initializeWasm() must be awaited first!");
1446         }
1447         const nativeResponseValue = wasm.TS_LDKBalance_ContentiousClaimable_get_timeout_height(ptr);
1448         return nativeResponseValue;
1449 }
1450 export function LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_amount_satoshis(ptr: number): bigint {
1451         if(!isWasmInitialized) {
1452                 throw new Error("initializeWasm() must be awaited first!");
1453         }
1454         const nativeResponseValue = wasm.TS_LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_amount_satoshis(ptr);
1455         return nativeResponseValue;
1456 }
1457 export function LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_height(ptr: number): number {
1458         if(!isWasmInitialized) {
1459                 throw new Error("initializeWasm() must be awaited first!");
1460         }
1461         const nativeResponseValue = wasm.TS_LDKBalance_MaybeClaimableHTLCAwaitingTimeout_get_claimable_height(ptr);
1462         return nativeResponseValue;
1463 }
1464         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1465 export function C2Tuple_SignatureCVec_SignatureZZ_get_a(owner: number): number {
1466         if(!isWasmInitialized) {
1467                 throw new Error("initializeWasm() must be awaited first!");
1468         }
1469         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_a(owner);
1470         return nativeResponseValue;
1471 }
1472         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
1473 export function C2Tuple_SignatureCVec_SignatureZZ_get_b(owner: number): number {
1474         if(!isWasmInitialized) {
1475                 throw new Error("initializeWasm() must be awaited first!");
1476         }
1477         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_get_b(owner);
1478         return nativeResponseValue;
1479 }
1480         // struct LDKC2Tuple_SignatureCVec_SignatureZZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1481 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner: number): number {
1482         if(!isWasmInitialized) {
1483                 throw new Error("initializeWasm() must be awaited first!");
1484         }
1485         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(owner);
1486         return nativeResponseValue;
1487 }
1488         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
1489 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner: number): void {
1490         if(!isWasmInitialized) {
1491                 throw new Error("initializeWasm() must be awaited first!");
1492         }
1493         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(owner);
1494         // debug statements here
1495 }
1496         // struct LDKSignature CResult_SignatureNoneZ_get_ok(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1497 export function CResult_SignatureNoneZ_get_ok(owner: number): number {
1498         if(!isWasmInitialized) {
1499                 throw new Error("initializeWasm() must be awaited first!");
1500         }
1501         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_ok(owner);
1502         return nativeResponseValue;
1503 }
1504         // void CResult_SignatureNoneZ_get_err(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
1505 export function CResult_SignatureNoneZ_get_err(owner: number): void {
1506         if(!isWasmInitialized) {
1507                 throw new Error("initializeWasm() must be awaited first!");
1508         }
1509         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_get_err(owner);
1510         // debug statements here
1511 }
1512
1513
1514
1515 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1516
1517 export interface LDKBaseSign {
1518         get_per_commitment_point (idx: bigint): number;
1519         release_commitment_secret (idx: bigint): number;
1520         validate_holder_commitment (holder_tx: number): number;
1521         channel_keys_id (): number;
1522         sign_counterparty_commitment (commitment_tx: number): number;
1523         validate_counterparty_revocation (idx: bigint, secret: number): number;
1524         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
1525         sign_justice_revoked_output (justice_tx: number, input: number, amount: bigint, per_commitment_key: number): number;
1526         sign_justice_revoked_htlc (justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: number): number;
1527         sign_counterparty_htlc_transaction (htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: number): number;
1528         sign_closing_transaction (closing_tx: number): number;
1529         sign_channel_announcement (msg: number): number;
1530         ready_channel (channel_parameters: number): void;
1531 }
1532
1533 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
1534         if(!isWasmInitialized) {
1535                 throw new Error("initializeWasm() must be awaited first!");
1536         }
1537         var new_obj_idx = js_objs.length;
1538         for (var i = 0; i < js_objs.length; i++) {
1539                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
1540         }
1541         js_objs[i] = new WeakRef(impl);
1542         return wasm.TS_LDKBaseSign_new(i);
1543 }
1544
1545 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1546
1547
1548         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1549 export function BaseSign_get_per_commitment_point(this_arg: number, idx: bigint): number {
1550         if(!isWasmInitialized) {
1551                 throw new Error("initializeWasm() must be awaited first!");
1552         }
1553         const nativeResponseValue = wasm.TS_BaseSign_get_per_commitment_point(this_arg, idx);
1554         return nativeResponseValue;
1555 }
1556         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
1557 export function BaseSign_release_commitment_secret(this_arg: number, idx: bigint): number {
1558         if(!isWasmInitialized) {
1559                 throw new Error("initializeWasm() must be awaited first!");
1560         }
1561         const nativeResponseValue = wasm.TS_BaseSign_release_commitment_secret(this_arg, idx);
1562         return nativeResponseValue;
1563 }
1564         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
1565 export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
1566         if(!isWasmInitialized) {
1567                 throw new Error("initializeWasm() must be awaited first!");
1568         }
1569         const nativeResponseValue = wasm.TS_BaseSign_validate_holder_commitment(this_arg, holder_tx);
1570         return nativeResponseValue;
1571 }
1572         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
1573 export function BaseSign_channel_keys_id(this_arg: number): number {
1574         if(!isWasmInitialized) {
1575                 throw new Error("initializeWasm() must be awaited first!");
1576         }
1577         const nativeResponseValue = wasm.TS_BaseSign_channel_keys_id(this_arg);
1578         return nativeResponseValue;
1579 }
1580         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
1581 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
1582         if(!isWasmInitialized) {
1583                 throw new Error("initializeWasm() must be awaited first!");
1584         }
1585         const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
1586         return nativeResponseValue;
1587 }
1588         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
1589 export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: bigint, secret: number): number {
1590         if(!isWasmInitialized) {
1591                 throw new Error("initializeWasm() must be awaited first!");
1592         }
1593         const nativeResponseValue = wasm.TS_BaseSign_validate_counterparty_revocation(this_arg, idx, secret);
1594         return nativeResponseValue;
1595 }
1596         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
1597 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
1598         if(!isWasmInitialized) {
1599                 throw new Error("initializeWasm() must be awaited first!");
1600         }
1601         const nativeResponseValue = wasm.TS_BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
1602         return nativeResponseValue;
1603 }
1604         // 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]
1605 export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: number, input: number, amount: bigint, per_commitment_key: number): number {
1606         if(!isWasmInitialized) {
1607                 throw new Error("initializeWasm() must be awaited first!");
1608         }
1609         const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_output(this_arg, justice_tx, input, amount, per_commitment_key);
1610         return nativeResponseValue;
1611 }
1612         // 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
1613 export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: number, input: number, amount: bigint, per_commitment_key: number, htlc: number): number {
1614         if(!isWasmInitialized) {
1615                 throw new Error("initializeWasm() must be awaited first!");
1616         }
1617         const nativeResponseValue = wasm.TS_BaseSign_sign_justice_revoked_htlc(this_arg, justice_tx, input, amount, per_commitment_key, htlc);
1618         return nativeResponseValue;
1619 }
1620         // 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
1621 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: number, input: number, amount: bigint, per_commitment_point: number, htlc: number): number {
1622         if(!isWasmInitialized) {
1623                 throw new Error("initializeWasm() must be awaited first!");
1624         }
1625         const nativeResponseValue = wasm.TS_BaseSign_sign_counterparty_htlc_transaction(this_arg, htlc_tx, input, amount, per_commitment_point, htlc);
1626         return nativeResponseValue;
1627 }
1628         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
1629 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
1630         if(!isWasmInitialized) {
1631                 throw new Error("initializeWasm() must be awaited first!");
1632         }
1633         const nativeResponseValue = wasm.TS_BaseSign_sign_closing_transaction(this_arg, closing_tx);
1634         return nativeResponseValue;
1635 }
1636         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
1637 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
1638         if(!isWasmInitialized) {
1639                 throw new Error("initializeWasm() must be awaited first!");
1640         }
1641         const nativeResponseValue = wasm.TS_BaseSign_sign_channel_announcement(this_arg, msg);
1642         return nativeResponseValue;
1643 }
1644         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
1645 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
1646         if(!isWasmInitialized) {
1647                 throw new Error("initializeWasm() must be awaited first!");
1648         }
1649         const nativeResponseValue = wasm.TS_BaseSign_ready_channel(this_arg, channel_parameters);
1650         // debug statements here
1651 }
1652         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
1653 export function BaseSign_get_pubkeys(this_arg: number): number {
1654         if(!isWasmInitialized) {
1655                 throw new Error("initializeWasm() must be awaited first!");
1656         }
1657         const nativeResponseValue = wasm.TS_BaseSign_get_pubkeys(this_arg);
1658         return nativeResponseValue;
1659 }
1660
1661
1662
1663 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1664
1665 export interface LDKSign {
1666         write (): number;
1667 }
1668
1669 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
1670         if(!isWasmInitialized) {
1671                 throw new Error("initializeWasm() must be awaited first!");
1672         }
1673         var new_obj_idx = js_objs.length;
1674         for (var i = 0; i < js_objs.length; i++) {
1675                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
1676         }
1677         js_objs[i] = new WeakRef(impl);
1678         return wasm.TS_LDKSign_new(i);
1679 }
1680
1681 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1682
1683
1684         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
1685 export function Sign_write(this_arg: number): number {
1686         if(!isWasmInitialized) {
1687                 throw new Error("initializeWasm() must be awaited first!");
1688         }
1689         const nativeResponseValue = wasm.TS_Sign_write(this_arg);
1690         return nativeResponseValue;
1691 }
1692         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1693 export function C2Tuple_BlockHashChannelMonitorZ_get_a(owner: number): number {
1694         if(!isWasmInitialized) {
1695                 throw new Error("initializeWasm() must be awaited first!");
1696         }
1697         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_a(owner);
1698         return nativeResponseValue;
1699 }
1700         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
1701 export function C2Tuple_BlockHashChannelMonitorZ_get_b(owner: number): number {
1702         if(!isWasmInitialized) {
1703                 throw new Error("initializeWasm() must be awaited first!");
1704         }
1705         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_get_b(owner);
1706         return nativeResponseValue;
1707 }
1708         // struct LDKC2Tuple_BlockHashChannelMonitorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1709 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner: number): number {
1710         if(!isWasmInitialized) {
1711                 throw new Error("initializeWasm() must be awaited first!");
1712         }
1713         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(owner);
1714         return nativeResponseValue;
1715 }
1716         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1717 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner: number): number {
1718         if(!isWasmInitialized) {
1719                 throw new Error("initializeWasm() must be awaited first!");
1720         }
1721         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(owner);
1722         return nativeResponseValue;
1723 }
1724         // struct LDKRouteHop CResult_RouteHopDecodeErrorZ_get_ok(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1725 export function CResult_RouteHopDecodeErrorZ_get_ok(owner: number): number {
1726         if(!isWasmInitialized) {
1727                 throw new Error("initializeWasm() must be awaited first!");
1728         }
1729         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_ok(owner);
1730         return nativeResponseValue;
1731 }
1732         // struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
1733 export function CResult_RouteHopDecodeErrorZ_get_err(owner: number): number {
1734         if(!isWasmInitialized) {
1735                 throw new Error("initializeWasm() must be awaited first!");
1736         }
1737         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_get_err(owner);
1738         return nativeResponseValue;
1739 }
1740         // struct LDKRoute CResult_RouteDecodeErrorZ_get_ok(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1741 export function CResult_RouteDecodeErrorZ_get_ok(owner: number): number {
1742         if(!isWasmInitialized) {
1743                 throw new Error("initializeWasm() must be awaited first!");
1744         }
1745         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_ok(owner);
1746         return nativeResponseValue;
1747 }
1748         // struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
1749 export function CResult_RouteDecodeErrorZ_get_err(owner: number): number {
1750         if(!isWasmInitialized) {
1751                 throw new Error("initializeWasm() must be awaited first!");
1752         }
1753         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_get_err(owner);
1754         return nativeResponseValue;
1755 }
1756         // struct LDKRouteParameters CResult_RouteParametersDecodeErrorZ_get_ok(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1757 export function CResult_RouteParametersDecodeErrorZ_get_ok(owner: number): number {
1758         if(!isWasmInitialized) {
1759                 throw new Error("initializeWasm() must be awaited first!");
1760         }
1761         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_ok(owner);
1762         return nativeResponseValue;
1763 }
1764         // struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
1765 export function CResult_RouteParametersDecodeErrorZ_get_err(owner: number): number {
1766         if(!isWasmInitialized) {
1767                 throw new Error("initializeWasm() must be awaited first!");
1768         }
1769         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_get_err(owner);
1770         return nativeResponseValue;
1771 }
1772         // struct LDKPayee CResult_PayeeDecodeErrorZ_get_ok(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1773 export function CResult_PayeeDecodeErrorZ_get_ok(owner: number): number {
1774         if(!isWasmInitialized) {
1775                 throw new Error("initializeWasm() must be awaited first!");
1776         }
1777         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_ok(owner);
1778         return nativeResponseValue;
1779 }
1780         // struct LDKDecodeError CResult_PayeeDecodeErrorZ_get_err(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
1781 export function CResult_PayeeDecodeErrorZ_get_err(owner: number): number {
1782         if(!isWasmInitialized) {
1783                 throw new Error("initializeWasm() must be awaited first!");
1784         }
1785         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_get_err(owner);
1786         return nativeResponseValue;
1787 }
1788         // struct LDKRouteHint CResult_RouteHintDecodeErrorZ_get_ok(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1789 export function CResult_RouteHintDecodeErrorZ_get_ok(owner: number): number {
1790         if(!isWasmInitialized) {
1791                 throw new Error("initializeWasm() must be awaited first!");
1792         }
1793         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_ok(owner);
1794         return nativeResponseValue;
1795 }
1796         // struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
1797 export function CResult_RouteHintDecodeErrorZ_get_err(owner: number): number {
1798         if(!isWasmInitialized) {
1799                 throw new Error("initializeWasm() must be awaited first!");
1800         }
1801         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_get_err(owner);
1802         return nativeResponseValue;
1803 }
1804         // struct LDKRouteHintHop CResult_RouteHintHopDecodeErrorZ_get_ok(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
1805 export function CResult_RouteHintHopDecodeErrorZ_get_ok(owner: number): number {
1806         if(!isWasmInitialized) {
1807                 throw new Error("initializeWasm() must be awaited first!");
1808         }
1809         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_ok(owner);
1810         return nativeResponseValue;
1811 }
1812         // struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
1813 export function CResult_RouteHintHopDecodeErrorZ_get_err(owner: number): number {
1814         if(!isWasmInitialized) {
1815                 throw new Error("initializeWasm() must be awaited first!");
1816         }
1817         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_get_err(owner);
1818         return nativeResponseValue;
1819 }
1820         // struct LDKRoute CResult_RouteLightningErrorZ_get_ok(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
1821 export function CResult_RouteLightningErrorZ_get_ok(owner: number): number {
1822         if(!isWasmInitialized) {
1823                 throw new Error("initializeWasm() must be awaited first!");
1824         }
1825         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_ok(owner);
1826         return nativeResponseValue;
1827 }
1828         // struct LDKLightningError CResult_RouteLightningErrorZ_get_err(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
1829 export function CResult_RouteLightningErrorZ_get_err(owner: number): number {
1830         if(!isWasmInitialized) {
1831                 throw new Error("initializeWasm() must be awaited first!");
1832         }
1833         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_get_err(owner);
1834         return nativeResponseValue;
1835 }
1836         // void CResult_NoneLightningErrorZ_get_ok(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1837 export function CResult_NoneLightningErrorZ_get_ok(owner: number): void {
1838         if(!isWasmInitialized) {
1839                 throw new Error("initializeWasm() must be awaited first!");
1840         }
1841         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_ok(owner);
1842         // debug statements here
1843 }
1844         // struct LDKLightningError CResult_NoneLightningErrorZ_get_err(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1845 export function CResult_NoneLightningErrorZ_get_err(owner: number): number {
1846         if(!isWasmInitialized) {
1847                 throw new Error("initializeWasm() must be awaited first!");
1848         }
1849         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_get_err(owner);
1850         return nativeResponseValue;
1851 }
1852         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1853 export function C2Tuple_PublicKeyTypeZ_get_a(owner: number): number {
1854         if(!isWasmInitialized) {
1855                 throw new Error("initializeWasm() must be awaited first!");
1856         }
1857         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_a(owner);
1858         return nativeResponseValue;
1859 }
1860         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1861 export function C2Tuple_PublicKeyTypeZ_get_b(owner: number): number {
1862         if(!isWasmInitialized) {
1863                 throw new Error("initializeWasm() must be awaited first!");
1864         }
1865         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_get_b(owner);
1866         return nativeResponseValue;
1867 }
1868 export class LDKErrorAction {
1869         protected constructor() {}
1870 }
1871 export function LDKErrorAction_ty_from_ptr(ptr: number): number {
1872         if(!isWasmInitialized) {
1873                 throw new Error("initializeWasm() must be awaited first!");
1874         }
1875         const nativeResponseValue = wasm.TS_LDKErrorAction_ty_from_ptr(ptr);
1876         return nativeResponseValue;
1877 }
1878 export function LDKErrorAction_DisconnectPeer_get_msg(ptr: number): number {
1879         if(!isWasmInitialized) {
1880                 throw new Error("initializeWasm() must be awaited first!");
1881         }
1882         const nativeResponseValue = wasm.TS_LDKErrorAction_DisconnectPeer_get_msg(ptr);
1883         return nativeResponseValue;
1884 }
1885 export function LDKErrorAction_IgnoreAndLog_get_ignore_and_log(ptr: number): Level {
1886         if(!isWasmInitialized) {
1887                 throw new Error("initializeWasm() must be awaited first!");
1888         }
1889         const nativeResponseValue = wasm.TS_LDKErrorAction_IgnoreAndLog_get_ignore_and_log(ptr);
1890         return nativeResponseValue;
1891 }
1892 export function LDKErrorAction_SendErrorMessage_get_msg(ptr: number): number {
1893         if(!isWasmInitialized) {
1894                 throw new Error("initializeWasm() must be awaited first!");
1895         }
1896         const nativeResponseValue = wasm.TS_LDKErrorAction_SendErrorMessage_get_msg(ptr);
1897         return nativeResponseValue;
1898 }
1899 export class LDKMessageSendEvent {
1900         protected constructor() {}
1901 }
1902 export function LDKMessageSendEvent_ty_from_ptr(ptr: number): number {
1903         if(!isWasmInitialized) {
1904                 throw new Error("initializeWasm() must be awaited first!");
1905         }
1906         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_ty_from_ptr(ptr);
1907         return nativeResponseValue;
1908 }
1909 export function LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr: number): number {
1910         if(!isWasmInitialized) {
1911                 throw new Error("initializeWasm() must be awaited first!");
1912         }
1913         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAcceptChannel_get_node_id(ptr);
1914         return nativeResponseValue;
1915 }
1916 export function LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr: number): number {
1917         if(!isWasmInitialized) {
1918                 throw new Error("initializeWasm() must be awaited first!");
1919         }
1920         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAcceptChannel_get_msg(ptr);
1921         return nativeResponseValue;
1922 }
1923 export function LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr: number): number {
1924         if(!isWasmInitialized) {
1925                 throw new Error("initializeWasm() must be awaited first!");
1926         }
1927         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendOpenChannel_get_node_id(ptr);
1928         return nativeResponseValue;
1929 }
1930 export function LDKMessageSendEvent_SendOpenChannel_get_msg(ptr: number): number {
1931         if(!isWasmInitialized) {
1932                 throw new Error("initializeWasm() must be awaited first!");
1933         }
1934         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendOpenChannel_get_msg(ptr);
1935         return nativeResponseValue;
1936 }
1937 export function LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr: number): number {
1938         if(!isWasmInitialized) {
1939                 throw new Error("initializeWasm() must be awaited first!");
1940         }
1941         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingCreated_get_node_id(ptr);
1942         return nativeResponseValue;
1943 }
1944 export function LDKMessageSendEvent_SendFundingCreated_get_msg(ptr: number): number {
1945         if(!isWasmInitialized) {
1946                 throw new Error("initializeWasm() must be awaited first!");
1947         }
1948         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingCreated_get_msg(ptr);
1949         return nativeResponseValue;
1950 }
1951 export function LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr: number): number {
1952         if(!isWasmInitialized) {
1953                 throw new Error("initializeWasm() must be awaited first!");
1954         }
1955         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingSigned_get_node_id(ptr);
1956         return nativeResponseValue;
1957 }
1958 export function LDKMessageSendEvent_SendFundingSigned_get_msg(ptr: number): number {
1959         if(!isWasmInitialized) {
1960                 throw new Error("initializeWasm() must be awaited first!");
1961         }
1962         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingSigned_get_msg(ptr);
1963         return nativeResponseValue;
1964 }
1965 export function LDKMessageSendEvent_SendFundingLocked_get_node_id(ptr: number): number {
1966         if(!isWasmInitialized) {
1967                 throw new Error("initializeWasm() must be awaited first!");
1968         }
1969         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingLocked_get_node_id(ptr);
1970         return nativeResponseValue;
1971 }
1972 export function LDKMessageSendEvent_SendFundingLocked_get_msg(ptr: number): number {
1973         if(!isWasmInitialized) {
1974                 throw new Error("initializeWasm() must be awaited first!");
1975         }
1976         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendFundingLocked_get_msg(ptr);
1977         return nativeResponseValue;
1978 }
1979 export function LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr: number): number {
1980         if(!isWasmInitialized) {
1981                 throw new Error("initializeWasm() must be awaited first!");
1982         }
1983         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_node_id(ptr);
1984         return nativeResponseValue;
1985 }
1986 export function LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr: number): number {
1987         if(!isWasmInitialized) {
1988                 throw new Error("initializeWasm() must be awaited first!");
1989         }
1990         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendAnnouncementSignatures_get_msg(ptr);
1991         return nativeResponseValue;
1992 }
1993 export function LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr: number): number {
1994         if(!isWasmInitialized) {
1995                 throw new Error("initializeWasm() must be awaited first!");
1996         }
1997         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_UpdateHTLCs_get_node_id(ptr);
1998         return nativeResponseValue;
1999 }
2000 export function LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr: number): number {
2001         if(!isWasmInitialized) {
2002                 throw new Error("initializeWasm() must be awaited first!");
2003         }
2004         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_UpdateHTLCs_get_updates(ptr);
2005         return nativeResponseValue;
2006 }
2007 export function LDKMessageSendEvent_SendRevokeAndACK_get_node_id(ptr: number): number {
2008         if(!isWasmInitialized) {
2009                 throw new Error("initializeWasm() must be awaited first!");
2010         }
2011         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendRevokeAndACK_get_node_id(ptr);
2012         return nativeResponseValue;
2013 }
2014 export function LDKMessageSendEvent_SendRevokeAndACK_get_msg(ptr: number): number {
2015         if(!isWasmInitialized) {
2016                 throw new Error("initializeWasm() must be awaited first!");
2017         }
2018         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendRevokeAndACK_get_msg(ptr);
2019         return nativeResponseValue;
2020 }
2021 export function LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr: number): number {
2022         if(!isWasmInitialized) {
2023                 throw new Error("initializeWasm() must be awaited first!");
2024         }
2025         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendClosingSigned_get_node_id(ptr);
2026         return nativeResponseValue;
2027 }
2028 export function LDKMessageSendEvent_SendClosingSigned_get_msg(ptr: number): number {
2029         if(!isWasmInitialized) {
2030                 throw new Error("initializeWasm() must be awaited first!");
2031         }
2032         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendClosingSigned_get_msg(ptr);
2033         return nativeResponseValue;
2034 }
2035 export function LDKMessageSendEvent_SendShutdown_get_node_id(ptr: number): number {
2036         if(!isWasmInitialized) {
2037                 throw new Error("initializeWasm() must be awaited first!");
2038         }
2039         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShutdown_get_node_id(ptr);
2040         return nativeResponseValue;
2041 }
2042 export function LDKMessageSendEvent_SendShutdown_get_msg(ptr: number): number {
2043         if(!isWasmInitialized) {
2044                 throw new Error("initializeWasm() must be awaited first!");
2045         }
2046         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShutdown_get_msg(ptr);
2047         return nativeResponseValue;
2048 }
2049 export function LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr: number): number {
2050         if(!isWasmInitialized) {
2051                 throw new Error("initializeWasm() must be awaited first!");
2052         }
2053         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelReestablish_get_node_id(ptr);
2054         return nativeResponseValue;
2055 }
2056 export function LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr: number): number {
2057         if(!isWasmInitialized) {
2058                 throw new Error("initializeWasm() must be awaited first!");
2059         }
2060         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelReestablish_get_msg(ptr);
2061         return nativeResponseValue;
2062 }
2063 export function LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr: number): number {
2064         if(!isWasmInitialized) {
2065                 throw new Error("initializeWasm() must be awaited first!");
2066         }
2067         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_msg(ptr);
2068         return nativeResponseValue;
2069 }
2070 export function LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr: number): number {
2071         if(!isWasmInitialized) {
2072                 throw new Error("initializeWasm() must be awaited first!");
2073         }
2074         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastChannelAnnouncement_get_update_msg(ptr);
2075         return nativeResponseValue;
2076 }
2077 export function LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr: number): number {
2078         if(!isWasmInitialized) {
2079                 throw new Error("initializeWasm() must be awaited first!");
2080         }
2081         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastNodeAnnouncement_get_msg(ptr);
2082         return nativeResponseValue;
2083 }
2084 export function LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr: number): number {
2085         if(!isWasmInitialized) {
2086                 throw new Error("initializeWasm() must be awaited first!");
2087         }
2088         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_BroadcastChannelUpdate_get_msg(ptr);
2089         return nativeResponseValue;
2090 }
2091 export function LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr: number): number {
2092         if(!isWasmInitialized) {
2093                 throw new Error("initializeWasm() must be awaited first!");
2094         }
2095         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelUpdate_get_node_id(ptr);
2096         return nativeResponseValue;
2097 }
2098 export function LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr: number): number {
2099         if(!isWasmInitialized) {
2100                 throw new Error("initializeWasm() must be awaited first!");
2101         }
2102         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelUpdate_get_msg(ptr);
2103         return nativeResponseValue;
2104 }
2105 export function LDKMessageSendEvent_HandleError_get_node_id(ptr: number): number {
2106         if(!isWasmInitialized) {
2107                 throw new Error("initializeWasm() must be awaited first!");
2108         }
2109         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_HandleError_get_node_id(ptr);
2110         return nativeResponseValue;
2111 }
2112 export function LDKMessageSendEvent_HandleError_get_action(ptr: number): number {
2113         if(!isWasmInitialized) {
2114                 throw new Error("initializeWasm() must be awaited first!");
2115         }
2116         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_HandleError_get_action(ptr);
2117         return nativeResponseValue;
2118 }
2119 export function LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr: number): number {
2120         if(!isWasmInitialized) {
2121                 throw new Error("initializeWasm() must be awaited first!");
2122         }
2123         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelRangeQuery_get_node_id(ptr);
2124         return nativeResponseValue;
2125 }
2126 export function LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr: number): number {
2127         if(!isWasmInitialized) {
2128                 throw new Error("initializeWasm() must be awaited first!");
2129         }
2130         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendChannelRangeQuery_get_msg(ptr);
2131         return nativeResponseValue;
2132 }
2133 export function LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr: number): number {
2134         if(!isWasmInitialized) {
2135                 throw new Error("initializeWasm() must be awaited first!");
2136         }
2137         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShortIdsQuery_get_node_id(ptr);
2138         return nativeResponseValue;
2139 }
2140 export function LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr: number): number {
2141         if(!isWasmInitialized) {
2142                 throw new Error("initializeWasm() must be awaited first!");
2143         }
2144         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendShortIdsQuery_get_msg(ptr);
2145         return nativeResponseValue;
2146 }
2147 export function LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr: number): number {
2148         if(!isWasmInitialized) {
2149                 throw new Error("initializeWasm() must be awaited first!");
2150         }
2151         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendReplyChannelRange_get_node_id(ptr);
2152         return nativeResponseValue;
2153 }
2154 export function LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr: number): number {
2155         if(!isWasmInitialized) {
2156                 throw new Error("initializeWasm() must be awaited first!");
2157         }
2158         const nativeResponseValue = wasm.TS_LDKMessageSendEvent_SendReplyChannelRange_get_msg(ptr);
2159         return nativeResponseValue;
2160 }
2161         // bool CResult_boolLightningErrorZ_get_ok(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
2162 export function CResult_boolLightningErrorZ_get_ok(owner: number): boolean {
2163         if(!isWasmInitialized) {
2164                 throw new Error("initializeWasm() must be awaited first!");
2165         }
2166         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_ok(owner);
2167         return nativeResponseValue;
2168 }
2169         // struct LDKLightningError CResult_boolLightningErrorZ_get_err(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
2170 export function CResult_boolLightningErrorZ_get_err(owner: number): number {
2171         if(!isWasmInitialized) {
2172                 throw new Error("initializeWasm() must be awaited first!");
2173         }
2174         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_get_err(owner);
2175         return nativeResponseValue;
2176 }
2177         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
2178 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner: number): number {
2179         if(!isWasmInitialized) {
2180                 throw new Error("initializeWasm() must be awaited first!");
2181         }
2182         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(owner);
2183         return nativeResponseValue;
2184 }
2185         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
2186 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner: number): number {
2187         if(!isWasmInitialized) {
2188                 throw new Error("initializeWasm() must be awaited first!");
2189         }
2190         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(owner);
2191         return nativeResponseValue;
2192 }
2193         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
2194 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner: number): number {
2195         if(!isWasmInitialized) {
2196                 throw new Error("initializeWasm() must be awaited first!");
2197         }
2198         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(owner);
2199         return nativeResponseValue;
2200 }
2201         // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
2202 export function CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner: number): number {
2203         if(!isWasmInitialized) {
2204                 throw new Error("initializeWasm() must be awaited first!");
2205         }
2206         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_ok(owner);
2207         return nativeResponseValue;
2208 }
2209         // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
2210 export function CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner: number): number {
2211         if(!isWasmInitialized) {
2212                 throw new Error("initializeWasm() must be awaited first!");
2213         }
2214         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_get_err(owner);
2215         return nativeResponseValue;
2216 }
2217         // void CResult_NonePeerHandleErrorZ_get_ok(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
2218 export function CResult_NonePeerHandleErrorZ_get_ok(owner: number): void {
2219         if(!isWasmInitialized) {
2220                 throw new Error("initializeWasm() must be awaited first!");
2221         }
2222         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_ok(owner);
2223         // debug statements here
2224 }
2225         // struct LDKPeerHandleError CResult_NonePeerHandleErrorZ_get_err(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
2226 export function CResult_NonePeerHandleErrorZ_get_err(owner: number): number {
2227         if(!isWasmInitialized) {
2228                 throw new Error("initializeWasm() must be awaited first!");
2229         }
2230         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_get_err(owner);
2231         return nativeResponseValue;
2232 }
2233         // bool CResult_boolPeerHandleErrorZ_get_ok(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
2234 export function CResult_boolPeerHandleErrorZ_get_ok(owner: number): boolean {
2235         if(!isWasmInitialized) {
2236                 throw new Error("initializeWasm() must be awaited first!");
2237         }
2238         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_ok(owner);
2239         return nativeResponseValue;
2240 }
2241         // struct LDKPeerHandleError CResult_boolPeerHandleErrorZ_get_err(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
2242 export function CResult_boolPeerHandleErrorZ_get_err(owner: number): number {
2243         if(!isWasmInitialized) {
2244                 throw new Error("initializeWasm() must be awaited first!");
2245         }
2246         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_get_err(owner);
2247         return nativeResponseValue;
2248 }
2249         // struct LDKTxOut CResult_TxOutAccessErrorZ_get_ok(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
2250 export function CResult_TxOutAccessErrorZ_get_ok(owner: number): number {
2251         if(!isWasmInitialized) {
2252                 throw new Error("initializeWasm() must be awaited first!");
2253         }
2254         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_ok(owner);
2255         return nativeResponseValue;
2256 }
2257         // enum LDKAccessError CResult_TxOutAccessErrorZ_get_err(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
2258 export function CResult_TxOutAccessErrorZ_get_err(owner: number): AccessError {
2259         if(!isWasmInitialized) {
2260                 throw new Error("initializeWasm() must be awaited first!");
2261         }
2262         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_get_err(owner);
2263         return nativeResponseValue;
2264 }
2265         // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
2266 export function CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner: number): void {
2267         if(!isWasmInitialized) {
2268                 throw new Error("initializeWasm() must be awaited first!");
2269         }
2270         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_ok(owner);
2271         // debug statements here
2272 }
2273         // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
2274 export function CResult_NoneChannelMonitorUpdateErrZ_get_err(owner: number): ChannelMonitorUpdateErr {
2275         if(!isWasmInitialized) {
2276                 throw new Error("initializeWasm() must be awaited first!");
2277         }
2278         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_get_err(owner);
2279         return nativeResponseValue;
2280 }
2281 export class LDKCOption_C2Tuple_usizeTransactionZZ {
2282         protected constructor() {}
2283 }
2284 export function LDKCOption_C2Tuple_usizeTransactionZZ_ty_from_ptr(ptr: number): number {
2285         if(!isWasmInitialized) {
2286                 throw new Error("initializeWasm() must be awaited first!");
2287         }
2288         const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_usizeTransactionZZ_ty_from_ptr(ptr);
2289         return nativeResponseValue;
2290 }
2291 export function LDKCOption_C2Tuple_usizeTransactionZZ_Some_get_some(ptr: number): number {
2292         if(!isWasmInitialized) {
2293                 throw new Error("initializeWasm() must be awaited first!");
2294         }
2295         const nativeResponseValue = wasm.TS_LDKCOption_C2Tuple_usizeTransactionZZ_Some_get_some(ptr);
2296         return nativeResponseValue;
2297 }
2298 export class LDKCOption_ClosureReasonZ {
2299         protected constructor() {}
2300 }
2301 export function LDKCOption_ClosureReasonZ_ty_from_ptr(ptr: number): number {
2302         if(!isWasmInitialized) {
2303                 throw new Error("initializeWasm() must be awaited first!");
2304         }
2305         const nativeResponseValue = wasm.TS_LDKCOption_ClosureReasonZ_ty_from_ptr(ptr);
2306         return nativeResponseValue;
2307 }
2308 export function LDKCOption_ClosureReasonZ_Some_get_some(ptr: number): number {
2309         if(!isWasmInitialized) {
2310                 throw new Error("initializeWasm() must be awaited first!");
2311         }
2312         const nativeResponseValue = wasm.TS_LDKCOption_ClosureReasonZ_Some_get_some(ptr);
2313         return nativeResponseValue;
2314 }
2315         // struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
2316 export function CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner: number): number {
2317         if(!isWasmInitialized) {
2318                 throw new Error("initializeWasm() must be awaited first!");
2319         }
2320         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(owner);
2321         return nativeResponseValue;
2322 }
2323         // struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
2324 export function CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner: number): number {
2325         if(!isWasmInitialized) {
2326                 throw new Error("initializeWasm() must be awaited first!");
2327         }
2328         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_get_err(owner);
2329         return nativeResponseValue;
2330 }
2331 export class LDKCOption_EventZ {
2332         protected constructor() {}
2333 }
2334 export function LDKCOption_EventZ_ty_from_ptr(ptr: number): number {
2335         if(!isWasmInitialized) {
2336                 throw new Error("initializeWasm() must be awaited first!");
2337         }
2338         const nativeResponseValue = wasm.TS_LDKCOption_EventZ_ty_from_ptr(ptr);
2339         return nativeResponseValue;
2340 }
2341 export function LDKCOption_EventZ_Some_get_some(ptr: number): number {
2342         if(!isWasmInitialized) {
2343                 throw new Error("initializeWasm() must be awaited first!");
2344         }
2345         const nativeResponseValue = wasm.TS_LDKCOption_EventZ_Some_get_some(ptr);
2346         return nativeResponseValue;
2347 }
2348         // struct LDKCOption_EventZ CResult_COption_EventZDecodeErrorZ_get_ok(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
2349 export function CResult_COption_EventZDecodeErrorZ_get_ok(owner: number): number {
2350         if(!isWasmInitialized) {
2351                 throw new Error("initializeWasm() must be awaited first!");
2352         }
2353         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_ok(owner);
2354         return nativeResponseValue;
2355 }
2356         // struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
2357 export function CResult_COption_EventZDecodeErrorZ_get_err(owner: number): number {
2358         if(!isWasmInitialized) {
2359                 throw new Error("initializeWasm() must be awaited first!");
2360         }
2361         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_get_err(owner);
2362         return nativeResponseValue;
2363 }
2364         // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
2365 export function CResult_NodeIdDecodeErrorZ_get_ok(owner: number): number {
2366         if(!isWasmInitialized) {
2367                 throw new Error("initializeWasm() must be awaited first!");
2368         }
2369         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_ok(owner);
2370         return nativeResponseValue;
2371 }
2372         // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
2373 export function CResult_NodeIdDecodeErrorZ_get_err(owner: number): number {
2374         if(!isWasmInitialized) {
2375                 throw new Error("initializeWasm() must be awaited first!");
2376         }
2377         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_get_err(owner);
2378         return nativeResponseValue;
2379 }
2380         // struct LDKCOption_NetworkUpdateZ CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
2381 export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner: number): number {
2382         if(!isWasmInitialized) {
2383                 throw new Error("initializeWasm() must be awaited first!");
2384         }
2385         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(owner);
2386         return nativeResponseValue;
2387 }
2388         // struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
2389 export function CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner: number): number {
2390         if(!isWasmInitialized) {
2391                 throw new Error("initializeWasm() must be awaited first!");
2392         }
2393         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(owner);
2394         return nativeResponseValue;
2395 }
2396
2397
2398
2399 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2400
2401 export interface LDKAccess {
2402         get_utxo (genesis_hash: number, short_channel_id: bigint): number;
2403 }
2404
2405 export function LDKAccess_new(impl: LDKAccess): number {
2406         if(!isWasmInitialized) {
2407                 throw new Error("initializeWasm() must be awaited first!");
2408         }
2409         var new_obj_idx = js_objs.length;
2410         for (var i = 0; i < js_objs.length; i++) {
2411                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
2412         }
2413         js_objs[i] = new WeakRef(impl);
2414         return wasm.TS_LDKAccess_new(i);
2415 }
2416
2417 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2418
2419
2420         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
2421 export function Access_get_utxo(this_arg: number, genesis_hash: number, short_channel_id: bigint): number {
2422         if(!isWasmInitialized) {
2423                 throw new Error("initializeWasm() must be awaited first!");
2424         }
2425         const nativeResponseValue = wasm.TS_Access_get_utxo(this_arg, genesis_hash, short_channel_id);
2426         return nativeResponseValue;
2427 }
2428 export class LDKCOption_AccessZ {
2429         protected constructor() {}
2430 }
2431 export function LDKCOption_AccessZ_ty_from_ptr(ptr: number): number {
2432         if(!isWasmInitialized) {
2433                 throw new Error("initializeWasm() must be awaited first!");
2434         }
2435         const nativeResponseValue = wasm.TS_LDKCOption_AccessZ_ty_from_ptr(ptr);
2436         return nativeResponseValue;
2437 }
2438 export function LDKCOption_AccessZ_Some_get_some(ptr: number): number {
2439         if(!isWasmInitialized) {
2440                 throw new Error("initializeWasm() must be awaited first!");
2441         }
2442         const nativeResponseValue = wasm.TS_LDKCOption_AccessZ_Some_get_some(ptr);
2443         return nativeResponseValue;
2444 }
2445         // struct LDKDirectionalChannelInfo CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2446 export function CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner: number): number {
2447         if(!isWasmInitialized) {
2448                 throw new Error("initializeWasm() must be awaited first!");
2449         }
2450         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(owner);
2451         return nativeResponseValue;
2452 }
2453         // struct LDKDecodeError CResult_DirectionalChannelInfoDecodeErrorZ_get_err(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2454 export function CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner: number): number {
2455         if(!isWasmInitialized) {
2456                 throw new Error("initializeWasm() must be awaited first!");
2457         }
2458         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_get_err(owner);
2459         return nativeResponseValue;
2460 }
2461         // struct LDKChannelInfo CResult_ChannelInfoDecodeErrorZ_get_ok(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2462 export function CResult_ChannelInfoDecodeErrorZ_get_ok(owner: number): number {
2463         if(!isWasmInitialized) {
2464                 throw new Error("initializeWasm() must be awaited first!");
2465         }
2466         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_ok(owner);
2467         return nativeResponseValue;
2468 }
2469         // struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
2470 export function CResult_ChannelInfoDecodeErrorZ_get_err(owner: number): number {
2471         if(!isWasmInitialized) {
2472                 throw new Error("initializeWasm() must be awaited first!");
2473         }
2474         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_get_err(owner);
2475         return nativeResponseValue;
2476 }
2477         // struct LDKRoutingFees CResult_RoutingFeesDecodeErrorZ_get_ok(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
2478 export function CResult_RoutingFeesDecodeErrorZ_get_ok(owner: number): number {
2479         if(!isWasmInitialized) {
2480                 throw new Error("initializeWasm() must be awaited first!");
2481         }
2482         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_ok(owner);
2483         return nativeResponseValue;
2484 }
2485         // struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
2486 export function CResult_RoutingFeesDecodeErrorZ_get_err(owner: number): number {
2487         if(!isWasmInitialized) {
2488                 throw new Error("initializeWasm() must be awaited first!");
2489         }
2490         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_get_err(owner);
2491         return nativeResponseValue;
2492 }
2493 export class LDKNetAddress {
2494         protected constructor() {}
2495 }
2496 export function LDKNetAddress_ty_from_ptr(ptr: number): number {
2497         if(!isWasmInitialized) {
2498                 throw new Error("initializeWasm() must be awaited first!");
2499         }
2500         const nativeResponseValue = wasm.TS_LDKNetAddress_ty_from_ptr(ptr);
2501         return nativeResponseValue;
2502 }
2503 export function LDKNetAddress_IPv4_get_addr(ptr: number): number {
2504         if(!isWasmInitialized) {
2505                 throw new Error("initializeWasm() must be awaited first!");
2506         }
2507         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv4_get_addr(ptr);
2508         return nativeResponseValue;
2509 }
2510 export function LDKNetAddress_IPv4_get_port(ptr: number): number {
2511         if(!isWasmInitialized) {
2512                 throw new Error("initializeWasm() must be awaited first!");
2513         }
2514         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv4_get_port(ptr);
2515         return nativeResponseValue;
2516 }
2517 export function LDKNetAddress_IPv6_get_addr(ptr: number): number {
2518         if(!isWasmInitialized) {
2519                 throw new Error("initializeWasm() must be awaited first!");
2520         }
2521         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv6_get_addr(ptr);
2522         return nativeResponseValue;
2523 }
2524 export function LDKNetAddress_IPv6_get_port(ptr: number): number {
2525         if(!isWasmInitialized) {
2526                 throw new Error("initializeWasm() must be awaited first!");
2527         }
2528         const nativeResponseValue = wasm.TS_LDKNetAddress_IPv6_get_port(ptr);
2529         return nativeResponseValue;
2530 }
2531 export function LDKNetAddress_OnionV2_get_onion_v2(ptr: number): number {
2532         if(!isWasmInitialized) {
2533                 throw new Error("initializeWasm() must be awaited first!");
2534         }
2535         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV2_get_onion_v2(ptr);
2536         return nativeResponseValue;
2537 }
2538 export function LDKNetAddress_OnionV3_get_ed25519_pubkey(ptr: number): number {
2539         if(!isWasmInitialized) {
2540                 throw new Error("initializeWasm() must be awaited first!");
2541         }
2542         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_ed25519_pubkey(ptr);
2543         return nativeResponseValue;
2544 }
2545 export function LDKNetAddress_OnionV3_get_checksum(ptr: number): number {
2546         if(!isWasmInitialized) {
2547                 throw new Error("initializeWasm() must be awaited first!");
2548         }
2549         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_checksum(ptr);
2550         return nativeResponseValue;
2551 }
2552 export function LDKNetAddress_OnionV3_get_version(ptr: number): number {
2553         if(!isWasmInitialized) {
2554                 throw new Error("initializeWasm() must be awaited first!");
2555         }
2556         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_version(ptr);
2557         return nativeResponseValue;
2558 }
2559 export function LDKNetAddress_OnionV3_get_port(ptr: number): number {
2560         if(!isWasmInitialized) {
2561                 throw new Error("initializeWasm() must be awaited first!");
2562         }
2563         const nativeResponseValue = wasm.TS_LDKNetAddress_OnionV3_get_port(ptr);
2564         return nativeResponseValue;
2565 }
2566         // struct LDKNodeAnnouncementInfo CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
2567 export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner: number): number {
2568         if(!isWasmInitialized) {
2569                 throw new Error("initializeWasm() must be awaited first!");
2570         }
2571         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(owner);
2572         return nativeResponseValue;
2573 }
2574         // struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
2575 export function CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner: number): number {
2576         if(!isWasmInitialized) {
2577                 throw new Error("initializeWasm() must be awaited first!");
2578         }
2579         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(owner);
2580         return nativeResponseValue;
2581 }
2582         // struct LDKNodeInfo CResult_NodeInfoDecodeErrorZ_get_ok(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2583 export function CResult_NodeInfoDecodeErrorZ_get_ok(owner: number): number {
2584         if(!isWasmInitialized) {
2585                 throw new Error("initializeWasm() must be awaited first!");
2586         }
2587         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_ok(owner);
2588         return nativeResponseValue;
2589 }
2590         // struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
2591 export function CResult_NodeInfoDecodeErrorZ_get_err(owner: number): number {
2592         if(!isWasmInitialized) {
2593                 throw new Error("initializeWasm() must be awaited first!");
2594         }
2595         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_get_err(owner);
2596         return nativeResponseValue;
2597 }
2598         // struct LDKNetworkGraph CResult_NetworkGraphDecodeErrorZ_get_ok(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2599 export function CResult_NetworkGraphDecodeErrorZ_get_ok(owner: number): number {
2600         if(!isWasmInitialized) {
2601                 throw new Error("initializeWasm() must be awaited first!");
2602         }
2603         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_ok(owner);
2604         return nativeResponseValue;
2605 }
2606         // struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
2607 export function CResult_NetworkGraphDecodeErrorZ_get_err(owner: number): number {
2608         if(!isWasmInitialized) {
2609                 throw new Error("initializeWasm() must be awaited first!");
2610         }
2611         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_get_err(owner);
2612         return nativeResponseValue;
2613 }
2614 export class LDKCOption_CVec_NetAddressZZ {
2615         protected constructor() {}
2616 }
2617 export function LDKCOption_CVec_NetAddressZZ_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_CVec_NetAddressZZ_ty_from_ptr(ptr);
2622         return nativeResponseValue;
2623 }
2624 export function LDKCOption_CVec_NetAddressZZ_Some_get_some(ptr: number): number {
2625         if(!isWasmInitialized) {
2626                 throw new Error("initializeWasm() must be awaited first!");
2627         }
2628         const nativeResponseValue = wasm.TS_LDKCOption_CVec_NetAddressZZ_Some_get_some(ptr);
2629         return nativeResponseValue;
2630 }
2631         // struct LDKScoringParameters *CResult_ScoringParametersDecodeErrorZ_get_ok(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2632 export function CResult_ScoringParametersDecodeErrorZ_get_ok(owner: number): number {
2633         if(!isWasmInitialized) {
2634                 throw new Error("initializeWasm() must be awaited first!");
2635         }
2636         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_ok(owner);
2637         return nativeResponseValue;
2638 }
2639         // struct LDKDecodeError CResult_ScoringParametersDecodeErrorZ_get_err(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
2640 export function CResult_ScoringParametersDecodeErrorZ_get_err(owner: number): number {
2641         if(!isWasmInitialized) {
2642                 throw new Error("initializeWasm() must be awaited first!");
2643         }
2644         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_get_err(owner);
2645         return nativeResponseValue;
2646 }
2647         // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2648 export function CResult_InitFeaturesDecodeErrorZ_get_ok(owner: number): number {
2649         if(!isWasmInitialized) {
2650                 throw new Error("initializeWasm() must be awaited first!");
2651         }
2652         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_ok(owner);
2653         return nativeResponseValue;
2654 }
2655         // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
2656 export function CResult_InitFeaturesDecodeErrorZ_get_err(owner: number): number {
2657         if(!isWasmInitialized) {
2658                 throw new Error("initializeWasm() must be awaited first!");
2659         }
2660         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_get_err(owner);
2661         return nativeResponseValue;
2662 }
2663         // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2664 export function CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner: number): number {
2665         if(!isWasmInitialized) {
2666                 throw new Error("initializeWasm() must be awaited first!");
2667         }
2668         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_ok(owner);
2669         return nativeResponseValue;
2670 }
2671         // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
2672 export function CResult_ChannelFeaturesDecodeErrorZ_get_err(owner: number): number {
2673         if(!isWasmInitialized) {
2674                 throw new Error("initializeWasm() must be awaited first!");
2675         }
2676         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_get_err(owner);
2677         return nativeResponseValue;
2678 }
2679         // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2680 export function CResult_NodeFeaturesDecodeErrorZ_get_ok(owner: number): number {
2681         if(!isWasmInitialized) {
2682                 throw new Error("initializeWasm() must be awaited first!");
2683         }
2684         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_ok(owner);
2685         return nativeResponseValue;
2686 }
2687         // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2688 export function CResult_NodeFeaturesDecodeErrorZ_get_err(owner: number): number {
2689         if(!isWasmInitialized) {
2690                 throw new Error("initializeWasm() must be awaited first!");
2691         }
2692         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_get_err(owner);
2693         return nativeResponseValue;
2694 }
2695         // struct LDKInvoiceFeatures CResult_InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
2696 export function CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner: number): number {
2697         if(!isWasmInitialized) {
2698                 throw new Error("initializeWasm() must be awaited first!");
2699         }
2700         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_ok(owner);
2701         return nativeResponseValue;
2702 }
2703         // struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
2704 export function CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner: number): number {
2705         if(!isWasmInitialized) {
2706                 throw new Error("initializeWasm() must be awaited first!");
2707         }
2708         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_get_err(owner);
2709         return nativeResponseValue;
2710 }
2711         // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2712 export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner: number): number {
2713         if(!isWasmInitialized) {
2714                 throw new Error("initializeWasm() must be awaited first!");
2715         }
2716         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(owner);
2717         return nativeResponseValue;
2718 }
2719         // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
2720 export function CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner: number): number {
2721         if(!isWasmInitialized) {
2722                 throw new Error("initializeWasm() must be awaited first!");
2723         }
2724         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(owner);
2725         return nativeResponseValue;
2726 }
2727         // struct LDKNetAddress CResult_NetAddressDecodeErrorZ_get_ok(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
2728 export function CResult_NetAddressDecodeErrorZ_get_ok(owner: number): number {
2729         if(!isWasmInitialized) {
2730                 throw new Error("initializeWasm() must be awaited first!");
2731         }
2732         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_ok(owner);
2733         return nativeResponseValue;
2734 }
2735         // struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
2736 export function CResult_NetAddressDecodeErrorZ_get_err(owner: number): number {
2737         if(!isWasmInitialized) {
2738                 throw new Error("initializeWasm() must be awaited first!");
2739         }
2740         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_get_err(owner);
2741         return nativeResponseValue;
2742 }
2743         // struct LDKAcceptChannel CResult_AcceptChannelDecodeErrorZ_get_ok(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
2744 export function CResult_AcceptChannelDecodeErrorZ_get_ok(owner: number): number {
2745         if(!isWasmInitialized) {
2746                 throw new Error("initializeWasm() must be awaited first!");
2747         }
2748         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_ok(owner);
2749         return nativeResponseValue;
2750 }
2751         // struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
2752 export function CResult_AcceptChannelDecodeErrorZ_get_err(owner: number): number {
2753         if(!isWasmInitialized) {
2754                 throw new Error("initializeWasm() must be awaited first!");
2755         }
2756         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_get_err(owner);
2757         return nativeResponseValue;
2758 }
2759         // struct LDKAnnouncementSignatures CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
2760 export function CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner: number): number {
2761         if(!isWasmInitialized) {
2762                 throw new Error("initializeWasm() must be awaited first!");
2763         }
2764         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(owner);
2765         return nativeResponseValue;
2766 }
2767         // struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
2768 export function CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner: number): number {
2769         if(!isWasmInitialized) {
2770                 throw new Error("initializeWasm() must be awaited first!");
2771         }
2772         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_get_err(owner);
2773         return nativeResponseValue;
2774 }
2775         // struct LDKChannelReestablish CResult_ChannelReestablishDecodeErrorZ_get_ok(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
2776 export function CResult_ChannelReestablishDecodeErrorZ_get_ok(owner: number): number {
2777         if(!isWasmInitialized) {
2778                 throw new Error("initializeWasm() must be awaited first!");
2779         }
2780         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_ok(owner);
2781         return nativeResponseValue;
2782 }
2783         // struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
2784 export function CResult_ChannelReestablishDecodeErrorZ_get_err(owner: number): number {
2785         if(!isWasmInitialized) {
2786                 throw new Error("initializeWasm() must be awaited first!");
2787         }
2788         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_get_err(owner);
2789         return nativeResponseValue;
2790 }
2791         // struct LDKClosingSigned CResult_ClosingSignedDecodeErrorZ_get_ok(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
2792 export function CResult_ClosingSignedDecodeErrorZ_get_ok(owner: number): number {
2793         if(!isWasmInitialized) {
2794                 throw new Error("initializeWasm() must be awaited first!");
2795         }
2796         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_ok(owner);
2797         return nativeResponseValue;
2798 }
2799         // struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
2800 export function CResult_ClosingSignedDecodeErrorZ_get_err(owner: number): number {
2801         if(!isWasmInitialized) {
2802                 throw new Error("initializeWasm() must be awaited first!");
2803         }
2804         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_get_err(owner);
2805         return nativeResponseValue;
2806 }
2807         // struct LDKClosingSignedFeeRange CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
2808 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner: number): number {
2809         if(!isWasmInitialized) {
2810                 throw new Error("initializeWasm() must be awaited first!");
2811         }
2812         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(owner);
2813         return nativeResponseValue;
2814 }
2815         // struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
2816 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner: number): number {
2817         if(!isWasmInitialized) {
2818                 throw new Error("initializeWasm() must be awaited first!");
2819         }
2820         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(owner);
2821         return nativeResponseValue;
2822 }
2823         // struct LDKCommitmentSigned CResult_CommitmentSignedDecodeErrorZ_get_ok(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
2824 export function CResult_CommitmentSignedDecodeErrorZ_get_ok(owner: number): number {
2825         if(!isWasmInitialized) {
2826                 throw new Error("initializeWasm() must be awaited first!");
2827         }
2828         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_ok(owner);
2829         return nativeResponseValue;
2830 }
2831         // struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
2832 export function CResult_CommitmentSignedDecodeErrorZ_get_err(owner: number): number {
2833         if(!isWasmInitialized) {
2834                 throw new Error("initializeWasm() must be awaited first!");
2835         }
2836         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_get_err(owner);
2837         return nativeResponseValue;
2838 }
2839         // struct LDKFundingCreated CResult_FundingCreatedDecodeErrorZ_get_ok(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
2840 export function CResult_FundingCreatedDecodeErrorZ_get_ok(owner: number): number {
2841         if(!isWasmInitialized) {
2842                 throw new Error("initializeWasm() must be awaited first!");
2843         }
2844         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_ok(owner);
2845         return nativeResponseValue;
2846 }
2847         // struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
2848 export function CResult_FundingCreatedDecodeErrorZ_get_err(owner: number): number {
2849         if(!isWasmInitialized) {
2850                 throw new Error("initializeWasm() must be awaited first!");
2851         }
2852         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_get_err(owner);
2853         return nativeResponseValue;
2854 }
2855         // struct LDKFundingSigned CResult_FundingSignedDecodeErrorZ_get_ok(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
2856 export function CResult_FundingSignedDecodeErrorZ_get_ok(owner: number): number {
2857         if(!isWasmInitialized) {
2858                 throw new Error("initializeWasm() must be awaited first!");
2859         }
2860         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_ok(owner);
2861         return nativeResponseValue;
2862 }
2863         // struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
2864 export function CResult_FundingSignedDecodeErrorZ_get_err(owner: number): number {
2865         if(!isWasmInitialized) {
2866                 throw new Error("initializeWasm() must be awaited first!");
2867         }
2868         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_get_err(owner);
2869         return nativeResponseValue;
2870 }
2871         // struct LDKFundingLocked CResult_FundingLockedDecodeErrorZ_get_ok(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
2872 export function CResult_FundingLockedDecodeErrorZ_get_ok(owner: number): number {
2873         if(!isWasmInitialized) {
2874                 throw new Error("initializeWasm() must be awaited first!");
2875         }
2876         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_ok(owner);
2877         return nativeResponseValue;
2878 }
2879         // struct LDKDecodeError CResult_FundingLockedDecodeErrorZ_get_err(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
2880 export function CResult_FundingLockedDecodeErrorZ_get_err(owner: number): number {
2881         if(!isWasmInitialized) {
2882                 throw new Error("initializeWasm() must be awaited first!");
2883         }
2884         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_get_err(owner);
2885         return nativeResponseValue;
2886 }
2887         // struct LDKInit CResult_InitDecodeErrorZ_get_ok(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
2888 export function CResult_InitDecodeErrorZ_get_ok(owner: number): number {
2889         if(!isWasmInitialized) {
2890                 throw new Error("initializeWasm() must be awaited first!");
2891         }
2892         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_ok(owner);
2893         return nativeResponseValue;
2894 }
2895         // struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
2896 export function CResult_InitDecodeErrorZ_get_err(owner: number): number {
2897         if(!isWasmInitialized) {
2898                 throw new Error("initializeWasm() must be awaited first!");
2899         }
2900         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_get_err(owner);
2901         return nativeResponseValue;
2902 }
2903         // struct LDKOpenChannel CResult_OpenChannelDecodeErrorZ_get_ok(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
2904 export function CResult_OpenChannelDecodeErrorZ_get_ok(owner: number): number {
2905         if(!isWasmInitialized) {
2906                 throw new Error("initializeWasm() must be awaited first!");
2907         }
2908         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_ok(owner);
2909         return nativeResponseValue;
2910 }
2911         // struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
2912 export function CResult_OpenChannelDecodeErrorZ_get_err(owner: number): number {
2913         if(!isWasmInitialized) {
2914                 throw new Error("initializeWasm() must be awaited first!");
2915         }
2916         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_get_err(owner);
2917         return nativeResponseValue;
2918 }
2919         // struct LDKRevokeAndACK CResult_RevokeAndACKDecodeErrorZ_get_ok(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
2920 export function CResult_RevokeAndACKDecodeErrorZ_get_ok(owner: number): number {
2921         if(!isWasmInitialized) {
2922                 throw new Error("initializeWasm() must be awaited first!");
2923         }
2924         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_ok(owner);
2925         return nativeResponseValue;
2926 }
2927         // struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
2928 export function CResult_RevokeAndACKDecodeErrorZ_get_err(owner: number): number {
2929         if(!isWasmInitialized) {
2930                 throw new Error("initializeWasm() must be awaited first!");
2931         }
2932         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_get_err(owner);
2933         return nativeResponseValue;
2934 }
2935         // struct LDKShutdown CResult_ShutdownDecodeErrorZ_get_ok(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
2936 export function CResult_ShutdownDecodeErrorZ_get_ok(owner: number): number {
2937         if(!isWasmInitialized) {
2938                 throw new Error("initializeWasm() must be awaited first!");
2939         }
2940         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_ok(owner);
2941         return nativeResponseValue;
2942 }
2943         // struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
2944 export function CResult_ShutdownDecodeErrorZ_get_err(owner: number): number {
2945         if(!isWasmInitialized) {
2946                 throw new Error("initializeWasm() must be awaited first!");
2947         }
2948         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_get_err(owner);
2949         return nativeResponseValue;
2950 }
2951         // struct LDKUpdateFailHTLC CResult_UpdateFailHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
2952 export function CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner: number): number {
2953         if(!isWasmInitialized) {
2954                 throw new Error("initializeWasm() must be awaited first!");
2955         }
2956         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_ok(owner);
2957         return nativeResponseValue;
2958 }
2959         // struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
2960 export function CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner: number): number {
2961         if(!isWasmInitialized) {
2962                 throw new Error("initializeWasm() must be awaited first!");
2963         }
2964         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_get_err(owner);
2965         return nativeResponseValue;
2966 }
2967         // struct LDKUpdateFailMalformedHTLC CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
2968 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner: number): number {
2969         if(!isWasmInitialized) {
2970                 throw new Error("initializeWasm() must be awaited first!");
2971         }
2972         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(owner);
2973         return nativeResponseValue;
2974 }
2975         // struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
2976 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner: number): number {
2977         if(!isWasmInitialized) {
2978                 throw new Error("initializeWasm() must be awaited first!");
2979         }
2980         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(owner);
2981         return nativeResponseValue;
2982 }
2983         // struct LDKUpdateFee CResult_UpdateFeeDecodeErrorZ_get_ok(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
2984 export function CResult_UpdateFeeDecodeErrorZ_get_ok(owner: number): number {
2985         if(!isWasmInitialized) {
2986                 throw new Error("initializeWasm() must be awaited first!");
2987         }
2988         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_ok(owner);
2989         return nativeResponseValue;
2990 }
2991         // struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
2992 export function CResult_UpdateFeeDecodeErrorZ_get_err(owner: number): number {
2993         if(!isWasmInitialized) {
2994                 throw new Error("initializeWasm() must be awaited first!");
2995         }
2996         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_get_err(owner);
2997         return nativeResponseValue;
2998 }
2999         // struct LDKUpdateFulfillHTLC CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
3000 export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner: number): number {
3001         if(!isWasmInitialized) {
3002                 throw new Error("initializeWasm() must be awaited first!");
3003         }
3004         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(owner);
3005         return nativeResponseValue;
3006 }
3007         // struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
3008 export function CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner: number): number {
3009         if(!isWasmInitialized) {
3010                 throw new Error("initializeWasm() must be awaited first!");
3011         }
3012         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(owner);
3013         return nativeResponseValue;
3014 }
3015         // struct LDKUpdateAddHTLC CResult_UpdateAddHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
3016 export function CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner: number): number {
3017         if(!isWasmInitialized) {
3018                 throw new Error("initializeWasm() must be awaited first!");
3019         }
3020         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_ok(owner);
3021         return nativeResponseValue;
3022 }
3023         // struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
3024 export function CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner: number): number {
3025         if(!isWasmInitialized) {
3026                 throw new Error("initializeWasm() must be awaited first!");
3027         }
3028         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_get_err(owner);
3029         return nativeResponseValue;
3030 }
3031         // struct LDKPing CResult_PingDecodeErrorZ_get_ok(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
3032 export function CResult_PingDecodeErrorZ_get_ok(owner: number): number {
3033         if(!isWasmInitialized) {
3034                 throw new Error("initializeWasm() must be awaited first!");
3035         }
3036         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_ok(owner);
3037         return nativeResponseValue;
3038 }
3039         // struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
3040 export function CResult_PingDecodeErrorZ_get_err(owner: number): number {
3041         if(!isWasmInitialized) {
3042                 throw new Error("initializeWasm() must be awaited first!");
3043         }
3044         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_get_err(owner);
3045         return nativeResponseValue;
3046 }
3047         // struct LDKPong CResult_PongDecodeErrorZ_get_ok(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
3048 export function CResult_PongDecodeErrorZ_get_ok(owner: number): number {
3049         if(!isWasmInitialized) {
3050                 throw new Error("initializeWasm() must be awaited first!");
3051         }
3052         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_ok(owner);
3053         return nativeResponseValue;
3054 }
3055         // struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
3056 export function CResult_PongDecodeErrorZ_get_err(owner: number): number {
3057         if(!isWasmInitialized) {
3058                 throw new Error("initializeWasm() must be awaited first!");
3059         }
3060         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_get_err(owner);
3061         return nativeResponseValue;
3062 }
3063         // struct LDKUnsignedChannelAnnouncement CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3064 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3065         if(!isWasmInitialized) {
3066                 throw new Error("initializeWasm() must be awaited first!");
3067         }
3068         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(owner);
3069         return nativeResponseValue;
3070 }
3071         // struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3072 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
3073         if(!isWasmInitialized) {
3074                 throw new Error("initializeWasm() must be awaited first!");
3075         }
3076         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(owner);
3077         return nativeResponseValue;
3078 }
3079         // struct LDKChannelAnnouncement CResult_ChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3080 export function CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3081         if(!isWasmInitialized) {
3082                 throw new Error("initializeWasm() must be awaited first!");
3083         }
3084         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_ok(owner);
3085         return nativeResponseValue;
3086 }
3087         // struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3088 export function CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner: number): number {
3089         if(!isWasmInitialized) {
3090                 throw new Error("initializeWasm() must be awaited first!");
3091         }
3092         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_get_err(owner);
3093         return nativeResponseValue;
3094 }
3095         // struct LDKUnsignedChannelUpdate CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3096 export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
3097         if(!isWasmInitialized) {
3098                 throw new Error("initializeWasm() must be awaited first!");
3099         }
3100         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(owner);
3101         return nativeResponseValue;
3102 }
3103         // struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3104 export function CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner: number): number {
3105         if(!isWasmInitialized) {
3106                 throw new Error("initializeWasm() must be awaited first!");
3107         }
3108         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(owner);
3109         return nativeResponseValue;
3110 }
3111         // struct LDKChannelUpdate CResult_ChannelUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3112 export function CResult_ChannelUpdateDecodeErrorZ_get_ok(owner: number): number {
3113         if(!isWasmInitialized) {
3114                 throw new Error("initializeWasm() must be awaited first!");
3115         }
3116         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_ok(owner);
3117         return nativeResponseValue;
3118 }
3119         // struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
3120 export function CResult_ChannelUpdateDecodeErrorZ_get_err(owner: number): number {
3121         if(!isWasmInitialized) {
3122                 throw new Error("initializeWasm() must be awaited first!");
3123         }
3124         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_get_err(owner);
3125         return nativeResponseValue;
3126 }
3127         // struct LDKErrorMessage CResult_ErrorMessageDecodeErrorZ_get_ok(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
3128 export function CResult_ErrorMessageDecodeErrorZ_get_ok(owner: number): number {
3129         if(!isWasmInitialized) {
3130                 throw new Error("initializeWasm() must be awaited first!");
3131         }
3132         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_ok(owner);
3133         return nativeResponseValue;
3134 }
3135         // struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
3136 export function CResult_ErrorMessageDecodeErrorZ_get_err(owner: number): number {
3137         if(!isWasmInitialized) {
3138                 throw new Error("initializeWasm() must be awaited first!");
3139         }
3140         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_get_err(owner);
3141         return nativeResponseValue;
3142 }
3143         // struct LDKUnsignedNodeAnnouncement CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3144 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3145         if(!isWasmInitialized) {
3146                 throw new Error("initializeWasm() must be awaited first!");
3147         }
3148         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(owner);
3149         return nativeResponseValue;
3150 }
3151         // struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3152 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
3153         if(!isWasmInitialized) {
3154                 throw new Error("initializeWasm() must be awaited first!");
3155         }
3156         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(owner);
3157         return nativeResponseValue;
3158 }
3159         // struct LDKNodeAnnouncement CResult_NodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3160 export function CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner: number): number {
3161         if(!isWasmInitialized) {
3162                 throw new Error("initializeWasm() must be awaited first!");
3163         }
3164         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_ok(owner);
3165         return nativeResponseValue;
3166 }
3167         // struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
3168 export function CResult_NodeAnnouncementDecodeErrorZ_get_err(owner: number): number {
3169         if(!isWasmInitialized) {
3170                 throw new Error("initializeWasm() must be awaited first!");
3171         }
3172         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_get_err(owner);
3173         return nativeResponseValue;
3174 }
3175         // struct LDKQueryShortChannelIds CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
3176 export function CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner: number): number {
3177         if(!isWasmInitialized) {
3178                 throw new Error("initializeWasm() must be awaited first!");
3179         }
3180         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(owner);
3181         return nativeResponseValue;
3182 }
3183         // struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
3184 export function CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner: number): number {
3185         if(!isWasmInitialized) {
3186                 throw new Error("initializeWasm() must be awaited first!");
3187         }
3188         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_get_err(owner);
3189         return nativeResponseValue;
3190 }
3191         // struct LDKReplyShortChannelIdsEnd CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
3192 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner: number): number {
3193         if(!isWasmInitialized) {
3194                 throw new Error("initializeWasm() must be awaited first!");
3195         }
3196         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(owner);
3197         return nativeResponseValue;
3198 }
3199         // struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
3200 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner: number): number {
3201         if(!isWasmInitialized) {
3202                 throw new Error("initializeWasm() must be awaited first!");
3203         }
3204         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(owner);
3205         return nativeResponseValue;
3206 }
3207         // struct LDKQueryChannelRange CResult_QueryChannelRangeDecodeErrorZ_get_ok(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3208 export function CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner: number): number {
3209         if(!isWasmInitialized) {
3210                 throw new Error("initializeWasm() must be awaited first!");
3211         }
3212         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_ok(owner);
3213         return nativeResponseValue;
3214 }
3215         // struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3216 export function CResult_QueryChannelRangeDecodeErrorZ_get_err(owner: number): number {
3217         if(!isWasmInitialized) {
3218                 throw new Error("initializeWasm() must be awaited first!");
3219         }
3220         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_get_err(owner);
3221         return nativeResponseValue;
3222 }
3223         // struct LDKReplyChannelRange CResult_ReplyChannelRangeDecodeErrorZ_get_ok(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3224 export function CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner: number): number {
3225         if(!isWasmInitialized) {
3226                 throw new Error("initializeWasm() must be awaited first!");
3227         }
3228         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_ok(owner);
3229         return nativeResponseValue;
3230 }
3231         // struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
3232 export function CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner: number): number {
3233         if(!isWasmInitialized) {
3234                 throw new Error("initializeWasm() must be awaited first!");
3235         }
3236         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_get_err(owner);
3237         return nativeResponseValue;
3238 }
3239         // struct LDKGossipTimestampFilter CResult_GossipTimestampFilterDecodeErrorZ_get_ok(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
3240 export function CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner: number): number {
3241         if(!isWasmInitialized) {
3242                 throw new Error("initializeWasm() must be awaited first!");
3243         }
3244         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_ok(owner);
3245         return nativeResponseValue;
3246 }
3247         // struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
3248 export function CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner: number): number {
3249         if(!isWasmInitialized) {
3250                 throw new Error("initializeWasm() must be awaited first!");
3251         }
3252         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_get_err(owner);
3253         return nativeResponseValue;
3254 }
3255         // struct LDKDelayedPaymentOutputDescriptor CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3256 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
3257         if(!isWasmInitialized) {
3258                 throw new Error("initializeWasm() must be awaited first!");
3259         }
3260         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
3261         return nativeResponseValue;
3262 }
3263         // struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3264 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
3265         if(!isWasmInitialized) {
3266                 throw new Error("initializeWasm() must be awaited first!");
3267         }
3268         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
3269         return nativeResponseValue;
3270 }
3271         // struct LDKStaticPaymentOutputDescriptor CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3272 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
3273         if(!isWasmInitialized) {
3274                 throw new Error("initializeWasm() must be awaited first!");
3275         }
3276         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(owner);
3277         return nativeResponseValue;
3278 }
3279         // struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3280 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
3281         if(!isWasmInitialized) {
3282                 throw new Error("initializeWasm() must be awaited first!");
3283         }
3284         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(owner);
3285         return nativeResponseValue;
3286 }
3287         // struct LDKSpendableOutputDescriptor CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3288 export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner: number): number {
3289         if(!isWasmInitialized) {
3290                 throw new Error("initializeWasm() must be awaited first!");
3291         }
3292         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(owner);
3293         return nativeResponseValue;
3294 }
3295         // struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
3296 export function CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner: number): number {
3297         if(!isWasmInitialized) {
3298                 throw new Error("initializeWasm() must be awaited first!");
3299         }
3300         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(owner);
3301         return nativeResponseValue;
3302 }
3303         // struct LDKSign CResult_SignDecodeErrorZ_get_ok(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
3304 export function CResult_SignDecodeErrorZ_get_ok(owner: number): number {
3305         if(!isWasmInitialized) {
3306                 throw new Error("initializeWasm() must be awaited first!");
3307         }
3308         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_ok(owner);
3309         return nativeResponseValue;
3310 }
3311         // struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
3312 export function CResult_SignDecodeErrorZ_get_err(owner: number): number {
3313         if(!isWasmInitialized) {
3314                 throw new Error("initializeWasm() must be awaited first!");
3315         }
3316         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_get_err(owner);
3317         return nativeResponseValue;
3318 }
3319         // struct LDKRecoverableSignature CResult_RecoverableSignatureNoneZ_get_ok(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
3320 export function CResult_RecoverableSignatureNoneZ_get_ok(owner: number): number {
3321         if(!isWasmInitialized) {
3322                 throw new Error("initializeWasm() must be awaited first!");
3323         }
3324         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_ok(owner);
3325         return nativeResponseValue;
3326 }
3327         // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
3328 export function CResult_RecoverableSignatureNoneZ_get_err(owner: number): void {
3329         if(!isWasmInitialized) {
3330                 throw new Error("initializeWasm() must be awaited first!");
3331         }
3332         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_get_err(owner);
3333         // debug statements here
3334 }
3335         // struct LDKCVec_CVec_u8ZZ CResult_CVec_CVec_u8ZZNoneZ_get_ok(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
3336 export function CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner: number): number {
3337         if(!isWasmInitialized) {
3338                 throw new Error("initializeWasm() must be awaited first!");
3339         }
3340         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_ok(owner);
3341         return nativeResponseValue;
3342 }
3343         // void CResult_CVec_CVec_u8ZZNoneZ_get_err(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
3344 export function CResult_CVec_CVec_u8ZZNoneZ_get_err(owner: number): void {
3345         if(!isWasmInitialized) {
3346                 throw new Error("initializeWasm() must be awaited first!");
3347         }
3348         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_get_err(owner);
3349         // debug statements here
3350 }
3351         // struct LDKInMemorySigner CResult_InMemorySignerDecodeErrorZ_get_ok(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
3352 export function CResult_InMemorySignerDecodeErrorZ_get_ok(owner: number): number {
3353         if(!isWasmInitialized) {
3354                 throw new Error("initializeWasm() must be awaited first!");
3355         }
3356         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_ok(owner);
3357         return nativeResponseValue;
3358 }
3359         // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
3360 export function CResult_InMemorySignerDecodeErrorZ_get_err(owner: number): number {
3361         if(!isWasmInitialized) {
3362                 throw new Error("initializeWasm() must be awaited first!");
3363         }
3364         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_get_err(owner);
3365         return nativeResponseValue;
3366 }
3367         // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
3368 export function CResult_TransactionNoneZ_get_ok(owner: number): number {
3369         if(!isWasmInitialized) {
3370                 throw new Error("initializeWasm() must be awaited first!");
3371         }
3372         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_ok(owner);
3373         return nativeResponseValue;
3374 }
3375         // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
3376 export function CResult_TransactionNoneZ_get_err(owner: number): void {
3377         if(!isWasmInitialized) {
3378                 throw new Error("initializeWasm() must be awaited first!");
3379         }
3380         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_get_err(owner);
3381         // debug statements here
3382 }
3383
3384
3385
3386 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3387
3388 export interface LDKFilter {
3389         register_tx (txid: number, script_pubkey: number): void;
3390         register_output (output: number): number;
3391 }
3392
3393 export function LDKFilter_new(impl: LDKFilter): number {
3394         if(!isWasmInitialized) {
3395                 throw new Error("initializeWasm() must be awaited first!");
3396         }
3397         var new_obj_idx = js_objs.length;
3398         for (var i = 0; i < js_objs.length; i++) {
3399                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3400         }
3401         js_objs[i] = new WeakRef(impl);
3402         return wasm.TS_LDKFilter_new(i);
3403 }
3404
3405 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3406
3407
3408         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
3409 export function Filter_register_tx(this_arg: number, txid: number, script_pubkey: number): void {
3410         if(!isWasmInitialized) {
3411                 throw new Error("initializeWasm() must be awaited first!");
3412         }
3413         const nativeResponseValue = wasm.TS_Filter_register_tx(this_arg, txid, script_pubkey);
3414         // debug statements here
3415 }
3416         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
3417 export function Filter_register_output(this_arg: number, output: number): number {
3418         if(!isWasmInitialized) {
3419                 throw new Error("initializeWasm() must be awaited first!");
3420         }
3421         const nativeResponseValue = wasm.TS_Filter_register_output(this_arg, output);
3422         return nativeResponseValue;
3423 }
3424 export class LDKCOption_FilterZ {
3425         protected constructor() {}
3426 }
3427 export function LDKCOption_FilterZ_ty_from_ptr(ptr: number): number {
3428         if(!isWasmInitialized) {
3429                 throw new Error("initializeWasm() must be awaited first!");
3430         }
3431         const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_ty_from_ptr(ptr);
3432         return nativeResponseValue;
3433 }
3434 export function LDKCOption_FilterZ_Some_get_some(ptr: number): number {
3435         if(!isWasmInitialized) {
3436                 throw new Error("initializeWasm() must be awaited first!");
3437         }
3438         const nativeResponseValue = wasm.TS_LDKCOption_FilterZ_Some_get_some(ptr);
3439         return nativeResponseValue;
3440 }
3441         // struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
3442 export function CResult_LockedChannelMonitorNoneZ_get_ok(owner: number): number {
3443         if(!isWasmInitialized) {
3444                 throw new Error("initializeWasm() must be awaited first!");
3445         }
3446         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_ok(owner);
3447         return nativeResponseValue;
3448 }
3449         // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
3450 export function CResult_LockedChannelMonitorNoneZ_get_err(owner: number): void {
3451         if(!isWasmInitialized) {
3452                 throw new Error("initializeWasm() must be awaited first!");
3453         }
3454         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_get_err(owner);
3455         // debug statements here
3456 }
3457 export class LDKAPIError {
3458         protected constructor() {}
3459 }
3460 export function LDKAPIError_ty_from_ptr(ptr: number): number {
3461         if(!isWasmInitialized) {
3462                 throw new Error("initializeWasm() must be awaited first!");
3463         }
3464         const nativeResponseValue = wasm.TS_LDKAPIError_ty_from_ptr(ptr);
3465         return nativeResponseValue;
3466 }
3467 export function LDKAPIError_APIMisuseError_get_err(ptr: number): number {
3468         if(!isWasmInitialized) {
3469                 throw new Error("initializeWasm() must be awaited first!");
3470         }
3471         const nativeResponseValue = wasm.TS_LDKAPIError_APIMisuseError_get_err(ptr);
3472         return nativeResponseValue;
3473 }
3474 export function LDKAPIError_FeeRateTooHigh_get_err(ptr: number): number {
3475         if(!isWasmInitialized) {
3476                 throw new Error("initializeWasm() must be awaited first!");
3477         }
3478         const nativeResponseValue = wasm.TS_LDKAPIError_FeeRateTooHigh_get_err(ptr);
3479         return nativeResponseValue;
3480 }
3481 export function LDKAPIError_FeeRateTooHigh_get_feerate(ptr: number): number {
3482         if(!isWasmInitialized) {
3483                 throw new Error("initializeWasm() must be awaited first!");
3484         }
3485         const nativeResponseValue = wasm.TS_LDKAPIError_FeeRateTooHigh_get_feerate(ptr);
3486         return nativeResponseValue;
3487 }
3488 export function LDKAPIError_RouteError_get_err(ptr: number): number {
3489         if(!isWasmInitialized) {
3490                 throw new Error("initializeWasm() must be awaited first!");
3491         }
3492         const nativeResponseValue = wasm.TS_LDKAPIError_RouteError_get_err(ptr);
3493         return nativeResponseValue;
3494 }
3495 export function LDKAPIError_ChannelUnavailable_get_err(ptr: number): number {
3496         if(!isWasmInitialized) {
3497                 throw new Error("initializeWasm() must be awaited first!");
3498         }
3499         const nativeResponseValue = wasm.TS_LDKAPIError_ChannelUnavailable_get_err(ptr);
3500         return nativeResponseValue;
3501 }
3502 export function LDKAPIError_IncompatibleShutdownScript_get_script(ptr: number): number {
3503         if(!isWasmInitialized) {
3504                 throw new Error("initializeWasm() must be awaited first!");
3505         }
3506         const nativeResponseValue = wasm.TS_LDKAPIError_IncompatibleShutdownScript_get_script(ptr);
3507         return nativeResponseValue;
3508 }
3509         // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
3510 export function CResult_NoneAPIErrorZ_get_ok(owner: number): void {
3511         if(!isWasmInitialized) {
3512                 throw new Error("initializeWasm() must be awaited first!");
3513         }
3514         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_ok(owner);
3515         // debug statements here
3516 }
3517         // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
3518 export function CResult_NoneAPIErrorZ_get_err(owner: number): number {
3519         if(!isWasmInitialized) {
3520                 throw new Error("initializeWasm() must be awaited first!");
3521         }
3522         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_get_err(owner);
3523         return nativeResponseValue;
3524 }
3525 export class LDKCOption_u16Z {
3526         protected constructor() {}
3527 }
3528 export function LDKCOption_u16Z_ty_from_ptr(ptr: number): number {
3529         if(!isWasmInitialized) {
3530                 throw new Error("initializeWasm() must be awaited first!");
3531         }
3532         const nativeResponseValue = wasm.TS_LDKCOption_u16Z_ty_from_ptr(ptr);
3533         return nativeResponseValue;
3534 }
3535 export function LDKCOption_u16Z_Some_get_some(ptr: number): number {
3536         if(!isWasmInitialized) {
3537                 throw new Error("initializeWasm() must be awaited first!");
3538         }
3539         const nativeResponseValue = wasm.TS_LDKCOption_u16Z_Some_get_some(ptr);
3540         return nativeResponseValue;
3541 }
3542         // struct LDKThirtyTwoBytes CResult__u832APIErrorZ_get_ok(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
3543 export function CResult__u832APIErrorZ_get_ok(owner: number): number {
3544         if(!isWasmInitialized) {
3545                 throw new Error("initializeWasm() must be awaited first!");
3546         }
3547         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_ok(owner);
3548         return nativeResponseValue;
3549 }
3550         // struct LDKAPIError CResult__u832APIErrorZ_get_err(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
3551 export function CResult__u832APIErrorZ_get_err(owner: number): number {
3552         if(!isWasmInitialized) {
3553                 throw new Error("initializeWasm() must be awaited first!");
3554         }
3555         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_get_err(owner);
3556         return nativeResponseValue;
3557 }
3558 export class LDKPaymentSendFailure {
3559         protected constructor() {}
3560 }
3561 export function LDKPaymentSendFailure_ty_from_ptr(ptr: number): number {
3562         if(!isWasmInitialized) {
3563                 throw new Error("initializeWasm() must be awaited first!");
3564         }
3565         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_ty_from_ptr(ptr);
3566         return nativeResponseValue;
3567 }
3568 export function LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr: number): number {
3569         if(!isWasmInitialized) {
3570                 throw new Error("initializeWasm() must be awaited first!");
3571         }
3572         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr);
3573         return nativeResponseValue;
3574 }
3575 export function LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(ptr: number): number {
3576         if(!isWasmInitialized) {
3577                 throw new Error("initializeWasm() must be awaited first!");
3578         }
3579         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(ptr);
3580         return nativeResponseValue;
3581 }
3582 export function LDKPaymentSendFailure_AllFailedRetrySafe_get_all_failed_retry_safe(ptr: number): number {
3583         if(!isWasmInitialized) {
3584                 throw new Error("initializeWasm() must be awaited first!");
3585         }
3586         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_AllFailedRetrySafe_get_all_failed_retry_safe(ptr);
3587         return nativeResponseValue;
3588 }
3589 export function LDKPaymentSendFailure_PartialFailure_get_results(ptr: number): number {
3590         if(!isWasmInitialized) {
3591                 throw new Error("initializeWasm() must be awaited first!");
3592         }
3593         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PartialFailure_get_results(ptr);
3594         return nativeResponseValue;
3595 }
3596 export function LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr: number): number {
3597         if(!isWasmInitialized) {
3598                 throw new Error("initializeWasm() must be awaited first!");
3599         }
3600         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr);
3601         return nativeResponseValue;
3602 }
3603 export function LDKPaymentSendFailure_PartialFailure_get_payment_id(ptr: number): number {
3604         if(!isWasmInitialized) {
3605                 throw new Error("initializeWasm() must be awaited first!");
3606         }
3607         const nativeResponseValue = wasm.TS_LDKPaymentSendFailure_PartialFailure_get_payment_id(ptr);
3608         return nativeResponseValue;
3609 }
3610         // struct LDKThirtyTwoBytes CResult_PaymentIdPaymentSendFailureZ_get_ok(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
3611 export function CResult_PaymentIdPaymentSendFailureZ_get_ok(owner: number): number {
3612         if(!isWasmInitialized) {
3613                 throw new Error("initializeWasm() must be awaited first!");
3614         }
3615         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_ok(owner);
3616         return nativeResponseValue;
3617 }
3618         // struct LDKPaymentSendFailure CResult_PaymentIdPaymentSendFailureZ_get_err(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
3619 export function CResult_PaymentIdPaymentSendFailureZ_get_err(owner: number): number {
3620         if(!isWasmInitialized) {
3621                 throw new Error("initializeWasm() must be awaited first!");
3622         }
3623         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_get_err(owner);
3624         return nativeResponseValue;
3625 }
3626         // void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
3627 export function CResult_NonePaymentSendFailureZ_get_ok(owner: number): void {
3628         if(!isWasmInitialized) {
3629                 throw new Error("initializeWasm() must be awaited first!");
3630         }
3631         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_ok(owner);
3632         // debug statements here
3633 }
3634         // struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
3635 export function CResult_NonePaymentSendFailureZ_get_err(owner: number): number {
3636         if(!isWasmInitialized) {
3637                 throw new Error("initializeWasm() must be awaited first!");
3638         }
3639         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_get_err(owner);
3640         return nativeResponseValue;
3641 }
3642         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
3643 export function C2Tuple_PaymentHashPaymentIdZ_get_a(owner: number): number {
3644         if(!isWasmInitialized) {
3645                 throw new Error("initializeWasm() must be awaited first!");
3646         }
3647         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_a(owner);
3648         return nativeResponseValue;
3649 }
3650         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
3651 export function C2Tuple_PaymentHashPaymentIdZ_get_b(owner: number): number {
3652         if(!isWasmInitialized) {
3653                 throw new Error("initializeWasm() must be awaited first!");
3654         }
3655         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_get_b(owner);
3656         return nativeResponseValue;
3657 }
3658         // struct LDKC2Tuple_PaymentHashPaymentIdZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
3659 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner: number): number {
3660         if(!isWasmInitialized) {
3661                 throw new Error("initializeWasm() must be awaited first!");
3662         }
3663         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(owner);
3664         return nativeResponseValue;
3665 }
3666         // struct LDKPaymentSendFailure CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
3667 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner: number): number {
3668         if(!isWasmInitialized) {
3669                 throw new Error("initializeWasm() must be awaited first!");
3670         }
3671         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(owner);
3672         return nativeResponseValue;
3673 }
3674         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
3675 export function C2Tuple_PaymentHashPaymentSecretZ_get_a(owner: number): number {
3676         if(!isWasmInitialized) {
3677                 throw new Error("initializeWasm() must be awaited first!");
3678         }
3679         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_a(owner);
3680         return nativeResponseValue;
3681 }
3682         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
3683 export function C2Tuple_PaymentHashPaymentSecretZ_get_b(owner: number): number {
3684         if(!isWasmInitialized) {
3685                 throw new Error("initializeWasm() must be awaited first!");
3686         }
3687         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_get_b(owner);
3688         return nativeResponseValue;
3689 }
3690         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
3691 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner: number): number {
3692         if(!isWasmInitialized) {
3693                 throw new Error("initializeWasm() must be awaited first!");
3694         }
3695         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(owner);
3696         return nativeResponseValue;
3697 }
3698         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
3699 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner: number): void {
3700         if(!isWasmInitialized) {
3701                 throw new Error("initializeWasm() must be awaited first!");
3702         }
3703         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(owner);
3704         // debug statements here
3705 }
3706         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
3707 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner: number): number {
3708         if(!isWasmInitialized) {
3709                 throw new Error("initializeWasm() must be awaited first!");
3710         }
3711         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(owner);
3712         return nativeResponseValue;
3713 }
3714         // struct LDKAPIError CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
3715 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner: number): number {
3716         if(!isWasmInitialized) {
3717                 throw new Error("initializeWasm() must be awaited first!");
3718         }
3719         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(owner);
3720         return nativeResponseValue;
3721 }
3722         // struct LDKThirtyTwoBytes CResult_PaymentSecretNoneZ_get_ok(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
3723 export function CResult_PaymentSecretNoneZ_get_ok(owner: number): number {
3724         if(!isWasmInitialized) {
3725                 throw new Error("initializeWasm() must be awaited first!");
3726         }
3727         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_ok(owner);
3728         return nativeResponseValue;
3729 }
3730         // void CResult_PaymentSecretNoneZ_get_err(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
3731 export function CResult_PaymentSecretNoneZ_get_err(owner: number): void {
3732         if(!isWasmInitialized) {
3733                 throw new Error("initializeWasm() must be awaited first!");
3734         }
3735         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_get_err(owner);
3736         // debug statements here
3737 }
3738         // struct LDKThirtyTwoBytes CResult_PaymentSecretAPIErrorZ_get_ok(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
3739 export function CResult_PaymentSecretAPIErrorZ_get_ok(owner: number): number {
3740         if(!isWasmInitialized) {
3741                 throw new Error("initializeWasm() must be awaited first!");
3742         }
3743         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_ok(owner);
3744         return nativeResponseValue;
3745 }
3746         // struct LDKAPIError CResult_PaymentSecretAPIErrorZ_get_err(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
3747 export function CResult_PaymentSecretAPIErrorZ_get_err(owner: number): number {
3748         if(!isWasmInitialized) {
3749                 throw new Error("initializeWasm() must be awaited first!");
3750         }
3751         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_get_err(owner);
3752         return nativeResponseValue;
3753 }
3754         // struct LDKThirtyTwoBytes CResult_PaymentPreimageAPIErrorZ_get_ok(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
3755 export function CResult_PaymentPreimageAPIErrorZ_get_ok(owner: number): number {
3756         if(!isWasmInitialized) {
3757                 throw new Error("initializeWasm() must be awaited first!");
3758         }
3759         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_ok(owner);
3760         return nativeResponseValue;
3761 }
3762         // struct LDKAPIError CResult_PaymentPreimageAPIErrorZ_get_err(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
3763 export function CResult_PaymentPreimageAPIErrorZ_get_err(owner: number): number {
3764         if(!isWasmInitialized) {
3765                 throw new Error("initializeWasm() must be awaited first!");
3766         }
3767         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_get_err(owner);
3768         return nativeResponseValue;
3769 }
3770
3771
3772
3773 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3774
3775 export interface LDKWatch {
3776         watch_channel (funding_txo: number, monitor: number): number;
3777         update_channel (funding_txo: number, update: number): number;
3778         release_pending_monitor_events (): number;
3779 }
3780
3781 export function LDKWatch_new(impl: LDKWatch): number {
3782         if(!isWasmInitialized) {
3783                 throw new Error("initializeWasm() must be awaited first!");
3784         }
3785         var new_obj_idx = js_objs.length;
3786         for (var i = 0; i < js_objs.length; i++) {
3787                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3788         }
3789         js_objs[i] = new WeakRef(impl);
3790         return wasm.TS_LDKWatch_new(i);
3791 }
3792
3793 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3794
3795
3796         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
3797 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
3798         if(!isWasmInitialized) {
3799                 throw new Error("initializeWasm() must be awaited first!");
3800         }
3801         const nativeResponseValue = wasm.TS_Watch_watch_channel(this_arg, funding_txo, monitor);
3802         return nativeResponseValue;
3803 }
3804         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
3805 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
3806         if(!isWasmInitialized) {
3807                 throw new Error("initializeWasm() must be awaited first!");
3808         }
3809         const nativeResponseValue = wasm.TS_Watch_update_channel(this_arg, funding_txo, update);
3810         return nativeResponseValue;
3811 }
3812         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
3813 export function Watch_release_pending_monitor_events(this_arg: number): number {
3814         if(!isWasmInitialized) {
3815                 throw new Error("initializeWasm() must be awaited first!");
3816         }
3817         const nativeResponseValue = wasm.TS_Watch_release_pending_monitor_events(this_arg);
3818         return nativeResponseValue;
3819 }
3820
3821
3822
3823 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3824
3825 export interface LDKBroadcasterInterface {
3826         broadcast_transaction (tx: number): void;
3827 }
3828
3829 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
3830         if(!isWasmInitialized) {
3831                 throw new Error("initializeWasm() must be awaited first!");
3832         }
3833         var new_obj_idx = js_objs.length;
3834         for (var i = 0; i < js_objs.length; i++) {
3835                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3836         }
3837         js_objs[i] = new WeakRef(impl);
3838         return wasm.TS_LDKBroadcasterInterface_new(i);
3839 }
3840
3841 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3842
3843
3844         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
3845 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: number): void {
3846         if(!isWasmInitialized) {
3847                 throw new Error("initializeWasm() must be awaited first!");
3848         }
3849         const nativeResponseValue = wasm.TS_BroadcasterInterface_broadcast_transaction(this_arg, tx);
3850         // debug statements here
3851 }
3852
3853
3854
3855 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3856
3857 export interface LDKKeysInterface {
3858         get_node_secret (): number;
3859         get_destination_script (): number;
3860         get_shutdown_scriptpubkey (): number;
3861         get_channel_signer (inbound: boolean, channel_value_satoshis: bigint): number;
3862         get_secure_random_bytes (): number;
3863         read_chan_signer (reader: number): number;
3864         sign_invoice (invoice_preimage: number): number;
3865         get_inbound_payment_key_material (): number;
3866 }
3867
3868 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
3869         if(!isWasmInitialized) {
3870                 throw new Error("initializeWasm() must be awaited first!");
3871         }
3872         var new_obj_idx = js_objs.length;
3873         for (var i = 0; i < js_objs.length; i++) {
3874                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3875         }
3876         js_objs[i] = new WeakRef(impl);
3877         return wasm.TS_LDKKeysInterface_new(i);
3878 }
3879
3880 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3881
3882
3883         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
3884 export function KeysInterface_get_node_secret(this_arg: number): number {
3885         if(!isWasmInitialized) {
3886                 throw new Error("initializeWasm() must be awaited first!");
3887         }
3888         const nativeResponseValue = wasm.TS_KeysInterface_get_node_secret(this_arg);
3889         return nativeResponseValue;
3890 }
3891         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
3892 export function KeysInterface_get_destination_script(this_arg: number): number {
3893         if(!isWasmInitialized) {
3894                 throw new Error("initializeWasm() must be awaited first!");
3895         }
3896         const nativeResponseValue = wasm.TS_KeysInterface_get_destination_script(this_arg);
3897         return nativeResponseValue;
3898 }
3899         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
3900 export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
3901         if(!isWasmInitialized) {
3902                 throw new Error("initializeWasm() must be awaited first!");
3903         }
3904         const nativeResponseValue = wasm.TS_KeysInterface_get_shutdown_scriptpubkey(this_arg);
3905         return nativeResponseValue;
3906 }
3907         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
3908 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: bigint): number {
3909         if(!isWasmInitialized) {
3910                 throw new Error("initializeWasm() must be awaited first!");
3911         }
3912         const nativeResponseValue = wasm.TS_KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
3913         return nativeResponseValue;
3914 }
3915         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
3916 export function KeysInterface_get_secure_random_bytes(this_arg: number): number {
3917         if(!isWasmInitialized) {
3918                 throw new Error("initializeWasm() must be awaited first!");
3919         }
3920         const nativeResponseValue = wasm.TS_KeysInterface_get_secure_random_bytes(this_arg);
3921         return nativeResponseValue;
3922 }
3923         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
3924 export function KeysInterface_read_chan_signer(this_arg: number, reader: number): number {
3925         if(!isWasmInitialized) {
3926                 throw new Error("initializeWasm() must be awaited first!");
3927         }
3928         const nativeResponseValue = wasm.TS_KeysInterface_read_chan_signer(this_arg, reader);
3929         return nativeResponseValue;
3930 }
3931         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
3932 export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: number): number {
3933         if(!isWasmInitialized) {
3934                 throw new Error("initializeWasm() must be awaited first!");
3935         }
3936         const nativeResponseValue = wasm.TS_KeysInterface_sign_invoice(this_arg, invoice_preimage);
3937         return nativeResponseValue;
3938 }
3939         // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
3940 export function KeysInterface_get_inbound_payment_key_material(this_arg: number): number {
3941         if(!isWasmInitialized) {
3942                 throw new Error("initializeWasm() must be awaited first!");
3943         }
3944         const nativeResponseValue = wasm.TS_KeysInterface_get_inbound_payment_key_material(this_arg);
3945         return nativeResponseValue;
3946 }
3947
3948
3949
3950 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3951
3952 export interface LDKFeeEstimator {
3953         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
3954 }
3955
3956 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
3957         if(!isWasmInitialized) {
3958                 throw new Error("initializeWasm() must be awaited first!");
3959         }
3960         var new_obj_idx = js_objs.length;
3961         for (var i = 0; i < js_objs.length; i++) {
3962                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3963         }
3964         js_objs[i] = new WeakRef(impl);
3965         return wasm.TS_LDKFeeEstimator_new(i);
3966 }
3967
3968 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
3969
3970
3971         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
3972 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
3973         if(!isWasmInitialized) {
3974                 throw new Error("initializeWasm() must be awaited first!");
3975         }
3976         const nativeResponseValue = wasm.TS_FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
3977         return nativeResponseValue;
3978 }
3979
3980
3981
3982 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
3983
3984 export interface LDKLogger {
3985         log (record: number): void;
3986 }
3987
3988 export function LDKLogger_new(impl: LDKLogger): number {
3989         if(!isWasmInitialized) {
3990                 throw new Error("initializeWasm() must be awaited first!");
3991         }
3992         var new_obj_idx = js_objs.length;
3993         for (var i = 0; i < js_objs.length; i++) {
3994                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
3995         }
3996         js_objs[i] = new WeakRef(impl);
3997         return wasm.TS_LDKLogger_new(i);
3998 }
3999
4000 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4001
4002
4003         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
4004 export function C2Tuple_BlockHashChannelManagerZ_get_a(owner: number): number {
4005         if(!isWasmInitialized) {
4006                 throw new Error("initializeWasm() must be awaited first!");
4007         }
4008         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_a(owner);
4009         return nativeResponseValue;
4010 }
4011         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
4012 export function C2Tuple_BlockHashChannelManagerZ_get_b(owner: number): number {
4013         if(!isWasmInitialized) {
4014                 throw new Error("initializeWasm() must be awaited first!");
4015         }
4016         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_get_b(owner);
4017         return nativeResponseValue;
4018 }
4019         // struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
4020 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner: number): number {
4021         if(!isWasmInitialized) {
4022                 throw new Error("initializeWasm() must be awaited first!");
4023         }
4024         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(owner);
4025         return nativeResponseValue;
4026 }
4027         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
4028 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner: number): number {
4029         if(!isWasmInitialized) {
4030                 throw new Error("initializeWasm() must be awaited first!");
4031         }
4032         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(owner);
4033         return nativeResponseValue;
4034 }
4035
4036
4037
4038 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4039
4040 export interface LDKMessageSendEventsProvider {
4041         get_and_clear_pending_msg_events (): number;
4042 }
4043
4044 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
4045         if(!isWasmInitialized) {
4046                 throw new Error("initializeWasm() must be awaited first!");
4047         }
4048         var new_obj_idx = js_objs.length;
4049         for (var i = 0; i < js_objs.length; i++) {
4050                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4051         }
4052         js_objs[i] = new WeakRef(impl);
4053         return wasm.TS_LDKMessageSendEventsProvider_new(i);
4054 }
4055
4056 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4057
4058
4059         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
4060 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number {
4061         if(!isWasmInitialized) {
4062                 throw new Error("initializeWasm() must be awaited first!");
4063         }
4064         const nativeResponseValue = wasm.TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
4065         return nativeResponseValue;
4066 }
4067
4068
4069
4070 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4071
4072 export interface LDKEventHandler {
4073         handle_event (event: number): void;
4074 }
4075
4076 export function LDKEventHandler_new(impl: LDKEventHandler): number {
4077         if(!isWasmInitialized) {
4078                 throw new Error("initializeWasm() must be awaited first!");
4079         }
4080         var new_obj_idx = js_objs.length;
4081         for (var i = 0; i < js_objs.length; i++) {
4082                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4083         }
4084         js_objs[i] = new WeakRef(impl);
4085         return wasm.TS_LDKEventHandler_new(i);
4086 }
4087
4088 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4089
4090
4091         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
4092 export function EventHandler_handle_event(this_arg: number, event: number): void {
4093         if(!isWasmInitialized) {
4094                 throw new Error("initializeWasm() must be awaited first!");
4095         }
4096         const nativeResponseValue = wasm.TS_EventHandler_handle_event(this_arg, event);
4097         // debug statements here
4098 }
4099
4100
4101
4102 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4103
4104 export interface LDKEventsProvider {
4105         process_pending_events (handler: number): void;
4106 }
4107
4108 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
4109         if(!isWasmInitialized) {
4110                 throw new Error("initializeWasm() must be awaited first!");
4111         }
4112         var new_obj_idx = js_objs.length;
4113         for (var i = 0; i < js_objs.length; i++) {
4114                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4115         }
4116         js_objs[i] = new WeakRef(impl);
4117         return wasm.TS_LDKEventsProvider_new(i);
4118 }
4119
4120 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4121
4122
4123         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
4124 export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
4125         if(!isWasmInitialized) {
4126                 throw new Error("initializeWasm() must be awaited first!");
4127         }
4128         const nativeResponseValue = wasm.TS_EventsProvider_process_pending_events(this_arg, handler);
4129         // debug statements here
4130 }
4131
4132
4133
4134 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4135
4136 export interface LDKListen {
4137         block_connected (block: number, height: number): void;
4138         block_disconnected (header: number, height: number): void;
4139 }
4140
4141 export function LDKListen_new(impl: LDKListen): number {
4142         if(!isWasmInitialized) {
4143                 throw new Error("initializeWasm() must be awaited first!");
4144         }
4145         var new_obj_idx = js_objs.length;
4146         for (var i = 0; i < js_objs.length; i++) {
4147                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4148         }
4149         js_objs[i] = new WeakRef(impl);
4150         return wasm.TS_LDKListen_new(i);
4151 }
4152
4153 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4154
4155
4156         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
4157 export function Listen_block_connected(this_arg: number, block: number, height: number): void {
4158         if(!isWasmInitialized) {
4159                 throw new Error("initializeWasm() must be awaited first!");
4160         }
4161         const nativeResponseValue = wasm.TS_Listen_block_connected(this_arg, block, height);
4162         // debug statements here
4163 }
4164         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
4165 export function Listen_block_disconnected(this_arg: number, header: number, height: number): void {
4166         if(!isWasmInitialized) {
4167                 throw new Error("initializeWasm() must be awaited first!");
4168         }
4169         const nativeResponseValue = wasm.TS_Listen_block_disconnected(this_arg, header, height);
4170         // debug statements here
4171 }
4172
4173
4174
4175 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4176
4177 export interface LDKConfirm {
4178         transactions_confirmed (header: number, txdata: number, height: number): void;
4179         transaction_unconfirmed (txid: number): void;
4180         best_block_updated (header: number, height: number): void;
4181         get_relevant_txids (): number;
4182 }
4183
4184 export function LDKConfirm_new(impl: LDKConfirm): number {
4185         if(!isWasmInitialized) {
4186                 throw new Error("initializeWasm() must be awaited first!");
4187         }
4188         var new_obj_idx = js_objs.length;
4189         for (var i = 0; i < js_objs.length; i++) {
4190                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4191         }
4192         js_objs[i] = new WeakRef(impl);
4193         return wasm.TS_LDKConfirm_new(i);
4194 }
4195
4196 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4197
4198
4199         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
4200 export function Confirm_transactions_confirmed(this_arg: number, header: number, txdata: number, height: number): void {
4201         if(!isWasmInitialized) {
4202                 throw new Error("initializeWasm() must be awaited first!");
4203         }
4204         const nativeResponseValue = wasm.TS_Confirm_transactions_confirmed(this_arg, header, txdata, height);
4205         // debug statements here
4206 }
4207         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
4208 export function Confirm_transaction_unconfirmed(this_arg: number, txid: number): void {
4209         if(!isWasmInitialized) {
4210                 throw new Error("initializeWasm() must be awaited first!");
4211         }
4212         const nativeResponseValue = wasm.TS_Confirm_transaction_unconfirmed(this_arg, txid);
4213         // debug statements here
4214 }
4215         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
4216 export function Confirm_best_block_updated(this_arg: number, header: number, height: number): void {
4217         if(!isWasmInitialized) {
4218                 throw new Error("initializeWasm() must be awaited first!");
4219         }
4220         const nativeResponseValue = wasm.TS_Confirm_best_block_updated(this_arg, header, height);
4221         // debug statements here
4222 }
4223         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
4224 export function Confirm_get_relevant_txids(this_arg: number): number {
4225         if(!isWasmInitialized) {
4226                 throw new Error("initializeWasm() must be awaited first!");
4227         }
4228         const nativeResponseValue = wasm.TS_Confirm_get_relevant_txids(this_arg);
4229         return nativeResponseValue;
4230 }
4231
4232
4233
4234 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4235
4236 export interface LDKPersist {
4237         persist_new_channel (channel_id: number, data: number, update_id: number): number;
4238         update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
4239 }
4240
4241 export function LDKPersist_new(impl: LDKPersist): number {
4242         if(!isWasmInitialized) {
4243                 throw new Error("initializeWasm() must be awaited first!");
4244         }
4245         var new_obj_idx = js_objs.length;
4246         for (var i = 0; i < js_objs.length; i++) {
4247                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4248         }
4249         js_objs[i] = new WeakRef(impl);
4250         return wasm.TS_LDKPersist_new(i);
4251 }
4252
4253 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4254
4255
4256         // 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
4257 export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
4258         if(!isWasmInitialized) {
4259                 throw new Error("initializeWasm() must be awaited first!");
4260         }
4261         const nativeResponseValue = wasm.TS_Persist_persist_new_channel(this_arg, channel_id, data, update_id);
4262         return nativeResponseValue;
4263 }
4264         // 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
4265 export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
4266         if(!isWasmInitialized) {
4267                 throw new Error("initializeWasm() must be awaited first!");
4268         }
4269         const nativeResponseValue = wasm.TS_Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
4270         return nativeResponseValue;
4271 }
4272
4273
4274
4275 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4276
4277 export interface LDKChannelMessageHandler {
4278         handle_open_channel (their_node_id: number, their_features: number, msg: number): void;
4279         handle_accept_channel (their_node_id: number, their_features: number, msg: number): void;
4280         handle_funding_created (their_node_id: number, msg: number): void;
4281         handle_funding_signed (their_node_id: number, msg: number): void;
4282         handle_funding_locked (their_node_id: number, msg: number): void;
4283         handle_shutdown (their_node_id: number, their_features: number, msg: number): void;
4284         handle_closing_signed (their_node_id: number, msg: number): void;
4285         handle_update_add_htlc (their_node_id: number, msg: number): void;
4286         handle_update_fulfill_htlc (their_node_id: number, msg: number): void;
4287         handle_update_fail_htlc (their_node_id: number, msg: number): void;
4288         handle_update_fail_malformed_htlc (their_node_id: number, msg: number): void;
4289         handle_commitment_signed (their_node_id: number, msg: number): void;
4290         handle_revoke_and_ack (their_node_id: number, msg: number): void;
4291         handle_update_fee (their_node_id: number, msg: number): void;
4292         handle_announcement_signatures (their_node_id: number, msg: number): void;
4293         peer_disconnected (their_node_id: number, no_connection_possible: boolean): void;
4294         peer_connected (their_node_id: number, msg: number): void;
4295         handle_channel_reestablish (their_node_id: number, msg: number): void;
4296         handle_channel_update (their_node_id: number, msg: number): void;
4297         handle_error (their_node_id: number, msg: number): void;
4298 }
4299
4300 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
4301         if(!isWasmInitialized) {
4302                 throw new Error("initializeWasm() must be awaited first!");
4303         }
4304         var new_obj_idx = js_objs.length;
4305         for (var i = 0; i < js_objs.length; i++) {
4306                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4307         }
4308         js_objs[i] = new WeakRef(impl);
4309         return wasm.TS_LDKChannelMessageHandler_new(i);
4310 }
4311
4312 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4313
4314
4315         // 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
4316 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: number, their_features: number, msg: number): void {
4317         if(!isWasmInitialized) {
4318                 throw new Error("initializeWasm() must be awaited first!");
4319         }
4320         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_open_channel(this_arg, their_node_id, their_features, msg);
4321         // debug statements here
4322 }
4323         // 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
4324 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: number, their_features: number, msg: number): void {
4325         if(!isWasmInitialized) {
4326                 throw new Error("initializeWasm() must be awaited first!");
4327         }
4328         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_accept_channel(this_arg, their_node_id, their_features, msg);
4329         // debug statements here
4330 }
4331         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
4332 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: number, msg: number): void {
4333         if(!isWasmInitialized) {
4334                 throw new Error("initializeWasm() must be awaited first!");
4335         }
4336         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_created(this_arg, their_node_id, msg);
4337         // debug statements here
4338 }
4339         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
4340 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: number, msg: number): void {
4341         if(!isWasmInitialized) {
4342                 throw new Error("initializeWasm() must be awaited first!");
4343         }
4344         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_signed(this_arg, their_node_id, msg);
4345         // debug statements here
4346 }
4347         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
4348 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: number, msg: number): void {
4349         if(!isWasmInitialized) {
4350                 throw new Error("initializeWasm() must be awaited first!");
4351         }
4352         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_funding_locked(this_arg, their_node_id, msg);
4353         // debug statements here
4354 }
4355         // 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
4356 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: number, their_features: number, msg: number): void {
4357         if(!isWasmInitialized) {
4358                 throw new Error("initializeWasm() must be awaited first!");
4359         }
4360         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_shutdown(this_arg, their_node_id, their_features, msg);
4361         // debug statements here
4362 }
4363         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
4364 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: number, msg: number): void {
4365         if(!isWasmInitialized) {
4366                 throw new Error("initializeWasm() must be awaited first!");
4367         }
4368         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_closing_signed(this_arg, their_node_id, msg);
4369         // debug statements here
4370 }
4371         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
4372 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: number, msg: number): void {
4373         if(!isWasmInitialized) {
4374                 throw new Error("initializeWasm() must be awaited first!");
4375         }
4376         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_add_htlc(this_arg, their_node_id, msg);
4377         // debug statements here
4378 }
4379         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
4380 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: number, msg: number): void {
4381         if(!isWasmInitialized) {
4382                 throw new Error("initializeWasm() must be awaited first!");
4383         }
4384         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, their_node_id, msg);
4385         // debug statements here
4386 }
4387         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
4388 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: number, msg: number): void {
4389         if(!isWasmInitialized) {
4390                 throw new Error("initializeWasm() must be awaited first!");
4391         }
4392         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_htlc(this_arg, their_node_id, msg);
4393         // debug statements here
4394 }
4395         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
4396 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: number, msg: number): void {
4397         if(!isWasmInitialized) {
4398                 throw new Error("initializeWasm() must be awaited first!");
4399         }
4400         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, their_node_id, msg);
4401         // debug statements here
4402 }
4403         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
4404 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: number, msg: number): void {
4405         if(!isWasmInitialized) {
4406                 throw new Error("initializeWasm() must be awaited first!");
4407         }
4408         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_commitment_signed(this_arg, their_node_id, msg);
4409         // debug statements here
4410 }
4411         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
4412 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: number, msg: number): void {
4413         if(!isWasmInitialized) {
4414                 throw new Error("initializeWasm() must be awaited first!");
4415         }
4416         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_revoke_and_ack(this_arg, their_node_id, msg);
4417         // debug statements here
4418 }
4419         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
4420 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: number, msg: number): void {
4421         if(!isWasmInitialized) {
4422                 throw new Error("initializeWasm() must be awaited first!");
4423         }
4424         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_update_fee(this_arg, their_node_id, msg);
4425         // debug statements here
4426 }
4427         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
4428 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: number, msg: number): void {
4429         if(!isWasmInitialized) {
4430                 throw new Error("initializeWasm() must be awaited first!");
4431         }
4432         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_announcement_signatures(this_arg, their_node_id, msg);
4433         // debug statements here
4434 }
4435         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
4436 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: number, no_connection_possible: boolean): void {
4437         if(!isWasmInitialized) {
4438                 throw new Error("initializeWasm() must be awaited first!");
4439         }
4440         const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_disconnected(this_arg, their_node_id, no_connection_possible);
4441         // debug statements here
4442 }
4443         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
4444 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: number, msg: number): void {
4445         if(!isWasmInitialized) {
4446                 throw new Error("initializeWasm() must be awaited first!");
4447         }
4448         const nativeResponseValue = wasm.TS_ChannelMessageHandler_peer_connected(this_arg, their_node_id, msg);
4449         // debug statements here
4450 }
4451         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
4452 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: number, msg: number): void {
4453         if(!isWasmInitialized) {
4454                 throw new Error("initializeWasm() must be awaited first!");
4455         }
4456         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_reestablish(this_arg, their_node_id, msg);
4457         // debug statements here
4458 }
4459         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
4460 export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: number, msg: number): void {
4461         if(!isWasmInitialized) {
4462                 throw new Error("initializeWasm() must be awaited first!");
4463         }
4464         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_channel_update(this_arg, their_node_id, msg);
4465         // debug statements here
4466 }
4467         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
4468 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: number, msg: number): void {
4469         if(!isWasmInitialized) {
4470                 throw new Error("initializeWasm() must be awaited first!");
4471         }
4472         const nativeResponseValue = wasm.TS_ChannelMessageHandler_handle_error(this_arg, their_node_id, msg);
4473         // debug statements here
4474 }
4475
4476
4477
4478 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4479
4480 export interface LDKRoutingMessageHandler {
4481         handle_node_announcement (msg: number): number;
4482         handle_channel_announcement (msg: number): number;
4483         handle_channel_update (msg: number): number;
4484         get_next_channel_announcements (starting_point: bigint, batch_amount: number): number;
4485         get_next_node_announcements (starting_point: number, batch_amount: number): number;
4486         sync_routing_table (their_node_id: number, init: number): void;
4487         handle_reply_channel_range (their_node_id: number, msg: number): number;
4488         handle_reply_short_channel_ids_end (their_node_id: number, msg: number): number;
4489         handle_query_channel_range (their_node_id: number, msg: number): number;
4490         handle_query_short_channel_ids (their_node_id: number, msg: number): number;
4491 }
4492
4493 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
4494         if(!isWasmInitialized) {
4495                 throw new Error("initializeWasm() must be awaited first!");
4496         }
4497         var new_obj_idx = js_objs.length;
4498         for (var i = 0; i < js_objs.length; i++) {
4499                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4500         }
4501         js_objs[i] = new WeakRef(impl);
4502         return wasm.TS_LDKRoutingMessageHandler_new(i);
4503 }
4504
4505 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4506
4507
4508         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
4509 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
4510         if(!isWasmInitialized) {
4511                 throw new Error("initializeWasm() must be awaited first!");
4512         }
4513         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_node_announcement(this_arg, msg);
4514         return nativeResponseValue;
4515 }
4516         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
4517 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
4518         if(!isWasmInitialized) {
4519                 throw new Error("initializeWasm() must be awaited first!");
4520         }
4521         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
4522         return nativeResponseValue;
4523 }
4524         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
4525 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
4526         if(!isWasmInitialized) {
4527                 throw new Error("initializeWasm() must be awaited first!");
4528         }
4529         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_channel_update(this_arg, msg);
4530         return nativeResponseValue;
4531 }
4532         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
4533 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: bigint, batch_amount: number): number {
4534         if(!isWasmInitialized) {
4535                 throw new Error("initializeWasm() must be awaited first!");
4536         }
4537         const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
4538         return nativeResponseValue;
4539 }
4540         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
4541 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: number, batch_amount: number): number {
4542         if(!isWasmInitialized) {
4543                 throw new Error("initializeWasm() must be awaited first!");
4544         }
4545         const nativeResponseValue = wasm.TS_RoutingMessageHandler_get_next_node_announcements(this_arg, starting_point, batch_amount);
4546         return nativeResponseValue;
4547 }
4548         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
4549 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: number, init: number): void {
4550         if(!isWasmInitialized) {
4551                 throw new Error("initializeWasm() must be awaited first!");
4552         }
4553         const nativeResponseValue = wasm.TS_RoutingMessageHandler_sync_routing_table(this_arg, their_node_id, init);
4554         // debug statements here
4555 }
4556         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
4557 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: number, msg: number): number {
4558         if(!isWasmInitialized) {
4559                 throw new Error("initializeWasm() must be awaited first!");
4560         }
4561         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_channel_range(this_arg, their_node_id, msg);
4562         return nativeResponseValue;
4563 }
4564         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
4565 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: number, msg: number): number {
4566         if(!isWasmInitialized) {
4567                 throw new Error("initializeWasm() must be awaited first!");
4568         }
4569         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, their_node_id, msg);
4570         return nativeResponseValue;
4571 }
4572         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
4573 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: number, msg: number): number {
4574         if(!isWasmInitialized) {
4575                 throw new Error("initializeWasm() must be awaited first!");
4576         }
4577         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_channel_range(this_arg, their_node_id, msg);
4578         return nativeResponseValue;
4579 }
4580         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
4581 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: number, msg: number): number {
4582         if(!isWasmInitialized) {
4583                 throw new Error("initializeWasm() must be awaited first!");
4584         }
4585         const nativeResponseValue = wasm.TS_RoutingMessageHandler_handle_query_short_channel_ids(this_arg, their_node_id, msg);
4586         return nativeResponseValue;
4587 }
4588
4589
4590
4591 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4592
4593 export interface LDKCustomMessageReader {
4594         read (message_type: number, buffer: number): number;
4595 }
4596
4597 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
4598         if(!isWasmInitialized) {
4599                 throw new Error("initializeWasm() must be awaited first!");
4600         }
4601         var new_obj_idx = js_objs.length;
4602         for (var i = 0; i < js_objs.length; i++) {
4603                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4604         }
4605         js_objs[i] = new WeakRef(impl);
4606         return wasm.TS_LDKCustomMessageReader_new(i);
4607 }
4608
4609 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4610
4611
4612         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
4613 export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: number): number {
4614         if(!isWasmInitialized) {
4615                 throw new Error("initializeWasm() must be awaited first!");
4616         }
4617         const nativeResponseValue = wasm.TS_CustomMessageReader_read(this_arg, message_type, buffer);
4618         return nativeResponseValue;
4619 }
4620
4621
4622
4623 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4624
4625 export interface LDKCustomMessageHandler {
4626         handle_custom_message (msg: number, sender_node_id: number): number;
4627         get_and_clear_pending_msg (): number;
4628 }
4629
4630 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
4631         if(!isWasmInitialized) {
4632                 throw new Error("initializeWasm() must be awaited first!");
4633         }
4634         var new_obj_idx = js_objs.length;
4635         for (var i = 0; i < js_objs.length; i++) {
4636                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4637         }
4638         js_objs[i] = new WeakRef(impl);
4639         return wasm.TS_LDKCustomMessageHandler_new(i);
4640 }
4641
4642 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4643
4644
4645         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
4646 export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: number): number {
4647         if(!isWasmInitialized) {
4648                 throw new Error("initializeWasm() must be awaited first!");
4649         }
4650         const nativeResponseValue = wasm.TS_CustomMessageHandler_handle_custom_message(this_arg, msg, sender_node_id);
4651         return nativeResponseValue;
4652 }
4653         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
4654 export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number {
4655         if(!isWasmInitialized) {
4656                 throw new Error("initializeWasm() must be awaited first!");
4657         }
4658         const nativeResponseValue = wasm.TS_CustomMessageHandler_get_and_clear_pending_msg(this_arg);
4659         return nativeResponseValue;
4660 }
4661
4662
4663
4664 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4665
4666 export interface LDKSocketDescriptor {
4667         send_data (data: number, resume_read: boolean): number;
4668         disconnect_socket (): void;
4669         eq (other_arg: number): boolean;
4670         hash (): bigint;
4671 }
4672
4673 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
4674         if(!isWasmInitialized) {
4675                 throw new Error("initializeWasm() must be awaited first!");
4676         }
4677         var new_obj_idx = js_objs.length;
4678         for (var i = 0; i < js_objs.length; i++) {
4679                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4680         }
4681         js_objs[i] = new WeakRef(impl);
4682         return wasm.TS_LDKSocketDescriptor_new(i);
4683 }
4684
4685 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4686
4687
4688         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
4689 export function SocketDescriptor_send_data(this_arg: number, data: number, resume_read: boolean): number {
4690         if(!isWasmInitialized) {
4691                 throw new Error("initializeWasm() must be awaited first!");
4692         }
4693         const nativeResponseValue = wasm.TS_SocketDescriptor_send_data(this_arg, data, resume_read);
4694         return nativeResponseValue;
4695 }
4696         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
4697 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
4698         if(!isWasmInitialized) {
4699                 throw new Error("initializeWasm() must be awaited first!");
4700         }
4701         const nativeResponseValue = wasm.TS_SocketDescriptor_disconnect_socket(this_arg);
4702         // debug statements here
4703 }
4704         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
4705 export function SocketDescriptor_hash(this_arg: number): bigint {
4706         if(!isWasmInitialized) {
4707                 throw new Error("initializeWasm() must be awaited first!");
4708         }
4709         const nativeResponseValue = wasm.TS_SocketDescriptor_hash(this_arg);
4710         return nativeResponseValue;
4711 }
4712
4713
4714
4715 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4716
4717 export interface LDKScore {
4718         channel_penalty_msat (short_channel_id: bigint, send_amt_msat: bigint, channel_capacity_msat: number, source: number, target: number): bigint;
4719         payment_path_failed (path: number, short_channel_id: bigint): void;
4720         payment_path_successful (path: number): void;
4721         write (): number;
4722 }
4723
4724 export function LDKScore_new(impl: LDKScore): number {
4725         if(!isWasmInitialized) {
4726                 throw new Error("initializeWasm() must be awaited first!");
4727         }
4728         var new_obj_idx = js_objs.length;
4729         for (var i = 0; i < js_objs.length; i++) {
4730                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4731         }
4732         js_objs[i] = new WeakRef(impl);
4733         return wasm.TS_LDKScore_new(i);
4734 }
4735
4736 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4737
4738
4739         // 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
4740 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 {
4741         if(!isWasmInitialized) {
4742                 throw new Error("initializeWasm() must be awaited first!");
4743         }
4744         const nativeResponseValue = wasm.TS_Score_channel_penalty_msat(this_arg, short_channel_id, send_amt_msat, channel_capacity_msat, source, target);
4745         return nativeResponseValue;
4746 }
4747         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
4748 export function Score_payment_path_failed(this_arg: number, path: number, short_channel_id: bigint): void {
4749         if(!isWasmInitialized) {
4750                 throw new Error("initializeWasm() must be awaited first!");
4751         }
4752         const nativeResponseValue = wasm.TS_Score_payment_path_failed(this_arg, path, short_channel_id);
4753         // debug statements here
4754 }
4755         // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
4756 export function Score_payment_path_successful(this_arg: number, path: number): void {
4757         if(!isWasmInitialized) {
4758                 throw new Error("initializeWasm() must be awaited first!");
4759         }
4760         const nativeResponseValue = wasm.TS_Score_payment_path_successful(this_arg, path);
4761         // debug statements here
4762 }
4763         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
4764 export function Score_write(this_arg: number): number {
4765         if(!isWasmInitialized) {
4766                 throw new Error("initializeWasm() must be awaited first!");
4767         }
4768         const nativeResponseValue = wasm.TS_Score_write(this_arg);
4769         return nativeResponseValue;
4770 }
4771
4772
4773
4774 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
4775
4776 export interface LDKLockableScore {
4777         lock (): number;
4778 }
4779
4780 export function LDKLockableScore_new(impl: LDKLockableScore): number {
4781         if(!isWasmInitialized) {
4782                 throw new Error("initializeWasm() must be awaited first!");
4783         }
4784         var new_obj_idx = js_objs.length;
4785         for (var i = 0; i < js_objs.length; i++) {
4786                 if (js_objs[i] == null || js_objs[i] == undefined) { new_obj_idx = i; break; }
4787         }
4788         js_objs[i] = new WeakRef(impl);
4789         return wasm.TS_LDKLockableScore_new(i);
4790 }
4791
4792 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
4793
4794
4795         // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
4796 export function LockableScore_lock(this_arg: number): number {
4797         if(!isWasmInitialized) {
4798                 throw new Error("initializeWasm() must be awaited first!");
4799         }
4800         const nativeResponseValue = wasm.TS_LockableScore_lock(this_arg);
4801         return nativeResponseValue;
4802 }
4803         // struct LDKStr _ldk_get_compiled_version(void);
4804 export function _ldk_get_compiled_version(): number {
4805         if(!isWasmInitialized) {
4806                 throw new Error("initializeWasm() must be awaited first!");
4807         }
4808         const nativeResponseValue = wasm.TS__ldk_get_compiled_version();
4809         return nativeResponseValue;
4810 }
4811         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
4812 export function _ldk_c_bindings_get_compiled_version(): number {
4813         if(!isWasmInitialized) {
4814                 throw new Error("initializeWasm() must be awaited first!");
4815         }
4816         const nativeResponseValue = wasm.TS__ldk_c_bindings_get_compiled_version();
4817         return nativeResponseValue;
4818 }
4819         // void Transaction_free(struct LDKTransaction _res);
4820 export function Transaction_free(_res: number): void {
4821         if(!isWasmInitialized) {
4822                 throw new Error("initializeWasm() must be awaited first!");
4823         }
4824         const nativeResponseValue = wasm.TS_Transaction_free(_res);
4825         // debug statements here
4826 }
4827         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
4828 export function TxOut_new(script_pubkey: number, value: bigint): number {
4829         if(!isWasmInitialized) {
4830                 throw new Error("initializeWasm() must be awaited first!");
4831         }
4832         const nativeResponseValue = wasm.TS_TxOut_new(script_pubkey, value);
4833         return nativeResponseValue;
4834 }
4835         // void TxOut_free(struct LDKTxOut _res);
4836 export function TxOut_free(_res: number): void {
4837         if(!isWasmInitialized) {
4838                 throw new Error("initializeWasm() must be awaited first!");
4839         }
4840         const nativeResponseValue = wasm.TS_TxOut_free(_res);
4841         // debug statements here
4842 }
4843         // uintptr_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
4844 export function TxOut_clone_ptr(arg: number): number {
4845         if(!isWasmInitialized) {
4846                 throw new Error("initializeWasm() must be awaited first!");
4847         }
4848         const nativeResponseValue = wasm.TS_TxOut_clone_ptr(arg);
4849         return nativeResponseValue;
4850 }
4851         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
4852 export function TxOut_clone(orig: number): number {
4853         if(!isWasmInitialized) {
4854                 throw new Error("initializeWasm() must be awaited first!");
4855         }
4856         const nativeResponseValue = wasm.TS_TxOut_clone(orig);
4857         return nativeResponseValue;
4858 }
4859         // void Str_free(struct LDKStr _res);
4860 export function Str_free(_res: number): void {
4861         if(!isWasmInitialized) {
4862                 throw new Error("initializeWasm() must be awaited first!");
4863         }
4864         const nativeResponseValue = wasm.TS_Str_free(_res);
4865         // debug statements here
4866 }
4867         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4868 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4869         if(!isWasmInitialized) {
4870                 throw new Error("initializeWasm() must be awaited first!");
4871         }
4872         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_ok(o);
4873         return nativeResponseValue;
4874 }
4875         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4876 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4877         if(!isWasmInitialized) {
4878                 throw new Error("initializeWasm() must be awaited first!");
4879         }
4880         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_err(e);
4881         return nativeResponseValue;
4882 }
4883         // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
4884 export function CResult_ChannelConfigDecodeErrorZ_is_ok(o: number): boolean {
4885         if(!isWasmInitialized) {
4886                 throw new Error("initializeWasm() must be awaited first!");
4887         }
4888         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_is_ok(o);
4889         return nativeResponseValue;
4890 }
4891         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4892 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4893         if(!isWasmInitialized) {
4894                 throw new Error("initializeWasm() must be awaited first!");
4895         }
4896         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_free(_res);
4897         // debug statements here
4898 }
4899         // uintptr_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
4900 export function CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg: number): number {
4901         if(!isWasmInitialized) {
4902                 throw new Error("initializeWasm() must be awaited first!");
4903         }
4904         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg);
4905         return nativeResponseValue;
4906 }
4907         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4908 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4909         if(!isWasmInitialized) {
4910                 throw new Error("initializeWasm() must be awaited first!");
4911         }
4912         const nativeResponseValue = wasm.TS_CResult_ChannelConfigDecodeErrorZ_clone(orig);
4913         return nativeResponseValue;
4914 }
4915         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4916 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4917         if(!isWasmInitialized) {
4918                 throw new Error("initializeWasm() must be awaited first!");
4919         }
4920         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_ok(o);
4921         return nativeResponseValue;
4922 }
4923         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4924 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4925         if(!isWasmInitialized) {
4926                 throw new Error("initializeWasm() must be awaited first!");
4927         }
4928         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_err(e);
4929         return nativeResponseValue;
4930 }
4931         // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
4932 export function CResult_OutPointDecodeErrorZ_is_ok(o: number): boolean {
4933         if(!isWasmInitialized) {
4934                 throw new Error("initializeWasm() must be awaited first!");
4935         }
4936         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_is_ok(o);
4937         return nativeResponseValue;
4938 }
4939         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4940 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4941         if(!isWasmInitialized) {
4942                 throw new Error("initializeWasm() must be awaited first!");
4943         }
4944         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_free(_res);
4945         // debug statements here
4946 }
4947         // uintptr_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
4948 export function CResult_OutPointDecodeErrorZ_clone_ptr(arg: number): number {
4949         if(!isWasmInitialized) {
4950                 throw new Error("initializeWasm() must be awaited first!");
4951         }
4952         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone_ptr(arg);
4953         return nativeResponseValue;
4954 }
4955         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4956 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4957         if(!isWasmInitialized) {
4958                 throw new Error("initializeWasm() must be awaited first!");
4959         }
4960         const nativeResponseValue = wasm.TS_CResult_OutPointDecodeErrorZ_clone(orig);
4961         return nativeResponseValue;
4962 }
4963         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
4964 export function CResult_SecretKeyErrorZ_ok(o: number): number {
4965         if(!isWasmInitialized) {
4966                 throw new Error("initializeWasm() must be awaited first!");
4967         }
4968         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_ok(o);
4969         return nativeResponseValue;
4970 }
4971         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
4972 export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
4973         if(!isWasmInitialized) {
4974                 throw new Error("initializeWasm() must be awaited first!");
4975         }
4976         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_err(e);
4977         return nativeResponseValue;
4978 }
4979         // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
4980 export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
4981         if(!isWasmInitialized) {
4982                 throw new Error("initializeWasm() must be awaited first!");
4983         }
4984         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_is_ok(o);
4985         return nativeResponseValue;
4986 }
4987         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
4988 export function CResult_SecretKeyErrorZ_free(_res: number): void {
4989         if(!isWasmInitialized) {
4990                 throw new Error("initializeWasm() must be awaited first!");
4991         }
4992         const nativeResponseValue = wasm.TS_CResult_SecretKeyErrorZ_free(_res);
4993         // debug statements here
4994 }
4995         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
4996 export function CResult_PublicKeyErrorZ_ok(o: number): number {
4997         if(!isWasmInitialized) {
4998                 throw new Error("initializeWasm() must be awaited first!");
4999         }
5000         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_ok(o);
5001         return nativeResponseValue;
5002 }
5003         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
5004 export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
5005         if(!isWasmInitialized) {
5006                 throw new Error("initializeWasm() must be awaited first!");
5007         }
5008         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_err(e);
5009         return nativeResponseValue;
5010 }
5011         // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
5012 export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
5013         if(!isWasmInitialized) {
5014                 throw new Error("initializeWasm() must be awaited first!");
5015         }
5016         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_is_ok(o);
5017         return nativeResponseValue;
5018 }
5019         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
5020 export function CResult_PublicKeyErrorZ_free(_res: number): void {
5021         if(!isWasmInitialized) {
5022                 throw new Error("initializeWasm() must be awaited first!");
5023         }
5024         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_free(_res);
5025         // debug statements here
5026 }
5027         // uintptr_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
5028 export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
5029         if(!isWasmInitialized) {
5030                 throw new Error("initializeWasm() must be awaited first!");
5031         }
5032         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone_ptr(arg);
5033         return nativeResponseValue;
5034 }
5035         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
5036 export function CResult_PublicKeyErrorZ_clone(orig: number): number {
5037         if(!isWasmInitialized) {
5038                 throw new Error("initializeWasm() must be awaited first!");
5039         }
5040         const nativeResponseValue = wasm.TS_CResult_PublicKeyErrorZ_clone(orig);
5041         return nativeResponseValue;
5042 }
5043         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
5044 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
5045         if(!isWasmInitialized) {
5046                 throw new Error("initializeWasm() must be awaited first!");
5047         }
5048         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_ok(o);
5049         return nativeResponseValue;
5050 }
5051         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
5052 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
5053         if(!isWasmInitialized) {
5054                 throw new Error("initializeWasm() must be awaited first!");
5055         }
5056         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_err(e);
5057         return nativeResponseValue;
5058 }
5059         // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
5060 export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
5061         if(!isWasmInitialized) {
5062                 throw new Error("initializeWasm() must be awaited first!");
5063         }
5064         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
5065         return nativeResponseValue;
5066 }
5067         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
5068 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
5069         if(!isWasmInitialized) {
5070                 throw new Error("initializeWasm() must be awaited first!");
5071         }
5072         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_free(_res);
5073         // debug statements here
5074 }
5075         // uintptr_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
5076 export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
5077         if(!isWasmInitialized) {
5078                 throw new Error("initializeWasm() must be awaited first!");
5079         }
5080         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
5081         return nativeResponseValue;
5082 }
5083         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
5084 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
5085         if(!isWasmInitialized) {
5086                 throw new Error("initializeWasm() must be awaited first!");
5087         }
5088         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysDecodeErrorZ_clone(orig);
5089         return nativeResponseValue;
5090 }
5091         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
5092 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
5093         if(!isWasmInitialized) {
5094                 throw new Error("initializeWasm() must be awaited first!");
5095         }
5096         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
5097         return nativeResponseValue;
5098 }
5099         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
5100 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
5101         if(!isWasmInitialized) {
5102                 throw new Error("initializeWasm() must be awaited first!");
5103         }
5104         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_err(e);
5105         return nativeResponseValue;
5106 }
5107         // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
5108 export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
5109         if(!isWasmInitialized) {
5110                 throw new Error("initializeWasm() must be awaited first!");
5111         }
5112         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
5113         return nativeResponseValue;
5114 }
5115         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
5116 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
5117         if(!isWasmInitialized) {
5118                 throw new Error("initializeWasm() must be awaited first!");
5119         }
5120         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
5121         // debug statements here
5122 }
5123         // uintptr_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
5124 export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
5125         if(!isWasmInitialized) {
5126                 throw new Error("initializeWasm() must be awaited first!");
5127         }
5128         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
5129         return nativeResponseValue;
5130 }
5131         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
5132 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
5133         if(!isWasmInitialized) {
5134                 throw new Error("initializeWasm() must be awaited first!");
5135         }
5136         const nativeResponseValue = wasm.TS_CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
5137         return nativeResponseValue;
5138 }
5139         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
5140 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
5141         if(!isWasmInitialized) {
5142                 throw new Error("initializeWasm() must be awaited first!");
5143         }
5144         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_ok(o);
5145         return nativeResponseValue;
5146 }
5147         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
5148 export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
5149         if(!isWasmInitialized) {
5150                 throw new Error("initializeWasm() must be awaited first!");
5151         }
5152         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_err(e);
5153         return nativeResponseValue;
5154 }
5155         // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
5156 export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
5157         if(!isWasmInitialized) {
5158                 throw new Error("initializeWasm() must be awaited first!");
5159         }
5160         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_is_ok(o);
5161         return nativeResponseValue;
5162 }
5163         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
5164 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
5165         if(!isWasmInitialized) {
5166                 throw new Error("initializeWasm() must be awaited first!");
5167         }
5168         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_free(_res);
5169         // debug statements here
5170 }
5171         // uintptr_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
5172 export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
5173         if(!isWasmInitialized) {
5174                 throw new Error("initializeWasm() must be awaited first!");
5175         }
5176         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone_ptr(arg);
5177         return nativeResponseValue;
5178 }
5179         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
5180 export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
5181         if(!isWasmInitialized) {
5182                 throw new Error("initializeWasm() must be awaited first!");
5183         }
5184         const nativeResponseValue = wasm.TS_CResult_TxCreationKeysErrorZ_clone(orig);
5185         return nativeResponseValue;
5186 }
5187         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
5188 export function COption_u32Z_some(o: number): number {
5189         if(!isWasmInitialized) {
5190                 throw new Error("initializeWasm() must be awaited first!");
5191         }
5192         const nativeResponseValue = wasm.TS_COption_u32Z_some(o);
5193         return nativeResponseValue;
5194 }
5195         // struct LDKCOption_u32Z COption_u32Z_none(void);
5196 export function COption_u32Z_none(): number {
5197         if(!isWasmInitialized) {
5198                 throw new Error("initializeWasm() must be awaited first!");
5199         }
5200         const nativeResponseValue = wasm.TS_COption_u32Z_none();
5201         return nativeResponseValue;
5202 }
5203         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
5204 export function COption_u32Z_free(_res: number): void {
5205         if(!isWasmInitialized) {
5206                 throw new Error("initializeWasm() must be awaited first!");
5207         }
5208         const nativeResponseValue = wasm.TS_COption_u32Z_free(_res);
5209         // debug statements here
5210 }
5211         // uintptr_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
5212 export function COption_u32Z_clone_ptr(arg: number): number {
5213         if(!isWasmInitialized) {
5214                 throw new Error("initializeWasm() must be awaited first!");
5215         }
5216         const nativeResponseValue = wasm.TS_COption_u32Z_clone_ptr(arg);
5217         return nativeResponseValue;
5218 }
5219         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
5220 export function COption_u32Z_clone(orig: number): number {
5221         if(!isWasmInitialized) {
5222                 throw new Error("initializeWasm() must be awaited first!");
5223         }
5224         const nativeResponseValue = wasm.TS_COption_u32Z_clone(orig);
5225         return nativeResponseValue;
5226 }
5227         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
5228 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
5229         if(!isWasmInitialized) {
5230                 throw new Error("initializeWasm() must be awaited first!");
5231         }
5232         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
5233         return nativeResponseValue;
5234 }
5235         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
5236 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
5237         if(!isWasmInitialized) {
5238                 throw new Error("initializeWasm() must be awaited first!");
5239         }
5240         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
5241         return nativeResponseValue;
5242 }
5243         // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
5244 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
5245         if(!isWasmInitialized) {
5246                 throw new Error("initializeWasm() must be awaited first!");
5247         }
5248         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
5249         return nativeResponseValue;
5250 }
5251         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
5252 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
5253         if(!isWasmInitialized) {
5254                 throw new Error("initializeWasm() must be awaited first!");
5255         }
5256         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
5257         // debug statements here
5258 }
5259         // uintptr_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
5260 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
5261         if(!isWasmInitialized) {
5262                 throw new Error("initializeWasm() must be awaited first!");
5263         }
5264         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
5265         return nativeResponseValue;
5266 }
5267         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
5268 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
5269         if(!isWasmInitialized) {
5270                 throw new Error("initializeWasm() must be awaited first!");
5271         }
5272         const nativeResponseValue = wasm.TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
5273         return nativeResponseValue;
5274 }
5275         // enum LDKCOption_NoneZ COption_NoneZ_some(void);
5276 export function COption_NoneZ_some(): COption_NoneZ {
5277         if(!isWasmInitialized) {
5278                 throw new Error("initializeWasm() must be awaited first!");
5279         }
5280         const nativeResponseValue = wasm.TS_COption_NoneZ_some();
5281         return nativeResponseValue;
5282 }
5283         // enum LDKCOption_NoneZ COption_NoneZ_none(void);
5284 export function COption_NoneZ_none(): COption_NoneZ {
5285         if(!isWasmInitialized) {
5286                 throw new Error("initializeWasm() must be awaited first!");
5287         }
5288         const nativeResponseValue = wasm.TS_COption_NoneZ_none();
5289         return nativeResponseValue;
5290 }
5291         // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
5292 export function COption_NoneZ_free(_res: COption_NoneZ): void {
5293         if(!isWasmInitialized) {
5294                 throw new Error("initializeWasm() must be awaited first!");
5295         }
5296         const nativeResponseValue = wasm.TS_COption_NoneZ_free(_res);
5297         // debug statements here
5298 }
5299         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
5300 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
5301         if(!isWasmInitialized) {
5302                 throw new Error("initializeWasm() must be awaited first!");
5303         }
5304         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
5305         return nativeResponseValue;
5306 }
5307         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
5308 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
5309         if(!isWasmInitialized) {
5310                 throw new Error("initializeWasm() must be awaited first!");
5311         }
5312         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
5313         return nativeResponseValue;
5314 }
5315         // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
5316 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
5317         if(!isWasmInitialized) {
5318                 throw new Error("initializeWasm() must be awaited first!");
5319         }
5320         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
5321         return nativeResponseValue;
5322 }
5323         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
5324 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
5325         if(!isWasmInitialized) {
5326                 throw new Error("initializeWasm() must be awaited first!");
5327         }
5328         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
5329         // debug statements here
5330 }
5331         // uintptr_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
5332 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
5333         if(!isWasmInitialized) {
5334                 throw new Error("initializeWasm() must be awaited first!");
5335         }
5336         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
5337         return nativeResponseValue;
5338 }
5339         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
5340 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
5341         if(!isWasmInitialized) {
5342                 throw new Error("initializeWasm() must be awaited first!");
5343         }
5344         const nativeResponseValue = wasm.TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
5345         return nativeResponseValue;
5346 }
5347         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
5348 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
5349         if(!isWasmInitialized) {
5350                 throw new Error("initializeWasm() must be awaited first!");
5351         }
5352         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
5353         return nativeResponseValue;
5354 }
5355         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
5356 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
5357         if(!isWasmInitialized) {
5358                 throw new Error("initializeWasm() must be awaited first!");
5359         }
5360         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
5361         return nativeResponseValue;
5362 }
5363         // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
5364 export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
5365         if(!isWasmInitialized) {
5366                 throw new Error("initializeWasm() must be awaited first!");
5367         }
5368         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
5369         return nativeResponseValue;
5370 }
5371         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
5372 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
5373         if(!isWasmInitialized) {
5374                 throw new Error("initializeWasm() must be awaited first!");
5375         }
5376         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
5377         // debug statements here
5378 }
5379         // uintptr_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
5380 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
5381         if(!isWasmInitialized) {
5382                 throw new Error("initializeWasm() must be awaited first!");
5383         }
5384         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
5385         return nativeResponseValue;
5386 }
5387         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
5388 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
5389         if(!isWasmInitialized) {
5390                 throw new Error("initializeWasm() must be awaited first!");
5391         }
5392         const nativeResponseValue = wasm.TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
5393         return nativeResponseValue;
5394 }
5395         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
5396 export function CVec_SignatureZ_free(_res: number): void {
5397         if(!isWasmInitialized) {
5398                 throw new Error("initializeWasm() must be awaited first!");
5399         }
5400         const nativeResponseValue = wasm.TS_CVec_SignatureZ_free(_res);
5401         // debug statements here
5402 }
5403         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
5404 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
5405         if(!isWasmInitialized) {
5406                 throw new Error("initializeWasm() must be awaited first!");
5407         }
5408         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
5409         return nativeResponseValue;
5410 }
5411         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
5412 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
5413         if(!isWasmInitialized) {
5414                 throw new Error("initializeWasm() must be awaited first!");
5415         }
5416         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
5417         return nativeResponseValue;
5418 }
5419         // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
5420 export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
5421         if(!isWasmInitialized) {
5422                 throw new Error("initializeWasm() must be awaited first!");
5423         }
5424         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
5425         return nativeResponseValue;
5426 }
5427         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
5428 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
5429         if(!isWasmInitialized) {
5430                 throw new Error("initializeWasm() must be awaited first!");
5431         }
5432         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
5433         // debug statements here
5434 }
5435         // uintptr_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
5436 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
5437         if(!isWasmInitialized) {
5438                 throw new Error("initializeWasm() must be awaited first!");
5439         }
5440         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
5441         return nativeResponseValue;
5442 }
5443         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
5444 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
5445         if(!isWasmInitialized) {
5446                 throw new Error("initializeWasm() must be awaited first!");
5447         }
5448         const nativeResponseValue = wasm.TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
5449         return nativeResponseValue;
5450 }
5451         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
5452 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
5453         if(!isWasmInitialized) {
5454                 throw new Error("initializeWasm() must be awaited first!");
5455         }
5456         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
5457         return nativeResponseValue;
5458 }
5459         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
5460 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
5461         if(!isWasmInitialized) {
5462                 throw new Error("initializeWasm() must be awaited first!");
5463         }
5464         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
5465         return nativeResponseValue;
5466 }
5467         // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
5468 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
5469         if(!isWasmInitialized) {
5470                 throw new Error("initializeWasm() must be awaited first!");
5471         }
5472         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
5473         return nativeResponseValue;
5474 }
5475         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
5476 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
5477         if(!isWasmInitialized) {
5478                 throw new Error("initializeWasm() must be awaited first!");
5479         }
5480         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
5481         // debug statements here
5482 }
5483         // uintptr_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
5484 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
5485         if(!isWasmInitialized) {
5486                 throw new Error("initializeWasm() must be awaited first!");
5487         }
5488         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
5489         return nativeResponseValue;
5490 }
5491         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
5492 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
5493         if(!isWasmInitialized) {
5494                 throw new Error("initializeWasm() must be awaited first!");
5495         }
5496         const nativeResponseValue = wasm.TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
5497         return nativeResponseValue;
5498 }
5499         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
5500 export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
5501         if(!isWasmInitialized) {
5502                 throw new Error("initializeWasm() must be awaited first!");
5503         }
5504         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_ok(o);
5505         return nativeResponseValue;
5506 }
5507         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
5508 export function CResult_TrustedClosingTransactionNoneZ_err(): number {
5509         if(!isWasmInitialized) {
5510                 throw new Error("initializeWasm() must be awaited first!");
5511         }
5512         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_err();
5513         return nativeResponseValue;
5514 }
5515         // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
5516 export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
5517         if(!isWasmInitialized) {
5518                 throw new Error("initializeWasm() must be awaited first!");
5519         }
5520         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_is_ok(o);
5521         return nativeResponseValue;
5522 }
5523         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
5524 export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
5525         if(!isWasmInitialized) {
5526                 throw new Error("initializeWasm() must be awaited first!");
5527         }
5528         const nativeResponseValue = wasm.TS_CResult_TrustedClosingTransactionNoneZ_free(_res);
5529         // debug statements here
5530 }
5531         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
5532 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
5533         if(!isWasmInitialized) {
5534                 throw new Error("initializeWasm() must be awaited first!");
5535         }
5536         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_ok(o);
5537         return nativeResponseValue;
5538 }
5539         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
5540 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
5541         if(!isWasmInitialized) {
5542                 throw new Error("initializeWasm() must be awaited first!");
5543         }
5544         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_err(e);
5545         return nativeResponseValue;
5546 }
5547         // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
5548 export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
5549         if(!isWasmInitialized) {
5550                 throw new Error("initializeWasm() must be awaited first!");
5551         }
5552         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
5553         return nativeResponseValue;
5554 }
5555         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
5556 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
5557         if(!isWasmInitialized) {
5558                 throw new Error("initializeWasm() must be awaited first!");
5559         }
5560         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_free(_res);
5561         // debug statements here
5562 }
5563         // uintptr_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
5564 export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
5565         if(!isWasmInitialized) {
5566                 throw new Error("initializeWasm() must be awaited first!");
5567         }
5568         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
5569         return nativeResponseValue;
5570 }
5571         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
5572 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
5573         if(!isWasmInitialized) {
5574                 throw new Error("initializeWasm() must be awaited first!");
5575         }
5576         const nativeResponseValue = wasm.TS_CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
5577         return nativeResponseValue;
5578 }
5579         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
5580 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
5581         if(!isWasmInitialized) {
5582                 throw new Error("initializeWasm() must be awaited first!");
5583         }
5584         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_ok(o);
5585         return nativeResponseValue;
5586 }
5587         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
5588 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
5589         if(!isWasmInitialized) {
5590                 throw new Error("initializeWasm() must be awaited first!");
5591         }
5592         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_err();
5593         return nativeResponseValue;
5594 }
5595         // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
5596 export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
5597         if(!isWasmInitialized) {
5598                 throw new Error("initializeWasm() must be awaited first!");
5599         }
5600         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
5601         return nativeResponseValue;
5602 }
5603         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
5604 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
5605         if(!isWasmInitialized) {
5606                 throw new Error("initializeWasm() must be awaited first!");
5607         }
5608         const nativeResponseValue = wasm.TS_CResult_TrustedCommitmentTransactionNoneZ_free(_res);
5609         // debug statements here
5610 }
5611         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
5612 export function CResult_CVec_SignatureZNoneZ_ok(o: number): number {
5613         if(!isWasmInitialized) {
5614                 throw new Error("initializeWasm() must be awaited first!");
5615         }
5616         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_ok(o);
5617         return nativeResponseValue;
5618 }
5619         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
5620 export function CResult_CVec_SignatureZNoneZ_err(): number {
5621         if(!isWasmInitialized) {
5622                 throw new Error("initializeWasm() must be awaited first!");
5623         }
5624         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_err();
5625         return nativeResponseValue;
5626 }
5627         // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
5628 export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
5629         if(!isWasmInitialized) {
5630                 throw new Error("initializeWasm() must be awaited first!");
5631         }
5632         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_is_ok(o);
5633         return nativeResponseValue;
5634 }
5635         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
5636 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
5637         if(!isWasmInitialized) {
5638                 throw new Error("initializeWasm() must be awaited first!");
5639         }
5640         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_free(_res);
5641         // debug statements here
5642 }
5643         // uintptr_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
5644 export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
5645         if(!isWasmInitialized) {
5646                 throw new Error("initializeWasm() must be awaited first!");
5647         }
5648         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
5649         return nativeResponseValue;
5650 }
5651         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
5652 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
5653         if(!isWasmInitialized) {
5654                 throw new Error("initializeWasm() must be awaited first!");
5655         }
5656         const nativeResponseValue = wasm.TS_CResult_CVec_SignatureZNoneZ_clone(orig);
5657         return nativeResponseValue;
5658 }
5659         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
5660 export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
5661         if(!isWasmInitialized) {
5662                 throw new Error("initializeWasm() must be awaited first!");
5663         }
5664         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_ok(o);
5665         return nativeResponseValue;
5666 }
5667         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
5668 export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
5669         if(!isWasmInitialized) {
5670                 throw new Error("initializeWasm() must be awaited first!");
5671         }
5672         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_err(e);
5673         return nativeResponseValue;
5674 }
5675         // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
5676 export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
5677         if(!isWasmInitialized) {
5678                 throw new Error("initializeWasm() must be awaited first!");
5679         }
5680         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
5681         return nativeResponseValue;
5682 }
5683         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
5684 export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
5685         if(!isWasmInitialized) {
5686                 throw new Error("initializeWasm() must be awaited first!");
5687         }
5688         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_free(_res);
5689         // debug statements here
5690 }
5691         // uintptr_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
5692 export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
5693         if(!isWasmInitialized) {
5694                 throw new Error("initializeWasm() must be awaited first!");
5695         }
5696         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
5697         return nativeResponseValue;
5698 }
5699         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
5700 export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
5701         if(!isWasmInitialized) {
5702                 throw new Error("initializeWasm() must be awaited first!");
5703         }
5704         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptDecodeErrorZ_clone(orig);
5705         return nativeResponseValue;
5706 }
5707         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
5708 export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
5709         if(!isWasmInitialized) {
5710                 throw new Error("initializeWasm() must be awaited first!");
5711         }
5712         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
5713         return nativeResponseValue;
5714 }
5715         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
5716 export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
5717         if(!isWasmInitialized) {
5718                 throw new Error("initializeWasm() must be awaited first!");
5719         }
5720         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
5721         return nativeResponseValue;
5722 }
5723         // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
5724 export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
5725         if(!isWasmInitialized) {
5726                 throw new Error("initializeWasm() must be awaited first!");
5727         }
5728         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
5729         return nativeResponseValue;
5730 }
5731         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
5732 export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
5733         if(!isWasmInitialized) {
5734                 throw new Error("initializeWasm() must be awaited first!");
5735         }
5736         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
5737         // debug statements here
5738 }
5739         // uintptr_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
5740 export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
5741         if(!isWasmInitialized) {
5742                 throw new Error("initializeWasm() must be awaited first!");
5743         }
5744         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
5745         return nativeResponseValue;
5746 }
5747         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
5748 export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
5749         if(!isWasmInitialized) {
5750                 throw new Error("initializeWasm() must be awaited first!");
5751         }
5752         const nativeResponseValue = wasm.TS_CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
5753         return nativeResponseValue;
5754 }
5755         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
5756 export function COption_TypeZ_some(o: number): number {
5757         if(!isWasmInitialized) {
5758                 throw new Error("initializeWasm() must be awaited first!");
5759         }
5760         const nativeResponseValue = wasm.TS_COption_TypeZ_some(o);
5761         return nativeResponseValue;
5762 }
5763         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
5764 export function COption_TypeZ_none(): number {
5765         if(!isWasmInitialized) {
5766                 throw new Error("initializeWasm() must be awaited first!");
5767         }
5768         const nativeResponseValue = wasm.TS_COption_TypeZ_none();
5769         return nativeResponseValue;
5770 }
5771         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
5772 export function COption_TypeZ_free(_res: number): void {
5773         if(!isWasmInitialized) {
5774                 throw new Error("initializeWasm() must be awaited first!");
5775         }
5776         const nativeResponseValue = wasm.TS_COption_TypeZ_free(_res);
5777         // debug statements here
5778 }
5779         // uintptr_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
5780 export function COption_TypeZ_clone_ptr(arg: number): number {
5781         if(!isWasmInitialized) {
5782                 throw new Error("initializeWasm() must be awaited first!");
5783         }
5784         const nativeResponseValue = wasm.TS_COption_TypeZ_clone_ptr(arg);
5785         return nativeResponseValue;
5786 }
5787         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
5788 export function COption_TypeZ_clone(orig: number): number {
5789         if(!isWasmInitialized) {
5790                 throw new Error("initializeWasm() must be awaited first!");
5791         }
5792         const nativeResponseValue = wasm.TS_COption_TypeZ_clone(orig);
5793         return nativeResponseValue;
5794 }
5795         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
5796 export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
5797         if(!isWasmInitialized) {
5798                 throw new Error("initializeWasm() must be awaited first!");
5799         }
5800         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_ok(o);
5801         return nativeResponseValue;
5802 }
5803         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
5804 export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
5805         if(!isWasmInitialized) {
5806                 throw new Error("initializeWasm() must be awaited first!");
5807         }
5808         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_err(e);
5809         return nativeResponseValue;
5810 }
5811         // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
5812 export function CResult_COption_TypeZDecodeErrorZ_is_ok(o: number): boolean {
5813         if(!isWasmInitialized) {
5814                 throw new Error("initializeWasm() must be awaited first!");
5815         }
5816         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_is_ok(o);
5817         return nativeResponseValue;
5818 }
5819         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
5820 export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
5821         if(!isWasmInitialized) {
5822                 throw new Error("initializeWasm() must be awaited first!");
5823         }
5824         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_free(_res);
5825         // debug statements here
5826 }
5827         // uintptr_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
5828 export function CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg: number): number {
5829         if(!isWasmInitialized) {
5830                 throw new Error("initializeWasm() must be awaited first!");
5831         }
5832         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg);
5833         return nativeResponseValue;
5834 }
5835         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
5836 export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
5837         if(!isWasmInitialized) {
5838                 throw new Error("initializeWasm() must be awaited first!");
5839         }
5840         const nativeResponseValue = wasm.TS_CResult_COption_TypeZDecodeErrorZ_clone(orig);
5841         return nativeResponseValue;
5842 }
5843         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
5844 export function CResult_StringErrorZ_ok(o: number): number {
5845         if(!isWasmInitialized) {
5846                 throw new Error("initializeWasm() must be awaited first!");
5847         }
5848         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_ok(o);
5849         return nativeResponseValue;
5850 }
5851         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
5852 export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
5853         if(!isWasmInitialized) {
5854                 throw new Error("initializeWasm() must be awaited first!");
5855         }
5856         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_err(e);
5857         return nativeResponseValue;
5858 }
5859         // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
5860 export function CResult_StringErrorZ_is_ok(o: number): boolean {
5861         if(!isWasmInitialized) {
5862                 throw new Error("initializeWasm() must be awaited first!");
5863         }
5864         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_is_ok(o);
5865         return nativeResponseValue;
5866 }
5867         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
5868 export function CResult_StringErrorZ_free(_res: number): void {
5869         if(!isWasmInitialized) {
5870                 throw new Error("initializeWasm() must be awaited first!");
5871         }
5872         const nativeResponseValue = wasm.TS_CResult_StringErrorZ_free(_res);
5873         // debug statements here
5874 }
5875         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
5876 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
5877         if(!isWasmInitialized) {
5878                 throw new Error("initializeWasm() must be awaited first!");
5879         }
5880         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
5881         return nativeResponseValue;
5882 }
5883         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5884 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
5885         if(!isWasmInitialized) {
5886                 throw new Error("initializeWasm() must be awaited first!");
5887         }
5888         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
5889         return nativeResponseValue;
5890 }
5891         // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
5892 export function CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: number): boolean {
5893         if(!isWasmInitialized) {
5894                 throw new Error("initializeWasm() must be awaited first!");
5895         }
5896         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o);
5897         return nativeResponseValue;
5898 }
5899         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
5900 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
5901         if(!isWasmInitialized) {
5902                 throw new Error("initializeWasm() must be awaited first!");
5903         }
5904         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
5905         // debug statements here
5906 }
5907         // uintptr_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
5908 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg: number): number {
5909         if(!isWasmInitialized) {
5910                 throw new Error("initializeWasm() must be awaited first!");
5911         }
5912         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg);
5913         return nativeResponseValue;
5914 }
5915         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
5916 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
5917         if(!isWasmInitialized) {
5918                 throw new Error("initializeWasm() must be awaited first!");
5919         }
5920         const nativeResponseValue = wasm.TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
5921         return nativeResponseValue;
5922 }
5923         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
5924 export function COption_MonitorEventZ_some(o: number): number {
5925         if(!isWasmInitialized) {
5926                 throw new Error("initializeWasm() must be awaited first!");
5927         }
5928         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_some(o);
5929         return nativeResponseValue;
5930 }
5931         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
5932 export function COption_MonitorEventZ_none(): number {
5933         if(!isWasmInitialized) {
5934                 throw new Error("initializeWasm() must be awaited first!");
5935         }
5936         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_none();
5937         return nativeResponseValue;
5938 }
5939         // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
5940 export function COption_MonitorEventZ_free(_res: number): void {
5941         if(!isWasmInitialized) {
5942                 throw new Error("initializeWasm() must be awaited first!");
5943         }
5944         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_free(_res);
5945         // debug statements here
5946 }
5947         // uintptr_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
5948 export function COption_MonitorEventZ_clone_ptr(arg: number): number {
5949         if(!isWasmInitialized) {
5950                 throw new Error("initializeWasm() must be awaited first!");
5951         }
5952         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone_ptr(arg);
5953         return nativeResponseValue;
5954 }
5955         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
5956 export function COption_MonitorEventZ_clone(orig: number): number {
5957         if(!isWasmInitialized) {
5958                 throw new Error("initializeWasm() must be awaited first!");
5959         }
5960         const nativeResponseValue = wasm.TS_COption_MonitorEventZ_clone(orig);
5961         return nativeResponseValue;
5962 }
5963         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
5964 export function CResult_COption_MonitorEventZDecodeErrorZ_ok(o: number): number {
5965         if(!isWasmInitialized) {
5966                 throw new Error("initializeWasm() must be awaited first!");
5967         }
5968         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_ok(o);
5969         return nativeResponseValue;
5970 }
5971         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
5972 export function CResult_COption_MonitorEventZDecodeErrorZ_err(e: number): number {
5973         if(!isWasmInitialized) {
5974                 throw new Error("initializeWasm() must be awaited first!");
5975         }
5976         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_err(e);
5977         return nativeResponseValue;
5978 }
5979         // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
5980 export function CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: number): boolean {
5981         if(!isWasmInitialized) {
5982                 throw new Error("initializeWasm() must be awaited first!");
5983         }
5984         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o);
5985         return nativeResponseValue;
5986 }
5987         // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
5988 export function CResult_COption_MonitorEventZDecodeErrorZ_free(_res: number): void {
5989         if(!isWasmInitialized) {
5990                 throw new Error("initializeWasm() must be awaited first!");
5991         }
5992         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_free(_res);
5993         // debug statements here
5994 }
5995         // uintptr_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
5996 export function CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg: number): number {
5997         if(!isWasmInitialized) {
5998                 throw new Error("initializeWasm() must be awaited first!");
5999         }
6000         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg);
6001         return nativeResponseValue;
6002 }
6003         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
6004 export function CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: number): number {
6005         if(!isWasmInitialized) {
6006                 throw new Error("initializeWasm() must be awaited first!");
6007         }
6008         const nativeResponseValue = wasm.TS_CResult_COption_MonitorEventZDecodeErrorZ_clone(orig);
6009         return nativeResponseValue;
6010 }
6011         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
6012 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
6013         if(!isWasmInitialized) {
6014                 throw new Error("initializeWasm() must be awaited first!");
6015         }
6016         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_ok(o);
6017         return nativeResponseValue;
6018 }
6019         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6020 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
6021         if(!isWasmInitialized) {
6022                 throw new Error("initializeWasm() must be awaited first!");
6023         }
6024         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_err(e);
6025         return nativeResponseValue;
6026 }
6027         // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
6028 export function CResult_HTLCUpdateDecodeErrorZ_is_ok(o: number): boolean {
6029         if(!isWasmInitialized) {
6030                 throw new Error("initializeWasm() must be awaited first!");
6031         }
6032         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_is_ok(o);
6033         return nativeResponseValue;
6034 }
6035         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
6036 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
6037         if(!isWasmInitialized) {
6038                 throw new Error("initializeWasm() must be awaited first!");
6039         }
6040         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_free(_res);
6041         // debug statements here
6042 }
6043         // uintptr_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
6044 export function CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6045         if(!isWasmInitialized) {
6046                 throw new Error("initializeWasm() must be awaited first!");
6047         }
6048         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg);
6049         return nativeResponseValue;
6050 }
6051         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
6052 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
6053         if(!isWasmInitialized) {
6054                 throw new Error("initializeWasm() must be awaited first!");
6055         }
6056         const nativeResponseValue = wasm.TS_CResult_HTLCUpdateDecodeErrorZ_clone(orig);
6057         return nativeResponseValue;
6058 }
6059         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
6060 export function CResult_NoneNoneZ_ok(): number {
6061         if(!isWasmInitialized) {
6062                 throw new Error("initializeWasm() must be awaited first!");
6063         }
6064         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_ok();
6065         return nativeResponseValue;
6066 }
6067         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
6068 export function CResult_NoneNoneZ_err(): number {
6069         if(!isWasmInitialized) {
6070                 throw new Error("initializeWasm() must be awaited first!");
6071         }
6072         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_err();
6073         return nativeResponseValue;
6074 }
6075         // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
6076 export function CResult_NoneNoneZ_is_ok(o: number): boolean {
6077         if(!isWasmInitialized) {
6078                 throw new Error("initializeWasm() must be awaited first!");
6079         }
6080         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_is_ok(o);
6081         return nativeResponseValue;
6082 }
6083         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
6084 export function CResult_NoneNoneZ_free(_res: number): void {
6085         if(!isWasmInitialized) {
6086                 throw new Error("initializeWasm() must be awaited first!");
6087         }
6088         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_free(_res);
6089         // debug statements here
6090 }
6091         // uintptr_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
6092 export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
6093         if(!isWasmInitialized) {
6094                 throw new Error("initializeWasm() must be awaited first!");
6095         }
6096         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone_ptr(arg);
6097         return nativeResponseValue;
6098 }
6099         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
6100 export function CResult_NoneNoneZ_clone(orig: number): number {
6101         if(!isWasmInitialized) {
6102                 throw new Error("initializeWasm() must be awaited first!");
6103         }
6104         const nativeResponseValue = wasm.TS_CResult_NoneNoneZ_clone(orig);
6105         return nativeResponseValue;
6106 }
6107         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
6108 export function C2Tuple_OutPointScriptZ_new(a: number, b: number): number {
6109         if(!isWasmInitialized) {
6110                 throw new Error("initializeWasm() must be awaited first!");
6111         }
6112         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_new(a, b);
6113         return nativeResponseValue;
6114 }
6115         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
6116 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
6117         if(!isWasmInitialized) {
6118                 throw new Error("initializeWasm() must be awaited first!");
6119         }
6120         const nativeResponseValue = wasm.TS_C2Tuple_OutPointScriptZ_free(_res);
6121         // debug statements here
6122 }
6123         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
6124 export function C2Tuple_u32ScriptZ_new(a: number, b: number): number {
6125         if(!isWasmInitialized) {
6126                 throw new Error("initializeWasm() must be awaited first!");
6127         }
6128         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_new(a, b);
6129         return nativeResponseValue;
6130 }
6131         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
6132 export function C2Tuple_u32ScriptZ_free(_res: number): void {
6133         if(!isWasmInitialized) {
6134                 throw new Error("initializeWasm() must be awaited first!");
6135         }
6136         const nativeResponseValue = wasm.TS_C2Tuple_u32ScriptZ_free(_res);
6137         // debug statements here
6138 }
6139         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
6140 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number): void {
6141         if(!isWasmInitialized) {
6142                 throw new Error("initializeWasm() must be awaited first!");
6143         }
6144         const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32ScriptZZ_free(_res);
6145         // debug statements here
6146 }
6147         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
6148 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: number, b: number): number {
6149         if(!isWasmInitialized) {
6150                 throw new Error("initializeWasm() must be awaited first!");
6151         }
6152         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a, b);
6153         return nativeResponseValue;
6154 }
6155         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
6156 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
6157         if(!isWasmInitialized) {
6158                 throw new Error("initializeWasm() must be awaited first!");
6159         }
6160         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
6161         // debug statements here
6162 }
6163         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
6164 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number): void {
6165         if(!isWasmInitialized) {
6166                 throw new Error("initializeWasm() must be awaited first!");
6167         }
6168         const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
6169         // debug statements here
6170 }
6171         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
6172 export function CVec_MonitorEventZ_free(_res: number): void {
6173         if(!isWasmInitialized) {
6174                 throw new Error("initializeWasm() must be awaited first!");
6175         }
6176         const nativeResponseValue = wasm.TS_CVec_MonitorEventZ_free(_res);
6177         // debug statements here
6178 }
6179         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
6180 export function CVec_EventZ_free(_res: number): void {
6181         if(!isWasmInitialized) {
6182                 throw new Error("initializeWasm() must be awaited first!");
6183         }
6184         const nativeResponseValue = wasm.TS_CVec_EventZ_free(_res);
6185         // debug statements here
6186 }
6187         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
6188 export function CVec_TransactionZ_free(_res: number): void {
6189         if(!isWasmInitialized) {
6190                 throw new Error("initializeWasm() must be awaited first!");
6191         }
6192         const nativeResponseValue = wasm.TS_CVec_TransactionZ_free(_res);
6193         // debug statements here
6194 }
6195         // uintptr_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
6196 export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
6197         if(!isWasmInitialized) {
6198                 throw new Error("initializeWasm() must be awaited first!");
6199         }
6200         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone_ptr(arg);
6201         return nativeResponseValue;
6202 }
6203         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
6204 export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
6205         if(!isWasmInitialized) {
6206                 throw new Error("initializeWasm() must be awaited first!");
6207         }
6208         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_clone(orig);
6209         return nativeResponseValue;
6210 }
6211         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
6212 export function C2Tuple_usizeTransactionZ_new(a: number, b: number): number {
6213         if(!isWasmInitialized) {
6214                 throw new Error("initializeWasm() must be awaited first!");
6215         }
6216         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_new(a, b);
6217         return nativeResponseValue;
6218 }
6219         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
6220 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
6221         if(!isWasmInitialized) {
6222                 throw new Error("initializeWasm() must be awaited first!");
6223         }
6224         const nativeResponseValue = wasm.TS_C2Tuple_usizeTransactionZ_free(_res);
6225         // debug statements here
6226 }
6227         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
6228 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number): void {
6229         if(!isWasmInitialized) {
6230                 throw new Error("initializeWasm() must be awaited first!");
6231         }
6232         const nativeResponseValue = wasm.TS_CVec_C2Tuple_usizeTransactionZZ_free(_res);
6233         // debug statements here
6234 }
6235         // uintptr_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
6236 export function C2Tuple_u32TxOutZ_clone_ptr(arg: number): number {
6237         if(!isWasmInitialized) {
6238                 throw new Error("initializeWasm() must be awaited first!");
6239         }
6240         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone_ptr(arg);
6241         return nativeResponseValue;
6242 }
6243         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
6244 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
6245         if(!isWasmInitialized) {
6246                 throw new Error("initializeWasm() must be awaited first!");
6247         }
6248         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_clone(orig);
6249         return nativeResponseValue;
6250 }
6251         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
6252 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
6253         if(!isWasmInitialized) {
6254                 throw new Error("initializeWasm() must be awaited first!");
6255         }
6256         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_new(a, b);
6257         return nativeResponseValue;
6258 }
6259         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
6260 export function C2Tuple_u32TxOutZ_free(_res: number): void {
6261         if(!isWasmInitialized) {
6262                 throw new Error("initializeWasm() must be awaited first!");
6263         }
6264         const nativeResponseValue = wasm.TS_C2Tuple_u32TxOutZ_free(_res);
6265         // debug statements here
6266 }
6267         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
6268 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number): void {
6269         if(!isWasmInitialized) {
6270                 throw new Error("initializeWasm() must be awaited first!");
6271         }
6272         const nativeResponseValue = wasm.TS_CVec_C2Tuple_u32TxOutZZ_free(_res);
6273         // debug statements here
6274 }
6275         // uintptr_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
6276 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg: number): number {
6277         if(!isWasmInitialized) {
6278                 throw new Error("initializeWasm() must be awaited first!");
6279         }
6280         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg);
6281         return nativeResponseValue;
6282 }
6283         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
6284 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
6285         if(!isWasmInitialized) {
6286                 throw new Error("initializeWasm() must be awaited first!");
6287         }
6288         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
6289         return nativeResponseValue;
6290 }
6291         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
6292 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: number, b: number): number {
6293         if(!isWasmInitialized) {
6294                 throw new Error("initializeWasm() must be awaited first!");
6295         }
6296         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a, b);
6297         return nativeResponseValue;
6298 }
6299         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
6300 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
6301         if(!isWasmInitialized) {
6302                 throw new Error("initializeWasm() must be awaited first!");
6303         }
6304         const nativeResponseValue = wasm.TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
6305         // debug statements here
6306 }
6307         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
6308 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number): void {
6309         if(!isWasmInitialized) {
6310                 throw new Error("initializeWasm() must be awaited first!");
6311         }
6312         const nativeResponseValue = wasm.TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
6313         // debug statements here
6314 }
6315         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
6316 export function CVec_TxidZ_free(_res: number): void {
6317         if(!isWasmInitialized) {
6318                 throw new Error("initializeWasm() must be awaited first!");
6319         }
6320         const nativeResponseValue = wasm.TS_CVec_TxidZ_free(_res);
6321         // debug statements here
6322 }
6323         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
6324 export function CVec_BalanceZ_free(_res: number): void {
6325         if(!isWasmInitialized) {
6326                 throw new Error("initializeWasm() must be awaited first!");
6327         }
6328         const nativeResponseValue = wasm.TS_CVec_BalanceZ_free(_res);
6329         // debug statements here
6330 }
6331         // uintptr_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
6332 export function C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg: number): number {
6333         if(!isWasmInitialized) {
6334                 throw new Error("initializeWasm() must be awaited first!");
6335         }
6336         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg);
6337         return nativeResponseValue;
6338 }
6339         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
6340 export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
6341         if(!isWasmInitialized) {
6342                 throw new Error("initializeWasm() must be awaited first!");
6343         }
6344         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_clone(orig);
6345         return nativeResponseValue;
6346 }
6347         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
6348 export function C2Tuple_BlockHashChannelMonitorZ_new(a: number, b: number): number {
6349         if(!isWasmInitialized) {
6350                 throw new Error("initializeWasm() must be awaited first!");
6351         }
6352         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_new(a, b);
6353         return nativeResponseValue;
6354 }
6355         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
6356 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
6357         if(!isWasmInitialized) {
6358                 throw new Error("initializeWasm() must be awaited first!");
6359         }
6360         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_free(_res);
6361         // debug statements here
6362 }
6363         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
6364 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
6365         if(!isWasmInitialized) {
6366                 throw new Error("initializeWasm() must be awaited first!");
6367         }
6368         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
6369         return nativeResponseValue;
6370 }
6371         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
6372 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
6373         if(!isWasmInitialized) {
6374                 throw new Error("initializeWasm() must be awaited first!");
6375         }
6376         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
6377         return nativeResponseValue;
6378 }
6379         // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
6380 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o: number): boolean {
6381         if(!isWasmInitialized) {
6382                 throw new Error("initializeWasm() must be awaited first!");
6383         }
6384         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o);
6385         return nativeResponseValue;
6386 }
6387         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
6388 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
6389         if(!isWasmInitialized) {
6390                 throw new Error("initializeWasm() must be awaited first!");
6391         }
6392         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
6393         // debug statements here
6394 }
6395         // uintptr_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
6396 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg: number): number {
6397         if(!isWasmInitialized) {
6398                 throw new Error("initializeWasm() must be awaited first!");
6399         }
6400         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg);
6401         return nativeResponseValue;
6402 }
6403         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
6404 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
6405         if(!isWasmInitialized) {
6406                 throw new Error("initializeWasm() must be awaited first!");
6407         }
6408         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
6409         return nativeResponseValue;
6410 }
6411         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
6412 export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
6413         if(!isWasmInitialized) {
6414                 throw new Error("initializeWasm() must be awaited first!");
6415         }
6416         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_ok(o);
6417         return nativeResponseValue;
6418 }
6419         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
6420 export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
6421         if(!isWasmInitialized) {
6422                 throw new Error("initializeWasm() must be awaited first!");
6423         }
6424         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_err(e);
6425         return nativeResponseValue;
6426 }
6427         // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
6428 export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
6429         if(!isWasmInitialized) {
6430                 throw new Error("initializeWasm() must be awaited first!");
6431         }
6432         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_is_ok(o);
6433         return nativeResponseValue;
6434 }
6435         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
6436 export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
6437         if(!isWasmInitialized) {
6438                 throw new Error("initializeWasm() must be awaited first!");
6439         }
6440         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_free(_res);
6441         // debug statements here
6442 }
6443         // uintptr_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
6444 export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
6445         if(!isWasmInitialized) {
6446                 throw new Error("initializeWasm() must be awaited first!");
6447         }
6448         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
6449         return nativeResponseValue;
6450 }
6451         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
6452 export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
6453         if(!isWasmInitialized) {
6454                 throw new Error("initializeWasm() must be awaited first!");
6455         }
6456         const nativeResponseValue = wasm.TS_CResult_RouteHopDecodeErrorZ_clone(orig);
6457         return nativeResponseValue;
6458 }
6459         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
6460 export function CVec_RouteHopZ_free(_res: number): void {
6461         if(!isWasmInitialized) {
6462                 throw new Error("initializeWasm() must be awaited first!");
6463         }
6464         const nativeResponseValue = wasm.TS_CVec_RouteHopZ_free(_res);
6465         // debug statements here
6466 }
6467         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
6468 export function CVec_CVec_RouteHopZZ_free(_res: number): void {
6469         if(!isWasmInitialized) {
6470                 throw new Error("initializeWasm() must be awaited first!");
6471         }
6472         const nativeResponseValue = wasm.TS_CVec_CVec_RouteHopZZ_free(_res);
6473         // debug statements here
6474 }
6475         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
6476 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
6477         if(!isWasmInitialized) {
6478                 throw new Error("initializeWasm() must be awaited first!");
6479         }
6480         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_ok(o);
6481         return nativeResponseValue;
6482 }
6483         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
6484 export function CResult_RouteDecodeErrorZ_err(e: number): number {
6485         if(!isWasmInitialized) {
6486                 throw new Error("initializeWasm() must be awaited first!");
6487         }
6488         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_err(e);
6489         return nativeResponseValue;
6490 }
6491         // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
6492 export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
6493         if(!isWasmInitialized) {
6494                 throw new Error("initializeWasm() must be awaited first!");
6495         }
6496         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_is_ok(o);
6497         return nativeResponseValue;
6498 }
6499         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
6500 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
6501         if(!isWasmInitialized) {
6502                 throw new Error("initializeWasm() must be awaited first!");
6503         }
6504         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_free(_res);
6505         // debug statements here
6506 }
6507         // uintptr_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
6508 export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
6509         if(!isWasmInitialized) {
6510                 throw new Error("initializeWasm() must be awaited first!");
6511         }
6512         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone_ptr(arg);
6513         return nativeResponseValue;
6514 }
6515         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
6516 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
6517         if(!isWasmInitialized) {
6518                 throw new Error("initializeWasm() must be awaited first!");
6519         }
6520         const nativeResponseValue = wasm.TS_CResult_RouteDecodeErrorZ_clone(orig);
6521         return nativeResponseValue;
6522 }
6523         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
6524 export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
6525         if(!isWasmInitialized) {
6526                 throw new Error("initializeWasm() must be awaited first!");
6527         }
6528         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_ok(o);
6529         return nativeResponseValue;
6530 }
6531         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
6532 export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
6533         if(!isWasmInitialized) {
6534                 throw new Error("initializeWasm() must be awaited first!");
6535         }
6536         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_err(e);
6537         return nativeResponseValue;
6538 }
6539         // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
6540 export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
6541         if(!isWasmInitialized) {
6542                 throw new Error("initializeWasm() must be awaited first!");
6543         }
6544         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_is_ok(o);
6545         return nativeResponseValue;
6546 }
6547         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
6548 export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
6549         if(!isWasmInitialized) {
6550                 throw new Error("initializeWasm() must be awaited first!");
6551         }
6552         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_free(_res);
6553         // debug statements here
6554 }
6555         // uintptr_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
6556 export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
6557         if(!isWasmInitialized) {
6558                 throw new Error("initializeWasm() must be awaited first!");
6559         }
6560         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
6561         return nativeResponseValue;
6562 }
6563         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
6564 export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
6565         if(!isWasmInitialized) {
6566                 throw new Error("initializeWasm() must be awaited first!");
6567         }
6568         const nativeResponseValue = wasm.TS_CResult_RouteParametersDecodeErrorZ_clone(orig);
6569         return nativeResponseValue;
6570 }
6571         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
6572 export function CVec_RouteHintZ_free(_res: number): void {
6573         if(!isWasmInitialized) {
6574                 throw new Error("initializeWasm() must be awaited first!");
6575         }
6576         const nativeResponseValue = wasm.TS_CVec_RouteHintZ_free(_res);
6577         // debug statements here
6578 }
6579         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
6580 export function COption_u64Z_some(o: bigint): number {
6581         if(!isWasmInitialized) {
6582                 throw new Error("initializeWasm() must be awaited first!");
6583         }
6584         const nativeResponseValue = wasm.TS_COption_u64Z_some(o);
6585         return nativeResponseValue;
6586 }
6587         // struct LDKCOption_u64Z COption_u64Z_none(void);
6588 export function COption_u64Z_none(): number {
6589         if(!isWasmInitialized) {
6590                 throw new Error("initializeWasm() must be awaited first!");
6591         }
6592         const nativeResponseValue = wasm.TS_COption_u64Z_none();
6593         return nativeResponseValue;
6594 }
6595         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
6596 export function COption_u64Z_free(_res: number): void {
6597         if(!isWasmInitialized) {
6598                 throw new Error("initializeWasm() must be awaited first!");
6599         }
6600         const nativeResponseValue = wasm.TS_COption_u64Z_free(_res);
6601         // debug statements here
6602 }
6603         // uintptr_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
6604 export function COption_u64Z_clone_ptr(arg: number): number {
6605         if(!isWasmInitialized) {
6606                 throw new Error("initializeWasm() must be awaited first!");
6607         }
6608         const nativeResponseValue = wasm.TS_COption_u64Z_clone_ptr(arg);
6609         return nativeResponseValue;
6610 }
6611         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
6612 export function COption_u64Z_clone(orig: number): number {
6613         if(!isWasmInitialized) {
6614                 throw new Error("initializeWasm() must be awaited first!");
6615         }
6616         const nativeResponseValue = wasm.TS_COption_u64Z_clone(orig);
6617         return nativeResponseValue;
6618 }
6619         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
6620 export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
6621         if(!isWasmInitialized) {
6622                 throw new Error("initializeWasm() must be awaited first!");
6623         }
6624         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_ok(o);
6625         return nativeResponseValue;
6626 }
6627         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
6628 export function CResult_PayeeDecodeErrorZ_err(e: number): number {
6629         if(!isWasmInitialized) {
6630                 throw new Error("initializeWasm() must be awaited first!");
6631         }
6632         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_err(e);
6633         return nativeResponseValue;
6634 }
6635         // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
6636 export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
6637         if(!isWasmInitialized) {
6638                 throw new Error("initializeWasm() must be awaited first!");
6639         }
6640         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_is_ok(o);
6641         return nativeResponseValue;
6642 }
6643         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
6644 export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
6645         if(!isWasmInitialized) {
6646                 throw new Error("initializeWasm() must be awaited first!");
6647         }
6648         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_free(_res);
6649         // debug statements here
6650 }
6651         // uintptr_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
6652 export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
6653         if(!isWasmInitialized) {
6654                 throw new Error("initializeWasm() must be awaited first!");
6655         }
6656         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone_ptr(arg);
6657         return nativeResponseValue;
6658 }
6659         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
6660 export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
6661         if(!isWasmInitialized) {
6662                 throw new Error("initializeWasm() must be awaited first!");
6663         }
6664         const nativeResponseValue = wasm.TS_CResult_PayeeDecodeErrorZ_clone(orig);
6665         return nativeResponseValue;
6666 }
6667         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
6668 export function CVec_RouteHintHopZ_free(_res: number): void {
6669         if(!isWasmInitialized) {
6670                 throw new Error("initializeWasm() must be awaited first!");
6671         }
6672         const nativeResponseValue = wasm.TS_CVec_RouteHintHopZ_free(_res);
6673         // debug statements here
6674 }
6675         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
6676 export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
6677         if(!isWasmInitialized) {
6678                 throw new Error("initializeWasm() must be awaited first!");
6679         }
6680         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_ok(o);
6681         return nativeResponseValue;
6682 }
6683         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
6684 export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
6685         if(!isWasmInitialized) {
6686                 throw new Error("initializeWasm() must be awaited first!");
6687         }
6688         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_err(e);
6689         return nativeResponseValue;
6690 }
6691         // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
6692 export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
6693         if(!isWasmInitialized) {
6694                 throw new Error("initializeWasm() must be awaited first!");
6695         }
6696         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_is_ok(o);
6697         return nativeResponseValue;
6698 }
6699         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
6700 export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
6701         if(!isWasmInitialized) {
6702                 throw new Error("initializeWasm() must be awaited first!");
6703         }
6704         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_free(_res);
6705         // debug statements here
6706 }
6707         // uintptr_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
6708 export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
6709         if(!isWasmInitialized) {
6710                 throw new Error("initializeWasm() must be awaited first!");
6711         }
6712         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
6713         return nativeResponseValue;
6714 }
6715         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
6716 export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
6717         if(!isWasmInitialized) {
6718                 throw new Error("initializeWasm() must be awaited first!");
6719         }
6720         const nativeResponseValue = wasm.TS_CResult_RouteHintDecodeErrorZ_clone(orig);
6721         return nativeResponseValue;
6722 }
6723         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
6724 export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
6725         if(!isWasmInitialized) {
6726                 throw new Error("initializeWasm() must be awaited first!");
6727         }
6728         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_ok(o);
6729         return nativeResponseValue;
6730 }
6731         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
6732 export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
6733         if(!isWasmInitialized) {
6734                 throw new Error("initializeWasm() must be awaited first!");
6735         }
6736         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_err(e);
6737         return nativeResponseValue;
6738 }
6739         // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
6740 export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
6741         if(!isWasmInitialized) {
6742                 throw new Error("initializeWasm() must be awaited first!");
6743         }
6744         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_is_ok(o);
6745         return nativeResponseValue;
6746 }
6747         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
6748 export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
6749         if(!isWasmInitialized) {
6750                 throw new Error("initializeWasm() must be awaited first!");
6751         }
6752         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_free(_res);
6753         // debug statements here
6754 }
6755         // uintptr_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
6756 export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
6757         if(!isWasmInitialized) {
6758                 throw new Error("initializeWasm() must be awaited first!");
6759         }
6760         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
6761         return nativeResponseValue;
6762 }
6763         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
6764 export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
6765         if(!isWasmInitialized) {
6766                 throw new Error("initializeWasm() must be awaited first!");
6767         }
6768         const nativeResponseValue = wasm.TS_CResult_RouteHintHopDecodeErrorZ_clone(orig);
6769         return nativeResponseValue;
6770 }
6771         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
6772 export function CVec_ChannelDetailsZ_free(_res: number): void {
6773         if(!isWasmInitialized) {
6774                 throw new Error("initializeWasm() must be awaited first!");
6775         }
6776         const nativeResponseValue = wasm.TS_CVec_ChannelDetailsZ_free(_res);
6777         // debug statements here
6778 }
6779         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
6780 export function CResult_RouteLightningErrorZ_ok(o: number): number {
6781         if(!isWasmInitialized) {
6782                 throw new Error("initializeWasm() must be awaited first!");
6783         }
6784         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_ok(o);
6785         return nativeResponseValue;
6786 }
6787         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
6788 export function CResult_RouteLightningErrorZ_err(e: number): number {
6789         if(!isWasmInitialized) {
6790                 throw new Error("initializeWasm() must be awaited first!");
6791         }
6792         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_err(e);
6793         return nativeResponseValue;
6794 }
6795         // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
6796 export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
6797         if(!isWasmInitialized) {
6798                 throw new Error("initializeWasm() must be awaited first!");
6799         }
6800         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_is_ok(o);
6801         return nativeResponseValue;
6802 }
6803         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
6804 export function CResult_RouteLightningErrorZ_free(_res: number): void {
6805         if(!isWasmInitialized) {
6806                 throw new Error("initializeWasm() must be awaited first!");
6807         }
6808         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_free(_res);
6809         // debug statements here
6810 }
6811         // uintptr_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
6812 export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
6813         if(!isWasmInitialized) {
6814                 throw new Error("initializeWasm() must be awaited first!");
6815         }
6816         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone_ptr(arg);
6817         return nativeResponseValue;
6818 }
6819         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
6820 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
6821         if(!isWasmInitialized) {
6822                 throw new Error("initializeWasm() must be awaited first!");
6823         }
6824         const nativeResponseValue = wasm.TS_CResult_RouteLightningErrorZ_clone(orig);
6825         return nativeResponseValue;
6826 }
6827         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
6828 export function CResult_NoneLightningErrorZ_ok(): number {
6829         if(!isWasmInitialized) {
6830                 throw new Error("initializeWasm() must be awaited first!");
6831         }
6832         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_ok();
6833         return nativeResponseValue;
6834 }
6835         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
6836 export function CResult_NoneLightningErrorZ_err(e: number): number {
6837         if(!isWasmInitialized) {
6838                 throw new Error("initializeWasm() must be awaited first!");
6839         }
6840         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_err(e);
6841         return nativeResponseValue;
6842 }
6843         // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
6844 export function CResult_NoneLightningErrorZ_is_ok(o: number): boolean {
6845         if(!isWasmInitialized) {
6846                 throw new Error("initializeWasm() must be awaited first!");
6847         }
6848         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_is_ok(o);
6849         return nativeResponseValue;
6850 }
6851         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
6852 export function CResult_NoneLightningErrorZ_free(_res: number): void {
6853         if(!isWasmInitialized) {
6854                 throw new Error("initializeWasm() must be awaited first!");
6855         }
6856         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_free(_res);
6857         // debug statements here
6858 }
6859         // uintptr_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
6860 export function CResult_NoneLightningErrorZ_clone_ptr(arg: number): number {
6861         if(!isWasmInitialized) {
6862                 throw new Error("initializeWasm() must be awaited first!");
6863         }
6864         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone_ptr(arg);
6865         return nativeResponseValue;
6866 }
6867         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
6868 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
6869         if(!isWasmInitialized) {
6870                 throw new Error("initializeWasm() must be awaited first!");
6871         }
6872         const nativeResponseValue = wasm.TS_CResult_NoneLightningErrorZ_clone(orig);
6873         return nativeResponseValue;
6874 }
6875         // uintptr_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
6876 export function C2Tuple_PublicKeyTypeZ_clone_ptr(arg: number): number {
6877         if(!isWasmInitialized) {
6878                 throw new Error("initializeWasm() must be awaited first!");
6879         }
6880         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone_ptr(arg);
6881         return nativeResponseValue;
6882 }
6883         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
6884 export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
6885         if(!isWasmInitialized) {
6886                 throw new Error("initializeWasm() must be awaited first!");
6887         }
6888         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_clone(orig);
6889         return nativeResponseValue;
6890 }
6891         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
6892 export function C2Tuple_PublicKeyTypeZ_new(a: number, b: number): number {
6893         if(!isWasmInitialized) {
6894                 throw new Error("initializeWasm() must be awaited first!");
6895         }
6896         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_new(a, b);
6897         return nativeResponseValue;
6898 }
6899         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
6900 export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
6901         if(!isWasmInitialized) {
6902                 throw new Error("initializeWasm() must be awaited first!");
6903         }
6904         const nativeResponseValue = wasm.TS_C2Tuple_PublicKeyTypeZ_free(_res);
6905         // debug statements here
6906 }
6907         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
6908 export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number): void {
6909         if(!isWasmInitialized) {
6910                 throw new Error("initializeWasm() must be awaited first!");
6911         }
6912         const nativeResponseValue = wasm.TS_CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
6913         // debug statements here
6914 }
6915         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
6916 export function CVec_MessageSendEventZ_free(_res: number): void {
6917         if(!isWasmInitialized) {
6918                 throw new Error("initializeWasm() must be awaited first!");
6919         }
6920         const nativeResponseValue = wasm.TS_CVec_MessageSendEventZ_free(_res);
6921         // debug statements here
6922 }
6923         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
6924 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
6925         if(!isWasmInitialized) {
6926                 throw new Error("initializeWasm() must be awaited first!");
6927         }
6928         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_ok(o);
6929         return nativeResponseValue;
6930 }
6931         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
6932 export function CResult_boolLightningErrorZ_err(e: number): number {
6933         if(!isWasmInitialized) {
6934                 throw new Error("initializeWasm() must be awaited first!");
6935         }
6936         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_err(e);
6937         return nativeResponseValue;
6938 }
6939         // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
6940 export function CResult_boolLightningErrorZ_is_ok(o: number): boolean {
6941         if(!isWasmInitialized) {
6942                 throw new Error("initializeWasm() must be awaited first!");
6943         }
6944         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_is_ok(o);
6945         return nativeResponseValue;
6946 }
6947         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
6948 export function CResult_boolLightningErrorZ_free(_res: number): void {
6949         if(!isWasmInitialized) {
6950                 throw new Error("initializeWasm() must be awaited first!");
6951         }
6952         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_free(_res);
6953         // debug statements here
6954 }
6955         // uintptr_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
6956 export function CResult_boolLightningErrorZ_clone_ptr(arg: number): number {
6957         if(!isWasmInitialized) {
6958                 throw new Error("initializeWasm() must be awaited first!");
6959         }
6960         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone_ptr(arg);
6961         return nativeResponseValue;
6962 }
6963         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
6964 export function CResult_boolLightningErrorZ_clone(orig: number): number {
6965         if(!isWasmInitialized) {
6966                 throw new Error("initializeWasm() must be awaited first!");
6967         }
6968         const nativeResponseValue = wasm.TS_CResult_boolLightningErrorZ_clone(orig);
6969         return nativeResponseValue;
6970 }
6971         // uintptr_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
6972 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg: number): number {
6973         if(!isWasmInitialized) {
6974                 throw new Error("initializeWasm() must be awaited first!");
6975         }
6976         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg);
6977         return nativeResponseValue;
6978 }
6979         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
6980 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
6981         if(!isWasmInitialized) {
6982                 throw new Error("initializeWasm() must be awaited first!");
6983         }
6984         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
6985         return nativeResponseValue;
6986 }
6987         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
6988 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
6989         if(!isWasmInitialized) {
6990                 throw new Error("initializeWasm() must be awaited first!");
6991         }
6992         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
6993         return nativeResponseValue;
6994 }
6995         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
6996 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
6997         if(!isWasmInitialized) {
6998                 throw new Error("initializeWasm() must be awaited first!");
6999         }
7000         const nativeResponseValue = wasm.TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
7001         // debug statements here
7002 }
7003         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
7004 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number): void {
7005         if(!isWasmInitialized) {
7006                 throw new Error("initializeWasm() must be awaited first!");
7007         }
7008         const nativeResponseValue = wasm.TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
7009         // debug statements here
7010 }
7011         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
7012 export function CVec_NodeAnnouncementZ_free(_res: number): void {
7013         if(!isWasmInitialized) {
7014                 throw new Error("initializeWasm() must be awaited first!");
7015         }
7016         const nativeResponseValue = wasm.TS_CVec_NodeAnnouncementZ_free(_res);
7017         // debug statements here
7018 }
7019         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
7020 export function CVec_PublicKeyZ_free(_res: number): void {
7021         if(!isWasmInitialized) {
7022                 throw new Error("initializeWasm() must be awaited first!");
7023         }
7024         const nativeResponseValue = wasm.TS_CVec_PublicKeyZ_free(_res);
7025         // debug statements here
7026 }
7027         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
7028 export function CVec_u8Z_free(_res: number): void {
7029         if(!isWasmInitialized) {
7030                 throw new Error("initializeWasm() must be awaited first!");
7031         }
7032         const nativeResponseValue = wasm.TS_CVec_u8Z_free(_res);
7033         // debug statements here
7034 }
7035         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
7036 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: number): number {
7037         if(!isWasmInitialized) {
7038                 throw new Error("initializeWasm() must be awaited first!");
7039         }
7040         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(o);
7041         return nativeResponseValue;
7042 }
7043         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7044 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
7045         if(!isWasmInitialized) {
7046                 throw new Error("initializeWasm() must be awaited first!");
7047         }
7048         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_err(e);
7049         return nativeResponseValue;
7050 }
7051         // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
7052 export function CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: number): boolean {
7053         if(!isWasmInitialized) {
7054                 throw new Error("initializeWasm() must be awaited first!");
7055         }
7056         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o);
7057         return nativeResponseValue;
7058 }
7059         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
7060 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
7061         if(!isWasmInitialized) {
7062                 throw new Error("initializeWasm() must be awaited first!");
7063         }
7064         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
7065         // debug statements here
7066 }
7067         // uintptr_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
7068 export function CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg: number): number {
7069         if(!isWasmInitialized) {
7070                 throw new Error("initializeWasm() must be awaited first!");
7071         }
7072         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg);
7073         return nativeResponseValue;
7074 }
7075         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
7076 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
7077         if(!isWasmInitialized) {
7078                 throw new Error("initializeWasm() must be awaited first!");
7079         }
7080         const nativeResponseValue = wasm.TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
7081         return nativeResponseValue;
7082 }
7083         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
7084 export function CResult_NonePeerHandleErrorZ_ok(): number {
7085         if(!isWasmInitialized) {
7086                 throw new Error("initializeWasm() must be awaited first!");
7087         }
7088         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_ok();
7089         return nativeResponseValue;
7090 }
7091         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
7092 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
7093         if(!isWasmInitialized) {
7094                 throw new Error("initializeWasm() must be awaited first!");
7095         }
7096         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_err(e);
7097         return nativeResponseValue;
7098 }
7099         // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
7100 export function CResult_NonePeerHandleErrorZ_is_ok(o: number): boolean {
7101         if(!isWasmInitialized) {
7102                 throw new Error("initializeWasm() must be awaited first!");
7103         }
7104         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_is_ok(o);
7105         return nativeResponseValue;
7106 }
7107         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
7108 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
7109         if(!isWasmInitialized) {
7110                 throw new Error("initializeWasm() must be awaited first!");
7111         }
7112         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_free(_res);
7113         // debug statements here
7114 }
7115         // uintptr_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
7116 export function CResult_NonePeerHandleErrorZ_clone_ptr(arg: number): number {
7117         if(!isWasmInitialized) {
7118                 throw new Error("initializeWasm() must be awaited first!");
7119         }
7120         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone_ptr(arg);
7121         return nativeResponseValue;
7122 }
7123         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
7124 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
7125         if(!isWasmInitialized) {
7126                 throw new Error("initializeWasm() must be awaited first!");
7127         }
7128         const nativeResponseValue = wasm.TS_CResult_NonePeerHandleErrorZ_clone(orig);
7129         return nativeResponseValue;
7130 }
7131         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
7132 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
7133         if(!isWasmInitialized) {
7134                 throw new Error("initializeWasm() must be awaited first!");
7135         }
7136         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_ok(o);
7137         return nativeResponseValue;
7138 }
7139         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7140 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
7141         if(!isWasmInitialized) {
7142                 throw new Error("initializeWasm() must be awaited first!");
7143         }
7144         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_err(e);
7145         return nativeResponseValue;
7146 }
7147         // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
7148 export function CResult_boolPeerHandleErrorZ_is_ok(o: number): boolean {
7149         if(!isWasmInitialized) {
7150                 throw new Error("initializeWasm() must be awaited first!");
7151         }
7152         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_is_ok(o);
7153         return nativeResponseValue;
7154 }
7155         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
7156 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
7157         if(!isWasmInitialized) {
7158                 throw new Error("initializeWasm() must be awaited first!");
7159         }
7160         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_free(_res);
7161         // debug statements here
7162 }
7163         // uintptr_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
7164 export function CResult_boolPeerHandleErrorZ_clone_ptr(arg: number): number {
7165         if(!isWasmInitialized) {
7166                 throw new Error("initializeWasm() must be awaited first!");
7167         }
7168         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone_ptr(arg);
7169         return nativeResponseValue;
7170 }
7171         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
7172 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
7173         if(!isWasmInitialized) {
7174                 throw new Error("initializeWasm() must be awaited first!");
7175         }
7176         const nativeResponseValue = wasm.TS_CResult_boolPeerHandleErrorZ_clone(orig);
7177         return nativeResponseValue;
7178 }
7179         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
7180 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
7181         if(!isWasmInitialized) {
7182                 throw new Error("initializeWasm() must be awaited first!");
7183         }
7184         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_ok(o);
7185         return nativeResponseValue;
7186 }
7187         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
7188 export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
7189         if(!isWasmInitialized) {
7190                 throw new Error("initializeWasm() must be awaited first!");
7191         }
7192         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_err(e);
7193         return nativeResponseValue;
7194 }
7195         // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
7196 export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
7197         if(!isWasmInitialized) {
7198                 throw new Error("initializeWasm() must be awaited first!");
7199         }
7200         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_is_ok(o);
7201         return nativeResponseValue;
7202 }
7203         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
7204 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
7205         if(!isWasmInitialized) {
7206                 throw new Error("initializeWasm() must be awaited first!");
7207         }
7208         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_free(_res);
7209         // debug statements here
7210 }
7211         // uintptr_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
7212 export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
7213         if(!isWasmInitialized) {
7214                 throw new Error("initializeWasm() must be awaited first!");
7215         }
7216         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone_ptr(arg);
7217         return nativeResponseValue;
7218 }
7219         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
7220 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
7221         if(!isWasmInitialized) {
7222                 throw new Error("initializeWasm() must be awaited first!");
7223         }
7224         const nativeResponseValue = wasm.TS_CResult_TxOutAccessErrorZ_clone(orig);
7225         return nativeResponseValue;
7226 }
7227         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
7228 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
7229         if(!isWasmInitialized) {
7230                 throw new Error("initializeWasm() must be awaited first!");
7231         }
7232         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_ok();
7233         return nativeResponseValue;
7234 }
7235         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
7236 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
7237         if(!isWasmInitialized) {
7238                 throw new Error("initializeWasm() must be awaited first!");
7239         }
7240         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_err(e);
7241         return nativeResponseValue;
7242 }
7243         // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
7244 export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
7245         if(!isWasmInitialized) {
7246                 throw new Error("initializeWasm() must be awaited first!");
7247         }
7248         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
7249         return nativeResponseValue;
7250 }
7251         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
7252 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
7253         if(!isWasmInitialized) {
7254                 throw new Error("initializeWasm() must be awaited first!");
7255         }
7256         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_free(_res);
7257         // debug statements here
7258 }
7259         // uintptr_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
7260 export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
7261         if(!isWasmInitialized) {
7262                 throw new Error("initializeWasm() must be awaited first!");
7263         }
7264         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
7265         return nativeResponseValue;
7266 }
7267         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
7268 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
7269         if(!isWasmInitialized) {
7270                 throw new Error("initializeWasm() must be awaited first!");
7271         }
7272         const nativeResponseValue = wasm.TS_CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
7273         return nativeResponseValue;
7274 }
7275         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
7276 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
7277         if(!isWasmInitialized) {
7278                 throw new Error("initializeWasm() must be awaited first!");
7279         }
7280         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_some(o);
7281         return nativeResponseValue;
7282 }
7283         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
7284 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
7285         if(!isWasmInitialized) {
7286                 throw new Error("initializeWasm() must be awaited first!");
7287         }
7288         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_none();
7289         return nativeResponseValue;
7290 }
7291         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
7292 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
7293         if(!isWasmInitialized) {
7294                 throw new Error("initializeWasm() must be awaited first!");
7295         }
7296         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_free(_res);
7297         // debug statements here
7298 }
7299         // uintptr_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
7300 export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
7301         if(!isWasmInitialized) {
7302                 throw new Error("initializeWasm() must be awaited first!");
7303         }
7304         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
7305         return nativeResponseValue;
7306 }
7307         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
7308 export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
7309         if(!isWasmInitialized) {
7310                 throw new Error("initializeWasm() must be awaited first!");
7311         }
7312         const nativeResponseValue = wasm.TS_COption_C2Tuple_usizeTransactionZZ_clone(orig);
7313         return nativeResponseValue;
7314 }
7315         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
7316 export function COption_ClosureReasonZ_some(o: number): number {
7317         if(!isWasmInitialized) {
7318                 throw new Error("initializeWasm() must be awaited first!");
7319         }
7320         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_some(o);
7321         return nativeResponseValue;
7322 }
7323         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
7324 export function COption_ClosureReasonZ_none(): number {
7325         if(!isWasmInitialized) {
7326                 throw new Error("initializeWasm() must be awaited first!");
7327         }
7328         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_none();
7329         return nativeResponseValue;
7330 }
7331         // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
7332 export function COption_ClosureReasonZ_free(_res: number): void {
7333         if(!isWasmInitialized) {
7334                 throw new Error("initializeWasm() must be awaited first!");
7335         }
7336         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_free(_res);
7337         // debug statements here
7338 }
7339         // uintptr_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
7340 export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
7341         if(!isWasmInitialized) {
7342                 throw new Error("initializeWasm() must be awaited first!");
7343         }
7344         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone_ptr(arg);
7345         return nativeResponseValue;
7346 }
7347         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
7348 export function COption_ClosureReasonZ_clone(orig: number): number {
7349         if(!isWasmInitialized) {
7350                 throw new Error("initializeWasm() must be awaited first!");
7351         }
7352         const nativeResponseValue = wasm.TS_COption_ClosureReasonZ_clone(orig);
7353         return nativeResponseValue;
7354 }
7355         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
7356 export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
7357         if(!isWasmInitialized) {
7358                 throw new Error("initializeWasm() must be awaited first!");
7359         }
7360         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
7361         return nativeResponseValue;
7362 }
7363         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
7364 export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
7365         if(!isWasmInitialized) {
7366                 throw new Error("initializeWasm() must be awaited first!");
7367         }
7368         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
7369         return nativeResponseValue;
7370 }
7371         // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
7372 export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
7373         if(!isWasmInitialized) {
7374                 throw new Error("initializeWasm() must be awaited first!");
7375         }
7376         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
7377         return nativeResponseValue;
7378 }
7379         // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
7380 export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
7381         if(!isWasmInitialized) {
7382                 throw new Error("initializeWasm() must be awaited first!");
7383         }
7384         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
7385         // debug statements here
7386 }
7387         // uintptr_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
7388 export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
7389         if(!isWasmInitialized) {
7390                 throw new Error("initializeWasm() must be awaited first!");
7391         }
7392         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
7393         return nativeResponseValue;
7394 }
7395         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
7396 export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
7397         if(!isWasmInitialized) {
7398                 throw new Error("initializeWasm() must be awaited first!");
7399         }
7400         const nativeResponseValue = wasm.TS_CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
7401         return nativeResponseValue;
7402 }
7403         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
7404 export function COption_NetworkUpdateZ_some(o: number): number {
7405         if(!isWasmInitialized) {
7406                 throw new Error("initializeWasm() must be awaited first!");
7407         }
7408         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_some(o);
7409         return nativeResponseValue;
7410 }
7411         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
7412 export function COption_NetworkUpdateZ_none(): number {
7413         if(!isWasmInitialized) {
7414                 throw new Error("initializeWasm() must be awaited first!");
7415         }
7416         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_none();
7417         return nativeResponseValue;
7418 }
7419         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
7420 export function COption_NetworkUpdateZ_free(_res: number): void {
7421         if(!isWasmInitialized) {
7422                 throw new Error("initializeWasm() must be awaited first!");
7423         }
7424         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_free(_res);
7425         // debug statements here
7426 }
7427         // uintptr_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
7428 export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
7429         if(!isWasmInitialized) {
7430                 throw new Error("initializeWasm() must be awaited first!");
7431         }
7432         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone_ptr(arg);
7433         return nativeResponseValue;
7434 }
7435         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
7436 export function COption_NetworkUpdateZ_clone(orig: number): number {
7437         if(!isWasmInitialized) {
7438                 throw new Error("initializeWasm() must be awaited first!");
7439         }
7440         const nativeResponseValue = wasm.TS_COption_NetworkUpdateZ_clone(orig);
7441         return nativeResponseValue;
7442 }
7443         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
7444 export function CVec_SpendableOutputDescriptorZ_free(_res: number): void {
7445         if(!isWasmInitialized) {
7446                 throw new Error("initializeWasm() must be awaited first!");
7447         }
7448         const nativeResponseValue = wasm.TS_CVec_SpendableOutputDescriptorZ_free(_res);
7449         // debug statements here
7450 }
7451         // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
7452 export function COption_EventZ_some(o: number): number {
7453         if(!isWasmInitialized) {
7454                 throw new Error("initializeWasm() must be awaited first!");
7455         }
7456         const nativeResponseValue = wasm.TS_COption_EventZ_some(o);
7457         return nativeResponseValue;
7458 }
7459         // struct LDKCOption_EventZ COption_EventZ_none(void);
7460 export function COption_EventZ_none(): number {
7461         if(!isWasmInitialized) {
7462                 throw new Error("initializeWasm() must be awaited first!");
7463         }
7464         const nativeResponseValue = wasm.TS_COption_EventZ_none();
7465         return nativeResponseValue;
7466 }
7467         // void COption_EventZ_free(struct LDKCOption_EventZ _res);
7468 export function COption_EventZ_free(_res: number): void {
7469         if(!isWasmInitialized) {
7470                 throw new Error("initializeWasm() must be awaited first!");
7471         }
7472         const nativeResponseValue = wasm.TS_COption_EventZ_free(_res);
7473         // debug statements here
7474 }
7475         // uintptr_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
7476 export function COption_EventZ_clone_ptr(arg: number): number {
7477         if(!isWasmInitialized) {
7478                 throw new Error("initializeWasm() must be awaited first!");
7479         }
7480         const nativeResponseValue = wasm.TS_COption_EventZ_clone_ptr(arg);
7481         return nativeResponseValue;
7482 }
7483         // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
7484 export function COption_EventZ_clone(orig: number): number {
7485         if(!isWasmInitialized) {
7486                 throw new Error("initializeWasm() must be awaited first!");
7487         }
7488         const nativeResponseValue = wasm.TS_COption_EventZ_clone(orig);
7489         return nativeResponseValue;
7490 }
7491         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
7492 export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
7493         if(!isWasmInitialized) {
7494                 throw new Error("initializeWasm() must be awaited first!");
7495         }
7496         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_ok(o);
7497         return nativeResponseValue;
7498 }
7499         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
7500 export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
7501         if(!isWasmInitialized) {
7502                 throw new Error("initializeWasm() must be awaited first!");
7503         }
7504         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_err(e);
7505         return nativeResponseValue;
7506 }
7507         // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
7508 export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
7509         if(!isWasmInitialized) {
7510                 throw new Error("initializeWasm() must be awaited first!");
7511         }
7512         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_is_ok(o);
7513         return nativeResponseValue;
7514 }
7515         // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
7516 export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
7517         if(!isWasmInitialized) {
7518                 throw new Error("initializeWasm() must be awaited first!");
7519         }
7520         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_free(_res);
7521         // debug statements here
7522 }
7523         // uintptr_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
7524 export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
7525         if(!isWasmInitialized) {
7526                 throw new Error("initializeWasm() must be awaited first!");
7527         }
7528         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
7529         return nativeResponseValue;
7530 }
7531         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
7532 export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
7533         if(!isWasmInitialized) {
7534                 throw new Error("initializeWasm() must be awaited first!");
7535         }
7536         const nativeResponseValue = wasm.TS_CResult_COption_EventZDecodeErrorZ_clone(orig);
7537         return nativeResponseValue;
7538 }
7539         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
7540 export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
7541         if(!isWasmInitialized) {
7542                 throw new Error("initializeWasm() must be awaited first!");
7543         }
7544         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_ok(o);
7545         return nativeResponseValue;
7546 }
7547         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
7548 export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
7549         if(!isWasmInitialized) {
7550                 throw new Error("initializeWasm() must be awaited first!");
7551         }
7552         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_err(e);
7553         return nativeResponseValue;
7554 }
7555         // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
7556 export function CResult_NodeIdDecodeErrorZ_is_ok(o: number): boolean {
7557         if(!isWasmInitialized) {
7558                 throw new Error("initializeWasm() must be awaited first!");
7559         }
7560         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_is_ok(o);
7561         return nativeResponseValue;
7562 }
7563         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
7564 export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
7565         if(!isWasmInitialized) {
7566                 throw new Error("initializeWasm() must be awaited first!");
7567         }
7568         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_free(_res);
7569         // debug statements here
7570 }
7571         // uintptr_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
7572 export function CResult_NodeIdDecodeErrorZ_clone_ptr(arg: number): number {
7573         if(!isWasmInitialized) {
7574                 throw new Error("initializeWasm() must be awaited first!");
7575         }
7576         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone_ptr(arg);
7577         return nativeResponseValue;
7578 }
7579         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
7580 export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
7581         if(!isWasmInitialized) {
7582                 throw new Error("initializeWasm() must be awaited first!");
7583         }
7584         const nativeResponseValue = wasm.TS_CResult_NodeIdDecodeErrorZ_clone(orig);
7585         return nativeResponseValue;
7586 }
7587         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
7588 export function CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o: number): number {
7589         if(!isWasmInitialized) {
7590                 throw new Error("initializeWasm() must be awaited first!");
7591         }
7592         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o);
7593         return nativeResponseValue;
7594 }
7595         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
7596 export function CResult_COption_NetworkUpdateZDecodeErrorZ_err(e: number): number {
7597         if(!isWasmInitialized) {
7598                 throw new Error("initializeWasm() must be awaited first!");
7599         }
7600         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_err(e);
7601         return nativeResponseValue;
7602 }
7603         // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
7604 export function CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o: number): boolean {
7605         if(!isWasmInitialized) {
7606                 throw new Error("initializeWasm() must be awaited first!");
7607         }
7608         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o);
7609         return nativeResponseValue;
7610 }
7611         // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
7612 export function CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res: number): void {
7613         if(!isWasmInitialized) {
7614                 throw new Error("initializeWasm() must be awaited first!");
7615         }
7616         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res);
7617         // debug statements here
7618 }
7619         // uintptr_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
7620 export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg: number): number {
7621         if(!isWasmInitialized) {
7622                 throw new Error("initializeWasm() must be awaited first!");
7623         }
7624         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg);
7625         return nativeResponseValue;
7626 }
7627         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
7628 export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig: number): number {
7629         if(!isWasmInitialized) {
7630                 throw new Error("initializeWasm() must be awaited first!");
7631         }
7632         const nativeResponseValue = wasm.TS_CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig);
7633         return nativeResponseValue;
7634 }
7635         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
7636 export function COption_AccessZ_some(o: number): number {
7637         if(!isWasmInitialized) {
7638                 throw new Error("initializeWasm() must be awaited first!");
7639         }
7640         const nativeResponseValue = wasm.TS_COption_AccessZ_some(o);
7641         return nativeResponseValue;
7642 }
7643         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
7644 export function COption_AccessZ_none(): number {
7645         if(!isWasmInitialized) {
7646                 throw new Error("initializeWasm() must be awaited first!");
7647         }
7648         const nativeResponseValue = wasm.TS_COption_AccessZ_none();
7649         return nativeResponseValue;
7650 }
7651         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
7652 export function COption_AccessZ_free(_res: number): void {
7653         if(!isWasmInitialized) {
7654                 throw new Error("initializeWasm() must be awaited first!");
7655         }
7656         const nativeResponseValue = wasm.TS_COption_AccessZ_free(_res);
7657         // debug statements here
7658 }
7659         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
7660 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
7661         if(!isWasmInitialized) {
7662                 throw new Error("initializeWasm() must be awaited first!");
7663         }
7664         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
7665         return nativeResponseValue;
7666 }
7667         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
7668 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
7669         if(!isWasmInitialized) {
7670                 throw new Error("initializeWasm() must be awaited first!");
7671         }
7672         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
7673         return nativeResponseValue;
7674 }
7675         // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
7676 export function CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
7677         if(!isWasmInitialized) {
7678                 throw new Error("initializeWasm() must be awaited first!");
7679         }
7680         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o);
7681         return nativeResponseValue;
7682 }
7683         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
7684 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
7685         if(!isWasmInitialized) {
7686                 throw new Error("initializeWasm() must be awaited first!");
7687         }
7688         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
7689         // debug statements here
7690 }
7691         // uintptr_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
7692 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
7693         if(!isWasmInitialized) {
7694                 throw new Error("initializeWasm() must be awaited first!");
7695         }
7696         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg);
7697         return nativeResponseValue;
7698 }
7699         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
7700 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
7701         if(!isWasmInitialized) {
7702                 throw new Error("initializeWasm() must be awaited first!");
7703         }
7704         const nativeResponseValue = wasm.TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
7705         return nativeResponseValue;
7706 }
7707         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
7708 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
7709         if(!isWasmInitialized) {
7710                 throw new Error("initializeWasm() must be awaited first!");
7711         }
7712         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_ok(o);
7713         return nativeResponseValue;
7714 }
7715         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
7716 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
7717         if(!isWasmInitialized) {
7718                 throw new Error("initializeWasm() must be awaited first!");
7719         }
7720         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_err(e);
7721         return nativeResponseValue;
7722 }
7723         // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
7724 export function CResult_ChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
7725         if(!isWasmInitialized) {
7726                 throw new Error("initializeWasm() must be awaited first!");
7727         }
7728         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_is_ok(o);
7729         return nativeResponseValue;
7730 }
7731         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
7732 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
7733         if(!isWasmInitialized) {
7734                 throw new Error("initializeWasm() must be awaited first!");
7735         }
7736         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_free(_res);
7737         // debug statements here
7738 }
7739         // uintptr_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
7740 export function CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
7741         if(!isWasmInitialized) {
7742                 throw new Error("initializeWasm() must be awaited first!");
7743         }
7744         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg);
7745         return nativeResponseValue;
7746 }
7747         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
7748 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
7749         if(!isWasmInitialized) {
7750                 throw new Error("initializeWasm() must be awaited first!");
7751         }
7752         const nativeResponseValue = wasm.TS_CResult_ChannelInfoDecodeErrorZ_clone(orig);
7753         return nativeResponseValue;
7754 }
7755         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
7756 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
7757         if(!isWasmInitialized) {
7758                 throw new Error("initializeWasm() must be awaited first!");
7759         }
7760         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_ok(o);
7761         return nativeResponseValue;
7762 }
7763         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
7764 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
7765         if(!isWasmInitialized) {
7766                 throw new Error("initializeWasm() must be awaited first!");
7767         }
7768         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_err(e);
7769         return nativeResponseValue;
7770 }
7771         // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
7772 export function CResult_RoutingFeesDecodeErrorZ_is_ok(o: number): boolean {
7773         if(!isWasmInitialized) {
7774                 throw new Error("initializeWasm() must be awaited first!");
7775         }
7776         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_is_ok(o);
7777         return nativeResponseValue;
7778 }
7779         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
7780 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
7781         if(!isWasmInitialized) {
7782                 throw new Error("initializeWasm() must be awaited first!");
7783         }
7784         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_free(_res);
7785         // debug statements here
7786 }
7787         // uintptr_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
7788 export function CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg: number): number {
7789         if(!isWasmInitialized) {
7790                 throw new Error("initializeWasm() must be awaited first!");
7791         }
7792         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg);
7793         return nativeResponseValue;
7794 }
7795         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
7796 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
7797         if(!isWasmInitialized) {
7798                 throw new Error("initializeWasm() must be awaited first!");
7799         }
7800         const nativeResponseValue = wasm.TS_CResult_RoutingFeesDecodeErrorZ_clone(orig);
7801         return nativeResponseValue;
7802 }
7803         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
7804 export function CVec_NetAddressZ_free(_res: number): void {
7805         if(!isWasmInitialized) {
7806                 throw new Error("initializeWasm() must be awaited first!");
7807         }
7808         const nativeResponseValue = wasm.TS_CVec_NetAddressZ_free(_res);
7809         // debug statements here
7810 }
7811         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
7812 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
7813         if(!isWasmInitialized) {
7814                 throw new Error("initializeWasm() must be awaited first!");
7815         }
7816         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
7817         return nativeResponseValue;
7818 }
7819         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
7820 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
7821         if(!isWasmInitialized) {
7822                 throw new Error("initializeWasm() must be awaited first!");
7823         }
7824         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
7825         return nativeResponseValue;
7826 }
7827         // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
7828 export function CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o: number): boolean {
7829         if(!isWasmInitialized) {
7830                 throw new Error("initializeWasm() must be awaited first!");
7831         }
7832         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o);
7833         return nativeResponseValue;
7834 }
7835         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
7836 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
7837         if(!isWasmInitialized) {
7838                 throw new Error("initializeWasm() must be awaited first!");
7839         }
7840         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
7841         // debug statements here
7842 }
7843         // uintptr_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
7844 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg: number): number {
7845         if(!isWasmInitialized) {
7846                 throw new Error("initializeWasm() must be awaited first!");
7847         }
7848         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg);
7849         return nativeResponseValue;
7850 }
7851         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
7852 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
7853         if(!isWasmInitialized) {
7854                 throw new Error("initializeWasm() must be awaited first!");
7855         }
7856         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
7857         return nativeResponseValue;
7858 }
7859         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
7860 export function CVec_u64Z_free(_res: number): void {
7861         if(!isWasmInitialized) {
7862                 throw new Error("initializeWasm() must be awaited first!");
7863         }
7864         const nativeResponseValue = wasm.TS_CVec_u64Z_free(_res);
7865         // debug statements here
7866 }
7867         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
7868 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
7869         if(!isWasmInitialized) {
7870                 throw new Error("initializeWasm() must be awaited first!");
7871         }
7872         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_ok(o);
7873         return nativeResponseValue;
7874 }
7875         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
7876 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
7877         if(!isWasmInitialized) {
7878                 throw new Error("initializeWasm() must be awaited first!");
7879         }
7880         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_err(e);
7881         return nativeResponseValue;
7882 }
7883         // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
7884 export function CResult_NodeInfoDecodeErrorZ_is_ok(o: number): boolean {
7885         if(!isWasmInitialized) {
7886                 throw new Error("initializeWasm() must be awaited first!");
7887         }
7888         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_is_ok(o);
7889         return nativeResponseValue;
7890 }
7891         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
7892 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
7893         if(!isWasmInitialized) {
7894                 throw new Error("initializeWasm() must be awaited first!");
7895         }
7896         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_free(_res);
7897         // debug statements here
7898 }
7899         // uintptr_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
7900 export function CResult_NodeInfoDecodeErrorZ_clone_ptr(arg: number): number {
7901         if(!isWasmInitialized) {
7902                 throw new Error("initializeWasm() must be awaited first!");
7903         }
7904         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone_ptr(arg);
7905         return nativeResponseValue;
7906 }
7907         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
7908 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
7909         if(!isWasmInitialized) {
7910                 throw new Error("initializeWasm() must be awaited first!");
7911         }
7912         const nativeResponseValue = wasm.TS_CResult_NodeInfoDecodeErrorZ_clone(orig);
7913         return nativeResponseValue;
7914 }
7915         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
7916 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
7917         if(!isWasmInitialized) {
7918                 throw new Error("initializeWasm() must be awaited first!");
7919         }
7920         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_ok(o);
7921         return nativeResponseValue;
7922 }
7923         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
7924 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
7925         if(!isWasmInitialized) {
7926                 throw new Error("initializeWasm() must be awaited first!");
7927         }
7928         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_err(e);
7929         return nativeResponseValue;
7930 }
7931         // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
7932 export function CResult_NetworkGraphDecodeErrorZ_is_ok(o: number): boolean {
7933         if(!isWasmInitialized) {
7934                 throw new Error("initializeWasm() must be awaited first!");
7935         }
7936         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_is_ok(o);
7937         return nativeResponseValue;
7938 }
7939         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
7940 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
7941         if(!isWasmInitialized) {
7942                 throw new Error("initializeWasm() must be awaited first!");
7943         }
7944         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_free(_res);
7945         // debug statements here
7946 }
7947         // uintptr_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
7948 export function CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg: number): number {
7949         if(!isWasmInitialized) {
7950                 throw new Error("initializeWasm() must be awaited first!");
7951         }
7952         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg);
7953         return nativeResponseValue;
7954 }
7955         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
7956 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
7957         if(!isWasmInitialized) {
7958                 throw new Error("initializeWasm() must be awaited first!");
7959         }
7960         const nativeResponseValue = wasm.TS_CResult_NetworkGraphDecodeErrorZ_clone(orig);
7961         return nativeResponseValue;
7962 }
7963         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
7964 export function COption_CVec_NetAddressZZ_some(o: number): number {
7965         if(!isWasmInitialized) {
7966                 throw new Error("initializeWasm() must be awaited first!");
7967         }
7968         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_some(o);
7969         return nativeResponseValue;
7970 }
7971         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
7972 export function COption_CVec_NetAddressZZ_none(): number {
7973         if(!isWasmInitialized) {
7974                 throw new Error("initializeWasm() must be awaited first!");
7975         }
7976         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_none();
7977         return nativeResponseValue;
7978 }
7979         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
7980 export function COption_CVec_NetAddressZZ_free(_res: number): void {
7981         if(!isWasmInitialized) {
7982                 throw new Error("initializeWasm() must be awaited first!");
7983         }
7984         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_free(_res);
7985         // debug statements here
7986 }
7987         // uintptr_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
7988 export function COption_CVec_NetAddressZZ_clone_ptr(arg: number): number {
7989         if(!isWasmInitialized) {
7990                 throw new Error("initializeWasm() must be awaited first!");
7991         }
7992         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone_ptr(arg);
7993         return nativeResponseValue;
7994 }
7995         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
7996 export function COption_CVec_NetAddressZZ_clone(orig: number): number {
7997         if(!isWasmInitialized) {
7998                 throw new Error("initializeWasm() must be awaited first!");
7999         }
8000         const nativeResponseValue = wasm.TS_COption_CVec_NetAddressZZ_clone(orig);
8001         return nativeResponseValue;
8002 }
8003         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
8004 export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
8005         if(!isWasmInitialized) {
8006                 throw new Error("initializeWasm() must be awaited first!");
8007         }
8008         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_ok(o);
8009         return nativeResponseValue;
8010 }
8011         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
8012 export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
8013         if(!isWasmInitialized) {
8014                 throw new Error("initializeWasm() must be awaited first!");
8015         }
8016         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_err(e);
8017         return nativeResponseValue;
8018 }
8019         // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
8020 export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
8021         if(!isWasmInitialized) {
8022                 throw new Error("initializeWasm() must be awaited first!");
8023         }
8024         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_is_ok(o);
8025         return nativeResponseValue;
8026 }
8027         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
8028 export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
8029         if(!isWasmInitialized) {
8030                 throw new Error("initializeWasm() must be awaited first!");
8031         }
8032         const nativeResponseValue = wasm.TS_CResult_ScoringParametersDecodeErrorZ_free(_res);
8033         // debug statements here
8034 }
8035         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
8036 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
8037         if(!isWasmInitialized) {
8038                 throw new Error("initializeWasm() must be awaited first!");
8039         }
8040         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_ok(o);
8041         return nativeResponseValue;
8042 }
8043         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8044 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
8045         if(!isWasmInitialized) {
8046                 throw new Error("initializeWasm() must be awaited first!");
8047         }
8048         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_err(e);
8049         return nativeResponseValue;
8050 }
8051         // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
8052 export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8053         if(!isWasmInitialized) {
8054                 throw new Error("initializeWasm() must be awaited first!");
8055         }
8056         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_is_ok(o);
8057         return nativeResponseValue;
8058 }
8059         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
8060 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
8061         if(!isWasmInitialized) {
8062                 throw new Error("initializeWasm() must be awaited first!");
8063         }
8064         const nativeResponseValue = wasm.TS_CResult_InitFeaturesDecodeErrorZ_free(_res);
8065         // debug statements here
8066 }
8067         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
8068 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
8069         if(!isWasmInitialized) {
8070                 throw new Error("initializeWasm() must be awaited first!");
8071         }
8072         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_ok(o);
8073         return nativeResponseValue;
8074 }
8075         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8076 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
8077         if(!isWasmInitialized) {
8078                 throw new Error("initializeWasm() must be awaited first!");
8079         }
8080         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_err(e);
8081         return nativeResponseValue;
8082 }
8083         // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
8084 export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8085         if(!isWasmInitialized) {
8086                 throw new Error("initializeWasm() must be awaited first!");
8087         }
8088         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
8089         return nativeResponseValue;
8090 }
8091         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
8092 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
8093         if(!isWasmInitialized) {
8094                 throw new Error("initializeWasm() must be awaited first!");
8095         }
8096         const nativeResponseValue = wasm.TS_CResult_ChannelFeaturesDecodeErrorZ_free(_res);
8097         // debug statements here
8098 }
8099         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
8100 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
8101         if(!isWasmInitialized) {
8102                 throw new Error("initializeWasm() must be awaited first!");
8103         }
8104         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_ok(o);
8105         return nativeResponseValue;
8106 }
8107         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8108 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
8109         if(!isWasmInitialized) {
8110                 throw new Error("initializeWasm() must be awaited first!");
8111         }
8112         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_err(e);
8113         return nativeResponseValue;
8114 }
8115         // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
8116 export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8117         if(!isWasmInitialized) {
8118                 throw new Error("initializeWasm() must be awaited first!");
8119         }
8120         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
8121         return nativeResponseValue;
8122 }
8123         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
8124 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
8125         if(!isWasmInitialized) {
8126                 throw new Error("initializeWasm() must be awaited first!");
8127         }
8128         const nativeResponseValue = wasm.TS_CResult_NodeFeaturesDecodeErrorZ_free(_res);
8129         // debug statements here
8130 }
8131         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
8132 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
8133         if(!isWasmInitialized) {
8134                 throw new Error("initializeWasm() must be awaited first!");
8135         }
8136         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
8137         return nativeResponseValue;
8138 }
8139         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8140 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
8141         if(!isWasmInitialized) {
8142                 throw new Error("initializeWasm() must be awaited first!");
8143         }
8144         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_err(e);
8145         return nativeResponseValue;
8146 }
8147         // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
8148 export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8149         if(!isWasmInitialized) {
8150                 throw new Error("initializeWasm() must be awaited first!");
8151         }
8152         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
8153         return nativeResponseValue;
8154 }
8155         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
8156 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
8157         if(!isWasmInitialized) {
8158                 throw new Error("initializeWasm() must be awaited first!");
8159         }
8160         const nativeResponseValue = wasm.TS_CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
8161         // debug statements here
8162 }
8163         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
8164 export function CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o: number): number {
8165         if(!isWasmInitialized) {
8166                 throw new Error("initializeWasm() must be awaited first!");
8167         }
8168         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_ok(o);
8169         return nativeResponseValue;
8170 }
8171         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
8172 export function CResult_ChannelTypeFeaturesDecodeErrorZ_err(e: number): number {
8173         if(!isWasmInitialized) {
8174                 throw new Error("initializeWasm() must be awaited first!");
8175         }
8176         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_err(e);
8177         return nativeResponseValue;
8178 }
8179         // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
8180 export function CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
8181         if(!isWasmInitialized) {
8182                 throw new Error("initializeWasm() must be awaited first!");
8183         }
8184         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(o);
8185         return nativeResponseValue;
8186 }
8187         // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
8188 export function CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res: number): void {
8189         if(!isWasmInitialized) {
8190                 throw new Error("initializeWasm() must be awaited first!");
8191         }
8192         const nativeResponseValue = wasm.TS_CResult_ChannelTypeFeaturesDecodeErrorZ_free(_res);
8193         // debug statements here
8194 }
8195         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
8196 export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
8197         if(!isWasmInitialized) {
8198                 throw new Error("initializeWasm() must be awaited first!");
8199         }
8200         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_ok(o);
8201         return nativeResponseValue;
8202 }
8203         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
8204 export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
8205         if(!isWasmInitialized) {
8206                 throw new Error("initializeWasm() must be awaited first!");
8207         }
8208         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_err(e);
8209         return nativeResponseValue;
8210 }
8211         // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
8212 export function CResult_NetAddressDecodeErrorZ_is_ok(o: number): boolean {
8213         if(!isWasmInitialized) {
8214                 throw new Error("initializeWasm() must be awaited first!");
8215         }
8216         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_is_ok(o);
8217         return nativeResponseValue;
8218 }
8219         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
8220 export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
8221         if(!isWasmInitialized) {
8222                 throw new Error("initializeWasm() must be awaited first!");
8223         }
8224         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_free(_res);
8225         // debug statements here
8226 }
8227         // uintptr_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
8228 export function CResult_NetAddressDecodeErrorZ_clone_ptr(arg: number): number {
8229         if(!isWasmInitialized) {
8230                 throw new Error("initializeWasm() must be awaited first!");
8231         }
8232         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone_ptr(arg);
8233         return nativeResponseValue;
8234 }
8235         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
8236 export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
8237         if(!isWasmInitialized) {
8238                 throw new Error("initializeWasm() must be awaited first!");
8239         }
8240         const nativeResponseValue = wasm.TS_CResult_NetAddressDecodeErrorZ_clone(orig);
8241         return nativeResponseValue;
8242 }
8243         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
8244 export function CVec_UpdateAddHTLCZ_free(_res: number): void {
8245         if(!isWasmInitialized) {
8246                 throw new Error("initializeWasm() must be awaited first!");
8247         }
8248         const nativeResponseValue = wasm.TS_CVec_UpdateAddHTLCZ_free(_res);
8249         // debug statements here
8250 }
8251         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
8252 export function CVec_UpdateFulfillHTLCZ_free(_res: number): void {
8253         if(!isWasmInitialized) {
8254                 throw new Error("initializeWasm() must be awaited first!");
8255         }
8256         const nativeResponseValue = wasm.TS_CVec_UpdateFulfillHTLCZ_free(_res);
8257         // debug statements here
8258 }
8259         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
8260 export function CVec_UpdateFailHTLCZ_free(_res: number): void {
8261         if(!isWasmInitialized) {
8262                 throw new Error("initializeWasm() must be awaited first!");
8263         }
8264         const nativeResponseValue = wasm.TS_CVec_UpdateFailHTLCZ_free(_res);
8265         // debug statements here
8266 }
8267         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
8268 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number): void {
8269         if(!isWasmInitialized) {
8270                 throw new Error("initializeWasm() must be awaited first!");
8271         }
8272         const nativeResponseValue = wasm.TS_CVec_UpdateFailMalformedHTLCZ_free(_res);
8273         // debug statements here
8274 }
8275         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
8276 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
8277         if(!isWasmInitialized) {
8278                 throw new Error("initializeWasm() must be awaited first!");
8279         }
8280         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_ok(o);
8281         return nativeResponseValue;
8282 }
8283         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
8284 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
8285         if(!isWasmInitialized) {
8286                 throw new Error("initializeWasm() must be awaited first!");
8287         }
8288         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_err(e);
8289         return nativeResponseValue;
8290 }
8291         // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
8292 export function CResult_AcceptChannelDecodeErrorZ_is_ok(o: number): boolean {
8293         if(!isWasmInitialized) {
8294                 throw new Error("initializeWasm() must be awaited first!");
8295         }
8296         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_is_ok(o);
8297         return nativeResponseValue;
8298 }
8299         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
8300 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
8301         if(!isWasmInitialized) {
8302                 throw new Error("initializeWasm() must be awaited first!");
8303         }
8304         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_free(_res);
8305         // debug statements here
8306 }
8307         // uintptr_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
8308 export function CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg: number): number {
8309         if(!isWasmInitialized) {
8310                 throw new Error("initializeWasm() must be awaited first!");
8311         }
8312         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg);
8313         return nativeResponseValue;
8314 }
8315         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
8316 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
8317         if(!isWasmInitialized) {
8318                 throw new Error("initializeWasm() must be awaited first!");
8319         }
8320         const nativeResponseValue = wasm.TS_CResult_AcceptChannelDecodeErrorZ_clone(orig);
8321         return nativeResponseValue;
8322 }
8323         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
8324 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
8325         if(!isWasmInitialized) {
8326                 throw new Error("initializeWasm() must be awaited first!");
8327         }
8328         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
8329         return nativeResponseValue;
8330 }
8331         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
8332 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
8333         if(!isWasmInitialized) {
8334                 throw new Error("initializeWasm() must be awaited first!");
8335         }
8336         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
8337         return nativeResponseValue;
8338 }
8339         // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
8340 export function CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: number): boolean {
8341         if(!isWasmInitialized) {
8342                 throw new Error("initializeWasm() must be awaited first!");
8343         }
8344         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o);
8345         return nativeResponseValue;
8346 }
8347         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
8348 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
8349         if(!isWasmInitialized) {
8350                 throw new Error("initializeWasm() must be awaited first!");
8351         }
8352         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
8353         // debug statements here
8354 }
8355         // uintptr_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
8356 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg: number): number {
8357         if(!isWasmInitialized) {
8358                 throw new Error("initializeWasm() must be awaited first!");
8359         }
8360         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg);
8361         return nativeResponseValue;
8362 }
8363         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
8364 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
8365         if(!isWasmInitialized) {
8366                 throw new Error("initializeWasm() must be awaited first!");
8367         }
8368         const nativeResponseValue = wasm.TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
8369         return nativeResponseValue;
8370 }
8371         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
8372 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
8373         if(!isWasmInitialized) {
8374                 throw new Error("initializeWasm() must be awaited first!");
8375         }
8376         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_ok(o);
8377         return nativeResponseValue;
8378 }
8379         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
8380 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
8381         if(!isWasmInitialized) {
8382                 throw new Error("initializeWasm() must be awaited first!");
8383         }
8384         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_err(e);
8385         return nativeResponseValue;
8386 }
8387         // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
8388 export function CResult_ChannelReestablishDecodeErrorZ_is_ok(o: number): boolean {
8389         if(!isWasmInitialized) {
8390                 throw new Error("initializeWasm() must be awaited first!");
8391         }
8392         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_is_ok(o);
8393         return nativeResponseValue;
8394 }
8395         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
8396 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
8397         if(!isWasmInitialized) {
8398                 throw new Error("initializeWasm() must be awaited first!");
8399         }
8400         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_free(_res);
8401         // debug statements here
8402 }
8403         // uintptr_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
8404 export function CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg: number): number {
8405         if(!isWasmInitialized) {
8406                 throw new Error("initializeWasm() must be awaited first!");
8407         }
8408         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg);
8409         return nativeResponseValue;
8410 }
8411         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
8412 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
8413         if(!isWasmInitialized) {
8414                 throw new Error("initializeWasm() must be awaited first!");
8415         }
8416         const nativeResponseValue = wasm.TS_CResult_ChannelReestablishDecodeErrorZ_clone(orig);
8417         return nativeResponseValue;
8418 }
8419         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
8420 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
8421         if(!isWasmInitialized) {
8422                 throw new Error("initializeWasm() must be awaited first!");
8423         }
8424         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_ok(o);
8425         return nativeResponseValue;
8426 }
8427         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
8428 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
8429         if(!isWasmInitialized) {
8430                 throw new Error("initializeWasm() must be awaited first!");
8431         }
8432         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_err(e);
8433         return nativeResponseValue;
8434 }
8435         // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
8436 export function CResult_ClosingSignedDecodeErrorZ_is_ok(o: number): boolean {
8437         if(!isWasmInitialized) {
8438                 throw new Error("initializeWasm() must be awaited first!");
8439         }
8440         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_is_ok(o);
8441         return nativeResponseValue;
8442 }
8443         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
8444 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
8445         if(!isWasmInitialized) {
8446                 throw new Error("initializeWasm() must be awaited first!");
8447         }
8448         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_free(_res);
8449         // debug statements here
8450 }
8451         // uintptr_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
8452 export function CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg: number): number {
8453         if(!isWasmInitialized) {
8454                 throw new Error("initializeWasm() must be awaited first!");
8455         }
8456         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg);
8457         return nativeResponseValue;
8458 }
8459         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
8460 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
8461         if(!isWasmInitialized) {
8462                 throw new Error("initializeWasm() must be awaited first!");
8463         }
8464         const nativeResponseValue = wasm.TS_CResult_ClosingSignedDecodeErrorZ_clone(orig);
8465         return nativeResponseValue;
8466 }
8467         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
8468 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
8469         if(!isWasmInitialized) {
8470                 throw new Error("initializeWasm() must be awaited first!");
8471         }
8472         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
8473         return nativeResponseValue;
8474 }
8475         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
8476 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
8477         if(!isWasmInitialized) {
8478                 throw new Error("initializeWasm() must be awaited first!");
8479         }
8480         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
8481         return nativeResponseValue;
8482 }
8483         // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
8484 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: number): boolean {
8485         if(!isWasmInitialized) {
8486                 throw new Error("initializeWasm() must be awaited first!");
8487         }
8488         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o);
8489         return nativeResponseValue;
8490 }
8491         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
8492 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
8493         if(!isWasmInitialized) {
8494                 throw new Error("initializeWasm() must be awaited first!");
8495         }
8496         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
8497         // debug statements here
8498 }
8499         // uintptr_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
8500 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg: number): number {
8501         if(!isWasmInitialized) {
8502                 throw new Error("initializeWasm() must be awaited first!");
8503         }
8504         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg);
8505         return nativeResponseValue;
8506 }
8507         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
8508 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
8509         if(!isWasmInitialized) {
8510                 throw new Error("initializeWasm() must be awaited first!");
8511         }
8512         const nativeResponseValue = wasm.TS_CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
8513         return nativeResponseValue;
8514 }
8515         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
8516 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
8517         if(!isWasmInitialized) {
8518                 throw new Error("initializeWasm() must be awaited first!");
8519         }
8520         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_ok(o);
8521         return nativeResponseValue;
8522 }
8523         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
8524 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
8525         if(!isWasmInitialized) {
8526                 throw new Error("initializeWasm() must be awaited first!");
8527         }
8528         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_err(e);
8529         return nativeResponseValue;
8530 }
8531         // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
8532 export function CResult_CommitmentSignedDecodeErrorZ_is_ok(o: number): boolean {
8533         if(!isWasmInitialized) {
8534                 throw new Error("initializeWasm() must be awaited first!");
8535         }
8536         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_is_ok(o);
8537         return nativeResponseValue;
8538 }
8539         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
8540 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
8541         if(!isWasmInitialized) {
8542                 throw new Error("initializeWasm() must be awaited first!");
8543         }
8544         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_free(_res);
8545         // debug statements here
8546 }
8547         // uintptr_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
8548 export function CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg: number): number {
8549         if(!isWasmInitialized) {
8550                 throw new Error("initializeWasm() must be awaited first!");
8551         }
8552         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg);
8553         return nativeResponseValue;
8554 }
8555         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
8556 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
8557         if(!isWasmInitialized) {
8558                 throw new Error("initializeWasm() must be awaited first!");
8559         }
8560         const nativeResponseValue = wasm.TS_CResult_CommitmentSignedDecodeErrorZ_clone(orig);
8561         return nativeResponseValue;
8562 }
8563         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
8564 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
8565         if(!isWasmInitialized) {
8566                 throw new Error("initializeWasm() must be awaited first!");
8567         }
8568         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_ok(o);
8569         return nativeResponseValue;
8570 }
8571         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
8572 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
8573         if(!isWasmInitialized) {
8574                 throw new Error("initializeWasm() must be awaited first!");
8575         }
8576         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_err(e);
8577         return nativeResponseValue;
8578 }
8579         // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
8580 export function CResult_FundingCreatedDecodeErrorZ_is_ok(o: number): boolean {
8581         if(!isWasmInitialized) {
8582                 throw new Error("initializeWasm() must be awaited first!");
8583         }
8584         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_is_ok(o);
8585         return nativeResponseValue;
8586 }
8587         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
8588 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
8589         if(!isWasmInitialized) {
8590                 throw new Error("initializeWasm() must be awaited first!");
8591         }
8592         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_free(_res);
8593         // debug statements here
8594 }
8595         // uintptr_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
8596 export function CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg: number): number {
8597         if(!isWasmInitialized) {
8598                 throw new Error("initializeWasm() must be awaited first!");
8599         }
8600         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg);
8601         return nativeResponseValue;
8602 }
8603         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
8604 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
8605         if(!isWasmInitialized) {
8606                 throw new Error("initializeWasm() must be awaited first!");
8607         }
8608         const nativeResponseValue = wasm.TS_CResult_FundingCreatedDecodeErrorZ_clone(orig);
8609         return nativeResponseValue;
8610 }
8611         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
8612 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
8613         if(!isWasmInitialized) {
8614                 throw new Error("initializeWasm() must be awaited first!");
8615         }
8616         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_ok(o);
8617         return nativeResponseValue;
8618 }
8619         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
8620 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
8621         if(!isWasmInitialized) {
8622                 throw new Error("initializeWasm() must be awaited first!");
8623         }
8624         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_err(e);
8625         return nativeResponseValue;
8626 }
8627         // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
8628 export function CResult_FundingSignedDecodeErrorZ_is_ok(o: number): boolean {
8629         if(!isWasmInitialized) {
8630                 throw new Error("initializeWasm() must be awaited first!");
8631         }
8632         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_is_ok(o);
8633         return nativeResponseValue;
8634 }
8635         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
8636 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
8637         if(!isWasmInitialized) {
8638                 throw new Error("initializeWasm() must be awaited first!");
8639         }
8640         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_free(_res);
8641         // debug statements here
8642 }
8643         // uintptr_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
8644 export function CResult_FundingSignedDecodeErrorZ_clone_ptr(arg: number): number {
8645         if(!isWasmInitialized) {
8646                 throw new Error("initializeWasm() must be awaited first!");
8647         }
8648         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone_ptr(arg);
8649         return nativeResponseValue;
8650 }
8651         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
8652 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
8653         if(!isWasmInitialized) {
8654                 throw new Error("initializeWasm() must be awaited first!");
8655         }
8656         const nativeResponseValue = wasm.TS_CResult_FundingSignedDecodeErrorZ_clone(orig);
8657         return nativeResponseValue;
8658 }
8659         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
8660 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
8661         if(!isWasmInitialized) {
8662                 throw new Error("initializeWasm() must be awaited first!");
8663         }
8664         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_ok(o);
8665         return nativeResponseValue;
8666 }
8667         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
8668 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
8669         if(!isWasmInitialized) {
8670                 throw new Error("initializeWasm() must be awaited first!");
8671         }
8672         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_err(e);
8673         return nativeResponseValue;
8674 }
8675         // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
8676 export function CResult_FundingLockedDecodeErrorZ_is_ok(o: number): boolean {
8677         if(!isWasmInitialized) {
8678                 throw new Error("initializeWasm() must be awaited first!");
8679         }
8680         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_is_ok(o);
8681         return nativeResponseValue;
8682 }
8683         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
8684 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
8685         if(!isWasmInitialized) {
8686                 throw new Error("initializeWasm() must be awaited first!");
8687         }
8688         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_free(_res);
8689         // debug statements here
8690 }
8691         // uintptr_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
8692 export function CResult_FundingLockedDecodeErrorZ_clone_ptr(arg: number): number {
8693         if(!isWasmInitialized) {
8694                 throw new Error("initializeWasm() must be awaited first!");
8695         }
8696         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone_ptr(arg);
8697         return nativeResponseValue;
8698 }
8699         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
8700 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
8701         if(!isWasmInitialized) {
8702                 throw new Error("initializeWasm() must be awaited first!");
8703         }
8704         const nativeResponseValue = wasm.TS_CResult_FundingLockedDecodeErrorZ_clone(orig);
8705         return nativeResponseValue;
8706 }
8707         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
8708 export function CResult_InitDecodeErrorZ_ok(o: number): number {
8709         if(!isWasmInitialized) {
8710                 throw new Error("initializeWasm() must be awaited first!");
8711         }
8712         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_ok(o);
8713         return nativeResponseValue;
8714 }
8715         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
8716 export function CResult_InitDecodeErrorZ_err(e: number): number {
8717         if(!isWasmInitialized) {
8718                 throw new Error("initializeWasm() must be awaited first!");
8719         }
8720         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_err(e);
8721         return nativeResponseValue;
8722 }
8723         // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
8724 export function CResult_InitDecodeErrorZ_is_ok(o: number): boolean {
8725         if(!isWasmInitialized) {
8726                 throw new Error("initializeWasm() must be awaited first!");
8727         }
8728         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_is_ok(o);
8729         return nativeResponseValue;
8730 }
8731         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
8732 export function CResult_InitDecodeErrorZ_free(_res: number): void {
8733         if(!isWasmInitialized) {
8734                 throw new Error("initializeWasm() must be awaited first!");
8735         }
8736         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_free(_res);
8737         // debug statements here
8738 }
8739         // uintptr_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
8740 export function CResult_InitDecodeErrorZ_clone_ptr(arg: number): number {
8741         if(!isWasmInitialized) {
8742                 throw new Error("initializeWasm() must be awaited first!");
8743         }
8744         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone_ptr(arg);
8745         return nativeResponseValue;
8746 }
8747         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
8748 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
8749         if(!isWasmInitialized) {
8750                 throw new Error("initializeWasm() must be awaited first!");
8751         }
8752         const nativeResponseValue = wasm.TS_CResult_InitDecodeErrorZ_clone(orig);
8753         return nativeResponseValue;
8754 }
8755         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
8756 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
8757         if(!isWasmInitialized) {
8758                 throw new Error("initializeWasm() must be awaited first!");
8759         }
8760         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_ok(o);
8761         return nativeResponseValue;
8762 }
8763         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
8764 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
8765         if(!isWasmInitialized) {
8766                 throw new Error("initializeWasm() must be awaited first!");
8767         }
8768         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_err(e);
8769         return nativeResponseValue;
8770 }
8771         // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
8772 export function CResult_OpenChannelDecodeErrorZ_is_ok(o: number): boolean {
8773         if(!isWasmInitialized) {
8774                 throw new Error("initializeWasm() must be awaited first!");
8775         }
8776         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_is_ok(o);
8777         return nativeResponseValue;
8778 }
8779         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
8780 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
8781         if(!isWasmInitialized) {
8782                 throw new Error("initializeWasm() must be awaited first!");
8783         }
8784         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_free(_res);
8785         // debug statements here
8786 }
8787         // uintptr_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
8788 export function CResult_OpenChannelDecodeErrorZ_clone_ptr(arg: number): number {
8789         if(!isWasmInitialized) {
8790                 throw new Error("initializeWasm() must be awaited first!");
8791         }
8792         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone_ptr(arg);
8793         return nativeResponseValue;
8794 }
8795         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
8796 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
8797         if(!isWasmInitialized) {
8798                 throw new Error("initializeWasm() must be awaited first!");
8799         }
8800         const nativeResponseValue = wasm.TS_CResult_OpenChannelDecodeErrorZ_clone(orig);
8801         return nativeResponseValue;
8802 }
8803         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
8804 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
8805         if(!isWasmInitialized) {
8806                 throw new Error("initializeWasm() must be awaited first!");
8807         }
8808         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_ok(o);
8809         return nativeResponseValue;
8810 }
8811         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
8812 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
8813         if(!isWasmInitialized) {
8814                 throw new Error("initializeWasm() must be awaited first!");
8815         }
8816         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_err(e);
8817         return nativeResponseValue;
8818 }
8819         // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
8820 export function CResult_RevokeAndACKDecodeErrorZ_is_ok(o: number): boolean {
8821         if(!isWasmInitialized) {
8822                 throw new Error("initializeWasm() must be awaited first!");
8823         }
8824         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_is_ok(o);
8825         return nativeResponseValue;
8826 }
8827         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
8828 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
8829         if(!isWasmInitialized) {
8830                 throw new Error("initializeWasm() must be awaited first!");
8831         }
8832         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_free(_res);
8833         // debug statements here
8834 }
8835         // uintptr_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
8836 export function CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg: number): number {
8837         if(!isWasmInitialized) {
8838                 throw new Error("initializeWasm() must be awaited first!");
8839         }
8840         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg);
8841         return nativeResponseValue;
8842 }
8843         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
8844 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
8845         if(!isWasmInitialized) {
8846                 throw new Error("initializeWasm() must be awaited first!");
8847         }
8848         const nativeResponseValue = wasm.TS_CResult_RevokeAndACKDecodeErrorZ_clone(orig);
8849         return nativeResponseValue;
8850 }
8851         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
8852 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
8853         if(!isWasmInitialized) {
8854                 throw new Error("initializeWasm() must be awaited first!");
8855         }
8856         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_ok(o);
8857         return nativeResponseValue;
8858 }
8859         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
8860 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
8861         if(!isWasmInitialized) {
8862                 throw new Error("initializeWasm() must be awaited first!");
8863         }
8864         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_err(e);
8865         return nativeResponseValue;
8866 }
8867         // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
8868 export function CResult_ShutdownDecodeErrorZ_is_ok(o: number): boolean {
8869         if(!isWasmInitialized) {
8870                 throw new Error("initializeWasm() must be awaited first!");
8871         }
8872         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_is_ok(o);
8873         return nativeResponseValue;
8874 }
8875         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
8876 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
8877         if(!isWasmInitialized) {
8878                 throw new Error("initializeWasm() must be awaited first!");
8879         }
8880         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_free(_res);
8881         // debug statements here
8882 }
8883         // uintptr_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
8884 export function CResult_ShutdownDecodeErrorZ_clone_ptr(arg: number): number {
8885         if(!isWasmInitialized) {
8886                 throw new Error("initializeWasm() must be awaited first!");
8887         }
8888         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone_ptr(arg);
8889         return nativeResponseValue;
8890 }
8891         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
8892 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
8893         if(!isWasmInitialized) {
8894                 throw new Error("initializeWasm() must be awaited first!");
8895         }
8896         const nativeResponseValue = wasm.TS_CResult_ShutdownDecodeErrorZ_clone(orig);
8897         return nativeResponseValue;
8898 }
8899         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
8900 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
8901         if(!isWasmInitialized) {
8902                 throw new Error("initializeWasm() must be awaited first!");
8903         }
8904         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
8905         return nativeResponseValue;
8906 }
8907         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8908 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
8909         if(!isWasmInitialized) {
8910                 throw new Error("initializeWasm() must be awaited first!");
8911         }
8912         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_err(e);
8913         return nativeResponseValue;
8914 }
8915         // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
8916 export function CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: number): boolean {
8917         if(!isWasmInitialized) {
8918                 throw new Error("initializeWasm() must be awaited first!");
8919         }
8920         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o);
8921         return nativeResponseValue;
8922 }
8923         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
8924 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
8925         if(!isWasmInitialized) {
8926                 throw new Error("initializeWasm() must be awaited first!");
8927         }
8928         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
8929         // debug statements here
8930 }
8931         // uintptr_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
8932 export function CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8933         if(!isWasmInitialized) {
8934                 throw new Error("initializeWasm() must be awaited first!");
8935         }
8936         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg);
8937         return nativeResponseValue;
8938 }
8939         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
8940 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
8941         if(!isWasmInitialized) {
8942                 throw new Error("initializeWasm() must be awaited first!");
8943         }
8944         const nativeResponseValue = wasm.TS_CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
8945         return nativeResponseValue;
8946 }
8947         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
8948 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
8949         if(!isWasmInitialized) {
8950                 throw new Error("initializeWasm() must be awaited first!");
8951         }
8952         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
8953         return nativeResponseValue;
8954 }
8955         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8956 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
8957         if(!isWasmInitialized) {
8958                 throw new Error("initializeWasm() must be awaited first!");
8959         }
8960         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
8961         return nativeResponseValue;
8962 }
8963         // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
8964 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: number): boolean {
8965         if(!isWasmInitialized) {
8966                 throw new Error("initializeWasm() must be awaited first!");
8967         }
8968         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o);
8969         return nativeResponseValue;
8970 }
8971         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
8972 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
8973         if(!isWasmInitialized) {
8974                 throw new Error("initializeWasm() must be awaited first!");
8975         }
8976         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
8977         // debug statements here
8978 }
8979         // uintptr_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
8980 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8981         if(!isWasmInitialized) {
8982                 throw new Error("initializeWasm() must be awaited first!");
8983         }
8984         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg);
8985         return nativeResponseValue;
8986 }
8987         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
8988 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
8989         if(!isWasmInitialized) {
8990                 throw new Error("initializeWasm() must be awaited first!");
8991         }
8992         const nativeResponseValue = wasm.TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
8993         return nativeResponseValue;
8994 }
8995         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
8996 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
8997         if(!isWasmInitialized) {
8998                 throw new Error("initializeWasm() must be awaited first!");
8999         }
9000         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_ok(o);
9001         return nativeResponseValue;
9002 }
9003         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
9004 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
9005         if(!isWasmInitialized) {
9006                 throw new Error("initializeWasm() must be awaited first!");
9007         }
9008         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_err(e);
9009         return nativeResponseValue;
9010 }
9011         // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
9012 export function CResult_UpdateFeeDecodeErrorZ_is_ok(o: number): boolean {
9013         if(!isWasmInitialized) {
9014                 throw new Error("initializeWasm() must be awaited first!");
9015         }
9016         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_is_ok(o);
9017         return nativeResponseValue;
9018 }
9019         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
9020 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
9021         if(!isWasmInitialized) {
9022                 throw new Error("initializeWasm() must be awaited first!");
9023         }
9024         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_free(_res);
9025         // debug statements here
9026 }
9027         // uintptr_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
9028 export function CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg: number): number {
9029         if(!isWasmInitialized) {
9030                 throw new Error("initializeWasm() must be awaited first!");
9031         }
9032         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg);
9033         return nativeResponseValue;
9034 }
9035         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
9036 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
9037         if(!isWasmInitialized) {
9038                 throw new Error("initializeWasm() must be awaited first!");
9039         }
9040         const nativeResponseValue = wasm.TS_CResult_UpdateFeeDecodeErrorZ_clone(orig);
9041         return nativeResponseValue;
9042 }
9043         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
9044 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
9045         if(!isWasmInitialized) {
9046                 throw new Error("initializeWasm() must be awaited first!");
9047         }
9048         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
9049         return nativeResponseValue;
9050 }
9051         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
9052 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
9053         if(!isWasmInitialized) {
9054                 throw new Error("initializeWasm() must be awaited first!");
9055         }
9056         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
9057         return nativeResponseValue;
9058 }
9059         // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
9060 export function CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: number): boolean {
9061         if(!isWasmInitialized) {
9062                 throw new Error("initializeWasm() must be awaited first!");
9063         }
9064         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o);
9065         return nativeResponseValue;
9066 }
9067         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
9068 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
9069         if(!isWasmInitialized) {
9070                 throw new Error("initializeWasm() must be awaited first!");
9071         }
9072         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
9073         // debug statements here
9074 }
9075         // uintptr_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
9076 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg: number): number {
9077         if(!isWasmInitialized) {
9078                 throw new Error("initializeWasm() must be awaited first!");
9079         }
9080         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg);
9081         return nativeResponseValue;
9082 }
9083         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
9084 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
9085         if(!isWasmInitialized) {
9086                 throw new Error("initializeWasm() must be awaited first!");
9087         }
9088         const nativeResponseValue = wasm.TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
9089         return nativeResponseValue;
9090 }
9091         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
9092 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
9093         if(!isWasmInitialized) {
9094                 throw new Error("initializeWasm() must be awaited first!");
9095         }
9096         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
9097         return nativeResponseValue;
9098 }
9099         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
9100 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
9101         if(!isWasmInitialized) {
9102                 throw new Error("initializeWasm() must be awaited first!");
9103         }
9104         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_err(e);
9105         return nativeResponseValue;
9106 }
9107         // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
9108 export function CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: number): boolean {
9109         if(!isWasmInitialized) {
9110                 throw new Error("initializeWasm() must be awaited first!");
9111         }
9112         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o);
9113         return nativeResponseValue;
9114 }
9115         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
9116 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
9117         if(!isWasmInitialized) {
9118                 throw new Error("initializeWasm() must be awaited first!");
9119         }
9120         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
9121         // debug statements here
9122 }
9123         // uintptr_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
9124 export function CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg: number): number {
9125         if(!isWasmInitialized) {
9126                 throw new Error("initializeWasm() must be awaited first!");
9127         }
9128         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg);
9129         return nativeResponseValue;
9130 }
9131         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
9132 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
9133         if(!isWasmInitialized) {
9134                 throw new Error("initializeWasm() must be awaited first!");
9135         }
9136         const nativeResponseValue = wasm.TS_CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
9137         return nativeResponseValue;
9138 }
9139         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
9140 export function CResult_PingDecodeErrorZ_ok(o: number): number {
9141         if(!isWasmInitialized) {
9142                 throw new Error("initializeWasm() must be awaited first!");
9143         }
9144         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_ok(o);
9145         return nativeResponseValue;
9146 }
9147         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
9148 export function CResult_PingDecodeErrorZ_err(e: number): number {
9149         if(!isWasmInitialized) {
9150                 throw new Error("initializeWasm() must be awaited first!");
9151         }
9152         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_err(e);
9153         return nativeResponseValue;
9154 }
9155         // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
9156 export function CResult_PingDecodeErrorZ_is_ok(o: number): boolean {
9157         if(!isWasmInitialized) {
9158                 throw new Error("initializeWasm() must be awaited first!");
9159         }
9160         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_is_ok(o);
9161         return nativeResponseValue;
9162 }
9163         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
9164 export function CResult_PingDecodeErrorZ_free(_res: number): void {
9165         if(!isWasmInitialized) {
9166                 throw new Error("initializeWasm() must be awaited first!");
9167         }
9168         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_free(_res);
9169         // debug statements here
9170 }
9171         // uintptr_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
9172 export function CResult_PingDecodeErrorZ_clone_ptr(arg: number): number {
9173         if(!isWasmInitialized) {
9174                 throw new Error("initializeWasm() must be awaited first!");
9175         }
9176         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone_ptr(arg);
9177         return nativeResponseValue;
9178 }
9179         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
9180 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
9181         if(!isWasmInitialized) {
9182                 throw new Error("initializeWasm() must be awaited first!");
9183         }
9184         const nativeResponseValue = wasm.TS_CResult_PingDecodeErrorZ_clone(orig);
9185         return nativeResponseValue;
9186 }
9187         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
9188 export function CResult_PongDecodeErrorZ_ok(o: number): number {
9189         if(!isWasmInitialized) {
9190                 throw new Error("initializeWasm() must be awaited first!");
9191         }
9192         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_ok(o);
9193         return nativeResponseValue;
9194 }
9195         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
9196 export function CResult_PongDecodeErrorZ_err(e: number): number {
9197         if(!isWasmInitialized) {
9198                 throw new Error("initializeWasm() must be awaited first!");
9199         }
9200         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_err(e);
9201         return nativeResponseValue;
9202 }
9203         // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
9204 export function CResult_PongDecodeErrorZ_is_ok(o: number): boolean {
9205         if(!isWasmInitialized) {
9206                 throw new Error("initializeWasm() must be awaited first!");
9207         }
9208         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_is_ok(o);
9209         return nativeResponseValue;
9210 }
9211         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
9212 export function CResult_PongDecodeErrorZ_free(_res: number): void {
9213         if(!isWasmInitialized) {
9214                 throw new Error("initializeWasm() must be awaited first!");
9215         }
9216         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_free(_res);
9217         // debug statements here
9218 }
9219         // uintptr_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
9220 export function CResult_PongDecodeErrorZ_clone_ptr(arg: number): number {
9221         if(!isWasmInitialized) {
9222                 throw new Error("initializeWasm() must be awaited first!");
9223         }
9224         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone_ptr(arg);
9225         return nativeResponseValue;
9226 }
9227         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
9228 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
9229         if(!isWasmInitialized) {
9230                 throw new Error("initializeWasm() must be awaited first!");
9231         }
9232         const nativeResponseValue = wasm.TS_CResult_PongDecodeErrorZ_clone(orig);
9233         return nativeResponseValue;
9234 }
9235         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
9236 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
9237         if(!isWasmInitialized) {
9238                 throw new Error("initializeWasm() must be awaited first!");
9239         }
9240         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
9241         return nativeResponseValue;
9242 }
9243         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
9244 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
9245         if(!isWasmInitialized) {
9246                 throw new Error("initializeWasm() must be awaited first!");
9247         }
9248         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
9249         return nativeResponseValue;
9250 }
9251         // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
9252 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
9253         if(!isWasmInitialized) {
9254                 throw new Error("initializeWasm() must be awaited first!");
9255         }
9256         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o);
9257         return nativeResponseValue;
9258 }
9259         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
9260 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
9261         if(!isWasmInitialized) {
9262                 throw new Error("initializeWasm() must be awaited first!");
9263         }
9264         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
9265         // debug statements here
9266 }
9267         // uintptr_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
9268 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
9269         if(!isWasmInitialized) {
9270                 throw new Error("initializeWasm() must be awaited first!");
9271         }
9272         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
9273         return nativeResponseValue;
9274 }
9275         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
9276 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
9277         if(!isWasmInitialized) {
9278                 throw new Error("initializeWasm() must be awaited first!");
9279         }
9280         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
9281         return nativeResponseValue;
9282 }
9283         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
9284 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
9285         if(!isWasmInitialized) {
9286                 throw new Error("initializeWasm() must be awaited first!");
9287         }
9288         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
9289         return nativeResponseValue;
9290 }
9291         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
9292 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
9293         if(!isWasmInitialized) {
9294                 throw new Error("initializeWasm() must be awaited first!");
9295         }
9296         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_err(e);
9297         return nativeResponseValue;
9298 }
9299         // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
9300 export function CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
9301         if(!isWasmInitialized) {
9302                 throw new Error("initializeWasm() must be awaited first!");
9303         }
9304         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o);
9305         return nativeResponseValue;
9306 }
9307         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
9308 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
9309         if(!isWasmInitialized) {
9310                 throw new Error("initializeWasm() must be awaited first!");
9311         }
9312         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
9313         // debug statements here
9314 }
9315         // uintptr_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
9316 export function CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
9317         if(!isWasmInitialized) {
9318                 throw new Error("initializeWasm() must be awaited first!");
9319         }
9320         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
9321         return nativeResponseValue;
9322 }
9323         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
9324 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
9325         if(!isWasmInitialized) {
9326                 throw new Error("initializeWasm() must be awaited first!");
9327         }
9328         const nativeResponseValue = wasm.TS_CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
9329         return nativeResponseValue;
9330 }
9331         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
9332 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
9333         if(!isWasmInitialized) {
9334                 throw new Error("initializeWasm() must be awaited first!");
9335         }
9336         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
9337         return nativeResponseValue;
9338 }
9339         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
9340 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
9341         if(!isWasmInitialized) {
9342                 throw new Error("initializeWasm() must be awaited first!");
9343         }
9344         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
9345         return nativeResponseValue;
9346 }
9347         // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
9348 export function CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
9349         if(!isWasmInitialized) {
9350                 throw new Error("initializeWasm() must be awaited first!");
9351         }
9352         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o);
9353         return nativeResponseValue;
9354 }
9355         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
9356 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
9357         if(!isWasmInitialized) {
9358                 throw new Error("initializeWasm() must be awaited first!");
9359         }
9360         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
9361         // debug statements here
9362 }
9363         // uintptr_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
9364 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
9365         if(!isWasmInitialized) {
9366                 throw new Error("initializeWasm() must be awaited first!");
9367         }
9368         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg);
9369         return nativeResponseValue;
9370 }
9371         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
9372 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
9373         if(!isWasmInitialized) {
9374                 throw new Error("initializeWasm() must be awaited first!");
9375         }
9376         const nativeResponseValue = wasm.TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
9377         return nativeResponseValue;
9378 }
9379         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
9380 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
9381         if(!isWasmInitialized) {
9382                 throw new Error("initializeWasm() must be awaited first!");
9383         }
9384         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_ok(o);
9385         return nativeResponseValue;
9386 }
9387         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
9388 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
9389         if(!isWasmInitialized) {
9390                 throw new Error("initializeWasm() must be awaited first!");
9391         }
9392         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_err(e);
9393         return nativeResponseValue;
9394 }
9395         // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
9396 export function CResult_ChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
9397         if(!isWasmInitialized) {
9398                 throw new Error("initializeWasm() must be awaited first!");
9399         }
9400         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_is_ok(o);
9401         return nativeResponseValue;
9402 }
9403         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
9404 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
9405         if(!isWasmInitialized) {
9406                 throw new Error("initializeWasm() must be awaited first!");
9407         }
9408         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_free(_res);
9409         // debug statements here
9410 }
9411         // uintptr_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
9412 export function CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
9413         if(!isWasmInitialized) {
9414                 throw new Error("initializeWasm() must be awaited first!");
9415         }
9416         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg);
9417         return nativeResponseValue;
9418 }
9419         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
9420 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
9421         if(!isWasmInitialized) {
9422                 throw new Error("initializeWasm() must be awaited first!");
9423         }
9424         const nativeResponseValue = wasm.TS_CResult_ChannelUpdateDecodeErrorZ_clone(orig);
9425         return nativeResponseValue;
9426 }
9427         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
9428 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
9429         if(!isWasmInitialized) {
9430                 throw new Error("initializeWasm() must be awaited first!");
9431         }
9432         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_ok(o);
9433         return nativeResponseValue;
9434 }
9435         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
9436 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
9437         if(!isWasmInitialized) {
9438                 throw new Error("initializeWasm() must be awaited first!");
9439         }
9440         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_err(e);
9441         return nativeResponseValue;
9442 }
9443         // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
9444 export function CResult_ErrorMessageDecodeErrorZ_is_ok(o: number): boolean {
9445         if(!isWasmInitialized) {
9446                 throw new Error("initializeWasm() must be awaited first!");
9447         }
9448         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_is_ok(o);
9449         return nativeResponseValue;
9450 }
9451         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
9452 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
9453         if(!isWasmInitialized) {
9454                 throw new Error("initializeWasm() must be awaited first!");
9455         }
9456         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_free(_res);
9457         // debug statements here
9458 }
9459         // uintptr_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
9460 export function CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg: number): number {
9461         if(!isWasmInitialized) {
9462                 throw new Error("initializeWasm() must be awaited first!");
9463         }
9464         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg);
9465         return nativeResponseValue;
9466 }
9467         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
9468 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
9469         if(!isWasmInitialized) {
9470                 throw new Error("initializeWasm() must be awaited first!");
9471         }
9472         const nativeResponseValue = wasm.TS_CResult_ErrorMessageDecodeErrorZ_clone(orig);
9473         return nativeResponseValue;
9474 }
9475         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
9476 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
9477         if(!isWasmInitialized) {
9478                 throw new Error("initializeWasm() must be awaited first!");
9479         }
9480         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
9481         return nativeResponseValue;
9482 }
9483         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
9484 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
9485         if(!isWasmInitialized) {
9486                 throw new Error("initializeWasm() must be awaited first!");
9487         }
9488         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
9489         return nativeResponseValue;
9490 }
9491         // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
9492 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
9493         if(!isWasmInitialized) {
9494                 throw new Error("initializeWasm() must be awaited first!");
9495         }
9496         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o);
9497         return nativeResponseValue;
9498 }
9499         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
9500 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
9501         if(!isWasmInitialized) {
9502                 throw new Error("initializeWasm() must be awaited first!");
9503         }
9504         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
9505         // debug statements here
9506 }
9507         // uintptr_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
9508 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
9509         if(!isWasmInitialized) {
9510                 throw new Error("initializeWasm() must be awaited first!");
9511         }
9512         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg);
9513         return nativeResponseValue;
9514 }
9515         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
9516 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
9517         if(!isWasmInitialized) {
9518                 throw new Error("initializeWasm() must be awaited first!");
9519         }
9520         const nativeResponseValue = wasm.TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
9521         return nativeResponseValue;
9522 }
9523         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
9524 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
9525         if(!isWasmInitialized) {
9526                 throw new Error("initializeWasm() must be awaited first!");
9527         }
9528         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_ok(o);
9529         return nativeResponseValue;
9530 }
9531         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
9532 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
9533         if(!isWasmInitialized) {
9534                 throw new Error("initializeWasm() must be awaited first!");
9535         }
9536         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_err(e);
9537         return nativeResponseValue;
9538 }
9539         // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
9540 export function CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
9541         if(!isWasmInitialized) {
9542                 throw new Error("initializeWasm() must be awaited first!");
9543         }
9544         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_is_ok(o);
9545         return nativeResponseValue;
9546 }
9547         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
9548 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
9549         if(!isWasmInitialized) {
9550                 throw new Error("initializeWasm() must be awaited first!");
9551         }
9552         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_free(_res);
9553         // debug statements here
9554 }
9555         // uintptr_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
9556 export function CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
9557         if(!isWasmInitialized) {
9558                 throw new Error("initializeWasm() must be awaited first!");
9559         }
9560         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg);
9561         return nativeResponseValue;
9562 }
9563         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
9564 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
9565         if(!isWasmInitialized) {
9566                 throw new Error("initializeWasm() must be awaited first!");
9567         }
9568         const nativeResponseValue = wasm.TS_CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
9569         return nativeResponseValue;
9570 }
9571         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
9572 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
9573         if(!isWasmInitialized) {
9574                 throw new Error("initializeWasm() must be awaited first!");
9575         }
9576         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
9577         return nativeResponseValue;
9578 }
9579         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
9580 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
9581         if(!isWasmInitialized) {
9582                 throw new Error("initializeWasm() must be awaited first!");
9583         }
9584         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
9585         return nativeResponseValue;
9586 }
9587         // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
9588 export function CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: number): boolean {
9589         if(!isWasmInitialized) {
9590                 throw new Error("initializeWasm() must be awaited first!");
9591         }
9592         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o);
9593         return nativeResponseValue;
9594 }
9595         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
9596 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
9597         if(!isWasmInitialized) {
9598                 throw new Error("initializeWasm() must be awaited first!");
9599         }
9600         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
9601         // debug statements here
9602 }
9603         // uintptr_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
9604 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg: number): number {
9605         if(!isWasmInitialized) {
9606                 throw new Error("initializeWasm() must be awaited first!");
9607         }
9608         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg);
9609         return nativeResponseValue;
9610 }
9611         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
9612 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
9613         if(!isWasmInitialized) {
9614                 throw new Error("initializeWasm() must be awaited first!");
9615         }
9616         const nativeResponseValue = wasm.TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
9617         return nativeResponseValue;
9618 }
9619         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
9620 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
9621         if(!isWasmInitialized) {
9622                 throw new Error("initializeWasm() must be awaited first!");
9623         }
9624         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
9625         return nativeResponseValue;
9626 }
9627         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
9628 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
9629         if(!isWasmInitialized) {
9630                 throw new Error("initializeWasm() must be awaited first!");
9631         }
9632         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
9633         return nativeResponseValue;
9634 }
9635         // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
9636 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: number): boolean {
9637         if(!isWasmInitialized) {
9638                 throw new Error("initializeWasm() must be awaited first!");
9639         }
9640         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o);
9641         return nativeResponseValue;
9642 }
9643         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
9644 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
9645         if(!isWasmInitialized) {
9646                 throw new Error("initializeWasm() must be awaited first!");
9647         }
9648         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
9649         // debug statements here
9650 }
9651         // uintptr_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
9652 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg: number): number {
9653         if(!isWasmInitialized) {
9654                 throw new Error("initializeWasm() must be awaited first!");
9655         }
9656         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg);
9657         return nativeResponseValue;
9658 }
9659         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
9660 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
9661         if(!isWasmInitialized) {
9662                 throw new Error("initializeWasm() must be awaited first!");
9663         }
9664         const nativeResponseValue = wasm.TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
9665         return nativeResponseValue;
9666 }
9667         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
9668 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
9669         if(!isWasmInitialized) {
9670                 throw new Error("initializeWasm() must be awaited first!");
9671         }
9672         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_ok(o);
9673         return nativeResponseValue;
9674 }
9675         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
9676 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
9677         if(!isWasmInitialized) {
9678                 throw new Error("initializeWasm() must be awaited first!");
9679         }
9680         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_err(e);
9681         return nativeResponseValue;
9682 }
9683         // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
9684 export function CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
9685         if(!isWasmInitialized) {
9686                 throw new Error("initializeWasm() must be awaited first!");
9687         }
9688         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_is_ok(o);
9689         return nativeResponseValue;
9690 }
9691         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
9692 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
9693         if(!isWasmInitialized) {
9694                 throw new Error("initializeWasm() must be awaited first!");
9695         }
9696         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_free(_res);
9697         // debug statements here
9698 }
9699         // uintptr_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
9700 export function CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
9701         if(!isWasmInitialized) {
9702                 throw new Error("initializeWasm() must be awaited first!");
9703         }
9704         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg);
9705         return nativeResponseValue;
9706 }
9707         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
9708 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
9709         if(!isWasmInitialized) {
9710                 throw new Error("initializeWasm() must be awaited first!");
9711         }
9712         const nativeResponseValue = wasm.TS_CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
9713         return nativeResponseValue;
9714 }
9715         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
9716 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
9717         if(!isWasmInitialized) {
9718                 throw new Error("initializeWasm() must be awaited first!");
9719         }
9720         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
9721         return nativeResponseValue;
9722 }
9723         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
9724 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
9725         if(!isWasmInitialized) {
9726                 throw new Error("initializeWasm() must be awaited first!");
9727         }
9728         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_err(e);
9729         return nativeResponseValue;
9730 }
9731         // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
9732 export function CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
9733         if(!isWasmInitialized) {
9734                 throw new Error("initializeWasm() must be awaited first!");
9735         }
9736         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o);
9737         return nativeResponseValue;
9738 }
9739         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
9740 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
9741         if(!isWasmInitialized) {
9742                 throw new Error("initializeWasm() must be awaited first!");
9743         }
9744         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
9745         // debug statements here
9746 }
9747         // uintptr_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
9748 export function CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
9749         if(!isWasmInitialized) {
9750                 throw new Error("initializeWasm() must be awaited first!");
9751         }
9752         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg);
9753         return nativeResponseValue;
9754 }
9755         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
9756 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
9757         if(!isWasmInitialized) {
9758                 throw new Error("initializeWasm() must be awaited first!");
9759         }
9760         const nativeResponseValue = wasm.TS_CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
9761         return nativeResponseValue;
9762 }
9763         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
9764 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
9765         if(!isWasmInitialized) {
9766                 throw new Error("initializeWasm() must be awaited first!");
9767         }
9768         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
9769         return nativeResponseValue;
9770 }
9771         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
9772 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
9773         if(!isWasmInitialized) {
9774                 throw new Error("initializeWasm() must be awaited first!");
9775         }
9776         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_err(e);
9777         return nativeResponseValue;
9778 }
9779         // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
9780 export function CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: number): boolean {
9781         if(!isWasmInitialized) {
9782                 throw new Error("initializeWasm() must be awaited first!");
9783         }
9784         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o);
9785         return nativeResponseValue;
9786 }
9787         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
9788 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
9789         if(!isWasmInitialized) {
9790                 throw new Error("initializeWasm() must be awaited first!");
9791         }
9792         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
9793         // debug statements here
9794 }
9795         // uintptr_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
9796 export function CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg: number): number {
9797         if(!isWasmInitialized) {
9798                 throw new Error("initializeWasm() must be awaited first!");
9799         }
9800         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg);
9801         return nativeResponseValue;
9802 }
9803         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
9804 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
9805         if(!isWasmInitialized) {
9806                 throw new Error("initializeWasm() must be awaited first!");
9807         }
9808         const nativeResponseValue = wasm.TS_CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
9809         return nativeResponseValue;
9810 }
9811         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
9812 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
9813         if(!isWasmInitialized) {
9814                 throw new Error("initializeWasm() must be awaited first!");
9815         }
9816         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
9817         return nativeResponseValue;
9818 }
9819         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9820 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
9821         if(!isWasmInitialized) {
9822                 throw new Error("initializeWasm() must be awaited first!");
9823         }
9824         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
9825         return nativeResponseValue;
9826 }
9827         // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9828 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9829         if(!isWasmInitialized) {
9830                 throw new Error("initializeWasm() must be awaited first!");
9831         }
9832         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
9833         return nativeResponseValue;
9834 }
9835         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
9836 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
9837         if(!isWasmInitialized) {
9838                 throw new Error("initializeWasm() must be awaited first!");
9839         }
9840         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
9841         // debug statements here
9842 }
9843         // uintptr_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9844 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9845         if(!isWasmInitialized) {
9846                 throw new Error("initializeWasm() must be awaited first!");
9847         }
9848         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9849         return nativeResponseValue;
9850 }
9851         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9852 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9853         if(!isWasmInitialized) {
9854                 throw new Error("initializeWasm() must be awaited first!");
9855         }
9856         const nativeResponseValue = wasm.TS_CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
9857         return nativeResponseValue;
9858 }
9859         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
9860 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
9861         if(!isWasmInitialized) {
9862                 throw new Error("initializeWasm() must be awaited first!");
9863         }
9864         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
9865         return nativeResponseValue;
9866 }
9867         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9868 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
9869         if(!isWasmInitialized) {
9870                 throw new Error("initializeWasm() must be awaited first!");
9871         }
9872         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
9873         return nativeResponseValue;
9874 }
9875         // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9876 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9877         if(!isWasmInitialized) {
9878                 throw new Error("initializeWasm() must be awaited first!");
9879         }
9880         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
9881         return nativeResponseValue;
9882 }
9883         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
9884 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
9885         if(!isWasmInitialized) {
9886                 throw new Error("initializeWasm() must be awaited first!");
9887         }
9888         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
9889         // debug statements here
9890 }
9891         // uintptr_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9892 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9893         if(!isWasmInitialized) {
9894                 throw new Error("initializeWasm() must be awaited first!");
9895         }
9896         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9897         return nativeResponseValue;
9898 }
9899         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9900 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9901         if(!isWasmInitialized) {
9902                 throw new Error("initializeWasm() must be awaited first!");
9903         }
9904         const nativeResponseValue = wasm.TS_CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
9905         return nativeResponseValue;
9906 }
9907         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
9908 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
9909         if(!isWasmInitialized) {
9910                 throw new Error("initializeWasm() must be awaited first!");
9911         }
9912         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
9913         return nativeResponseValue;
9914 }
9915         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
9916 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
9917         if(!isWasmInitialized) {
9918                 throw new Error("initializeWasm() must be awaited first!");
9919         }
9920         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
9921         return nativeResponseValue;
9922 }
9923         // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
9924 export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
9925         if(!isWasmInitialized) {
9926                 throw new Error("initializeWasm() must be awaited first!");
9927         }
9928         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
9929         return nativeResponseValue;
9930 }
9931         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
9932 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
9933         if(!isWasmInitialized) {
9934                 throw new Error("initializeWasm() must be awaited first!");
9935         }
9936         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
9937         // debug statements here
9938 }
9939         // uintptr_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
9940 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
9941         if(!isWasmInitialized) {
9942                 throw new Error("initializeWasm() must be awaited first!");
9943         }
9944         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
9945         return nativeResponseValue;
9946 }
9947         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
9948 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
9949         if(!isWasmInitialized) {
9950                 throw new Error("initializeWasm() must be awaited first!");
9951         }
9952         const nativeResponseValue = wasm.TS_CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
9953         return nativeResponseValue;
9954 }
9955         // uintptr_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
9956 export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
9957         if(!isWasmInitialized) {
9958                 throw new Error("initializeWasm() must be awaited first!");
9959         }
9960         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
9961         return nativeResponseValue;
9962 }
9963         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
9964 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
9965         if(!isWasmInitialized) {
9966                 throw new Error("initializeWasm() must be awaited first!");
9967         }
9968         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
9969         return nativeResponseValue;
9970 }
9971         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
9972 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: number, b: number): number {
9973         if(!isWasmInitialized) {
9974                 throw new Error("initializeWasm() must be awaited first!");
9975         }
9976         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_new(a, b);
9977         return nativeResponseValue;
9978 }
9979         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
9980 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
9981         if(!isWasmInitialized) {
9982                 throw new Error("initializeWasm() must be awaited first!");
9983         }
9984         const nativeResponseValue = wasm.TS_C2Tuple_SignatureCVec_SignatureZZ_free(_res);
9985         // debug statements here
9986 }
9987         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
9988 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
9989         if(!isWasmInitialized) {
9990                 throw new Error("initializeWasm() must be awaited first!");
9991         }
9992         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
9993         return nativeResponseValue;
9994 }
9995         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
9996 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
9997         if(!isWasmInitialized) {
9998                 throw new Error("initializeWasm() must be awaited first!");
9999         }
10000         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
10001         return nativeResponseValue;
10002 }
10003         // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
10004 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o: number): boolean {
10005         if(!isWasmInitialized) {
10006                 throw new Error("initializeWasm() must be awaited first!");
10007         }
10008         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o);
10009         return nativeResponseValue;
10010 }
10011         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
10012 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
10013         if(!isWasmInitialized) {
10014                 throw new Error("initializeWasm() must be awaited first!");
10015         }
10016         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
10017         // debug statements here
10018 }
10019         // uintptr_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
10020 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg: number): number {
10021         if(!isWasmInitialized) {
10022                 throw new Error("initializeWasm() must be awaited first!");
10023         }
10024         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg);
10025         return nativeResponseValue;
10026 }
10027         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
10028 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
10029         if(!isWasmInitialized) {
10030                 throw new Error("initializeWasm() must be awaited first!");
10031         }
10032         const nativeResponseValue = wasm.TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
10033         return nativeResponseValue;
10034 }
10035         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
10036 export function CResult_SignatureNoneZ_ok(o: number): number {
10037         if(!isWasmInitialized) {
10038                 throw new Error("initializeWasm() must be awaited first!");
10039         }
10040         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_ok(o);
10041         return nativeResponseValue;
10042 }
10043         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
10044 export function CResult_SignatureNoneZ_err(): number {
10045         if(!isWasmInitialized) {
10046                 throw new Error("initializeWasm() must be awaited first!");
10047         }
10048         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_err();
10049         return nativeResponseValue;
10050 }
10051         // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
10052 export function CResult_SignatureNoneZ_is_ok(o: number): boolean {
10053         if(!isWasmInitialized) {
10054                 throw new Error("initializeWasm() must be awaited first!");
10055         }
10056         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_is_ok(o);
10057         return nativeResponseValue;
10058 }
10059         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
10060 export function CResult_SignatureNoneZ_free(_res: number): void {
10061         if(!isWasmInitialized) {
10062                 throw new Error("initializeWasm() must be awaited first!");
10063         }
10064         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_free(_res);
10065         // debug statements here
10066 }
10067         // uintptr_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
10068 export function CResult_SignatureNoneZ_clone_ptr(arg: number): number {
10069         if(!isWasmInitialized) {
10070                 throw new Error("initializeWasm() must be awaited first!");
10071         }
10072         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone_ptr(arg);
10073         return nativeResponseValue;
10074 }
10075         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
10076 export function CResult_SignatureNoneZ_clone(orig: number): number {
10077         if(!isWasmInitialized) {
10078                 throw new Error("initializeWasm() must be awaited first!");
10079         }
10080         const nativeResponseValue = wasm.TS_CResult_SignatureNoneZ_clone(orig);
10081         return nativeResponseValue;
10082 }
10083         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
10084 export function CResult_SignDecodeErrorZ_ok(o: number): number {
10085         if(!isWasmInitialized) {
10086                 throw new Error("initializeWasm() must be awaited first!");
10087         }
10088         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_ok(o);
10089         return nativeResponseValue;
10090 }
10091         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
10092 export function CResult_SignDecodeErrorZ_err(e: number): number {
10093         if(!isWasmInitialized) {
10094                 throw new Error("initializeWasm() must be awaited first!");
10095         }
10096         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_err(e);
10097         return nativeResponseValue;
10098 }
10099         // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
10100 export function CResult_SignDecodeErrorZ_is_ok(o: number): boolean {
10101         if(!isWasmInitialized) {
10102                 throw new Error("initializeWasm() must be awaited first!");
10103         }
10104         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_is_ok(o);
10105         return nativeResponseValue;
10106 }
10107         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
10108 export function CResult_SignDecodeErrorZ_free(_res: number): void {
10109         if(!isWasmInitialized) {
10110                 throw new Error("initializeWasm() must be awaited first!");
10111         }
10112         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_free(_res);
10113         // debug statements here
10114 }
10115         // uintptr_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
10116 export function CResult_SignDecodeErrorZ_clone_ptr(arg: number): number {
10117         if(!isWasmInitialized) {
10118                 throw new Error("initializeWasm() must be awaited first!");
10119         }
10120         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone_ptr(arg);
10121         return nativeResponseValue;
10122 }
10123         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
10124 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
10125         if(!isWasmInitialized) {
10126                 throw new Error("initializeWasm() must be awaited first!");
10127         }
10128         const nativeResponseValue = wasm.TS_CResult_SignDecodeErrorZ_clone(orig);
10129         return nativeResponseValue;
10130 }
10131         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
10132 export function CResult_RecoverableSignatureNoneZ_ok(o: number): number {
10133         if(!isWasmInitialized) {
10134                 throw new Error("initializeWasm() must be awaited first!");
10135         }
10136         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_ok(o);
10137         return nativeResponseValue;
10138 }
10139         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
10140 export function CResult_RecoverableSignatureNoneZ_err(): number {
10141         if(!isWasmInitialized) {
10142                 throw new Error("initializeWasm() must be awaited first!");
10143         }
10144         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_err();
10145         return nativeResponseValue;
10146 }
10147         // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
10148 export function CResult_RecoverableSignatureNoneZ_is_ok(o: number): boolean {
10149         if(!isWasmInitialized) {
10150                 throw new Error("initializeWasm() must be awaited first!");
10151         }
10152         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_is_ok(o);
10153         return nativeResponseValue;
10154 }
10155         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
10156 export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
10157         if(!isWasmInitialized) {
10158                 throw new Error("initializeWasm() must be awaited first!");
10159         }
10160         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_free(_res);
10161         // debug statements here
10162 }
10163         // uintptr_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
10164 export function CResult_RecoverableSignatureNoneZ_clone_ptr(arg: number): number {
10165         if(!isWasmInitialized) {
10166                 throw new Error("initializeWasm() must be awaited first!");
10167         }
10168         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone_ptr(arg);
10169         return nativeResponseValue;
10170 }
10171         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
10172 export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
10173         if(!isWasmInitialized) {
10174                 throw new Error("initializeWasm() must be awaited first!");
10175         }
10176         const nativeResponseValue = wasm.TS_CResult_RecoverableSignatureNoneZ_clone(orig);
10177         return nativeResponseValue;
10178 }
10179         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
10180 export function CVec_CVec_u8ZZ_free(_res: number): void {
10181         if(!isWasmInitialized) {
10182                 throw new Error("initializeWasm() must be awaited first!");
10183         }
10184         const nativeResponseValue = wasm.TS_CVec_CVec_u8ZZ_free(_res);
10185         // debug statements here
10186 }
10187         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
10188 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: number): number {
10189         if(!isWasmInitialized) {
10190                 throw new Error("initializeWasm() must be awaited first!");
10191         }
10192         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_ok(o);
10193         return nativeResponseValue;
10194 }
10195         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
10196 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
10197         if(!isWasmInitialized) {
10198                 throw new Error("initializeWasm() must be awaited first!");
10199         }
10200         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_err();
10201         return nativeResponseValue;
10202 }
10203         // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
10204 export function CResult_CVec_CVec_u8ZZNoneZ_is_ok(o: number): boolean {
10205         if(!isWasmInitialized) {
10206                 throw new Error("initializeWasm() must be awaited first!");
10207         }
10208         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_is_ok(o);
10209         return nativeResponseValue;
10210 }
10211         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
10212 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
10213         if(!isWasmInitialized) {
10214                 throw new Error("initializeWasm() must be awaited first!");
10215         }
10216         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_free(_res);
10217         // debug statements here
10218 }
10219         // uintptr_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
10220 export function CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg: number): number {
10221         if(!isWasmInitialized) {
10222                 throw new Error("initializeWasm() must be awaited first!");
10223         }
10224         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg);
10225         return nativeResponseValue;
10226 }
10227         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
10228 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
10229         if(!isWasmInitialized) {
10230                 throw new Error("initializeWasm() must be awaited first!");
10231         }
10232         const nativeResponseValue = wasm.TS_CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
10233         return nativeResponseValue;
10234 }
10235         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
10236 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
10237         if(!isWasmInitialized) {
10238                 throw new Error("initializeWasm() must be awaited first!");
10239         }
10240         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_ok(o);
10241         return nativeResponseValue;
10242 }
10243         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
10244 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
10245         if(!isWasmInitialized) {
10246                 throw new Error("initializeWasm() must be awaited first!");
10247         }
10248         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_err(e);
10249         return nativeResponseValue;
10250 }
10251         // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
10252 export function CResult_InMemorySignerDecodeErrorZ_is_ok(o: number): boolean {
10253         if(!isWasmInitialized) {
10254                 throw new Error("initializeWasm() must be awaited first!");
10255         }
10256         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_is_ok(o);
10257         return nativeResponseValue;
10258 }
10259         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
10260 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
10261         if(!isWasmInitialized) {
10262                 throw new Error("initializeWasm() must be awaited first!");
10263         }
10264         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_free(_res);
10265         // debug statements here
10266 }
10267         // uintptr_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
10268 export function CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg: number): number {
10269         if(!isWasmInitialized) {
10270                 throw new Error("initializeWasm() must be awaited first!");
10271         }
10272         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg);
10273         return nativeResponseValue;
10274 }
10275         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
10276 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
10277         if(!isWasmInitialized) {
10278                 throw new Error("initializeWasm() must be awaited first!");
10279         }
10280         const nativeResponseValue = wasm.TS_CResult_InMemorySignerDecodeErrorZ_clone(orig);
10281         return nativeResponseValue;
10282 }
10283         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
10284 export function CVec_TxOutZ_free(_res: number): void {
10285         if(!isWasmInitialized) {
10286                 throw new Error("initializeWasm() must be awaited first!");
10287         }
10288         const nativeResponseValue = wasm.TS_CVec_TxOutZ_free(_res);
10289         // debug statements here
10290 }
10291         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
10292 export function CResult_TransactionNoneZ_ok(o: number): number {
10293         if(!isWasmInitialized) {
10294                 throw new Error("initializeWasm() must be awaited first!");
10295         }
10296         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_ok(o);
10297         return nativeResponseValue;
10298 }
10299         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
10300 export function CResult_TransactionNoneZ_err(): number {
10301         if(!isWasmInitialized) {
10302                 throw new Error("initializeWasm() must be awaited first!");
10303         }
10304         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_err();
10305         return nativeResponseValue;
10306 }
10307         // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
10308 export function CResult_TransactionNoneZ_is_ok(o: number): boolean {
10309         if(!isWasmInitialized) {
10310                 throw new Error("initializeWasm() must be awaited first!");
10311         }
10312         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_is_ok(o);
10313         return nativeResponseValue;
10314 }
10315         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
10316 export function CResult_TransactionNoneZ_free(_res: number): void {
10317         if(!isWasmInitialized) {
10318                 throw new Error("initializeWasm() must be awaited first!");
10319         }
10320         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_free(_res);
10321         // debug statements here
10322 }
10323         // uintptr_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
10324 export function CResult_TransactionNoneZ_clone_ptr(arg: number): number {
10325         if(!isWasmInitialized) {
10326                 throw new Error("initializeWasm() must be awaited first!");
10327         }
10328         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone_ptr(arg);
10329         return nativeResponseValue;
10330 }
10331         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
10332 export function CResult_TransactionNoneZ_clone(orig: number): number {
10333         if(!isWasmInitialized) {
10334                 throw new Error("initializeWasm() must be awaited first!");
10335         }
10336         const nativeResponseValue = wasm.TS_CResult_TransactionNoneZ_clone(orig);
10337         return nativeResponseValue;
10338 }
10339         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
10340 export function COption_FilterZ_some(o: number): number {
10341         if(!isWasmInitialized) {
10342                 throw new Error("initializeWasm() must be awaited first!");
10343         }
10344         const nativeResponseValue = wasm.TS_COption_FilterZ_some(o);
10345         return nativeResponseValue;
10346 }
10347         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
10348 export function COption_FilterZ_none(): number {
10349         if(!isWasmInitialized) {
10350                 throw new Error("initializeWasm() must be awaited first!");
10351         }
10352         const nativeResponseValue = wasm.TS_COption_FilterZ_none();
10353         return nativeResponseValue;
10354 }
10355         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
10356 export function COption_FilterZ_free(_res: number): void {
10357         if(!isWasmInitialized) {
10358                 throw new Error("initializeWasm() must be awaited first!");
10359         }
10360         const nativeResponseValue = wasm.TS_COption_FilterZ_free(_res);
10361         // debug statements here
10362 }
10363         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
10364 export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
10365         if(!isWasmInitialized) {
10366                 throw new Error("initializeWasm() must be awaited first!");
10367         }
10368         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_ok(o);
10369         return nativeResponseValue;
10370 }
10371         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
10372 export function CResult_LockedChannelMonitorNoneZ_err(): number {
10373         if(!isWasmInitialized) {
10374                 throw new Error("initializeWasm() must be awaited first!");
10375         }
10376         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_err();
10377         return nativeResponseValue;
10378 }
10379         // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
10380 export function CResult_LockedChannelMonitorNoneZ_is_ok(o: number): boolean {
10381         if(!isWasmInitialized) {
10382                 throw new Error("initializeWasm() must be awaited first!");
10383         }
10384         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_is_ok(o);
10385         return nativeResponseValue;
10386 }
10387         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
10388 export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
10389         if(!isWasmInitialized) {
10390                 throw new Error("initializeWasm() must be awaited first!");
10391         }
10392         const nativeResponseValue = wasm.TS_CResult_LockedChannelMonitorNoneZ_free(_res);
10393         // debug statements here
10394 }
10395         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
10396 export function CVec_OutPointZ_free(_res: number): void {
10397         if(!isWasmInitialized) {
10398                 throw new Error("initializeWasm() must be awaited first!");
10399         }
10400         const nativeResponseValue = wasm.TS_CVec_OutPointZ_free(_res);
10401         // debug statements here
10402 }
10403         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
10404 export function CResult_NoneAPIErrorZ_ok(): number {
10405         if(!isWasmInitialized) {
10406                 throw new Error("initializeWasm() must be awaited first!");
10407         }
10408         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_ok();
10409         return nativeResponseValue;
10410 }
10411         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
10412 export function CResult_NoneAPIErrorZ_err(e: number): number {
10413         if(!isWasmInitialized) {
10414                 throw new Error("initializeWasm() must be awaited first!");
10415         }
10416         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_err(e);
10417         return nativeResponseValue;
10418 }
10419         // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
10420 export function CResult_NoneAPIErrorZ_is_ok(o: number): boolean {
10421         if(!isWasmInitialized) {
10422                 throw new Error("initializeWasm() must be awaited first!");
10423         }
10424         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_is_ok(o);
10425         return nativeResponseValue;
10426 }
10427         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
10428 export function CResult_NoneAPIErrorZ_free(_res: number): void {
10429         if(!isWasmInitialized) {
10430                 throw new Error("initializeWasm() must be awaited first!");
10431         }
10432         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_free(_res);
10433         // debug statements here
10434 }
10435         // uintptr_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
10436 export function CResult_NoneAPIErrorZ_clone_ptr(arg: number): number {
10437         if(!isWasmInitialized) {
10438                 throw new Error("initializeWasm() must be awaited first!");
10439         }
10440         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone_ptr(arg);
10441         return nativeResponseValue;
10442 }
10443         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
10444 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
10445         if(!isWasmInitialized) {
10446                 throw new Error("initializeWasm() must be awaited first!");
10447         }
10448         const nativeResponseValue = wasm.TS_CResult_NoneAPIErrorZ_clone(orig);
10449         return nativeResponseValue;
10450 }
10451         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
10452 export function COption_u16Z_some(o: number): number {
10453         if(!isWasmInitialized) {
10454                 throw new Error("initializeWasm() must be awaited first!");
10455         }
10456         const nativeResponseValue = wasm.TS_COption_u16Z_some(o);
10457         return nativeResponseValue;
10458 }
10459         // struct LDKCOption_u16Z COption_u16Z_none(void);
10460 export function COption_u16Z_none(): number {
10461         if(!isWasmInitialized) {
10462                 throw new Error("initializeWasm() must be awaited first!");
10463         }
10464         const nativeResponseValue = wasm.TS_COption_u16Z_none();
10465         return nativeResponseValue;
10466 }
10467         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
10468 export function COption_u16Z_free(_res: number): void {
10469         if(!isWasmInitialized) {
10470                 throw new Error("initializeWasm() must be awaited first!");
10471         }
10472         const nativeResponseValue = wasm.TS_COption_u16Z_free(_res);
10473         // debug statements here
10474 }
10475         // uintptr_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
10476 export function COption_u16Z_clone_ptr(arg: number): number {
10477         if(!isWasmInitialized) {
10478                 throw new Error("initializeWasm() must be awaited first!");
10479         }
10480         const nativeResponseValue = wasm.TS_COption_u16Z_clone_ptr(arg);
10481         return nativeResponseValue;
10482 }
10483         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
10484 export function COption_u16Z_clone(orig: number): number {
10485         if(!isWasmInitialized) {
10486                 throw new Error("initializeWasm() must be awaited first!");
10487         }
10488         const nativeResponseValue = wasm.TS_COption_u16Z_clone(orig);
10489         return nativeResponseValue;
10490 }
10491         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
10492 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number): void {
10493         if(!isWasmInitialized) {
10494                 throw new Error("initializeWasm() must be awaited first!");
10495         }
10496         const nativeResponseValue = wasm.TS_CVec_CResult_NoneAPIErrorZZ_free(_res);
10497         // debug statements here
10498 }
10499         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
10500 export function CVec_APIErrorZ_free(_res: number): void {
10501         if(!isWasmInitialized) {
10502                 throw new Error("initializeWasm() must be awaited first!");
10503         }
10504         const nativeResponseValue = wasm.TS_CVec_APIErrorZ_free(_res);
10505         // debug statements here
10506 }
10507         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
10508 export function CResult__u832APIErrorZ_ok(o: number): number {
10509         if(!isWasmInitialized) {
10510                 throw new Error("initializeWasm() must be awaited first!");
10511         }
10512         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_ok(o);
10513         return nativeResponseValue;
10514 }
10515         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
10516 export function CResult__u832APIErrorZ_err(e: number): number {
10517         if(!isWasmInitialized) {
10518                 throw new Error("initializeWasm() must be awaited first!");
10519         }
10520         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_err(e);
10521         return nativeResponseValue;
10522 }
10523         // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
10524 export function CResult__u832APIErrorZ_is_ok(o: number): boolean {
10525         if(!isWasmInitialized) {
10526                 throw new Error("initializeWasm() must be awaited first!");
10527         }
10528         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_is_ok(o);
10529         return nativeResponseValue;
10530 }
10531         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
10532 export function CResult__u832APIErrorZ_free(_res: number): void {
10533         if(!isWasmInitialized) {
10534                 throw new Error("initializeWasm() must be awaited first!");
10535         }
10536         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_free(_res);
10537         // debug statements here
10538 }
10539         // uintptr_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
10540 export function CResult__u832APIErrorZ_clone_ptr(arg: number): number {
10541         if(!isWasmInitialized) {
10542                 throw new Error("initializeWasm() must be awaited first!");
10543         }
10544         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone_ptr(arg);
10545         return nativeResponseValue;
10546 }
10547         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
10548 export function CResult__u832APIErrorZ_clone(orig: number): number {
10549         if(!isWasmInitialized) {
10550                 throw new Error("initializeWasm() must be awaited first!");
10551         }
10552         const nativeResponseValue = wasm.TS_CResult__u832APIErrorZ_clone(orig);
10553         return nativeResponseValue;
10554 }
10555         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
10556 export function CResult_PaymentIdPaymentSendFailureZ_ok(o: number): number {
10557         if(!isWasmInitialized) {
10558                 throw new Error("initializeWasm() must be awaited first!");
10559         }
10560         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_ok(o);
10561         return nativeResponseValue;
10562 }
10563         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
10564 export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
10565         if(!isWasmInitialized) {
10566                 throw new Error("initializeWasm() must be awaited first!");
10567         }
10568         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_err(e);
10569         return nativeResponseValue;
10570 }
10571         // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
10572 export function CResult_PaymentIdPaymentSendFailureZ_is_ok(o: number): boolean {
10573         if(!isWasmInitialized) {
10574                 throw new Error("initializeWasm() must be awaited first!");
10575         }
10576         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_is_ok(o);
10577         return nativeResponseValue;
10578 }
10579         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
10580 export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
10581         if(!isWasmInitialized) {
10582                 throw new Error("initializeWasm() must be awaited first!");
10583         }
10584         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_free(_res);
10585         // debug statements here
10586 }
10587         // uintptr_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
10588 export function CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg: number): number {
10589         if(!isWasmInitialized) {
10590                 throw new Error("initializeWasm() must be awaited first!");
10591         }
10592         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg);
10593         return nativeResponseValue;
10594 }
10595         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
10596 export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
10597         if(!isWasmInitialized) {
10598                 throw new Error("initializeWasm() must be awaited first!");
10599         }
10600         const nativeResponseValue = wasm.TS_CResult_PaymentIdPaymentSendFailureZ_clone(orig);
10601         return nativeResponseValue;
10602 }
10603         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
10604 export function CResult_NonePaymentSendFailureZ_ok(): number {
10605         if(!isWasmInitialized) {
10606                 throw new Error("initializeWasm() must be awaited first!");
10607         }
10608         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_ok();
10609         return nativeResponseValue;
10610 }
10611         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
10612 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
10613         if(!isWasmInitialized) {
10614                 throw new Error("initializeWasm() must be awaited first!");
10615         }
10616         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_err(e);
10617         return nativeResponseValue;
10618 }
10619         // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
10620 export function CResult_NonePaymentSendFailureZ_is_ok(o: number): boolean {
10621         if(!isWasmInitialized) {
10622                 throw new Error("initializeWasm() must be awaited first!");
10623         }
10624         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_is_ok(o);
10625         return nativeResponseValue;
10626 }
10627         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
10628 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
10629         if(!isWasmInitialized) {
10630                 throw new Error("initializeWasm() must be awaited first!");
10631         }
10632         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_free(_res);
10633         // debug statements here
10634 }
10635         // uintptr_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
10636 export function CResult_NonePaymentSendFailureZ_clone_ptr(arg: number): number {
10637         if(!isWasmInitialized) {
10638                 throw new Error("initializeWasm() must be awaited first!");
10639         }
10640         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone_ptr(arg);
10641         return nativeResponseValue;
10642 }
10643         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
10644 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
10645         if(!isWasmInitialized) {
10646                 throw new Error("initializeWasm() must be awaited first!");
10647         }
10648         const nativeResponseValue = wasm.TS_CResult_NonePaymentSendFailureZ_clone(orig);
10649         return nativeResponseValue;
10650 }
10651         // uintptr_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
10652 export function C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg: number): number {
10653         if(!isWasmInitialized) {
10654                 throw new Error("initializeWasm() must be awaited first!");
10655         }
10656         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg);
10657         return nativeResponseValue;
10658 }
10659         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
10660 export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
10661         if(!isWasmInitialized) {
10662                 throw new Error("initializeWasm() must be awaited first!");
10663         }
10664         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_clone(orig);
10665         return nativeResponseValue;
10666 }
10667         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
10668 export function C2Tuple_PaymentHashPaymentIdZ_new(a: number, b: number): number {
10669         if(!isWasmInitialized) {
10670                 throw new Error("initializeWasm() must be awaited first!");
10671         }
10672         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_new(a, b);
10673         return nativeResponseValue;
10674 }
10675         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
10676 export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
10677         if(!isWasmInitialized) {
10678                 throw new Error("initializeWasm() must be awaited first!");
10679         }
10680         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentIdZ_free(_res);
10681         // debug statements here
10682 }
10683         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
10684 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
10685         if(!isWasmInitialized) {
10686                 throw new Error("initializeWasm() must be awaited first!");
10687         }
10688         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
10689         return nativeResponseValue;
10690 }
10691         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
10692 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
10693         if(!isWasmInitialized) {
10694                 throw new Error("initializeWasm() must be awaited first!");
10695         }
10696         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
10697         return nativeResponseValue;
10698 }
10699         // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
10700 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o: number): boolean {
10701         if(!isWasmInitialized) {
10702                 throw new Error("initializeWasm() must be awaited first!");
10703         }
10704         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o);
10705         return nativeResponseValue;
10706 }
10707         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
10708 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
10709         if(!isWasmInitialized) {
10710                 throw new Error("initializeWasm() must be awaited first!");
10711         }
10712         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
10713         // debug statements here
10714 }
10715         // uintptr_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
10716 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg: number): number {
10717         if(!isWasmInitialized) {
10718                 throw new Error("initializeWasm() must be awaited first!");
10719         }
10720         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg);
10721         return nativeResponseValue;
10722 }
10723         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
10724 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
10725         if(!isWasmInitialized) {
10726                 throw new Error("initializeWasm() must be awaited first!");
10727         }
10728         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
10729         return nativeResponseValue;
10730 }
10731         // uintptr_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
10732 export function C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg: number): number {
10733         if(!isWasmInitialized) {
10734                 throw new Error("initializeWasm() must be awaited first!");
10735         }
10736         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg);
10737         return nativeResponseValue;
10738 }
10739         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
10740 export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
10741         if(!isWasmInitialized) {
10742                 throw new Error("initializeWasm() must be awaited first!");
10743         }
10744         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
10745         return nativeResponseValue;
10746 }
10747         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
10748 export function C2Tuple_PaymentHashPaymentSecretZ_new(a: number, b: number): number {
10749         if(!isWasmInitialized) {
10750                 throw new Error("initializeWasm() must be awaited first!");
10751         }
10752         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
10753         return nativeResponseValue;
10754 }
10755         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
10756 export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
10757         if(!isWasmInitialized) {
10758                 throw new Error("initializeWasm() must be awaited first!");
10759         }
10760         const nativeResponseValue = wasm.TS_C2Tuple_PaymentHashPaymentSecretZ_free(_res);
10761         // debug statements here
10762 }
10763         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
10764 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o: number): number {
10765         if(!isWasmInitialized) {
10766                 throw new Error("initializeWasm() must be awaited first!");
10767         }
10768         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(o);
10769         return nativeResponseValue;
10770 }
10771         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
10772 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(): number {
10773         if(!isWasmInitialized) {
10774                 throw new Error("initializeWasm() must be awaited first!");
10775         }
10776         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err();
10777         return nativeResponseValue;
10778 }
10779         // bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
10780 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o: number): boolean {
10781         if(!isWasmInitialized) {
10782                 throw new Error("initializeWasm() must be awaited first!");
10783         }
10784         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(o);
10785         return nativeResponseValue;
10786 }
10787         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
10788 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res: number): void {
10789         if(!isWasmInitialized) {
10790                 throw new Error("initializeWasm() must be awaited first!");
10791         }
10792         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(_res);
10793         // debug statements here
10794 }
10795         // uintptr_t CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR arg);
10796 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg: number): number {
10797         if(!isWasmInitialized) {
10798                 throw new Error("initializeWasm() must be awaited first!");
10799         }
10800         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(arg);
10801         return nativeResponseValue;
10802 }
10803         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
10804 export function CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig: number): number {
10805         if(!isWasmInitialized) {
10806                 throw new Error("initializeWasm() must be awaited first!");
10807         }
10808         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(orig);
10809         return nativeResponseValue;
10810 }
10811         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
10812 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o: number): number {
10813         if(!isWasmInitialized) {
10814                 throw new Error("initializeWasm() must be awaited first!");
10815         }
10816         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(o);
10817         return nativeResponseValue;
10818 }
10819         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(struct LDKAPIError e);
10820 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e: number): number {
10821         if(!isWasmInitialized) {
10822                 throw new Error("initializeWasm() must be awaited first!");
10823         }
10824         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(e);
10825         return nativeResponseValue;
10826 }
10827         // bool CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR o);
10828 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o: number): boolean {
10829         if(!isWasmInitialized) {
10830                 throw new Error("initializeWasm() must be awaited first!");
10831         }
10832         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(o);
10833         return nativeResponseValue;
10834 }
10835         // void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ _res);
10836 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res: number): void {
10837         if(!isWasmInitialized) {
10838                 throw new Error("initializeWasm() must be awaited first!");
10839         }
10840         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(_res);
10841         // debug statements here
10842 }
10843         // uintptr_t CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR arg);
10844 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg: number): number {
10845         if(!isWasmInitialized) {
10846                 throw new Error("initializeWasm() must be awaited first!");
10847         }
10848         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(arg);
10849         return nativeResponseValue;
10850 }
10851         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR orig);
10852 export function CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig: number): number {
10853         if(!isWasmInitialized) {
10854                 throw new Error("initializeWasm() must be awaited first!");
10855         }
10856         const nativeResponseValue = wasm.TS_CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(orig);
10857         return nativeResponseValue;
10858 }
10859         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
10860 export function CResult_PaymentSecretNoneZ_ok(o: number): number {
10861         if(!isWasmInitialized) {
10862                 throw new Error("initializeWasm() must be awaited first!");
10863         }
10864         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_ok(o);
10865         return nativeResponseValue;
10866 }
10867         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
10868 export function CResult_PaymentSecretNoneZ_err(): number {
10869         if(!isWasmInitialized) {
10870                 throw new Error("initializeWasm() must be awaited first!");
10871         }
10872         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_err();
10873         return nativeResponseValue;
10874 }
10875         // bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
10876 export function CResult_PaymentSecretNoneZ_is_ok(o: number): boolean {
10877         if(!isWasmInitialized) {
10878                 throw new Error("initializeWasm() must be awaited first!");
10879         }
10880         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_is_ok(o);
10881         return nativeResponseValue;
10882 }
10883         // void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
10884 export function CResult_PaymentSecretNoneZ_free(_res: number): void {
10885         if(!isWasmInitialized) {
10886                 throw new Error("initializeWasm() must be awaited first!");
10887         }
10888         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_free(_res);
10889         // debug statements here
10890 }
10891         // uintptr_t CResult_PaymentSecretNoneZ_clone_ptr(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR arg);
10892 export function CResult_PaymentSecretNoneZ_clone_ptr(arg: number): number {
10893         if(!isWasmInitialized) {
10894                 throw new Error("initializeWasm() must be awaited first!");
10895         }
10896         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone_ptr(arg);
10897         return nativeResponseValue;
10898 }
10899         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
10900 export function CResult_PaymentSecretNoneZ_clone(orig: number): number {
10901         if(!isWasmInitialized) {
10902                 throw new Error("initializeWasm() must be awaited first!");
10903         }
10904         const nativeResponseValue = wasm.TS_CResult_PaymentSecretNoneZ_clone(orig);
10905         return nativeResponseValue;
10906 }
10907         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
10908 export function CResult_PaymentSecretAPIErrorZ_ok(o: number): number {
10909         if(!isWasmInitialized) {
10910                 throw new Error("initializeWasm() must be awaited first!");
10911         }
10912         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_ok(o);
10913         return nativeResponseValue;
10914 }
10915         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
10916 export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
10917         if(!isWasmInitialized) {
10918                 throw new Error("initializeWasm() must be awaited first!");
10919         }
10920         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_err(e);
10921         return nativeResponseValue;
10922 }
10923         // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
10924 export function CResult_PaymentSecretAPIErrorZ_is_ok(o: number): boolean {
10925         if(!isWasmInitialized) {
10926                 throw new Error("initializeWasm() must be awaited first!");
10927         }
10928         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_is_ok(o);
10929         return nativeResponseValue;
10930 }
10931         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
10932 export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
10933         if(!isWasmInitialized) {
10934                 throw new Error("initializeWasm() must be awaited first!");
10935         }
10936         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_free(_res);
10937         // debug statements here
10938 }
10939         // uintptr_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
10940 export function CResult_PaymentSecretAPIErrorZ_clone_ptr(arg: number): number {
10941         if(!isWasmInitialized) {
10942                 throw new Error("initializeWasm() must be awaited first!");
10943         }
10944         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone_ptr(arg);
10945         return nativeResponseValue;
10946 }
10947         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
10948 export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
10949         if(!isWasmInitialized) {
10950                 throw new Error("initializeWasm() must be awaited first!");
10951         }
10952         const nativeResponseValue = wasm.TS_CResult_PaymentSecretAPIErrorZ_clone(orig);
10953         return nativeResponseValue;
10954 }
10955         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
10956 export function CResult_PaymentPreimageAPIErrorZ_ok(o: number): number {
10957         if(!isWasmInitialized) {
10958                 throw new Error("initializeWasm() must be awaited first!");
10959         }
10960         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_ok(o);
10961         return nativeResponseValue;
10962 }
10963         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
10964 export function CResult_PaymentPreimageAPIErrorZ_err(e: number): number {
10965         if(!isWasmInitialized) {
10966                 throw new Error("initializeWasm() must be awaited first!");
10967         }
10968         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_err(e);
10969         return nativeResponseValue;
10970 }
10971         // bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
10972 export function CResult_PaymentPreimageAPIErrorZ_is_ok(o: number): boolean {
10973         if(!isWasmInitialized) {
10974                 throw new Error("initializeWasm() must be awaited first!");
10975         }
10976         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_is_ok(o);
10977         return nativeResponseValue;
10978 }
10979         // void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
10980 export function CResult_PaymentPreimageAPIErrorZ_free(_res: number): void {
10981         if(!isWasmInitialized) {
10982                 throw new Error("initializeWasm() must be awaited first!");
10983         }
10984         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_free(_res);
10985         // debug statements here
10986 }
10987         // uintptr_t CResult_PaymentPreimageAPIErrorZ_clone_ptr(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR arg);
10988 export function CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg: number): number {
10989         if(!isWasmInitialized) {
10990                 throw new Error("initializeWasm() must be awaited first!");
10991         }
10992         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone_ptr(arg);
10993         return nativeResponseValue;
10994 }
10995         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
10996 export function CResult_PaymentPreimageAPIErrorZ_clone(orig: number): number {
10997         if(!isWasmInitialized) {
10998                 throw new Error("initializeWasm() must be awaited first!");
10999         }
11000         const nativeResponseValue = wasm.TS_CResult_PaymentPreimageAPIErrorZ_clone(orig);
11001         return nativeResponseValue;
11002 }
11003         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
11004 export function CVec_ChannelMonitorZ_free(_res: number): void {
11005         if(!isWasmInitialized) {
11006                 throw new Error("initializeWasm() must be awaited first!");
11007         }
11008         const nativeResponseValue = wasm.TS_CVec_ChannelMonitorZ_free(_res);
11009         // debug statements here
11010 }
11011         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
11012 export function C2Tuple_BlockHashChannelManagerZ_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_BlockHashChannelManagerZ_new(a, b);
11017         return nativeResponseValue;
11018 }
11019         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
11020 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
11021         if(!isWasmInitialized) {
11022                 throw new Error("initializeWasm() must be awaited first!");
11023         }
11024         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_free(_res);
11025         // debug statements here
11026 }
11027         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
11028 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
11029         if(!isWasmInitialized) {
11030                 throw new Error("initializeWasm() must be awaited first!");
11031         }
11032         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
11033         return nativeResponseValue;
11034 }
11035         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
11036 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
11037         if(!isWasmInitialized) {
11038                 throw new Error("initializeWasm() must be awaited first!");
11039         }
11040         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
11041         return nativeResponseValue;
11042 }
11043         // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
11044 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o: number): boolean {
11045         if(!isWasmInitialized) {
11046                 throw new Error("initializeWasm() must be awaited first!");
11047         }
11048         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o);
11049         return nativeResponseValue;
11050 }
11051         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
11052 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
11053         if(!isWasmInitialized) {
11054                 throw new Error("initializeWasm() must be awaited first!");
11055         }
11056         const nativeResponseValue = wasm.TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
11057         // debug statements here
11058 }
11059         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
11060 export function PaymentPurpose_free(this_ptr: number): void {
11061         if(!isWasmInitialized) {
11062                 throw new Error("initializeWasm() must be awaited first!");
11063         }
11064         const nativeResponseValue = wasm.TS_PaymentPurpose_free(this_ptr);
11065         // debug statements here
11066 }
11067         // uintptr_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
11068 export function PaymentPurpose_clone_ptr(arg: number): number {
11069         if(!isWasmInitialized) {
11070                 throw new Error("initializeWasm() must be awaited first!");
11071         }
11072         const nativeResponseValue = wasm.TS_PaymentPurpose_clone_ptr(arg);
11073         return nativeResponseValue;
11074 }
11075         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
11076 export function PaymentPurpose_clone(orig: number): number {
11077         if(!isWasmInitialized) {
11078                 throw new Error("initializeWasm() must be awaited first!");
11079         }
11080         const nativeResponseValue = wasm.TS_PaymentPurpose_clone(orig);
11081         return nativeResponseValue;
11082 }
11083         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret);
11084 export function PaymentPurpose_invoice_payment(payment_preimage: number, payment_secret: number): number {
11085         if(!isWasmInitialized) {
11086                 throw new Error("initializeWasm() must be awaited first!");
11087         }
11088         const nativeResponseValue = wasm.TS_PaymentPurpose_invoice_payment(payment_preimage, payment_secret);
11089         return nativeResponseValue;
11090 }
11091         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
11092 export function PaymentPurpose_spontaneous_payment(a: number): number {
11093         if(!isWasmInitialized) {
11094                 throw new Error("initializeWasm() must be awaited first!");
11095         }
11096         const nativeResponseValue = wasm.TS_PaymentPurpose_spontaneous_payment(a);
11097         return nativeResponseValue;
11098 }
11099         // void ClosureReason_free(struct LDKClosureReason this_ptr);
11100 export function ClosureReason_free(this_ptr: number): void {
11101         if(!isWasmInitialized) {
11102                 throw new Error("initializeWasm() must be awaited first!");
11103         }
11104         const nativeResponseValue = wasm.TS_ClosureReason_free(this_ptr);
11105         // debug statements here
11106 }
11107         // uintptr_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
11108 export function ClosureReason_clone_ptr(arg: number): number {
11109         if(!isWasmInitialized) {
11110                 throw new Error("initializeWasm() must be awaited first!");
11111         }
11112         const nativeResponseValue = wasm.TS_ClosureReason_clone_ptr(arg);
11113         return nativeResponseValue;
11114 }
11115         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
11116 export function ClosureReason_clone(orig: number): number {
11117         if(!isWasmInitialized) {
11118                 throw new Error("initializeWasm() must be awaited first!");
11119         }
11120         const nativeResponseValue = wasm.TS_ClosureReason_clone(orig);
11121         return nativeResponseValue;
11122 }
11123         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
11124 export function ClosureReason_counterparty_force_closed(peer_msg: number): number {
11125         if(!isWasmInitialized) {
11126                 throw new Error("initializeWasm() must be awaited first!");
11127         }
11128         const nativeResponseValue = wasm.TS_ClosureReason_counterparty_force_closed(peer_msg);
11129         return nativeResponseValue;
11130 }
11131         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
11132 export function ClosureReason_holder_force_closed(): number {
11133         if(!isWasmInitialized) {
11134                 throw new Error("initializeWasm() must be awaited first!");
11135         }
11136         const nativeResponseValue = wasm.TS_ClosureReason_holder_force_closed();
11137         return nativeResponseValue;
11138 }
11139         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
11140 export function ClosureReason_cooperative_closure(): number {
11141         if(!isWasmInitialized) {
11142                 throw new Error("initializeWasm() must be awaited first!");
11143         }
11144         const nativeResponseValue = wasm.TS_ClosureReason_cooperative_closure();
11145         return nativeResponseValue;
11146 }
11147         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
11148 export function ClosureReason_commitment_tx_confirmed(): number {
11149         if(!isWasmInitialized) {
11150                 throw new Error("initializeWasm() must be awaited first!");
11151         }
11152         const nativeResponseValue = wasm.TS_ClosureReason_commitment_tx_confirmed();
11153         return nativeResponseValue;
11154 }
11155         // struct LDKClosureReason ClosureReason_funding_timed_out(void);
11156 export function ClosureReason_funding_timed_out(): number {
11157         if(!isWasmInitialized) {
11158                 throw new Error("initializeWasm() must be awaited first!");
11159         }
11160         const nativeResponseValue = wasm.TS_ClosureReason_funding_timed_out();
11161         return nativeResponseValue;
11162 }
11163         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
11164 export function ClosureReason_processing_error(err: number): number {
11165         if(!isWasmInitialized) {
11166                 throw new Error("initializeWasm() must be awaited first!");
11167         }
11168         const nativeResponseValue = wasm.TS_ClosureReason_processing_error(err);
11169         return nativeResponseValue;
11170 }
11171         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
11172 export function ClosureReason_disconnected_peer(): number {
11173         if(!isWasmInitialized) {
11174                 throw new Error("initializeWasm() must be awaited first!");
11175         }
11176         const nativeResponseValue = wasm.TS_ClosureReason_disconnected_peer();
11177         return nativeResponseValue;
11178 }
11179         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
11180 export function ClosureReason_outdated_channel_manager(): number {
11181         if(!isWasmInitialized) {
11182                 throw new Error("initializeWasm() must be awaited first!");
11183         }
11184         const nativeResponseValue = wasm.TS_ClosureReason_outdated_channel_manager();
11185         return nativeResponseValue;
11186 }
11187         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
11188 export function ClosureReason_write(obj: number): number {
11189         if(!isWasmInitialized) {
11190                 throw new Error("initializeWasm() must be awaited first!");
11191         }
11192         const nativeResponseValue = wasm.TS_ClosureReason_write(obj);
11193         return nativeResponseValue;
11194 }
11195         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
11196 export function ClosureReason_read(ser: number): number {
11197         if(!isWasmInitialized) {
11198                 throw new Error("initializeWasm() must be awaited first!");
11199         }
11200         const nativeResponseValue = wasm.TS_ClosureReason_read(ser);
11201         return nativeResponseValue;
11202 }
11203         // void Event_free(struct LDKEvent this_ptr);
11204 export function Event_free(this_ptr: number): void {
11205         if(!isWasmInitialized) {
11206                 throw new Error("initializeWasm() must be awaited first!");
11207         }
11208         const nativeResponseValue = wasm.TS_Event_free(this_ptr);
11209         // debug statements here
11210 }
11211         // uintptr_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
11212 export function Event_clone_ptr(arg: number): number {
11213         if(!isWasmInitialized) {
11214                 throw new Error("initializeWasm() must be awaited first!");
11215         }
11216         const nativeResponseValue = wasm.TS_Event_clone_ptr(arg);
11217         return nativeResponseValue;
11218 }
11219         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
11220 export function Event_clone(orig: number): number {
11221         if(!isWasmInitialized) {
11222                 throw new Error("initializeWasm() must be awaited first!");
11223         }
11224         const nativeResponseValue = wasm.TS_Event_clone(orig);
11225         return nativeResponseValue;
11226 }
11227         // 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);
11228 export function Event_funding_generation_ready(temporary_channel_id: number, channel_value_satoshis: bigint, output_script: number, user_channel_id: bigint): number {
11229         if(!isWasmInitialized) {
11230                 throw new Error("initializeWasm() must be awaited first!");
11231         }
11232         const nativeResponseValue = wasm.TS_Event_funding_generation_ready(temporary_channel_id, channel_value_satoshis, output_script, user_channel_id);
11233         return nativeResponseValue;
11234 }
11235         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
11236 export function Event_payment_received(payment_hash: number, amt: bigint, purpose: number): number {
11237         if(!isWasmInitialized) {
11238                 throw new Error("initializeWasm() must be awaited first!");
11239         }
11240         const nativeResponseValue = wasm.TS_Event_payment_received(payment_hash, amt, purpose);
11241         return nativeResponseValue;
11242 }
11243         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
11244 export function Event_payment_sent(payment_id: number, payment_preimage: number, payment_hash: number, fee_paid_msat: number): number {
11245         if(!isWasmInitialized) {
11246                 throw new Error("initializeWasm() must be awaited first!");
11247         }
11248         const nativeResponseValue = wasm.TS_Event_payment_sent(payment_id, payment_preimage, payment_hash, fee_paid_msat);
11249         return nativeResponseValue;
11250 }
11251         // 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);
11252 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 {
11253         if(!isWasmInitialized) {
11254                 throw new Error("initializeWasm() must be awaited first!");
11255         }
11256         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);
11257         return nativeResponseValue;
11258 }
11259         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
11260 export function Event_payment_failed(payment_id: number, payment_hash: number): number {
11261         if(!isWasmInitialized) {
11262                 throw new Error("initializeWasm() must be awaited first!");
11263         }
11264         const nativeResponseValue = wasm.TS_Event_payment_failed(payment_id, payment_hash);
11265         return nativeResponseValue;
11266 }
11267         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
11268 export function Event_pending_htlcs_forwardable(time_forwardable: bigint): number {
11269         if(!isWasmInitialized) {
11270                 throw new Error("initializeWasm() must be awaited first!");
11271         }
11272         const nativeResponseValue = wasm.TS_Event_pending_htlcs_forwardable(time_forwardable);
11273         return nativeResponseValue;
11274 }
11275         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
11276 export function Event_spendable_outputs(outputs: number): number {
11277         if(!isWasmInitialized) {
11278                 throw new Error("initializeWasm() must be awaited first!");
11279         }
11280         const nativeResponseValue = wasm.TS_Event_spendable_outputs(outputs);
11281         return nativeResponseValue;
11282 }
11283         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
11284 export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
11285         if(!isWasmInitialized) {
11286                 throw new Error("initializeWasm() must be awaited first!");
11287         }
11288         const nativeResponseValue = wasm.TS_Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
11289         return nativeResponseValue;
11290 }
11291         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
11292 export function Event_channel_closed(channel_id: number, user_channel_id: bigint, reason: number): number {
11293         if(!isWasmInitialized) {
11294                 throw new Error("initializeWasm() must be awaited first!");
11295         }
11296         const nativeResponseValue = wasm.TS_Event_channel_closed(channel_id, user_channel_id, reason);
11297         return nativeResponseValue;
11298 }
11299         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
11300 export function Event_discard_funding(channel_id: number, transaction: number): number {
11301         if(!isWasmInitialized) {
11302                 throw new Error("initializeWasm() must be awaited first!");
11303         }
11304         const nativeResponseValue = wasm.TS_Event_discard_funding(channel_id, transaction);
11305         return nativeResponseValue;
11306 }
11307         // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
11308 export function Event_payment_path_successful(payment_id: number, payment_hash: number, path: number): number {
11309         if(!isWasmInitialized) {
11310                 throw new Error("initializeWasm() must be awaited first!");
11311         }
11312         const nativeResponseValue = wasm.TS_Event_payment_path_successful(payment_id, payment_hash, path);
11313         return nativeResponseValue;
11314 }
11315         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
11316 export function Event_write(obj: number): number {
11317         if(!isWasmInitialized) {
11318                 throw new Error("initializeWasm() must be awaited first!");
11319         }
11320         const nativeResponseValue = wasm.TS_Event_write(obj);
11321         return nativeResponseValue;
11322 }
11323         // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
11324 export function Event_read(ser: number): number {
11325         if(!isWasmInitialized) {
11326                 throw new Error("initializeWasm() must be awaited first!");
11327         }
11328         const nativeResponseValue = wasm.TS_Event_read(ser);
11329         return nativeResponseValue;
11330 }
11331         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
11332 export function MessageSendEvent_free(this_ptr: number): void {
11333         if(!isWasmInitialized) {
11334                 throw new Error("initializeWasm() must be awaited first!");
11335         }
11336         const nativeResponseValue = wasm.TS_MessageSendEvent_free(this_ptr);
11337         // debug statements here
11338 }
11339         // uintptr_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
11340 export function MessageSendEvent_clone_ptr(arg: number): number {
11341         if(!isWasmInitialized) {
11342                 throw new Error("initializeWasm() must be awaited first!");
11343         }
11344         const nativeResponseValue = wasm.TS_MessageSendEvent_clone_ptr(arg);
11345         return nativeResponseValue;
11346 }
11347         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
11348 export function MessageSendEvent_clone(orig: number): number {
11349         if(!isWasmInitialized) {
11350                 throw new Error("initializeWasm() must be awaited first!");
11351         }
11352         const nativeResponseValue = wasm.TS_MessageSendEvent_clone(orig);
11353         return nativeResponseValue;
11354 }
11355         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
11356 export function MessageSendEvent_send_accept_channel(node_id: number, msg: number): number {
11357         if(!isWasmInitialized) {
11358                 throw new Error("initializeWasm() must be awaited first!");
11359         }
11360         const nativeResponseValue = wasm.TS_MessageSendEvent_send_accept_channel(node_id, msg);
11361         return nativeResponseValue;
11362 }
11363         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
11364 export function MessageSendEvent_send_open_channel(node_id: number, msg: number): number {
11365         if(!isWasmInitialized) {
11366                 throw new Error("initializeWasm() must be awaited first!");
11367         }
11368         const nativeResponseValue = wasm.TS_MessageSendEvent_send_open_channel(node_id, msg);
11369         return nativeResponseValue;
11370 }
11371         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
11372 export function MessageSendEvent_send_funding_created(node_id: number, msg: number): number {
11373         if(!isWasmInitialized) {
11374                 throw new Error("initializeWasm() must be awaited first!");
11375         }
11376         const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_created(node_id, msg);
11377         return nativeResponseValue;
11378 }
11379         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
11380 export function MessageSendEvent_send_funding_signed(node_id: number, msg: number): number {
11381         if(!isWasmInitialized) {
11382                 throw new Error("initializeWasm() must be awaited first!");
11383         }
11384         const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_signed(node_id, msg);
11385         return nativeResponseValue;
11386 }
11387         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
11388 export function MessageSendEvent_send_funding_locked(node_id: number, msg: number): number {
11389         if(!isWasmInitialized) {
11390                 throw new Error("initializeWasm() must be awaited first!");
11391         }
11392         const nativeResponseValue = wasm.TS_MessageSendEvent_send_funding_locked(node_id, msg);
11393         return nativeResponseValue;
11394 }
11395         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
11396 export function MessageSendEvent_send_announcement_signatures(node_id: number, msg: number): number {
11397         if(!isWasmInitialized) {
11398                 throw new Error("initializeWasm() must be awaited first!");
11399         }
11400         const nativeResponseValue = wasm.TS_MessageSendEvent_send_announcement_signatures(node_id, msg);
11401         return nativeResponseValue;
11402 }
11403         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
11404 export function MessageSendEvent_update_htlcs(node_id: number, updates: number): number {
11405         if(!isWasmInitialized) {
11406                 throw new Error("initializeWasm() must be awaited first!");
11407         }
11408         const nativeResponseValue = wasm.TS_MessageSendEvent_update_htlcs(node_id, updates);
11409         return nativeResponseValue;
11410 }
11411         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
11412 export function MessageSendEvent_send_revoke_and_ack(node_id: number, msg: number): number {
11413         if(!isWasmInitialized) {
11414                 throw new Error("initializeWasm() must be awaited first!");
11415         }
11416         const nativeResponseValue = wasm.TS_MessageSendEvent_send_revoke_and_ack(node_id, msg);
11417         return nativeResponseValue;
11418 }
11419         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
11420 export function MessageSendEvent_send_closing_signed(node_id: number, msg: number): number {
11421         if(!isWasmInitialized) {
11422                 throw new Error("initializeWasm() must be awaited first!");
11423         }
11424         const nativeResponseValue = wasm.TS_MessageSendEvent_send_closing_signed(node_id, msg);
11425         return nativeResponseValue;
11426 }
11427         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
11428 export function MessageSendEvent_send_shutdown(node_id: number, msg: number): number {
11429         if(!isWasmInitialized) {
11430                 throw new Error("initializeWasm() must be awaited first!");
11431         }
11432         const nativeResponseValue = wasm.TS_MessageSendEvent_send_shutdown(node_id, msg);
11433         return nativeResponseValue;
11434 }
11435         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
11436 export function MessageSendEvent_send_channel_reestablish(node_id: number, msg: number): number {
11437         if(!isWasmInitialized) {
11438                 throw new Error("initializeWasm() must be awaited first!");
11439         }
11440         const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_reestablish(node_id, msg);
11441         return nativeResponseValue;
11442 }
11443         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
11444 export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
11445         if(!isWasmInitialized) {
11446                 throw new Error("initializeWasm() must be awaited first!");
11447         }
11448         const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
11449         return nativeResponseValue;
11450 }
11451         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
11452 export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
11453         if(!isWasmInitialized) {
11454                 throw new Error("initializeWasm() must be awaited first!");
11455         }
11456         const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_node_announcement(msg);
11457         return nativeResponseValue;
11458 }
11459         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
11460 export function MessageSendEvent_broadcast_channel_update(msg: number): number {
11461         if(!isWasmInitialized) {
11462                 throw new Error("initializeWasm() must be awaited first!");
11463         }
11464         const nativeResponseValue = wasm.TS_MessageSendEvent_broadcast_channel_update(msg);
11465         return nativeResponseValue;
11466 }
11467         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
11468 export function MessageSendEvent_send_channel_update(node_id: number, msg: number): number {
11469         if(!isWasmInitialized) {
11470                 throw new Error("initializeWasm() must be awaited first!");
11471         }
11472         const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_update(node_id, msg);
11473         return nativeResponseValue;
11474 }
11475         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
11476 export function MessageSendEvent_handle_error(node_id: number, action: number): number {
11477         if(!isWasmInitialized) {
11478                 throw new Error("initializeWasm() must be awaited first!");
11479         }
11480         const nativeResponseValue = wasm.TS_MessageSendEvent_handle_error(node_id, action);
11481         return nativeResponseValue;
11482 }
11483         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
11484 export function MessageSendEvent_send_channel_range_query(node_id: number, msg: number): number {
11485         if(!isWasmInitialized) {
11486                 throw new Error("initializeWasm() must be awaited first!");
11487         }
11488         const nativeResponseValue = wasm.TS_MessageSendEvent_send_channel_range_query(node_id, msg);
11489         return nativeResponseValue;
11490 }
11491         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
11492 export function MessageSendEvent_send_short_ids_query(node_id: number, msg: number): number {
11493         if(!isWasmInitialized) {
11494                 throw new Error("initializeWasm() must be awaited first!");
11495         }
11496         const nativeResponseValue = wasm.TS_MessageSendEvent_send_short_ids_query(node_id, msg);
11497         return nativeResponseValue;
11498 }
11499         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
11500 export function MessageSendEvent_send_reply_channel_range(node_id: number, msg: number): number {
11501         if(!isWasmInitialized) {
11502                 throw new Error("initializeWasm() must be awaited first!");
11503         }
11504         const nativeResponseValue = wasm.TS_MessageSendEvent_send_reply_channel_range(node_id, msg);
11505         return nativeResponseValue;
11506 }
11507         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
11508 export function MessageSendEventsProvider_free(this_ptr: number): void {
11509         if(!isWasmInitialized) {
11510                 throw new Error("initializeWasm() must be awaited first!");
11511         }
11512         const nativeResponseValue = wasm.TS_MessageSendEventsProvider_free(this_ptr);
11513         // debug statements here
11514 }
11515         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
11516 export function EventsProvider_free(this_ptr: number): void {
11517         if(!isWasmInitialized) {
11518                 throw new Error("initializeWasm() must be awaited first!");
11519         }
11520         const nativeResponseValue = wasm.TS_EventsProvider_free(this_ptr);
11521         // debug statements here
11522 }
11523         // void EventHandler_free(struct LDKEventHandler this_ptr);
11524 export function EventHandler_free(this_ptr: number): void {
11525         if(!isWasmInitialized) {
11526                 throw new Error("initializeWasm() must be awaited first!");
11527         }
11528         const nativeResponseValue = wasm.TS_EventHandler_free(this_ptr);
11529         // debug statements here
11530 }
11531         // void APIError_free(struct LDKAPIError this_ptr);
11532 export function APIError_free(this_ptr: number): void {
11533         if(!isWasmInitialized) {
11534                 throw new Error("initializeWasm() must be awaited first!");
11535         }
11536         const nativeResponseValue = wasm.TS_APIError_free(this_ptr);
11537         // debug statements here
11538 }
11539         // uintptr_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
11540 export function APIError_clone_ptr(arg: number): number {
11541         if(!isWasmInitialized) {
11542                 throw new Error("initializeWasm() must be awaited first!");
11543         }
11544         const nativeResponseValue = wasm.TS_APIError_clone_ptr(arg);
11545         return nativeResponseValue;
11546 }
11547         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
11548 export function APIError_clone(orig: number): number {
11549         if(!isWasmInitialized) {
11550                 throw new Error("initializeWasm() must be awaited first!");
11551         }
11552         const nativeResponseValue = wasm.TS_APIError_clone(orig);
11553         return nativeResponseValue;
11554 }
11555         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
11556 export function APIError_apimisuse_error(err: number): number {
11557         if(!isWasmInitialized) {
11558                 throw new Error("initializeWasm() must be awaited first!");
11559         }
11560         const nativeResponseValue = wasm.TS_APIError_apimisuse_error(err);
11561         return nativeResponseValue;
11562 }
11563         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
11564 export function APIError_fee_rate_too_high(err: number, feerate: number): number {
11565         if(!isWasmInitialized) {
11566                 throw new Error("initializeWasm() must be awaited first!");
11567         }
11568         const nativeResponseValue = wasm.TS_APIError_fee_rate_too_high(err, feerate);
11569         return nativeResponseValue;
11570 }
11571         // struct LDKAPIError APIError_route_error(struct LDKStr err);
11572 export function APIError_route_error(err: number): number {
11573         if(!isWasmInitialized) {
11574                 throw new Error("initializeWasm() must be awaited first!");
11575         }
11576         const nativeResponseValue = wasm.TS_APIError_route_error(err);
11577         return nativeResponseValue;
11578 }
11579         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
11580 export function APIError_channel_unavailable(err: number): number {
11581         if(!isWasmInitialized) {
11582                 throw new Error("initializeWasm() must be awaited first!");
11583         }
11584         const nativeResponseValue = wasm.TS_APIError_channel_unavailable(err);
11585         return nativeResponseValue;
11586 }
11587         // struct LDKAPIError APIError_monitor_update_failed(void);
11588 export function APIError_monitor_update_failed(): number {
11589         if(!isWasmInitialized) {
11590                 throw new Error("initializeWasm() must be awaited first!");
11591         }
11592         const nativeResponseValue = wasm.TS_APIError_monitor_update_failed();
11593         return nativeResponseValue;
11594 }
11595         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
11596 export function APIError_incompatible_shutdown_script(script: number): number {
11597         if(!isWasmInitialized) {
11598                 throw new Error("initializeWasm() must be awaited first!");
11599         }
11600         const nativeResponseValue = wasm.TS_APIError_incompatible_shutdown_script(script);
11601         return nativeResponseValue;
11602 }
11603         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
11604 export function sign(msg: number, sk: number): number {
11605         if(!isWasmInitialized) {
11606                 throw new Error("initializeWasm() must be awaited first!");
11607         }
11608         const nativeResponseValue = wasm.TS_sign(msg, sk);
11609         return nativeResponseValue;
11610 }
11611         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
11612 export function recover_pk(msg: number, sig: number): number {
11613         if(!isWasmInitialized) {
11614                 throw new Error("initializeWasm() must be awaited first!");
11615         }
11616         const nativeResponseValue = wasm.TS_recover_pk(msg, sig);
11617         return nativeResponseValue;
11618 }
11619         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
11620 export function verify(msg: number, sig: number, pk: number): boolean {
11621         if(!isWasmInitialized) {
11622                 throw new Error("initializeWasm() must be awaited first!");
11623         }
11624         const nativeResponseValue = wasm.TS_verify(msg, sig, pk);
11625         return nativeResponseValue;
11626 }
11627         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
11628 export function Level_clone(orig: number): Level {
11629         if(!isWasmInitialized) {
11630                 throw new Error("initializeWasm() must be awaited first!");
11631         }
11632         const nativeResponseValue = wasm.TS_Level_clone(orig);
11633         return nativeResponseValue;
11634 }
11635         // enum LDKLevel Level_gossip(void);
11636 export function Level_gossip(): Level {
11637         if(!isWasmInitialized) {
11638                 throw new Error("initializeWasm() must be awaited first!");
11639         }
11640         const nativeResponseValue = wasm.TS_Level_gossip();
11641         return nativeResponseValue;
11642 }
11643         // enum LDKLevel Level_trace(void);
11644 export function Level_trace(): Level {
11645         if(!isWasmInitialized) {
11646                 throw new Error("initializeWasm() must be awaited first!");
11647         }
11648         const nativeResponseValue = wasm.TS_Level_trace();
11649         return nativeResponseValue;
11650 }
11651         // enum LDKLevel Level_debug(void);
11652 export function Level_debug(): Level {
11653         if(!isWasmInitialized) {
11654                 throw new Error("initializeWasm() must be awaited first!");
11655         }
11656         const nativeResponseValue = wasm.TS_Level_debug();
11657         return nativeResponseValue;
11658 }
11659         // enum LDKLevel Level_info(void);
11660 export function Level_info(): Level {
11661         if(!isWasmInitialized) {
11662                 throw new Error("initializeWasm() must be awaited first!");
11663         }
11664         const nativeResponseValue = wasm.TS_Level_info();
11665         return nativeResponseValue;
11666 }
11667         // enum LDKLevel Level_warn(void);
11668 export function Level_warn(): Level {
11669         if(!isWasmInitialized) {
11670                 throw new Error("initializeWasm() must be awaited first!");
11671         }
11672         const nativeResponseValue = wasm.TS_Level_warn();
11673         return nativeResponseValue;
11674 }
11675         // enum LDKLevel Level_error(void);
11676 export function Level_error(): Level {
11677         if(!isWasmInitialized) {
11678                 throw new Error("initializeWasm() must be awaited first!");
11679         }
11680         const nativeResponseValue = wasm.TS_Level_error();
11681         return nativeResponseValue;
11682 }
11683         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
11684 export function Level_eq(a: number, b: number): boolean {
11685         if(!isWasmInitialized) {
11686                 throw new Error("initializeWasm() must be awaited first!");
11687         }
11688         const nativeResponseValue = wasm.TS_Level_eq(a, b);
11689         return nativeResponseValue;
11690 }
11691         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
11692 export function Level_hash(o: number): bigint {
11693         if(!isWasmInitialized) {
11694                 throw new Error("initializeWasm() must be awaited first!");
11695         }
11696         const nativeResponseValue = wasm.TS_Level_hash(o);
11697         return nativeResponseValue;
11698 }
11699         // MUST_USE_RES enum LDKLevel Level_max(void);
11700 export function Level_max(): Level {
11701         if(!isWasmInitialized) {
11702                 throw new Error("initializeWasm() must be awaited first!");
11703         }
11704         const nativeResponseValue = wasm.TS_Level_max();
11705         return nativeResponseValue;
11706 }
11707         // void Record_free(struct LDKRecord this_obj);
11708 export function Record_free(this_obj: number): void {
11709         if(!isWasmInitialized) {
11710                 throw new Error("initializeWasm() must be awaited first!");
11711         }
11712         const nativeResponseValue = wasm.TS_Record_free(this_obj);
11713         // debug statements here
11714 }
11715         // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
11716 export function Record_get_level(this_ptr: number): Level {
11717         if(!isWasmInitialized) {
11718                 throw new Error("initializeWasm() must be awaited first!");
11719         }
11720         const nativeResponseValue = wasm.TS_Record_get_level(this_ptr);
11721         return nativeResponseValue;
11722 }
11723         // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
11724 export function Record_set_level(this_ptr: number, val: Level): void {
11725         if(!isWasmInitialized) {
11726                 throw new Error("initializeWasm() must be awaited first!");
11727         }
11728         const nativeResponseValue = wasm.TS_Record_set_level(this_ptr, val);
11729         // debug statements here
11730 }
11731         // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
11732 export function Record_get_args(this_ptr: number): number {
11733         if(!isWasmInitialized) {
11734                 throw new Error("initializeWasm() must be awaited first!");
11735         }
11736         const nativeResponseValue = wasm.TS_Record_get_args(this_ptr);
11737         return nativeResponseValue;
11738 }
11739         // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
11740 export function Record_set_args(this_ptr: number, val: number): void {
11741         if(!isWasmInitialized) {
11742                 throw new Error("initializeWasm() must be awaited first!");
11743         }
11744         const nativeResponseValue = wasm.TS_Record_set_args(this_ptr, val);
11745         // debug statements here
11746 }
11747         // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
11748 export function Record_get_module_path(this_ptr: number): number {
11749         if(!isWasmInitialized) {
11750                 throw new Error("initializeWasm() must be awaited first!");
11751         }
11752         const nativeResponseValue = wasm.TS_Record_get_module_path(this_ptr);
11753         return nativeResponseValue;
11754 }
11755         // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
11756 export function Record_set_module_path(this_ptr: number, val: number): void {
11757         if(!isWasmInitialized) {
11758                 throw new Error("initializeWasm() must be awaited first!");
11759         }
11760         const nativeResponseValue = wasm.TS_Record_set_module_path(this_ptr, val);
11761         // debug statements here
11762 }
11763         // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
11764 export function Record_get_file(this_ptr: number): number {
11765         if(!isWasmInitialized) {
11766                 throw new Error("initializeWasm() must be awaited first!");
11767         }
11768         const nativeResponseValue = wasm.TS_Record_get_file(this_ptr);
11769         return nativeResponseValue;
11770 }
11771         // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
11772 export function Record_set_file(this_ptr: number, val: number): void {
11773         if(!isWasmInitialized) {
11774                 throw new Error("initializeWasm() must be awaited first!");
11775         }
11776         const nativeResponseValue = wasm.TS_Record_set_file(this_ptr, val);
11777         // debug statements here
11778 }
11779         // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
11780 export function Record_get_line(this_ptr: number): number {
11781         if(!isWasmInitialized) {
11782                 throw new Error("initializeWasm() must be awaited first!");
11783         }
11784         const nativeResponseValue = wasm.TS_Record_get_line(this_ptr);
11785         return nativeResponseValue;
11786 }
11787         // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
11788 export function Record_set_line(this_ptr: number, val: number): void {
11789         if(!isWasmInitialized) {
11790                 throw new Error("initializeWasm() must be awaited first!");
11791         }
11792         const nativeResponseValue = wasm.TS_Record_set_line(this_ptr, val);
11793         // debug statements here
11794 }
11795         // uintptr_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
11796 export function Record_clone_ptr(arg: number): number {
11797         if(!isWasmInitialized) {
11798                 throw new Error("initializeWasm() must be awaited first!");
11799         }
11800         const nativeResponseValue = wasm.TS_Record_clone_ptr(arg);
11801         return nativeResponseValue;
11802 }
11803         // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
11804 export function Record_clone(orig: number): number {
11805         if(!isWasmInitialized) {
11806                 throw new Error("initializeWasm() must be awaited first!");
11807         }
11808         const nativeResponseValue = wasm.TS_Record_clone(orig);
11809         return nativeResponseValue;
11810 }
11811         // void Logger_free(struct LDKLogger this_ptr);
11812 export function Logger_free(this_ptr: number): void {
11813         if(!isWasmInitialized) {
11814                 throw new Error("initializeWasm() must be awaited first!");
11815         }
11816         const nativeResponseValue = wasm.TS_Logger_free(this_ptr);
11817         // debug statements here
11818 }
11819         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
11820 export function ChannelHandshakeConfig_free(this_obj: number): void {
11821         if(!isWasmInitialized) {
11822                 throw new Error("initializeWasm() must be awaited first!");
11823         }
11824         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_free(this_obj);
11825         // debug statements here
11826 }
11827         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11828 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
11829         if(!isWasmInitialized) {
11830                 throw new Error("initializeWasm() must be awaited first!");
11831         }
11832         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_minimum_depth(this_ptr);
11833         return nativeResponseValue;
11834 }
11835         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
11836 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
11837         if(!isWasmInitialized) {
11838                 throw new Error("initializeWasm() must be awaited first!");
11839         }
11840         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
11841         // debug statements here
11842 }
11843         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11844 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
11845         if(!isWasmInitialized) {
11846                 throw new Error("initializeWasm() must be awaited first!");
11847         }
11848         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
11849         return nativeResponseValue;
11850 }
11851         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
11852 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
11853         if(!isWasmInitialized) {
11854                 throw new Error("initializeWasm() must be awaited first!");
11855         }
11856         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
11857         // debug statements here
11858 }
11859         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
11860 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): bigint {
11861         if(!isWasmInitialized) {
11862                 throw new Error("initializeWasm() must be awaited first!");
11863         }
11864         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
11865         return nativeResponseValue;
11866 }
11867         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
11868 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: bigint): void {
11869         if(!isWasmInitialized) {
11870                 throw new Error("initializeWasm() must be awaited first!");
11871         }
11872         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
11873         // debug statements here
11874 }
11875         // 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);
11876 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: bigint): number {
11877         if(!isWasmInitialized) {
11878                 throw new Error("initializeWasm() must be awaited first!");
11879         }
11880         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
11881         return nativeResponseValue;
11882 }
11883         // uintptr_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
11884 export function ChannelHandshakeConfig_clone_ptr(arg: number): number {
11885         if(!isWasmInitialized) {
11886                 throw new Error("initializeWasm() must be awaited first!");
11887         }
11888         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone_ptr(arg);
11889         return nativeResponseValue;
11890 }
11891         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
11892 export function ChannelHandshakeConfig_clone(orig: number): number {
11893         if(!isWasmInitialized) {
11894                 throw new Error("initializeWasm() must be awaited first!");
11895         }
11896         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_clone(orig);
11897         return nativeResponseValue;
11898 }
11899         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
11900 export function ChannelHandshakeConfig_default(): number {
11901         if(!isWasmInitialized) {
11902                 throw new Error("initializeWasm() must be awaited first!");
11903         }
11904         const nativeResponseValue = wasm.TS_ChannelHandshakeConfig_default();
11905         return nativeResponseValue;
11906 }
11907         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
11908 export function ChannelHandshakeLimits_free(this_obj: number): void {
11909         if(!isWasmInitialized) {
11910                 throw new Error("initializeWasm() must be awaited first!");
11911         }
11912         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_free(this_obj);
11913         // debug statements here
11914 }
11915         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11916 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): bigint {
11917         if(!isWasmInitialized) {
11918                 throw new Error("initializeWasm() must be awaited first!");
11919         }
11920         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
11921         return nativeResponseValue;
11922 }
11923         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11924 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: bigint): void {
11925         if(!isWasmInitialized) {
11926                 throw new Error("initializeWasm() must be awaited first!");
11927         }
11928         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
11929         // debug statements here
11930 }
11931         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11932 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): bigint {
11933         if(!isWasmInitialized) {
11934                 throw new Error("initializeWasm() must be awaited first!");
11935         }
11936         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
11937         return nativeResponseValue;
11938 }
11939         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11940 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: bigint): void {
11941         if(!isWasmInitialized) {
11942                 throw new Error("initializeWasm() must be awaited first!");
11943         }
11944         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
11945         // debug statements here
11946 }
11947         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11948 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): bigint {
11949         if(!isWasmInitialized) {
11950                 throw new Error("initializeWasm() must be awaited first!");
11951         }
11952         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
11953         return nativeResponseValue;
11954 }
11955         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11956 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: bigint): void {
11957         if(!isWasmInitialized) {
11958                 throw new Error("initializeWasm() must be awaited first!");
11959         }
11960         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
11961         // debug statements here
11962 }
11963         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11964 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): bigint {
11965         if(!isWasmInitialized) {
11966                 throw new Error("initializeWasm() must be awaited first!");
11967         }
11968         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
11969         return nativeResponseValue;
11970 }
11971         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
11972 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: bigint): void {
11973         if(!isWasmInitialized) {
11974                 throw new Error("initializeWasm() must be awaited first!");
11975         }
11976         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
11977         // debug statements here
11978 }
11979         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11980 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
11981         if(!isWasmInitialized) {
11982                 throw new Error("initializeWasm() must be awaited first!");
11983         }
11984         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
11985         return nativeResponseValue;
11986 }
11987         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
11988 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
11989         if(!isWasmInitialized) {
11990                 throw new Error("initializeWasm() must be awaited first!");
11991         }
11992         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
11993         // debug statements here
11994 }
11995         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
11996 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
11997         if(!isWasmInitialized) {
11998                 throw new Error("initializeWasm() must be awaited first!");
11999         }
12000         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
12001         return nativeResponseValue;
12002 }
12003         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
12004 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
12005         if(!isWasmInitialized) {
12006                 throw new Error("initializeWasm() must be awaited first!");
12007         }
12008         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
12009         // debug statements here
12010 }
12011         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
12012 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
12013         if(!isWasmInitialized) {
12014                 throw new Error("initializeWasm() must be awaited first!");
12015         }
12016         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
12017         return nativeResponseValue;
12018 }
12019         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
12020 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
12021         if(!isWasmInitialized) {
12022                 throw new Error("initializeWasm() must be awaited first!");
12023         }
12024         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
12025         // debug statements here
12026 }
12027         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
12028 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
12029         if(!isWasmInitialized) {
12030                 throw new Error("initializeWasm() must be awaited first!");
12031         }
12032         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
12033         return nativeResponseValue;
12034 }
12035         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
12036 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
12037         if(!isWasmInitialized) {
12038                 throw new Error("initializeWasm() must be awaited first!");
12039         }
12040         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
12041         // debug statements here
12042 }
12043         // 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);
12044 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 {
12045         if(!isWasmInitialized) {
12046                 throw new Error("initializeWasm() must be awaited first!");
12047         }
12048         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);
12049         return nativeResponseValue;
12050 }
12051         // uintptr_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
12052 export function ChannelHandshakeLimits_clone_ptr(arg: number): number {
12053         if(!isWasmInitialized) {
12054                 throw new Error("initializeWasm() must be awaited first!");
12055         }
12056         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone_ptr(arg);
12057         return nativeResponseValue;
12058 }
12059         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
12060 export function ChannelHandshakeLimits_clone(orig: number): number {
12061         if(!isWasmInitialized) {
12062                 throw new Error("initializeWasm() must be awaited first!");
12063         }
12064         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_clone(orig);
12065         return nativeResponseValue;
12066 }
12067         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
12068 export function ChannelHandshakeLimits_default(): number {
12069         if(!isWasmInitialized) {
12070                 throw new Error("initializeWasm() must be awaited first!");
12071         }
12072         const nativeResponseValue = wasm.TS_ChannelHandshakeLimits_default();
12073         return nativeResponseValue;
12074 }
12075         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
12076 export function ChannelConfig_free(this_obj: number): void {
12077         if(!isWasmInitialized) {
12078                 throw new Error("initializeWasm() must be awaited first!");
12079         }
12080         const nativeResponseValue = wasm.TS_ChannelConfig_free(this_obj);
12081         // debug statements here
12082 }
12083         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12084 export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
12085         if(!isWasmInitialized) {
12086                 throw new Error("initializeWasm() must be awaited first!");
12087         }
12088         const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
12089         return nativeResponseValue;
12090 }
12091         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
12092 export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
12093         if(!isWasmInitialized) {
12094                 throw new Error("initializeWasm() must be awaited first!");
12095         }
12096         const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
12097         // debug statements here
12098 }
12099         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12100 export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
12101         if(!isWasmInitialized) {
12102                 throw new Error("initializeWasm() must be awaited first!");
12103         }
12104         const nativeResponseValue = wasm.TS_ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
12105         return nativeResponseValue;
12106 }
12107         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
12108 export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
12109         if(!isWasmInitialized) {
12110                 throw new Error("initializeWasm() must be awaited first!");
12111         }
12112         const nativeResponseValue = wasm.TS_ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
12113         // debug statements here
12114 }
12115         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12116 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
12117         if(!isWasmInitialized) {
12118                 throw new Error("initializeWasm() must be awaited first!");
12119         }
12120         const nativeResponseValue = wasm.TS_ChannelConfig_get_cltv_expiry_delta(this_ptr);
12121         return nativeResponseValue;
12122 }
12123         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
12124 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12125         if(!isWasmInitialized) {
12126                 throw new Error("initializeWasm() must be awaited first!");
12127         }
12128         const nativeResponseValue = wasm.TS_ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
12129         // debug statements here
12130 }
12131         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12132 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
12133         if(!isWasmInitialized) {
12134                 throw new Error("initializeWasm() must be awaited first!");
12135         }
12136         const nativeResponseValue = wasm.TS_ChannelConfig_get_announced_channel(this_ptr);
12137         return nativeResponseValue;
12138 }
12139         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
12140 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
12141         if(!isWasmInitialized) {
12142                 throw new Error("initializeWasm() must be awaited first!");
12143         }
12144         const nativeResponseValue = wasm.TS_ChannelConfig_set_announced_channel(this_ptr, val);
12145         // debug statements here
12146 }
12147         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12148 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
12149         if(!isWasmInitialized) {
12150                 throw new Error("initializeWasm() must be awaited first!");
12151         }
12152         const nativeResponseValue = wasm.TS_ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
12153         return nativeResponseValue;
12154 }
12155         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
12156 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
12157         if(!isWasmInitialized) {
12158                 throw new Error("initializeWasm() must be awaited first!");
12159         }
12160         const nativeResponseValue = wasm.TS_ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
12161         // debug statements here
12162 }
12163         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12164 export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): bigint {
12165         if(!isWasmInitialized) {
12166                 throw new Error("initializeWasm() must be awaited first!");
12167         }
12168         const nativeResponseValue = wasm.TS_ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
12169         return nativeResponseValue;
12170 }
12171         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
12172 export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: bigint): void {
12173         if(!isWasmInitialized) {
12174                 throw new Error("initializeWasm() must be awaited first!");
12175         }
12176         const nativeResponseValue = wasm.TS_ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
12177         // debug statements here
12178 }
12179         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
12180 export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): bigint {
12181         if(!isWasmInitialized) {
12182                 throw new Error("initializeWasm() must be awaited first!");
12183         }
12184         const nativeResponseValue = wasm.TS_ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
12185         return nativeResponseValue;
12186 }
12187         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
12188 export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: bigint): void {
12189         if(!isWasmInitialized) {
12190                 throw new Error("initializeWasm() must be awaited first!");
12191         }
12192         const nativeResponseValue = wasm.TS_ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
12193         // debug statements here
12194 }
12195         // 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);
12196 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 {
12197         if(!isWasmInitialized) {
12198                 throw new Error("initializeWasm() must be awaited first!");
12199         }
12200         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);
12201         return nativeResponseValue;
12202 }
12203         // uintptr_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
12204 export function ChannelConfig_clone_ptr(arg: number): number {
12205         if(!isWasmInitialized) {
12206                 throw new Error("initializeWasm() must be awaited first!");
12207         }
12208         const nativeResponseValue = wasm.TS_ChannelConfig_clone_ptr(arg);
12209         return nativeResponseValue;
12210 }
12211         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
12212 export function ChannelConfig_clone(orig: number): number {
12213         if(!isWasmInitialized) {
12214                 throw new Error("initializeWasm() must be awaited first!");
12215         }
12216         const nativeResponseValue = wasm.TS_ChannelConfig_clone(orig);
12217         return nativeResponseValue;
12218 }
12219         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
12220 export function ChannelConfig_default(): number {
12221         if(!isWasmInitialized) {
12222                 throw new Error("initializeWasm() must be awaited first!");
12223         }
12224         const nativeResponseValue = wasm.TS_ChannelConfig_default();
12225         return nativeResponseValue;
12226 }
12227         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
12228 export function ChannelConfig_write(obj: number): number {
12229         if(!isWasmInitialized) {
12230                 throw new Error("initializeWasm() must be awaited first!");
12231         }
12232         const nativeResponseValue = wasm.TS_ChannelConfig_write(obj);
12233         return nativeResponseValue;
12234 }
12235         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
12236 export function ChannelConfig_read(ser: number): number {
12237         if(!isWasmInitialized) {
12238                 throw new Error("initializeWasm() must be awaited first!");
12239         }
12240         const nativeResponseValue = wasm.TS_ChannelConfig_read(ser);
12241         return nativeResponseValue;
12242 }
12243         // void UserConfig_free(struct LDKUserConfig this_obj);
12244 export function UserConfig_free(this_obj: number): void {
12245         if(!isWasmInitialized) {
12246                 throw new Error("initializeWasm() must be awaited first!");
12247         }
12248         const nativeResponseValue = wasm.TS_UserConfig_free(this_obj);
12249         // debug statements here
12250 }
12251         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
12252 export function UserConfig_get_own_channel_config(this_ptr: number): number {
12253         if(!isWasmInitialized) {
12254                 throw new Error("initializeWasm() must be awaited first!");
12255         }
12256         const nativeResponseValue = wasm.TS_UserConfig_get_own_channel_config(this_ptr);
12257         return nativeResponseValue;
12258 }
12259         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
12260 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
12261         if(!isWasmInitialized) {
12262                 throw new Error("initializeWasm() must be awaited first!");
12263         }
12264         const nativeResponseValue = wasm.TS_UserConfig_set_own_channel_config(this_ptr, val);
12265         // debug statements here
12266 }
12267         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
12268 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
12269         if(!isWasmInitialized) {
12270                 throw new Error("initializeWasm() must be awaited first!");
12271         }
12272         const nativeResponseValue = wasm.TS_UserConfig_get_peer_channel_config_limits(this_ptr);
12273         return nativeResponseValue;
12274 }
12275         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
12276 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
12277         if(!isWasmInitialized) {
12278                 throw new Error("initializeWasm() must be awaited first!");
12279         }
12280         const nativeResponseValue = wasm.TS_UserConfig_set_peer_channel_config_limits(this_ptr, val);
12281         // debug statements here
12282 }
12283         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
12284 export function UserConfig_get_channel_options(this_ptr: number): number {
12285         if(!isWasmInitialized) {
12286                 throw new Error("initializeWasm() must be awaited first!");
12287         }
12288         const nativeResponseValue = wasm.TS_UserConfig_get_channel_options(this_ptr);
12289         return nativeResponseValue;
12290 }
12291         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
12292 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
12293         if(!isWasmInitialized) {
12294                 throw new Error("initializeWasm() must be awaited first!");
12295         }
12296         const nativeResponseValue = wasm.TS_UserConfig_set_channel_options(this_ptr, val);
12297         // debug statements here
12298 }
12299         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
12300 export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
12301         if(!isWasmInitialized) {
12302                 throw new Error("initializeWasm() must be awaited first!");
12303         }
12304         const nativeResponseValue = wasm.TS_UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
12305         return nativeResponseValue;
12306 }
12307         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
12308 export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
12309         if(!isWasmInitialized) {
12310                 throw new Error("initializeWasm() must be awaited first!");
12311         }
12312         const nativeResponseValue = wasm.TS_UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
12313         // debug statements here
12314 }
12315         // bool UserConfig_get_accept_inbound_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
12316 export function UserConfig_get_accept_inbound_channels(this_ptr: number): boolean {
12317         if(!isWasmInitialized) {
12318                 throw new Error("initializeWasm() must be awaited first!");
12319         }
12320         const nativeResponseValue = wasm.TS_UserConfig_get_accept_inbound_channels(this_ptr);
12321         return nativeResponseValue;
12322 }
12323         // void UserConfig_set_accept_inbound_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
12324 export function UserConfig_set_accept_inbound_channels(this_ptr: number, val: boolean): void {
12325         if(!isWasmInitialized) {
12326                 throw new Error("initializeWasm() must be awaited first!");
12327         }
12328         const nativeResponseValue = wasm.TS_UserConfig_set_accept_inbound_channels(this_ptr, val);
12329         // debug statements here
12330 }
12331         // 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);
12332 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 {
12333         if(!isWasmInitialized) {
12334                 throw new Error("initializeWasm() must be awaited first!");
12335         }
12336         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);
12337         return nativeResponseValue;
12338 }
12339         // uintptr_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
12340 export function UserConfig_clone_ptr(arg: number): number {
12341         if(!isWasmInitialized) {
12342                 throw new Error("initializeWasm() must be awaited first!");
12343         }
12344         const nativeResponseValue = wasm.TS_UserConfig_clone_ptr(arg);
12345         return nativeResponseValue;
12346 }
12347         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
12348 export function UserConfig_clone(orig: number): number {
12349         if(!isWasmInitialized) {
12350                 throw new Error("initializeWasm() must be awaited first!");
12351         }
12352         const nativeResponseValue = wasm.TS_UserConfig_clone(orig);
12353         return nativeResponseValue;
12354 }
12355         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
12356 export function UserConfig_default(): number {
12357         if(!isWasmInitialized) {
12358                 throw new Error("initializeWasm() must be awaited first!");
12359         }
12360         const nativeResponseValue = wasm.TS_UserConfig_default();
12361         return nativeResponseValue;
12362 }
12363         // void BestBlock_free(struct LDKBestBlock this_obj);
12364 export function BestBlock_free(this_obj: number): void {
12365         if(!isWasmInitialized) {
12366                 throw new Error("initializeWasm() must be awaited first!");
12367         }
12368         const nativeResponseValue = wasm.TS_BestBlock_free(this_obj);
12369         // debug statements here
12370 }
12371         // uintptr_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
12372 export function BestBlock_clone_ptr(arg: number): number {
12373         if(!isWasmInitialized) {
12374                 throw new Error("initializeWasm() must be awaited first!");
12375         }
12376         const nativeResponseValue = wasm.TS_BestBlock_clone_ptr(arg);
12377         return nativeResponseValue;
12378 }
12379         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
12380 export function BestBlock_clone(orig: number): number {
12381         if(!isWasmInitialized) {
12382                 throw new Error("initializeWasm() must be awaited first!");
12383         }
12384         const nativeResponseValue = wasm.TS_BestBlock_clone(orig);
12385         return nativeResponseValue;
12386 }
12387         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
12388 export function BestBlock_from_genesis(network: Network): number {
12389         if(!isWasmInitialized) {
12390                 throw new Error("initializeWasm() must be awaited first!");
12391         }
12392         const nativeResponseValue = wasm.TS_BestBlock_from_genesis(network);
12393         return nativeResponseValue;
12394 }
12395         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
12396 export function BestBlock_new(block_hash: number, height: number): number {
12397         if(!isWasmInitialized) {
12398                 throw new Error("initializeWasm() must be awaited first!");
12399         }
12400         const nativeResponseValue = wasm.TS_BestBlock_new(block_hash, height);
12401         return nativeResponseValue;
12402 }
12403         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
12404 export function BestBlock_block_hash(this_arg: number): number {
12405         if(!isWasmInitialized) {
12406                 throw new Error("initializeWasm() must be awaited first!");
12407         }
12408         const nativeResponseValue = wasm.TS_BestBlock_block_hash(this_arg);
12409         return nativeResponseValue;
12410 }
12411         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
12412 export function BestBlock_height(this_arg: number): number {
12413         if(!isWasmInitialized) {
12414                 throw new Error("initializeWasm() must be awaited first!");
12415         }
12416         const nativeResponseValue = wasm.TS_BestBlock_height(this_arg);
12417         return nativeResponseValue;
12418 }
12419         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
12420 export function AccessError_clone(orig: number): AccessError {
12421         if(!isWasmInitialized) {
12422                 throw new Error("initializeWasm() must be awaited first!");
12423         }
12424         const nativeResponseValue = wasm.TS_AccessError_clone(orig);
12425         return nativeResponseValue;
12426 }
12427         // enum LDKAccessError AccessError_unknown_chain(void);
12428 export function AccessError_unknown_chain(): AccessError {
12429         if(!isWasmInitialized) {
12430                 throw new Error("initializeWasm() must be awaited first!");
12431         }
12432         const nativeResponseValue = wasm.TS_AccessError_unknown_chain();
12433         return nativeResponseValue;
12434 }
12435         // enum LDKAccessError AccessError_unknown_tx(void);
12436 export function AccessError_unknown_tx(): AccessError {
12437         if(!isWasmInitialized) {
12438                 throw new Error("initializeWasm() must be awaited first!");
12439         }
12440         const nativeResponseValue = wasm.TS_AccessError_unknown_tx();
12441         return nativeResponseValue;
12442 }
12443         // void Access_free(struct LDKAccess this_ptr);
12444 export function Access_free(this_ptr: number): void {
12445         if(!isWasmInitialized) {
12446                 throw new Error("initializeWasm() must be awaited first!");
12447         }
12448         const nativeResponseValue = wasm.TS_Access_free(this_ptr);
12449         // debug statements here
12450 }
12451         // void Listen_free(struct LDKListen this_ptr);
12452 export function Listen_free(this_ptr: number): void {
12453         if(!isWasmInitialized) {
12454                 throw new Error("initializeWasm() must be awaited first!");
12455         }
12456         const nativeResponseValue = wasm.TS_Listen_free(this_ptr);
12457         // debug statements here
12458 }
12459         // void Confirm_free(struct LDKConfirm this_ptr);
12460 export function Confirm_free(this_ptr: number): void {
12461         if(!isWasmInitialized) {
12462                 throw new Error("initializeWasm() must be awaited first!");
12463         }
12464         const nativeResponseValue = wasm.TS_Confirm_free(this_ptr);
12465         // debug statements here
12466 }
12467         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
12468 export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
12469         if(!isWasmInitialized) {
12470                 throw new Error("initializeWasm() must be awaited first!");
12471         }
12472         const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_clone(orig);
12473         return nativeResponseValue;
12474 }
12475         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
12476 export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
12477         if(!isWasmInitialized) {
12478                 throw new Error("initializeWasm() must be awaited first!");
12479         }
12480         const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_temporary_failure();
12481         return nativeResponseValue;
12482 }
12483         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
12484 export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
12485         if(!isWasmInitialized) {
12486                 throw new Error("initializeWasm() must be awaited first!");
12487         }
12488         const nativeResponseValue = wasm.TS_ChannelMonitorUpdateErr_permanent_failure();
12489         return nativeResponseValue;
12490 }
12491         // void Watch_free(struct LDKWatch this_ptr);
12492 export function Watch_free(this_ptr: number): void {
12493         if(!isWasmInitialized) {
12494                 throw new Error("initializeWasm() must be awaited first!");
12495         }
12496         const nativeResponseValue = wasm.TS_Watch_free(this_ptr);
12497         // debug statements here
12498 }
12499         // void Filter_free(struct LDKFilter this_ptr);
12500 export function Filter_free(this_ptr: number): void {
12501         if(!isWasmInitialized) {
12502                 throw new Error("initializeWasm() must be awaited first!");
12503         }
12504         const nativeResponseValue = wasm.TS_Filter_free(this_ptr);
12505         // debug statements here
12506 }
12507         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
12508 export function WatchedOutput_free(this_obj: number): void {
12509         if(!isWasmInitialized) {
12510                 throw new Error("initializeWasm() must be awaited first!");
12511         }
12512         const nativeResponseValue = wasm.TS_WatchedOutput_free(this_obj);
12513         // debug statements here
12514 }
12515         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
12516 export function WatchedOutput_get_block_hash(this_ptr: number): number {
12517         if(!isWasmInitialized) {
12518                 throw new Error("initializeWasm() must be awaited first!");
12519         }
12520         const nativeResponseValue = wasm.TS_WatchedOutput_get_block_hash(this_ptr);
12521         return nativeResponseValue;
12522 }
12523         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12524 export function WatchedOutput_set_block_hash(this_ptr: number, val: number): void {
12525         if(!isWasmInitialized) {
12526                 throw new Error("initializeWasm() must be awaited first!");
12527         }
12528         const nativeResponseValue = wasm.TS_WatchedOutput_set_block_hash(this_ptr, val);
12529         // debug statements here
12530 }
12531         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
12532 export function WatchedOutput_get_outpoint(this_ptr: number): number {
12533         if(!isWasmInitialized) {
12534                 throw new Error("initializeWasm() must be awaited first!");
12535         }
12536         const nativeResponseValue = wasm.TS_WatchedOutput_get_outpoint(this_ptr);
12537         return nativeResponseValue;
12538 }
12539         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12540 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
12541         if(!isWasmInitialized) {
12542                 throw new Error("initializeWasm() must be awaited first!");
12543         }
12544         const nativeResponseValue = wasm.TS_WatchedOutput_set_outpoint(this_ptr, val);
12545         // debug statements here
12546 }
12547         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
12548 export function WatchedOutput_get_script_pubkey(this_ptr: number): number {
12549         if(!isWasmInitialized) {
12550                 throw new Error("initializeWasm() must be awaited first!");
12551         }
12552         const nativeResponseValue = wasm.TS_WatchedOutput_get_script_pubkey(this_ptr);
12553         return nativeResponseValue;
12554 }
12555         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
12556 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: number): void {
12557         if(!isWasmInitialized) {
12558                 throw new Error("initializeWasm() must be awaited first!");
12559         }
12560         const nativeResponseValue = wasm.TS_WatchedOutput_set_script_pubkey(this_ptr, val);
12561         // debug statements here
12562 }
12563         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
12564 export function WatchedOutput_new(block_hash_arg: number, outpoint_arg: number, script_pubkey_arg: number): number {
12565         if(!isWasmInitialized) {
12566                 throw new Error("initializeWasm() must be awaited first!");
12567         }
12568         const nativeResponseValue = wasm.TS_WatchedOutput_new(block_hash_arg, outpoint_arg, script_pubkey_arg);
12569         return nativeResponseValue;
12570 }
12571         // uintptr_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
12572 export function WatchedOutput_clone_ptr(arg: number): number {
12573         if(!isWasmInitialized) {
12574                 throw new Error("initializeWasm() must be awaited first!");
12575         }
12576         const nativeResponseValue = wasm.TS_WatchedOutput_clone_ptr(arg);
12577         return nativeResponseValue;
12578 }
12579         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
12580 export function WatchedOutput_clone(orig: number): number {
12581         if(!isWasmInitialized) {
12582                 throw new Error("initializeWasm() must be awaited first!");
12583         }
12584         const nativeResponseValue = wasm.TS_WatchedOutput_clone(orig);
12585         return nativeResponseValue;
12586 }
12587         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
12588 export function WatchedOutput_hash(o: number): bigint {
12589         if(!isWasmInitialized) {
12590                 throw new Error("initializeWasm() must be awaited first!");
12591         }
12592         const nativeResponseValue = wasm.TS_WatchedOutput_hash(o);
12593         return nativeResponseValue;
12594 }
12595         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
12596 export function BroadcasterInterface_free(this_ptr: number): void {
12597         if(!isWasmInitialized) {
12598                 throw new Error("initializeWasm() must be awaited first!");
12599         }
12600         const nativeResponseValue = wasm.TS_BroadcasterInterface_free(this_ptr);
12601         // debug statements here
12602 }
12603         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
12604 export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
12605         if(!isWasmInitialized) {
12606                 throw new Error("initializeWasm() must be awaited first!");
12607         }
12608         const nativeResponseValue = wasm.TS_ConfirmationTarget_clone(orig);
12609         return nativeResponseValue;
12610 }
12611         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
12612 export function ConfirmationTarget_background(): ConfirmationTarget {
12613         if(!isWasmInitialized) {
12614                 throw new Error("initializeWasm() must be awaited first!");
12615         }
12616         const nativeResponseValue = wasm.TS_ConfirmationTarget_background();
12617         return nativeResponseValue;
12618 }
12619         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
12620 export function ConfirmationTarget_normal(): ConfirmationTarget {
12621         if(!isWasmInitialized) {
12622                 throw new Error("initializeWasm() must be awaited first!");
12623         }
12624         const nativeResponseValue = wasm.TS_ConfirmationTarget_normal();
12625         return nativeResponseValue;
12626 }
12627         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
12628 export function ConfirmationTarget_high_priority(): ConfirmationTarget {
12629         if(!isWasmInitialized) {
12630                 throw new Error("initializeWasm() must be awaited first!");
12631         }
12632         const nativeResponseValue = wasm.TS_ConfirmationTarget_high_priority();
12633         return nativeResponseValue;
12634 }
12635         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
12636 export function ConfirmationTarget_eq(a: number, b: number): boolean {
12637         if(!isWasmInitialized) {
12638                 throw new Error("initializeWasm() must be awaited first!");
12639         }
12640         const nativeResponseValue = wasm.TS_ConfirmationTarget_eq(a, b);
12641         return nativeResponseValue;
12642 }
12643         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
12644 export function FeeEstimator_free(this_ptr: number): void {
12645         if(!isWasmInitialized) {
12646                 throw new Error("initializeWasm() must be awaited first!");
12647         }
12648         const nativeResponseValue = wasm.TS_FeeEstimator_free(this_ptr);
12649         // debug statements here
12650 }
12651         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
12652 export function MonitorUpdateId_free(this_obj: number): void {
12653         if(!isWasmInitialized) {
12654                 throw new Error("initializeWasm() must be awaited first!");
12655         }
12656         const nativeResponseValue = wasm.TS_MonitorUpdateId_free(this_obj);
12657         // debug statements here
12658 }
12659         // uintptr_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
12660 export function MonitorUpdateId_clone_ptr(arg: number): number {
12661         if(!isWasmInitialized) {
12662                 throw new Error("initializeWasm() must be awaited first!");
12663         }
12664         const nativeResponseValue = wasm.TS_MonitorUpdateId_clone_ptr(arg);
12665         return nativeResponseValue;
12666 }
12667         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
12668 export function MonitorUpdateId_clone(orig: number): number {
12669         if(!isWasmInitialized) {
12670                 throw new Error("initializeWasm() must be awaited first!");
12671         }
12672         const nativeResponseValue = wasm.TS_MonitorUpdateId_clone(orig);
12673         return nativeResponseValue;
12674 }
12675         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
12676 export function MonitorUpdateId_hash(o: number): bigint {
12677         if(!isWasmInitialized) {
12678                 throw new Error("initializeWasm() must be awaited first!");
12679         }
12680         const nativeResponseValue = wasm.TS_MonitorUpdateId_hash(o);
12681         return nativeResponseValue;
12682 }
12683         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
12684 export function MonitorUpdateId_eq(a: number, b: number): boolean {
12685         if(!isWasmInitialized) {
12686                 throw new Error("initializeWasm() must be awaited first!");
12687         }
12688         const nativeResponseValue = wasm.TS_MonitorUpdateId_eq(a, b);
12689         return nativeResponseValue;
12690 }
12691         // void Persist_free(struct LDKPersist this_ptr);
12692 export function Persist_free(this_ptr: number): void {
12693         if(!isWasmInitialized) {
12694                 throw new Error("initializeWasm() must be awaited first!");
12695         }
12696         const nativeResponseValue = wasm.TS_Persist_free(this_ptr);
12697         // debug statements here
12698 }
12699         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
12700 export function LockedChannelMonitor_free(this_obj: number): void {
12701         if(!isWasmInitialized) {
12702                 throw new Error("initializeWasm() must be awaited first!");
12703         }
12704         const nativeResponseValue = wasm.TS_LockedChannelMonitor_free(this_obj);
12705         // debug statements here
12706 }
12707         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
12708 export function ChainMonitor_free(this_obj: number): void {
12709         if(!isWasmInitialized) {
12710                 throw new Error("initializeWasm() must be awaited first!");
12711         }
12712         const nativeResponseValue = wasm.TS_ChainMonitor_free(this_obj);
12713         // debug statements here
12714 }
12715         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
12716 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
12717         if(!isWasmInitialized) {
12718                 throw new Error("initializeWasm() must be awaited first!");
12719         }
12720         const nativeResponseValue = wasm.TS_ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
12721         return nativeResponseValue;
12722 }
12723         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
12724 export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number): number {
12725         if(!isWasmInitialized) {
12726                 throw new Error("initializeWasm() must be awaited first!");
12727         }
12728         const nativeResponseValue = wasm.TS_ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
12729         return nativeResponseValue;
12730 }
12731         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
12732 export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
12733         if(!isWasmInitialized) {
12734                 throw new Error("initializeWasm() must be awaited first!");
12735         }
12736         const nativeResponseValue = wasm.TS_ChainMonitor_get_monitor(this_arg, funding_txo);
12737         return nativeResponseValue;
12738 }
12739         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
12740 export function ChainMonitor_list_monitors(this_arg: number): number {
12741         if(!isWasmInitialized) {
12742                 throw new Error("initializeWasm() must be awaited first!");
12743         }
12744         const nativeResponseValue = wasm.TS_ChainMonitor_list_monitors(this_arg);
12745         return nativeResponseValue;
12746 }
12747         // 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);
12748 export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
12749         if(!isWasmInitialized) {
12750                 throw new Error("initializeWasm() must be awaited first!");
12751         }
12752         const nativeResponseValue = wasm.TS_ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
12753         return nativeResponseValue;
12754 }
12755         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
12756 export function ChainMonitor_as_Listen(this_arg: number): number {
12757         if(!isWasmInitialized) {
12758                 throw new Error("initializeWasm() must be awaited first!");
12759         }
12760         const nativeResponseValue = wasm.TS_ChainMonitor_as_Listen(this_arg);
12761         return nativeResponseValue;
12762 }
12763         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
12764 export function ChainMonitor_as_Confirm(this_arg: number): number {
12765         if(!isWasmInitialized) {
12766                 throw new Error("initializeWasm() must be awaited first!");
12767         }
12768         const nativeResponseValue = wasm.TS_ChainMonitor_as_Confirm(this_arg);
12769         return nativeResponseValue;
12770 }
12771         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
12772 export function ChainMonitor_as_Watch(this_arg: number): number {
12773         if(!isWasmInitialized) {
12774                 throw new Error("initializeWasm() must be awaited first!");
12775         }
12776         const nativeResponseValue = wasm.TS_ChainMonitor_as_Watch(this_arg);
12777         return nativeResponseValue;
12778 }
12779         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
12780 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
12781         if(!isWasmInitialized) {
12782                 throw new Error("initializeWasm() must be awaited first!");
12783         }
12784         const nativeResponseValue = wasm.TS_ChainMonitor_as_EventsProvider(this_arg);
12785         return nativeResponseValue;
12786 }
12787         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
12788 export function ChannelMonitorUpdate_free(this_obj: number): void {
12789         if(!isWasmInitialized) {
12790                 throw new Error("initializeWasm() must be awaited first!");
12791         }
12792         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_free(this_obj);
12793         // debug statements here
12794 }
12795         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
12796 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): bigint {
12797         if(!isWasmInitialized) {
12798                 throw new Error("initializeWasm() must be awaited first!");
12799         }
12800         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_get_update_id(this_ptr);
12801         return nativeResponseValue;
12802 }
12803         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
12804 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: bigint): void {
12805         if(!isWasmInitialized) {
12806                 throw new Error("initializeWasm() must be awaited first!");
12807         }
12808         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_set_update_id(this_ptr, val);
12809         // debug statements here
12810 }
12811         // uintptr_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
12812 export function ChannelMonitorUpdate_clone_ptr(arg: number): number {
12813         if(!isWasmInitialized) {
12814                 throw new Error("initializeWasm() must be awaited first!");
12815         }
12816         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone_ptr(arg);
12817         return nativeResponseValue;
12818 }
12819         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
12820 export function ChannelMonitorUpdate_clone(orig: number): number {
12821         if(!isWasmInitialized) {
12822                 throw new Error("initializeWasm() must be awaited first!");
12823         }
12824         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_clone(orig);
12825         return nativeResponseValue;
12826 }
12827         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
12828 export function ChannelMonitorUpdate_write(obj: number): number {
12829         if(!isWasmInitialized) {
12830                 throw new Error("initializeWasm() must be awaited first!");
12831         }
12832         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_write(obj);
12833         return nativeResponseValue;
12834 }
12835         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
12836 export function ChannelMonitorUpdate_read(ser: number): number {
12837         if(!isWasmInitialized) {
12838                 throw new Error("initializeWasm() must be awaited first!");
12839         }
12840         const nativeResponseValue = wasm.TS_ChannelMonitorUpdate_read(ser);
12841         return nativeResponseValue;
12842 }
12843         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
12844 export function MonitorEvent_free(this_ptr: number): void {
12845         if(!isWasmInitialized) {
12846                 throw new Error("initializeWasm() must be awaited first!");
12847         }
12848         const nativeResponseValue = wasm.TS_MonitorEvent_free(this_ptr);
12849         // debug statements here
12850 }
12851         // uintptr_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
12852 export function MonitorEvent_clone_ptr(arg: number): number {
12853         if(!isWasmInitialized) {
12854                 throw new Error("initializeWasm() must be awaited first!");
12855         }
12856         const nativeResponseValue = wasm.TS_MonitorEvent_clone_ptr(arg);
12857         return nativeResponseValue;
12858 }
12859         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
12860 export function MonitorEvent_clone(orig: number): number {
12861         if(!isWasmInitialized) {
12862                 throw new Error("initializeWasm() must be awaited first!");
12863         }
12864         const nativeResponseValue = wasm.TS_MonitorEvent_clone(orig);
12865         return nativeResponseValue;
12866 }
12867         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
12868 export function MonitorEvent_htlcevent(a: number): number {
12869         if(!isWasmInitialized) {
12870                 throw new Error("initializeWasm() must be awaited first!");
12871         }
12872         const nativeResponseValue = wasm.TS_MonitorEvent_htlcevent(a);
12873         return nativeResponseValue;
12874 }
12875         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
12876 export function MonitorEvent_commitment_tx_confirmed(a: number): number {
12877         if(!isWasmInitialized) {
12878                 throw new Error("initializeWasm() must be awaited first!");
12879         }
12880         const nativeResponseValue = wasm.TS_MonitorEvent_commitment_tx_confirmed(a);
12881         return nativeResponseValue;
12882 }
12883         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
12884 export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: bigint): number {
12885         if(!isWasmInitialized) {
12886                 throw new Error("initializeWasm() must be awaited first!");
12887         }
12888         const nativeResponseValue = wasm.TS_MonitorEvent_update_completed(funding_txo, monitor_update_id);
12889         return nativeResponseValue;
12890 }
12891         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
12892 export function MonitorEvent_update_failed(a: number): number {
12893         if(!isWasmInitialized) {
12894                 throw new Error("initializeWasm() must be awaited first!");
12895         }
12896         const nativeResponseValue = wasm.TS_MonitorEvent_update_failed(a);
12897         return nativeResponseValue;
12898 }
12899         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
12900 export function MonitorEvent_write(obj: number): number {
12901         if(!isWasmInitialized) {
12902                 throw new Error("initializeWasm() must be awaited first!");
12903         }
12904         const nativeResponseValue = wasm.TS_MonitorEvent_write(obj);
12905         return nativeResponseValue;
12906 }
12907         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
12908 export function MonitorEvent_read(ser: number): number {
12909         if(!isWasmInitialized) {
12910                 throw new Error("initializeWasm() must be awaited first!");
12911         }
12912         const nativeResponseValue = wasm.TS_MonitorEvent_read(ser);
12913         return nativeResponseValue;
12914 }
12915         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
12916 export function HTLCUpdate_free(this_obj: number): void {
12917         if(!isWasmInitialized) {
12918                 throw new Error("initializeWasm() must be awaited first!");
12919         }
12920         const nativeResponseValue = wasm.TS_HTLCUpdate_free(this_obj);
12921         // debug statements here
12922 }
12923         // uintptr_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
12924 export function HTLCUpdate_clone_ptr(arg: number): number {
12925         if(!isWasmInitialized) {
12926                 throw new Error("initializeWasm() must be awaited first!");
12927         }
12928         const nativeResponseValue = wasm.TS_HTLCUpdate_clone_ptr(arg);
12929         return nativeResponseValue;
12930 }
12931         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
12932 export function HTLCUpdate_clone(orig: number): number {
12933         if(!isWasmInitialized) {
12934                 throw new Error("initializeWasm() must be awaited first!");
12935         }
12936         const nativeResponseValue = wasm.TS_HTLCUpdate_clone(orig);
12937         return nativeResponseValue;
12938 }
12939         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
12940 export function HTLCUpdate_write(obj: number): number {
12941         if(!isWasmInitialized) {
12942                 throw new Error("initializeWasm() must be awaited first!");
12943         }
12944         const nativeResponseValue = wasm.TS_HTLCUpdate_write(obj);
12945         return nativeResponseValue;
12946 }
12947         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
12948 export function HTLCUpdate_read(ser: number): number {
12949         if(!isWasmInitialized) {
12950                 throw new Error("initializeWasm() must be awaited first!");
12951         }
12952         const nativeResponseValue = wasm.TS_HTLCUpdate_read(ser);
12953         return nativeResponseValue;
12954 }
12955         // void Balance_free(struct LDKBalance this_ptr);
12956 export function Balance_free(this_ptr: number): void {
12957         if(!isWasmInitialized) {
12958                 throw new Error("initializeWasm() must be awaited first!");
12959         }
12960         const nativeResponseValue = wasm.TS_Balance_free(this_ptr);
12961         // debug statements here
12962 }
12963         // uintptr_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
12964 export function Balance_clone_ptr(arg: number): number {
12965         if(!isWasmInitialized) {
12966                 throw new Error("initializeWasm() must be awaited first!");
12967         }
12968         const nativeResponseValue = wasm.TS_Balance_clone_ptr(arg);
12969         return nativeResponseValue;
12970 }
12971         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
12972 export function Balance_clone(orig: number): number {
12973         if(!isWasmInitialized) {
12974                 throw new Error("initializeWasm() must be awaited first!");
12975         }
12976         const nativeResponseValue = wasm.TS_Balance_clone(orig);
12977         return nativeResponseValue;
12978 }
12979         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
12980 export function Balance_claimable_on_channel_close(claimable_amount_satoshis: bigint): number {
12981         if(!isWasmInitialized) {
12982                 throw new Error("initializeWasm() must be awaited first!");
12983         }
12984         const nativeResponseValue = wasm.TS_Balance_claimable_on_channel_close(claimable_amount_satoshis);
12985         return nativeResponseValue;
12986 }
12987         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
12988 export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: bigint, confirmation_height: number): number {
12989         if(!isWasmInitialized) {
12990                 throw new Error("initializeWasm() must be awaited first!");
12991         }
12992         const nativeResponseValue = wasm.TS_Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
12993         return nativeResponseValue;
12994 }
12995         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
12996 export function Balance_contentious_claimable(claimable_amount_satoshis: bigint, timeout_height: number): number {
12997         if(!isWasmInitialized) {
12998                 throw new Error("initializeWasm() must be awaited first!");
12999         }
13000         const nativeResponseValue = wasm.TS_Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
13001         return nativeResponseValue;
13002 }
13003         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
13004 export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: bigint, claimable_height: number): number {
13005         if(!isWasmInitialized) {
13006                 throw new Error("initializeWasm() must be awaited first!");
13007         }
13008         const nativeResponseValue = wasm.TS_Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
13009         return nativeResponseValue;
13010 }
13011         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
13012 export function Balance_eq(a: number, b: number): boolean {
13013         if(!isWasmInitialized) {
13014                 throw new Error("initializeWasm() must be awaited first!");
13015         }
13016         const nativeResponseValue = wasm.TS_Balance_eq(a, b);
13017         return nativeResponseValue;
13018 }
13019         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
13020 export function ChannelMonitor_free(this_obj: number): void {
13021         if(!isWasmInitialized) {
13022                 throw new Error("initializeWasm() must be awaited first!");
13023         }
13024         const nativeResponseValue = wasm.TS_ChannelMonitor_free(this_obj);
13025         // debug statements here
13026 }
13027         // uintptr_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
13028 export function ChannelMonitor_clone_ptr(arg: number): number {
13029         if(!isWasmInitialized) {
13030                 throw new Error("initializeWasm() must be awaited first!");
13031         }
13032         const nativeResponseValue = wasm.TS_ChannelMonitor_clone_ptr(arg);
13033         return nativeResponseValue;
13034 }
13035         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
13036 export function ChannelMonitor_clone(orig: number): number {
13037         if(!isWasmInitialized) {
13038                 throw new Error("initializeWasm() must be awaited first!");
13039         }
13040         const nativeResponseValue = wasm.TS_ChannelMonitor_clone(orig);
13041         return nativeResponseValue;
13042 }
13043         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
13044 export function ChannelMonitor_write(obj: number): number {
13045         if(!isWasmInitialized) {
13046                 throw new Error("initializeWasm() must be awaited first!");
13047         }
13048         const nativeResponseValue = wasm.TS_ChannelMonitor_write(obj);
13049         return nativeResponseValue;
13050 }
13051         // 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);
13052 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
13053         if(!isWasmInitialized) {
13054                 throw new Error("initializeWasm() must be awaited first!");
13055         }
13056         const nativeResponseValue = wasm.TS_ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
13057         return nativeResponseValue;
13058 }
13059         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13060 export function ChannelMonitor_get_latest_update_id(this_arg: number): bigint {
13061         if(!isWasmInitialized) {
13062                 throw new Error("initializeWasm() must be awaited first!");
13063         }
13064         const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_update_id(this_arg);
13065         return nativeResponseValue;
13066 }
13067         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13068 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
13069         if(!isWasmInitialized) {
13070                 throw new Error("initializeWasm() must be awaited first!");
13071         }
13072         const nativeResponseValue = wasm.TS_ChannelMonitor_get_funding_txo(this_arg);
13073         return nativeResponseValue;
13074 }
13075         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13076 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number {
13077         if(!isWasmInitialized) {
13078                 throw new Error("initializeWasm() must be awaited first!");
13079         }
13080         const nativeResponseValue = wasm.TS_ChannelMonitor_get_outputs_to_watch(this_arg);
13081         return nativeResponseValue;
13082 }
13083         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
13084 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
13085         if(!isWasmInitialized) {
13086                 throw new Error("initializeWasm() must be awaited first!");
13087         }
13088         const nativeResponseValue = wasm.TS_ChannelMonitor_load_outputs_to_watch(this_arg, filter);
13089         // debug statements here
13090 }
13091         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13092 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number {
13093         if(!isWasmInitialized) {
13094                 throw new Error("initializeWasm() must be awaited first!");
13095         }
13096         const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
13097         return nativeResponseValue;
13098 }
13099         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13100 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number {
13101         if(!isWasmInitialized) {
13102                 throw new Error("initializeWasm() must be awaited first!");
13103         }
13104         const nativeResponseValue = wasm.TS_ChannelMonitor_get_and_clear_pending_events(this_arg);
13105         return nativeResponseValue;
13106 }
13107         // 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);
13108 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): number {
13109         if(!isWasmInitialized) {
13110                 throw new Error("initializeWasm() must be awaited first!");
13111         }
13112         const nativeResponseValue = wasm.TS_ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
13113         return nativeResponseValue;
13114 }
13115         // 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);
13116 export function ChannelMonitor_block_connected(this_arg: number, header: number, txdata: number, height: number, broadcaster: number, fee_estimator: number, logger: number): number {
13117         if(!isWasmInitialized) {
13118                 throw new Error("initializeWasm() must be awaited first!");
13119         }
13120         const nativeResponseValue = wasm.TS_ChannelMonitor_block_connected(this_arg, header, txdata, height, broadcaster, fee_estimator, logger);
13121         return nativeResponseValue;
13122 }
13123         // 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);
13124 export function ChannelMonitor_block_disconnected(this_arg: number, header: number, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
13125         if(!isWasmInitialized) {
13126                 throw new Error("initializeWasm() must be awaited first!");
13127         }
13128         const nativeResponseValue = wasm.TS_ChannelMonitor_block_disconnected(this_arg, header, height, broadcaster, fee_estimator, logger);
13129         // debug statements here
13130 }
13131         // 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);
13132 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: number, txdata: number, height: number, broadcaster: number, fee_estimator: number, logger: number): number {
13133         if(!isWasmInitialized) {
13134                 throw new Error("initializeWasm() must be awaited first!");
13135         }
13136         const nativeResponseValue = wasm.TS_ChannelMonitor_transactions_confirmed(this_arg, header, txdata, height, broadcaster, fee_estimator, logger);
13137         return nativeResponseValue;
13138 }
13139         // 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);
13140 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: number, broadcaster: number, fee_estimator: number, logger: number): void {
13141         if(!isWasmInitialized) {
13142                 throw new Error("initializeWasm() must be awaited first!");
13143         }
13144         const nativeResponseValue = wasm.TS_ChannelMonitor_transaction_unconfirmed(this_arg, txid, broadcaster, fee_estimator, logger);
13145         // debug statements here
13146 }
13147         // 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);
13148 export function ChannelMonitor_best_block_updated(this_arg: number, header: number, height: number, broadcaster: number, fee_estimator: number, logger: number): number {
13149         if(!isWasmInitialized) {
13150                 throw new Error("initializeWasm() must be awaited first!");
13151         }
13152         const nativeResponseValue = wasm.TS_ChannelMonitor_best_block_updated(this_arg, header, height, broadcaster, fee_estimator, logger);
13153         return nativeResponseValue;
13154 }
13155         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13156 export function ChannelMonitor_get_relevant_txids(this_arg: number): number {
13157         if(!isWasmInitialized) {
13158                 throw new Error("initializeWasm() must be awaited first!");
13159         }
13160         const nativeResponseValue = wasm.TS_ChannelMonitor_get_relevant_txids(this_arg);
13161         return nativeResponseValue;
13162 }
13163         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13164 export function ChannelMonitor_current_best_block(this_arg: number): number {
13165         if(!isWasmInitialized) {
13166                 throw new Error("initializeWasm() must be awaited first!");
13167         }
13168         const nativeResponseValue = wasm.TS_ChannelMonitor_current_best_block(this_arg);
13169         return nativeResponseValue;
13170 }
13171         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
13172 export function ChannelMonitor_get_claimable_balances(this_arg: number): number {
13173         if(!isWasmInitialized) {
13174                 throw new Error("initializeWasm() must be awaited first!");
13175         }
13176         const nativeResponseValue = wasm.TS_ChannelMonitor_get_claimable_balances(this_arg);
13177         return nativeResponseValue;
13178 }
13179         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
13180 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: number, arg: number): number {
13181         if(!isWasmInitialized) {
13182                 throw new Error("initializeWasm() must be awaited first!");
13183         }
13184         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelMonitorZ_read(ser, arg);
13185         return nativeResponseValue;
13186 }
13187         // void OutPoint_free(struct LDKOutPoint this_obj);
13188 export function OutPoint_free(this_obj: number): void {
13189         if(!isWasmInitialized) {
13190                 throw new Error("initializeWasm() must be awaited first!");
13191         }
13192         const nativeResponseValue = wasm.TS_OutPoint_free(this_obj);
13193         // debug statements here
13194 }
13195         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
13196 export function OutPoint_get_txid(this_ptr: number): number {
13197         if(!isWasmInitialized) {
13198                 throw new Error("initializeWasm() must be awaited first!");
13199         }
13200         const nativeResponseValue = wasm.TS_OutPoint_get_txid(this_ptr);
13201         return nativeResponseValue;
13202 }
13203         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13204 export function OutPoint_set_txid(this_ptr: number, val: number): void {
13205         if(!isWasmInitialized) {
13206                 throw new Error("initializeWasm() must be awaited first!");
13207         }
13208         const nativeResponseValue = wasm.TS_OutPoint_set_txid(this_ptr, val);
13209         // debug statements here
13210 }
13211         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
13212 export function OutPoint_get_index(this_ptr: number): number {
13213         if(!isWasmInitialized) {
13214                 throw new Error("initializeWasm() must be awaited first!");
13215         }
13216         const nativeResponseValue = wasm.TS_OutPoint_get_index(this_ptr);
13217         return nativeResponseValue;
13218 }
13219         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
13220 export function OutPoint_set_index(this_ptr: number, val: number): void {
13221         if(!isWasmInitialized) {
13222                 throw new Error("initializeWasm() must be awaited first!");
13223         }
13224         const nativeResponseValue = wasm.TS_OutPoint_set_index(this_ptr, val);
13225         // debug statements here
13226 }
13227         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
13228 export function OutPoint_new(txid_arg: number, index_arg: number): number {
13229         if(!isWasmInitialized) {
13230                 throw new Error("initializeWasm() must be awaited first!");
13231         }
13232         const nativeResponseValue = wasm.TS_OutPoint_new(txid_arg, index_arg);
13233         return nativeResponseValue;
13234 }
13235         // uintptr_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
13236 export function OutPoint_clone_ptr(arg: number): number {
13237         if(!isWasmInitialized) {
13238                 throw new Error("initializeWasm() must be awaited first!");
13239         }
13240         const nativeResponseValue = wasm.TS_OutPoint_clone_ptr(arg);
13241         return nativeResponseValue;
13242 }
13243         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
13244 export function OutPoint_clone(orig: number): number {
13245         if(!isWasmInitialized) {
13246                 throw new Error("initializeWasm() must be awaited first!");
13247         }
13248         const nativeResponseValue = wasm.TS_OutPoint_clone(orig);
13249         return nativeResponseValue;
13250 }
13251         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
13252 export function OutPoint_eq(a: number, b: number): boolean {
13253         if(!isWasmInitialized) {
13254                 throw new Error("initializeWasm() must be awaited first!");
13255         }
13256         const nativeResponseValue = wasm.TS_OutPoint_eq(a, b);
13257         return nativeResponseValue;
13258 }
13259         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
13260 export function OutPoint_hash(o: number): bigint {
13261         if(!isWasmInitialized) {
13262                 throw new Error("initializeWasm() must be awaited first!");
13263         }
13264         const nativeResponseValue = wasm.TS_OutPoint_hash(o);
13265         return nativeResponseValue;
13266 }
13267         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
13268 export function OutPoint_to_channel_id(this_arg: number): number {
13269         if(!isWasmInitialized) {
13270                 throw new Error("initializeWasm() must be awaited first!");
13271         }
13272         const nativeResponseValue = wasm.TS_OutPoint_to_channel_id(this_arg);
13273         return nativeResponseValue;
13274 }
13275         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
13276 export function OutPoint_write(obj: number): number {
13277         if(!isWasmInitialized) {
13278                 throw new Error("initializeWasm() must be awaited first!");
13279         }
13280         const nativeResponseValue = wasm.TS_OutPoint_write(obj);
13281         return nativeResponseValue;
13282 }
13283         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
13284 export function OutPoint_read(ser: number): number {
13285         if(!isWasmInitialized) {
13286                 throw new Error("initializeWasm() must be awaited first!");
13287         }
13288         const nativeResponseValue = wasm.TS_OutPoint_read(ser);
13289         return nativeResponseValue;
13290 }
13291         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
13292 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
13293         if(!isWasmInitialized) {
13294                 throw new Error("initializeWasm() must be awaited first!");
13295         }
13296         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_free(this_obj);
13297         // debug statements here
13298 }
13299         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13300 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
13301         if(!isWasmInitialized) {
13302                 throw new Error("initializeWasm() must be awaited first!");
13303         }
13304         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
13305         return nativeResponseValue;
13306 }
13307         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13308 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
13309         if(!isWasmInitialized) {
13310                 throw new Error("initializeWasm() must be awaited first!");
13311         }
13312         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
13313         // debug statements here
13314 }
13315         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13316 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): number {
13317         if(!isWasmInitialized) {
13318                 throw new Error("initializeWasm() must be awaited first!");
13319         }
13320         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
13321         return nativeResponseValue;
13322 }
13323         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13324 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: number): void {
13325         if(!isWasmInitialized) {
13326                 throw new Error("initializeWasm() must be awaited first!");
13327         }
13328         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, val);
13329         // debug statements here
13330 }
13331         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13332 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
13333         if(!isWasmInitialized) {
13334                 throw new Error("initializeWasm() must be awaited first!");
13335         }
13336         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
13337         return nativeResponseValue;
13338 }
13339         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
13340 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
13341         if(!isWasmInitialized) {
13342                 throw new Error("initializeWasm() must be awaited first!");
13343         }
13344         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
13345         // debug statements here
13346 }
13347         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
13348 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
13349         if(!isWasmInitialized) {
13350                 throw new Error("initializeWasm() must be awaited first!");
13351         }
13352         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
13353         // debug statements here
13354 }
13355         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13356 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): number {
13357         if(!isWasmInitialized) {
13358                 throw new Error("initializeWasm() must be awaited first!");
13359         }
13360         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
13361         return nativeResponseValue;
13362 }
13363         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13364 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: number): void {
13365         if(!isWasmInitialized) {
13366                 throw new Error("initializeWasm() must be awaited first!");
13367         }
13368         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, val);
13369         // debug statements here
13370 }
13371         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
13372 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): number {
13373         if(!isWasmInitialized) {
13374                 throw new Error("initializeWasm() must be awaited first!");
13375         }
13376         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
13377         return nativeResponseValue;
13378 }
13379         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13380 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: number): void {
13381         if(!isWasmInitialized) {
13382                 throw new Error("initializeWasm() must be awaited first!");
13383         }
13384         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, val);
13385         // debug statements here
13386 }
13387         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13388 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): bigint {
13389         if(!isWasmInitialized) {
13390                 throw new Error("initializeWasm() must be awaited first!");
13391         }
13392         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
13393         return nativeResponseValue;
13394 }
13395         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
13396 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: bigint): void {
13397         if(!isWasmInitialized) {
13398                 throw new Error("initializeWasm() must be awaited first!");
13399         }
13400         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
13401         // debug statements here
13402 }
13403         // 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);
13404 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 {
13405         if(!isWasmInitialized) {
13406                 throw new Error("initializeWasm() must be awaited first!");
13407         }
13408         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);
13409         return nativeResponseValue;
13410 }
13411         // uintptr_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
13412 export function DelayedPaymentOutputDescriptor_clone_ptr(arg: number): number {
13413         if(!isWasmInitialized) {
13414                 throw new Error("initializeWasm() must be awaited first!");
13415         }
13416         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone_ptr(arg);
13417         return nativeResponseValue;
13418 }
13419         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
13420 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
13421         if(!isWasmInitialized) {
13422                 throw new Error("initializeWasm() must be awaited first!");
13423         }
13424         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_clone(orig);
13425         return nativeResponseValue;
13426 }
13427         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
13428 export function DelayedPaymentOutputDescriptor_write(obj: number): number {
13429         if(!isWasmInitialized) {
13430                 throw new Error("initializeWasm() must be awaited first!");
13431         }
13432         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_write(obj);
13433         return nativeResponseValue;
13434 }
13435         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
13436 export function DelayedPaymentOutputDescriptor_read(ser: number): number {
13437         if(!isWasmInitialized) {
13438                 throw new Error("initializeWasm() must be awaited first!");
13439         }
13440         const nativeResponseValue = wasm.TS_DelayedPaymentOutputDescriptor_read(ser);
13441         return nativeResponseValue;
13442 }
13443         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
13444 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
13445         if(!isWasmInitialized) {
13446                 throw new Error("initializeWasm() must be awaited first!");
13447         }
13448         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_free(this_obj);
13449         // debug statements here
13450 }
13451         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13452 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
13453         if(!isWasmInitialized) {
13454                 throw new Error("initializeWasm() must be awaited first!");
13455         }
13456         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
13457         return nativeResponseValue;
13458 }
13459         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13460 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
13461         if(!isWasmInitialized) {
13462                 throw new Error("initializeWasm() must be awaited first!");
13463         }
13464         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
13465         // debug statements here
13466 }
13467         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
13468 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
13469         if(!isWasmInitialized) {
13470                 throw new Error("initializeWasm() must be awaited first!");
13471         }
13472         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_output(this_ptr, val);
13473         // debug statements here
13474 }
13475         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
13476 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): number {
13477         if(!isWasmInitialized) {
13478                 throw new Error("initializeWasm() must be awaited first!");
13479         }
13480         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
13481         return nativeResponseValue;
13482 }
13483         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13484 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: number): void {
13485         if(!isWasmInitialized) {
13486                 throw new Error("initializeWasm() must be awaited first!");
13487         }
13488         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, val);
13489         // debug statements here
13490 }
13491         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
13492 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): bigint {
13493         if(!isWasmInitialized) {
13494                 throw new Error("initializeWasm() must be awaited first!");
13495         }
13496         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
13497         return nativeResponseValue;
13498 }
13499         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
13500 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: bigint): void {
13501         if(!isWasmInitialized) {
13502                 throw new Error("initializeWasm() must be awaited first!");
13503         }
13504         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
13505         // debug statements here
13506 }
13507         // 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);
13508 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: number, channel_value_satoshis_arg: bigint): number {
13509         if(!isWasmInitialized) {
13510                 throw new Error("initializeWasm() must be awaited first!");
13511         }
13512         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, channel_keys_id_arg, channel_value_satoshis_arg);
13513         return nativeResponseValue;
13514 }
13515         // uintptr_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
13516 export function StaticPaymentOutputDescriptor_clone_ptr(arg: number): number {
13517         if(!isWasmInitialized) {
13518                 throw new Error("initializeWasm() must be awaited first!");
13519         }
13520         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone_ptr(arg);
13521         return nativeResponseValue;
13522 }
13523         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
13524 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
13525         if(!isWasmInitialized) {
13526                 throw new Error("initializeWasm() must be awaited first!");
13527         }
13528         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_clone(orig);
13529         return nativeResponseValue;
13530 }
13531         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
13532 export function StaticPaymentOutputDescriptor_write(obj: number): number {
13533         if(!isWasmInitialized) {
13534                 throw new Error("initializeWasm() must be awaited first!");
13535         }
13536         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_write(obj);
13537         return nativeResponseValue;
13538 }
13539         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
13540 export function StaticPaymentOutputDescriptor_read(ser: number): number {
13541         if(!isWasmInitialized) {
13542                 throw new Error("initializeWasm() must be awaited first!");
13543         }
13544         const nativeResponseValue = wasm.TS_StaticPaymentOutputDescriptor_read(ser);
13545         return nativeResponseValue;
13546 }
13547         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
13548 export function SpendableOutputDescriptor_free(this_ptr: number): void {
13549         if(!isWasmInitialized) {
13550                 throw new Error("initializeWasm() must be awaited first!");
13551         }
13552         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_free(this_ptr);
13553         // debug statements here
13554 }
13555         // uintptr_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
13556 export function SpendableOutputDescriptor_clone_ptr(arg: number): number {
13557         if(!isWasmInitialized) {
13558                 throw new Error("initializeWasm() must be awaited first!");
13559         }
13560         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone_ptr(arg);
13561         return nativeResponseValue;
13562 }
13563         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
13564 export function SpendableOutputDescriptor_clone(orig: number): number {
13565         if(!isWasmInitialized) {
13566                 throw new Error("initializeWasm() must be awaited first!");
13567         }
13568         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_clone(orig);
13569         return nativeResponseValue;
13570 }
13571         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
13572 export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
13573         if(!isWasmInitialized) {
13574                 throw new Error("initializeWasm() must be awaited first!");
13575         }
13576         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_output(outpoint, output);
13577         return nativeResponseValue;
13578 }
13579         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
13580 export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
13581         if(!isWasmInitialized) {
13582                 throw new Error("initializeWasm() must be awaited first!");
13583         }
13584         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_delayed_payment_output(a);
13585         return nativeResponseValue;
13586 }
13587         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
13588 export function SpendableOutputDescriptor_static_payment_output(a: number): number {
13589         if(!isWasmInitialized) {
13590                 throw new Error("initializeWasm() must be awaited first!");
13591         }
13592         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_static_payment_output(a);
13593         return nativeResponseValue;
13594 }
13595         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
13596 export function SpendableOutputDescriptor_write(obj: number): number {
13597         if(!isWasmInitialized) {
13598                 throw new Error("initializeWasm() must be awaited first!");
13599         }
13600         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_write(obj);
13601         return nativeResponseValue;
13602 }
13603         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
13604 export function SpendableOutputDescriptor_read(ser: number): number {
13605         if(!isWasmInitialized) {
13606                 throw new Error("initializeWasm() must be awaited first!");
13607         }
13608         const nativeResponseValue = wasm.TS_SpendableOutputDescriptor_read(ser);
13609         return nativeResponseValue;
13610 }
13611         // void BaseSign_free(struct LDKBaseSign this_ptr);
13612 export function BaseSign_free(this_ptr: number): void {
13613         if(!isWasmInitialized) {
13614                 throw new Error("initializeWasm() must be awaited first!");
13615         }
13616         const nativeResponseValue = wasm.TS_BaseSign_free(this_ptr);
13617         // debug statements here
13618 }
13619         // uintptr_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
13620 export function Sign_clone_ptr(arg: number): number {
13621         if(!isWasmInitialized) {
13622                 throw new Error("initializeWasm() must be awaited first!");
13623         }
13624         const nativeResponseValue = wasm.TS_Sign_clone_ptr(arg);
13625         return nativeResponseValue;
13626 }
13627         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
13628 export function Sign_clone(orig: number): number {
13629         if(!isWasmInitialized) {
13630                 throw new Error("initializeWasm() must be awaited first!");
13631         }
13632         const nativeResponseValue = wasm.TS_Sign_clone(orig);
13633         return nativeResponseValue;
13634 }
13635         // void Sign_free(struct LDKSign this_ptr);
13636 export function Sign_free(this_ptr: number): void {
13637         if(!isWasmInitialized) {
13638                 throw new Error("initializeWasm() must be awaited first!");
13639         }
13640         const nativeResponseValue = wasm.TS_Sign_free(this_ptr);
13641         // debug statements here
13642 }
13643         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
13644 export function KeysInterface_free(this_ptr: number): void {
13645         if(!isWasmInitialized) {
13646                 throw new Error("initializeWasm() must be awaited first!");
13647         }
13648         const nativeResponseValue = wasm.TS_KeysInterface_free(this_ptr);
13649         // debug statements here
13650 }
13651         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
13652 export function InMemorySigner_free(this_obj: number): void {
13653         if(!isWasmInitialized) {
13654                 throw new Error("initializeWasm() must be awaited first!");
13655         }
13656         const nativeResponseValue = wasm.TS_InMemorySigner_free(this_obj);
13657         // debug statements here
13658 }
13659         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
13660 export function InMemorySigner_get_funding_key(this_ptr: number): number {
13661         if(!isWasmInitialized) {
13662                 throw new Error("initializeWasm() must be awaited first!");
13663         }
13664         const nativeResponseValue = wasm.TS_InMemorySigner_get_funding_key(this_ptr);
13665         return nativeResponseValue;
13666 }
13667         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
13668 export function InMemorySigner_set_funding_key(this_ptr: number, val: number): void {
13669         if(!isWasmInitialized) {
13670                 throw new Error("initializeWasm() must be awaited first!");
13671         }
13672         const nativeResponseValue = wasm.TS_InMemorySigner_set_funding_key(this_ptr, val);
13673         // debug statements here
13674 }
13675         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
13676 export function InMemorySigner_get_revocation_base_key(this_ptr: number): number {
13677         if(!isWasmInitialized) {
13678                 throw new Error("initializeWasm() must be awaited first!");
13679         }
13680         const nativeResponseValue = wasm.TS_InMemorySigner_get_revocation_base_key(this_ptr);
13681         return nativeResponseValue;
13682 }
13683         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
13684 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: number): void {
13685         if(!isWasmInitialized) {
13686                 throw new Error("initializeWasm() must be awaited first!");
13687         }
13688         const nativeResponseValue = wasm.TS_InMemorySigner_set_revocation_base_key(this_ptr, val);
13689         // debug statements here
13690 }
13691         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
13692 export function InMemorySigner_get_payment_key(this_ptr: number): number {
13693         if(!isWasmInitialized) {
13694                 throw new Error("initializeWasm() must be awaited first!");
13695         }
13696         const nativeResponseValue = wasm.TS_InMemorySigner_get_payment_key(this_ptr);
13697         return nativeResponseValue;
13698 }
13699         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
13700 export function InMemorySigner_set_payment_key(this_ptr: number, val: number): void {
13701         if(!isWasmInitialized) {
13702                 throw new Error("initializeWasm() must be awaited first!");
13703         }
13704         const nativeResponseValue = wasm.TS_InMemorySigner_set_payment_key(this_ptr, val);
13705         // debug statements here
13706 }
13707         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
13708 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): number {
13709         if(!isWasmInitialized) {
13710                 throw new Error("initializeWasm() must be awaited first!");
13711         }
13712         const nativeResponseValue = wasm.TS_InMemorySigner_get_delayed_payment_base_key(this_ptr);
13713         return nativeResponseValue;
13714 }
13715         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
13716 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: number): void {
13717         if(!isWasmInitialized) {
13718                 throw new Error("initializeWasm() must be awaited first!");
13719         }
13720         const nativeResponseValue = wasm.TS_InMemorySigner_set_delayed_payment_base_key(this_ptr, val);
13721         // debug statements here
13722 }
13723         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
13724 export function InMemorySigner_get_htlc_base_key(this_ptr: number): number {
13725         if(!isWasmInitialized) {
13726                 throw new Error("initializeWasm() must be awaited first!");
13727         }
13728         const nativeResponseValue = wasm.TS_InMemorySigner_get_htlc_base_key(this_ptr);
13729         return nativeResponseValue;
13730 }
13731         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
13732 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: number): void {
13733         if(!isWasmInitialized) {
13734                 throw new Error("initializeWasm() must be awaited first!");
13735         }
13736         const nativeResponseValue = wasm.TS_InMemorySigner_set_htlc_base_key(this_ptr, val);
13737         // debug statements here
13738 }
13739         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
13740 export function InMemorySigner_get_commitment_seed(this_ptr: number): number {
13741         if(!isWasmInitialized) {
13742                 throw new Error("initializeWasm() must be awaited first!");
13743         }
13744         const nativeResponseValue = wasm.TS_InMemorySigner_get_commitment_seed(this_ptr);
13745         return nativeResponseValue;
13746 }
13747         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13748 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: number): void {
13749         if(!isWasmInitialized) {
13750                 throw new Error("initializeWasm() must be awaited first!");
13751         }
13752         const nativeResponseValue = wasm.TS_InMemorySigner_set_commitment_seed(this_ptr, val);
13753         // debug statements here
13754 }
13755         // uintptr_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
13756 export function InMemorySigner_clone_ptr(arg: number): number {
13757         if(!isWasmInitialized) {
13758                 throw new Error("initializeWasm() must be awaited first!");
13759         }
13760         const nativeResponseValue = wasm.TS_InMemorySigner_clone_ptr(arg);
13761         return nativeResponseValue;
13762 }
13763         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
13764 export function InMemorySigner_clone(orig: number): number {
13765         if(!isWasmInitialized) {
13766                 throw new Error("initializeWasm() must be awaited first!");
13767         }
13768         const nativeResponseValue = wasm.TS_InMemorySigner_clone(orig);
13769         return nativeResponseValue;
13770 }
13771         // 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);
13772 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 {
13773         if(!isWasmInitialized) {
13774                 throw new Error("initializeWasm() must be awaited first!");
13775         }
13776         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);
13777         return nativeResponseValue;
13778 }
13779         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13780 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
13781         if(!isWasmInitialized) {
13782                 throw new Error("initializeWasm() must be awaited first!");
13783         }
13784         const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_pubkeys(this_arg);
13785         return nativeResponseValue;
13786 }
13787         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13788 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
13789         if(!isWasmInitialized) {
13790                 throw new Error("initializeWasm() must be awaited first!");
13791         }
13792         const nativeResponseValue = wasm.TS_InMemorySigner_counterparty_selected_contest_delay(this_arg);
13793         return nativeResponseValue;
13794 }
13795         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13796 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
13797         if(!isWasmInitialized) {
13798                 throw new Error("initializeWasm() must be awaited first!");
13799         }
13800         const nativeResponseValue = wasm.TS_InMemorySigner_holder_selected_contest_delay(this_arg);
13801         return nativeResponseValue;
13802 }
13803         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13804 export function InMemorySigner_is_outbound(this_arg: number): boolean {
13805         if(!isWasmInitialized) {
13806                 throw new Error("initializeWasm() must be awaited first!");
13807         }
13808         const nativeResponseValue = wasm.TS_InMemorySigner_is_outbound(this_arg);
13809         return nativeResponseValue;
13810 }
13811         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13812 export function InMemorySigner_funding_outpoint(this_arg: number): number {
13813         if(!isWasmInitialized) {
13814                 throw new Error("initializeWasm() must be awaited first!");
13815         }
13816         const nativeResponseValue = wasm.TS_InMemorySigner_funding_outpoint(this_arg);
13817         return nativeResponseValue;
13818 }
13819         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13820 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
13821         if(!isWasmInitialized) {
13822                 throw new Error("initializeWasm() must be awaited first!");
13823         }
13824         const nativeResponseValue = wasm.TS_InMemorySigner_get_channel_parameters(this_arg);
13825         return nativeResponseValue;
13826 }
13827         // MUST_USE_RES bool InMemorySigner_opt_anchors(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13828 export function InMemorySigner_opt_anchors(this_arg: number): boolean {
13829         if(!isWasmInitialized) {
13830                 throw new Error("initializeWasm() must be awaited first!");
13831         }
13832         const nativeResponseValue = wasm.TS_InMemorySigner_opt_anchors(this_arg);
13833         return nativeResponseValue;
13834 }
13835         // 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);
13836 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: number, input_idx: number, descriptor: number): number {
13837         if(!isWasmInitialized) {
13838                 throw new Error("initializeWasm() must be awaited first!");
13839         }
13840         const nativeResponseValue = wasm.TS_InMemorySigner_sign_counterparty_payment_input(this_arg, spend_tx, input_idx, descriptor);
13841         return nativeResponseValue;
13842 }
13843         // 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);
13844 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: number, input_idx: number, descriptor: number): number {
13845         if(!isWasmInitialized) {
13846                 throw new Error("initializeWasm() must be awaited first!");
13847         }
13848         const nativeResponseValue = wasm.TS_InMemorySigner_sign_dynamic_p2wsh_input(this_arg, spend_tx, input_idx, descriptor);
13849         return nativeResponseValue;
13850 }
13851         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13852 export function InMemorySigner_as_BaseSign(this_arg: number): number {
13853         if(!isWasmInitialized) {
13854                 throw new Error("initializeWasm() must be awaited first!");
13855         }
13856         const nativeResponseValue = wasm.TS_InMemorySigner_as_BaseSign(this_arg);
13857         return nativeResponseValue;
13858 }
13859         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
13860 export function InMemorySigner_as_Sign(this_arg: number): number {
13861         if(!isWasmInitialized) {
13862                 throw new Error("initializeWasm() must be awaited first!");
13863         }
13864         const nativeResponseValue = wasm.TS_InMemorySigner_as_Sign(this_arg);
13865         return nativeResponseValue;
13866 }
13867         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
13868 export function InMemorySigner_write(obj: number): number {
13869         if(!isWasmInitialized) {
13870                 throw new Error("initializeWasm() must be awaited first!");
13871         }
13872         const nativeResponseValue = wasm.TS_InMemorySigner_write(obj);
13873         return nativeResponseValue;
13874 }
13875         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
13876 export function InMemorySigner_read(ser: number): number {
13877         if(!isWasmInitialized) {
13878                 throw new Error("initializeWasm() must be awaited first!");
13879         }
13880         const nativeResponseValue = wasm.TS_InMemorySigner_read(ser);
13881         return nativeResponseValue;
13882 }
13883         // void KeysManager_free(struct LDKKeysManager this_obj);
13884 export function KeysManager_free(this_obj: number): void {
13885         if(!isWasmInitialized) {
13886                 throw new Error("initializeWasm() must be awaited first!");
13887         }
13888         const nativeResponseValue = wasm.TS_KeysManager_free(this_obj);
13889         // debug statements here
13890 }
13891         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
13892 export function KeysManager_new(seed: number, starting_time_secs: bigint, starting_time_nanos: number): number {
13893         if(!isWasmInitialized) {
13894                 throw new Error("initializeWasm() must be awaited first!");
13895         }
13896         const nativeResponseValue = wasm.TS_KeysManager_new(seed, starting_time_secs, starting_time_nanos);
13897         return nativeResponseValue;
13898 }
13899         // 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]);
13900 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: bigint, params: number): number {
13901         if(!isWasmInitialized) {
13902                 throw new Error("initializeWasm() must be awaited first!");
13903         }
13904         const nativeResponseValue = wasm.TS_KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params);
13905         return nativeResponseValue;
13906 }
13907         // 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);
13908 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number, outputs: number, change_destination_script: number, feerate_sat_per_1000_weight: number): number {
13909         if(!isWasmInitialized) {
13910                 throw new Error("initializeWasm() must be awaited first!");
13911         }
13912         const nativeResponseValue = wasm.TS_KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, change_destination_script, feerate_sat_per_1000_weight);
13913         return nativeResponseValue;
13914 }
13915         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
13916 export function KeysManager_as_KeysInterface(this_arg: number): number {
13917         if(!isWasmInitialized) {
13918                 throw new Error("initializeWasm() must be awaited first!");
13919         }
13920         const nativeResponseValue = wasm.TS_KeysManager_as_KeysInterface(this_arg);
13921         return nativeResponseValue;
13922 }
13923         // void ChannelManager_free(struct LDKChannelManager this_obj);
13924 export function ChannelManager_free(this_obj: number): void {
13925         if(!isWasmInitialized) {
13926                 throw new Error("initializeWasm() must be awaited first!");
13927         }
13928         const nativeResponseValue = wasm.TS_ChannelManager_free(this_obj);
13929         // debug statements here
13930 }
13931         // void ChainParameters_free(struct LDKChainParameters this_obj);
13932 export function ChainParameters_free(this_obj: number): void {
13933         if(!isWasmInitialized) {
13934                 throw new Error("initializeWasm() must be awaited first!");
13935         }
13936         const nativeResponseValue = wasm.TS_ChainParameters_free(this_obj);
13937         // debug statements here
13938 }
13939         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
13940 export function ChainParameters_get_network(this_ptr: number): Network {
13941         if(!isWasmInitialized) {
13942                 throw new Error("initializeWasm() must be awaited first!");
13943         }
13944         const nativeResponseValue = wasm.TS_ChainParameters_get_network(this_ptr);
13945         return nativeResponseValue;
13946 }
13947         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
13948 export function ChainParameters_set_network(this_ptr: number, val: Network): void {
13949         if(!isWasmInitialized) {
13950                 throw new Error("initializeWasm() must be awaited first!");
13951         }
13952         const nativeResponseValue = wasm.TS_ChainParameters_set_network(this_ptr, val);
13953         // debug statements here
13954 }
13955         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
13956 export function ChainParameters_get_best_block(this_ptr: number): number {
13957         if(!isWasmInitialized) {
13958                 throw new Error("initializeWasm() must be awaited first!");
13959         }
13960         const nativeResponseValue = wasm.TS_ChainParameters_get_best_block(this_ptr);
13961         return nativeResponseValue;
13962 }
13963         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
13964 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
13965         if(!isWasmInitialized) {
13966                 throw new Error("initializeWasm() must be awaited first!");
13967         }
13968         const nativeResponseValue = wasm.TS_ChainParameters_set_best_block(this_ptr, val);
13969         // debug statements here
13970 }
13971         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
13972 export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
13973         if(!isWasmInitialized) {
13974                 throw new Error("initializeWasm() must be awaited first!");
13975         }
13976         const nativeResponseValue = wasm.TS_ChainParameters_new(network_arg, best_block_arg);
13977         return nativeResponseValue;
13978 }
13979         // uintptr_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
13980 export function ChainParameters_clone_ptr(arg: number): number {
13981         if(!isWasmInitialized) {
13982                 throw new Error("initializeWasm() must be awaited first!");
13983         }
13984         const nativeResponseValue = wasm.TS_ChainParameters_clone_ptr(arg);
13985         return nativeResponseValue;
13986 }
13987         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
13988 export function ChainParameters_clone(orig: number): number {
13989         if(!isWasmInitialized) {
13990                 throw new Error("initializeWasm() must be awaited first!");
13991         }
13992         const nativeResponseValue = wasm.TS_ChainParameters_clone(orig);
13993         return nativeResponseValue;
13994 }
13995         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
13996 export function CounterpartyForwardingInfo_free(this_obj: number): void {
13997         if(!isWasmInitialized) {
13998                 throw new Error("initializeWasm() must be awaited first!");
13999         }
14000         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_free(this_obj);
14001         // debug statements here
14002 }
14003         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
14004 export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
14005         if(!isWasmInitialized) {
14006                 throw new Error("initializeWasm() must be awaited first!");
14007         }
14008         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
14009         return nativeResponseValue;
14010 }
14011         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
14012 export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
14013         if(!isWasmInitialized) {
14014                 throw new Error("initializeWasm() must be awaited first!");
14015         }
14016         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
14017         // debug statements here
14018 }
14019         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
14020 export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
14021         if(!isWasmInitialized) {
14022                 throw new Error("initializeWasm() must be awaited first!");
14023         }
14024         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
14025         return nativeResponseValue;
14026 }
14027         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
14028 export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
14029         if(!isWasmInitialized) {
14030                 throw new Error("initializeWasm() must be awaited first!");
14031         }
14032         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
14033         // debug statements here
14034 }
14035         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
14036 export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
14037         if(!isWasmInitialized) {
14038                 throw new Error("initializeWasm() must be awaited first!");
14039         }
14040         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
14041         return nativeResponseValue;
14042 }
14043         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
14044 export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
14045         if(!isWasmInitialized) {
14046                 throw new Error("initializeWasm() must be awaited first!");
14047         }
14048         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
14049         // debug statements here
14050 }
14051         // 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);
14052 export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
14053         if(!isWasmInitialized) {
14054                 throw new Error("initializeWasm() must be awaited first!");
14055         }
14056         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
14057         return nativeResponseValue;
14058 }
14059         // uintptr_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
14060 export function CounterpartyForwardingInfo_clone_ptr(arg: number): number {
14061         if(!isWasmInitialized) {
14062                 throw new Error("initializeWasm() must be awaited first!");
14063         }
14064         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone_ptr(arg);
14065         return nativeResponseValue;
14066 }
14067         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
14068 export function CounterpartyForwardingInfo_clone(orig: number): number {
14069         if(!isWasmInitialized) {
14070                 throw new Error("initializeWasm() must be awaited first!");
14071         }
14072         const nativeResponseValue = wasm.TS_CounterpartyForwardingInfo_clone(orig);
14073         return nativeResponseValue;
14074 }
14075         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
14076 export function ChannelCounterparty_free(this_obj: number): void {
14077         if(!isWasmInitialized) {
14078                 throw new Error("initializeWasm() must be awaited first!");
14079         }
14080         const nativeResponseValue = wasm.TS_ChannelCounterparty_free(this_obj);
14081         // debug statements here
14082 }
14083         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
14084 export function ChannelCounterparty_get_node_id(this_ptr: number): number {
14085         if(!isWasmInitialized) {
14086                 throw new Error("initializeWasm() must be awaited first!");
14087         }
14088         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_node_id(this_ptr);
14089         return nativeResponseValue;
14090 }
14091         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14092 export function ChannelCounterparty_set_node_id(this_ptr: number, val: number): void {
14093         if(!isWasmInitialized) {
14094                 throw new Error("initializeWasm() must be awaited first!");
14095         }
14096         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_node_id(this_ptr, val);
14097         // debug statements here
14098 }
14099         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
14100 export function ChannelCounterparty_get_features(this_ptr: number): number {
14101         if(!isWasmInitialized) {
14102                 throw new Error("initializeWasm() must be awaited first!");
14103         }
14104         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_features(this_ptr);
14105         return nativeResponseValue;
14106 }
14107         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
14108 export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
14109         if(!isWasmInitialized) {
14110                 throw new Error("initializeWasm() must be awaited first!");
14111         }
14112         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_features(this_ptr, val);
14113         // debug statements here
14114 }
14115         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
14116 export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): bigint {
14117         if(!isWasmInitialized) {
14118                 throw new Error("initializeWasm() must be awaited first!");
14119         }
14120         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
14121         return nativeResponseValue;
14122 }
14123         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
14124 export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: bigint): void {
14125         if(!isWasmInitialized) {
14126                 throw new Error("initializeWasm() must be awaited first!");
14127         }
14128         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
14129         // debug statements here
14130 }
14131         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
14132 export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
14133         if(!isWasmInitialized) {
14134                 throw new Error("initializeWasm() must be awaited first!");
14135         }
14136         const nativeResponseValue = wasm.TS_ChannelCounterparty_get_forwarding_info(this_ptr);
14137         return nativeResponseValue;
14138 }
14139         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
14140 export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
14141         if(!isWasmInitialized) {
14142                 throw new Error("initializeWasm() must be awaited first!");
14143         }
14144         const nativeResponseValue = wasm.TS_ChannelCounterparty_set_forwarding_info(this_ptr, val);
14145         // debug statements here
14146 }
14147         // 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);
14148 export function ChannelCounterparty_new(node_id_arg: number, features_arg: number, unspendable_punishment_reserve_arg: bigint, forwarding_info_arg: number): number {
14149         if(!isWasmInitialized) {
14150                 throw new Error("initializeWasm() must be awaited first!");
14151         }
14152         const nativeResponseValue = wasm.TS_ChannelCounterparty_new(node_id_arg, features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
14153         return nativeResponseValue;
14154 }
14155         // uintptr_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
14156 export function ChannelCounterparty_clone_ptr(arg: number): number {
14157         if(!isWasmInitialized) {
14158                 throw new Error("initializeWasm() must be awaited first!");
14159         }
14160         const nativeResponseValue = wasm.TS_ChannelCounterparty_clone_ptr(arg);
14161         return nativeResponseValue;
14162 }
14163         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
14164 export function ChannelCounterparty_clone(orig: number): number {
14165         if(!isWasmInitialized) {
14166                 throw new Error("initializeWasm() must be awaited first!");
14167         }
14168         const nativeResponseValue = wasm.TS_ChannelCounterparty_clone(orig);
14169         return nativeResponseValue;
14170 }
14171         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
14172 export function ChannelDetails_free(this_obj: number): void {
14173         if(!isWasmInitialized) {
14174                 throw new Error("initializeWasm() must be awaited first!");
14175         }
14176         const nativeResponseValue = wasm.TS_ChannelDetails_free(this_obj);
14177         // debug statements here
14178 }
14179         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
14180 export function ChannelDetails_get_channel_id(this_ptr: number): number {
14181         if(!isWasmInitialized) {
14182                 throw new Error("initializeWasm() must be awaited first!");
14183         }
14184         const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_id(this_ptr);
14185         return nativeResponseValue;
14186 }
14187         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14188 export function ChannelDetails_set_channel_id(this_ptr: number, val: number): void {
14189         if(!isWasmInitialized) {
14190                 throw new Error("initializeWasm() must be awaited first!");
14191         }
14192         const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_id(this_ptr, val);
14193         // debug statements here
14194 }
14195         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14196 export function ChannelDetails_get_counterparty(this_ptr: number): number {
14197         if(!isWasmInitialized) {
14198                 throw new Error("initializeWasm() must be awaited first!");
14199         }
14200         const nativeResponseValue = wasm.TS_ChannelDetails_get_counterparty(this_ptr);
14201         return nativeResponseValue;
14202 }
14203         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
14204 export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
14205         if(!isWasmInitialized) {
14206                 throw new Error("initializeWasm() must be awaited first!");
14207         }
14208         const nativeResponseValue = wasm.TS_ChannelDetails_set_counterparty(this_ptr, val);
14209         // debug statements here
14210 }
14211         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14212 export function ChannelDetails_get_funding_txo(this_ptr: number): number {
14213         if(!isWasmInitialized) {
14214                 throw new Error("initializeWasm() must be awaited first!");
14215         }
14216         const nativeResponseValue = wasm.TS_ChannelDetails_get_funding_txo(this_ptr);
14217         return nativeResponseValue;
14218 }
14219         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14220 export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
14221         if(!isWasmInitialized) {
14222                 throw new Error("initializeWasm() must be awaited first!");
14223         }
14224         const nativeResponseValue = wasm.TS_ChannelDetails_set_funding_txo(this_ptr, val);
14225         // debug statements here
14226 }
14227         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14228 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
14229         if(!isWasmInitialized) {
14230                 throw new Error("initializeWasm() must be awaited first!");
14231         }
14232         const nativeResponseValue = wasm.TS_ChannelDetails_get_short_channel_id(this_ptr);
14233         return nativeResponseValue;
14234 }
14235         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14236 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
14237         if(!isWasmInitialized) {
14238                 throw new Error("initializeWasm() must be awaited first!");
14239         }
14240         const nativeResponseValue = wasm.TS_ChannelDetails_set_short_channel_id(this_ptr, val);
14241         // debug statements here
14242 }
14243         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14244 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): bigint {
14245         if(!isWasmInitialized) {
14246                 throw new Error("initializeWasm() must be awaited first!");
14247         }
14248         const nativeResponseValue = wasm.TS_ChannelDetails_get_channel_value_satoshis(this_ptr);
14249         return nativeResponseValue;
14250 }
14251         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
14252 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: bigint): void {
14253         if(!isWasmInitialized) {
14254                 throw new Error("initializeWasm() must be awaited first!");
14255         }
14256         const nativeResponseValue = wasm.TS_ChannelDetails_set_channel_value_satoshis(this_ptr, val);
14257         // debug statements here
14258 }
14259         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14260 export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
14261         if(!isWasmInitialized) {
14262                 throw new Error("initializeWasm() must be awaited first!");
14263         }
14264         const nativeResponseValue = wasm.TS_ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
14265         return nativeResponseValue;
14266 }
14267         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14268 export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
14269         if(!isWasmInitialized) {
14270                 throw new Error("initializeWasm() must be awaited first!");
14271         }
14272         const nativeResponseValue = wasm.TS_ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
14273         // debug statements here
14274 }
14275         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14276 export function ChannelDetails_get_user_channel_id(this_ptr: number): bigint {
14277         if(!isWasmInitialized) {
14278                 throw new Error("initializeWasm() must be awaited first!");
14279         }
14280         const nativeResponseValue = wasm.TS_ChannelDetails_get_user_channel_id(this_ptr);
14281         return nativeResponseValue;
14282 }
14283         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
14284 export function ChannelDetails_set_user_channel_id(this_ptr: number, val: bigint): void {
14285         if(!isWasmInitialized) {
14286                 throw new Error("initializeWasm() must be awaited first!");
14287         }
14288         const nativeResponseValue = wasm.TS_ChannelDetails_set_user_channel_id(this_ptr, val);
14289         // debug statements here
14290 }
14291         // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14292 export function ChannelDetails_get_balance_msat(this_ptr: number): bigint {
14293         if(!isWasmInitialized) {
14294                 throw new Error("initializeWasm() must be awaited first!");
14295         }
14296         const nativeResponseValue = wasm.TS_ChannelDetails_get_balance_msat(this_ptr);
14297         return nativeResponseValue;
14298 }
14299         // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
14300 export function ChannelDetails_set_balance_msat(this_ptr: number, val: bigint): void {
14301         if(!isWasmInitialized) {
14302                 throw new Error("initializeWasm() must be awaited first!");
14303         }
14304         const nativeResponseValue = wasm.TS_ChannelDetails_set_balance_msat(this_ptr, val);
14305         // debug statements here
14306 }
14307         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14308 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): bigint {
14309         if(!isWasmInitialized) {
14310                 throw new Error("initializeWasm() must be awaited first!");
14311         }
14312         const nativeResponseValue = wasm.TS_ChannelDetails_get_outbound_capacity_msat(this_ptr);
14313         return nativeResponseValue;
14314 }
14315         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
14316 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: bigint): void {
14317         if(!isWasmInitialized) {
14318                 throw new Error("initializeWasm() must be awaited first!");
14319         }
14320         const nativeResponseValue = wasm.TS_ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
14321         // debug statements here
14322 }
14323         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14324 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): bigint {
14325         if(!isWasmInitialized) {
14326                 throw new Error("initializeWasm() must be awaited first!");
14327         }
14328         const nativeResponseValue = wasm.TS_ChannelDetails_get_inbound_capacity_msat(this_ptr);
14329         return nativeResponseValue;
14330 }
14331         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
14332 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: bigint): void {
14333         if(!isWasmInitialized) {
14334                 throw new Error("initializeWasm() must be awaited first!");
14335         }
14336         const nativeResponseValue = wasm.TS_ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
14337         // debug statements here
14338 }
14339         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14340 export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
14341         if(!isWasmInitialized) {
14342                 throw new Error("initializeWasm() must be awaited first!");
14343         }
14344         const nativeResponseValue = wasm.TS_ChannelDetails_get_confirmations_required(this_ptr);
14345         return nativeResponseValue;
14346 }
14347         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
14348 export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
14349         if(!isWasmInitialized) {
14350                 throw new Error("initializeWasm() must be awaited first!");
14351         }
14352         const nativeResponseValue = wasm.TS_ChannelDetails_set_confirmations_required(this_ptr, val);
14353         // debug statements here
14354 }
14355         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14356 export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
14357         if(!isWasmInitialized) {
14358                 throw new Error("initializeWasm() must be awaited first!");
14359         }
14360         const nativeResponseValue = wasm.TS_ChannelDetails_get_force_close_spend_delay(this_ptr);
14361         return nativeResponseValue;
14362 }
14363         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
14364 export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
14365         if(!isWasmInitialized) {
14366                 throw new Error("initializeWasm() must be awaited first!");
14367         }
14368         const nativeResponseValue = wasm.TS_ChannelDetails_set_force_close_spend_delay(this_ptr, val);
14369         // debug statements here
14370 }
14371         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14372 export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
14373         if(!isWasmInitialized) {
14374                 throw new Error("initializeWasm() must be awaited first!");
14375         }
14376         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_outbound(this_ptr);
14377         return nativeResponseValue;
14378 }
14379         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
14380 export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
14381         if(!isWasmInitialized) {
14382                 throw new Error("initializeWasm() must be awaited first!");
14383         }
14384         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_outbound(this_ptr, val);
14385         // debug statements here
14386 }
14387         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14388 export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
14389         if(!isWasmInitialized) {
14390                 throw new Error("initializeWasm() must be awaited first!");
14391         }
14392         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_funding_locked(this_ptr);
14393         return nativeResponseValue;
14394 }
14395         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
14396 export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
14397         if(!isWasmInitialized) {
14398                 throw new Error("initializeWasm() must be awaited first!");
14399         }
14400         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_funding_locked(this_ptr, val);
14401         // debug statements here
14402 }
14403         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14404 export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
14405         if(!isWasmInitialized) {
14406                 throw new Error("initializeWasm() must be awaited first!");
14407         }
14408         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_usable(this_ptr);
14409         return nativeResponseValue;
14410 }
14411         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
14412 export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
14413         if(!isWasmInitialized) {
14414                 throw new Error("initializeWasm() must be awaited first!");
14415         }
14416         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_usable(this_ptr, val);
14417         // debug statements here
14418 }
14419         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
14420 export function ChannelDetails_get_is_public(this_ptr: number): boolean {
14421         if(!isWasmInitialized) {
14422                 throw new Error("initializeWasm() must be awaited first!");
14423         }
14424         const nativeResponseValue = wasm.TS_ChannelDetails_get_is_public(this_ptr);
14425         return nativeResponseValue;
14426 }
14427         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
14428 export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
14429         if(!isWasmInitialized) {
14430                 throw new Error("initializeWasm() must be awaited first!");
14431         }
14432         const nativeResponseValue = wasm.TS_ChannelDetails_set_is_public(this_ptr, val);
14433         // debug statements here
14434 }
14435         // 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);
14436 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 {
14437         if(!isWasmInitialized) {
14438                 throw new Error("initializeWasm() must be awaited first!");
14439         }
14440         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);
14441         return nativeResponseValue;
14442 }
14443         // uintptr_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
14444 export function ChannelDetails_clone_ptr(arg: number): number {
14445         if(!isWasmInitialized) {
14446                 throw new Error("initializeWasm() must be awaited first!");
14447         }
14448         const nativeResponseValue = wasm.TS_ChannelDetails_clone_ptr(arg);
14449         return nativeResponseValue;
14450 }
14451         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
14452 export function ChannelDetails_clone(orig: number): number {
14453         if(!isWasmInitialized) {
14454                 throw new Error("initializeWasm() must be awaited first!");
14455         }
14456         const nativeResponseValue = wasm.TS_ChannelDetails_clone(orig);
14457         return nativeResponseValue;
14458 }
14459         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
14460 export function PaymentSendFailure_free(this_ptr: number): void {
14461         if(!isWasmInitialized) {
14462                 throw new Error("initializeWasm() must be awaited first!");
14463         }
14464         const nativeResponseValue = wasm.TS_PaymentSendFailure_free(this_ptr);
14465         // debug statements here
14466 }
14467         // uintptr_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
14468 export function PaymentSendFailure_clone_ptr(arg: number): number {
14469         if(!isWasmInitialized) {
14470                 throw new Error("initializeWasm() must be awaited first!");
14471         }
14472         const nativeResponseValue = wasm.TS_PaymentSendFailure_clone_ptr(arg);
14473         return nativeResponseValue;
14474 }
14475         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
14476 export function PaymentSendFailure_clone(orig: number): number {
14477         if(!isWasmInitialized) {
14478                 throw new Error("initializeWasm() must be awaited first!");
14479         }
14480         const nativeResponseValue = wasm.TS_PaymentSendFailure_clone(orig);
14481         return nativeResponseValue;
14482 }
14483         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
14484 export function PaymentSendFailure_parameter_error(a: number): number {
14485         if(!isWasmInitialized) {
14486                 throw new Error("initializeWasm() must be awaited first!");
14487         }
14488         const nativeResponseValue = wasm.TS_PaymentSendFailure_parameter_error(a);
14489         return nativeResponseValue;
14490 }
14491         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
14492 export function PaymentSendFailure_path_parameter_error(a: number): number {
14493         if(!isWasmInitialized) {
14494                 throw new Error("initializeWasm() must be awaited first!");
14495         }
14496         const nativeResponseValue = wasm.TS_PaymentSendFailure_path_parameter_error(a);
14497         return nativeResponseValue;
14498 }
14499         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
14500 export function PaymentSendFailure_all_failed_retry_safe(a: number): number {
14501         if(!isWasmInitialized) {
14502                 throw new Error("initializeWasm() must be awaited first!");
14503         }
14504         const nativeResponseValue = wasm.TS_PaymentSendFailure_all_failed_retry_safe(a);
14505         return nativeResponseValue;
14506 }
14507         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
14508 export function PaymentSendFailure_partial_failure(results: number, failed_paths_retry: number, payment_id: number): number {
14509         if(!isWasmInitialized) {
14510                 throw new Error("initializeWasm() must be awaited first!");
14511         }
14512         const nativeResponseValue = wasm.TS_PaymentSendFailure_partial_failure(results, failed_paths_retry, payment_id);
14513         return nativeResponseValue;
14514 }
14515         // 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);
14516 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
14517         if(!isWasmInitialized) {
14518                 throw new Error("initializeWasm() must be awaited first!");
14519         }
14520         const nativeResponseValue = wasm.TS_ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
14521         return nativeResponseValue;
14522 }
14523         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
14524 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
14525         if(!isWasmInitialized) {
14526                 throw new Error("initializeWasm() must be awaited first!");
14527         }
14528         const nativeResponseValue = wasm.TS_ChannelManager_get_current_default_configuration(this_arg);
14529         return nativeResponseValue;
14530 }
14531         // 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);
14532 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 {
14533         if(!isWasmInitialized) {
14534                 throw new Error("initializeWasm() must be awaited first!");
14535         }
14536         const nativeResponseValue = wasm.TS_ChannelManager_create_channel(this_arg, their_network_key, channel_value_satoshis, push_msat, user_channel_id, override_config);
14537         return nativeResponseValue;
14538 }
14539         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
14540 export function ChannelManager_list_channels(this_arg: number): number {
14541         if(!isWasmInitialized) {
14542                 throw new Error("initializeWasm() must be awaited first!");
14543         }
14544         const nativeResponseValue = wasm.TS_ChannelManager_list_channels(this_arg);
14545         return nativeResponseValue;
14546 }
14547         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
14548 export function ChannelManager_list_usable_channels(this_arg: number): number {
14549         if(!isWasmInitialized) {
14550                 throw new Error("initializeWasm() must be awaited first!");
14551         }
14552         const nativeResponseValue = wasm.TS_ChannelManager_list_usable_channels(this_arg);
14553         return nativeResponseValue;
14554 }
14555         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
14556 export function ChannelManager_close_channel(this_arg: number, channel_id: number): number {
14557         if(!isWasmInitialized) {
14558                 throw new Error("initializeWasm() must be awaited first!");
14559         }
14560         const nativeResponseValue = wasm.TS_ChannelManager_close_channel(this_arg, channel_id);
14561         return nativeResponseValue;
14562 }
14563         // 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);
14564 export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: number, target_feerate_sats_per_1000_weight: number): number {
14565         if(!isWasmInitialized) {
14566                 throw new Error("initializeWasm() must be awaited first!");
14567         }
14568         const nativeResponseValue = wasm.TS_ChannelManager_close_channel_with_target_feerate(this_arg, channel_id, target_feerate_sats_per_1000_weight);
14569         return nativeResponseValue;
14570 }
14571         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
14572 export function ChannelManager_force_close_channel(this_arg: number, channel_id: number): number {
14573         if(!isWasmInitialized) {
14574                 throw new Error("initializeWasm() must be awaited first!");
14575         }
14576         const nativeResponseValue = wasm.TS_ChannelManager_force_close_channel(this_arg, channel_id);
14577         return nativeResponseValue;
14578 }
14579         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
14580 export function ChannelManager_force_close_all_channels(this_arg: number): void {
14581         if(!isWasmInitialized) {
14582                 throw new Error("initializeWasm() must be awaited first!");
14583         }
14584         const nativeResponseValue = wasm.TS_ChannelManager_force_close_all_channels(this_arg);
14585         // debug statements here
14586 }
14587         // 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);
14588 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: number, payment_secret: number): number {
14589         if(!isWasmInitialized) {
14590                 throw new Error("initializeWasm() must be awaited first!");
14591         }
14592         const nativeResponseValue = wasm.TS_ChannelManager_send_payment(this_arg, route, payment_hash, payment_secret);
14593         return nativeResponseValue;
14594 }
14595         // 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);
14596 export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: number): number {
14597         if(!isWasmInitialized) {
14598                 throw new Error("initializeWasm() must be awaited first!");
14599         }
14600         const nativeResponseValue = wasm.TS_ChannelManager_retry_payment(this_arg, route, payment_id);
14601         return nativeResponseValue;
14602 }
14603         // void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
14604 export function ChannelManager_abandon_payment(this_arg: number, payment_id: number): void {
14605         if(!isWasmInitialized) {
14606                 throw new Error("initializeWasm() must be awaited first!");
14607         }
14608         const nativeResponseValue = wasm.TS_ChannelManager_abandon_payment(this_arg, payment_id);
14609         // debug statements here
14610 }
14611         // 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);
14612 export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: number): number {
14613         if(!isWasmInitialized) {
14614                 throw new Error("initializeWasm() must be awaited first!");
14615         }
14616         const nativeResponseValue = wasm.TS_ChannelManager_send_spontaneous_payment(this_arg, route, payment_preimage);
14617         return nativeResponseValue;
14618 }
14619         // 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);
14620 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: number, funding_transaction: number): number {
14621         if(!isWasmInitialized) {
14622                 throw new Error("initializeWasm() must be awaited first!");
14623         }
14624         const nativeResponseValue = wasm.TS_ChannelManager_funding_transaction_generated(this_arg, temporary_channel_id, funding_transaction);
14625         return nativeResponseValue;
14626 }
14627         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
14628 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: number, alias: number, addresses: number): void {
14629         if(!isWasmInitialized) {
14630                 throw new Error("initializeWasm() must be awaited first!");
14631         }
14632         const nativeResponseValue = wasm.TS_ChannelManager_broadcast_node_announcement(this_arg, rgb, alias, addresses);
14633         // debug statements here
14634 }
14635         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
14636 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
14637         if(!isWasmInitialized) {
14638                 throw new Error("initializeWasm() must be awaited first!");
14639         }
14640         const nativeResponseValue = wasm.TS_ChannelManager_process_pending_htlc_forwards(this_arg);
14641         // debug statements here
14642 }
14643         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
14644 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
14645         if(!isWasmInitialized) {
14646                 throw new Error("initializeWasm() must be awaited first!");
14647         }
14648         const nativeResponseValue = wasm.TS_ChannelManager_timer_tick_occurred(this_arg);
14649         // debug statements here
14650 }
14651         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
14652 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: number): boolean {
14653         if(!isWasmInitialized) {
14654                 throw new Error("initializeWasm() must be awaited first!");
14655         }
14656         const nativeResponseValue = wasm.TS_ChannelManager_fail_htlc_backwards(this_arg, payment_hash);
14657         return nativeResponseValue;
14658 }
14659         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
14660 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: number): boolean {
14661         if(!isWasmInitialized) {
14662                 throw new Error("initializeWasm() must be awaited first!");
14663         }
14664         const nativeResponseValue = wasm.TS_ChannelManager_claim_funds(this_arg, payment_preimage);
14665         return nativeResponseValue;
14666 }
14667         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
14668 export function ChannelManager_get_our_node_id(this_arg: number): number {
14669         if(!isWasmInitialized) {
14670                 throw new Error("initializeWasm() must be awaited first!");
14671         }
14672         const nativeResponseValue = wasm.TS_ChannelManager_get_our_node_id(this_arg);
14673         return nativeResponseValue;
14674 }
14675         // 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);
14676 export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
14677         if(!isWasmInitialized) {
14678                 throw new Error("initializeWasm() must be awaited first!");
14679         }
14680         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs);
14681         return nativeResponseValue;
14682 }
14683         // 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);
14684 export function ChannelManager_create_inbound_payment_legacy(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
14685         if(!isWasmInitialized) {
14686                 throw new Error("initializeWasm() must be awaited first!");
14687         }
14688         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_legacy(this_arg, min_value_msat, invoice_expiry_delta_secs);
14689         return nativeResponseValue;
14690 }
14691         // 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);
14692 export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: number, min_value_msat: number, invoice_expiry_delta_secs: number): number {
14693         if(!isWasmInitialized) {
14694                 throw new Error("initializeWasm() must be awaited first!");
14695         }
14696         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash(this_arg, payment_hash, min_value_msat, invoice_expiry_delta_secs);
14697         return nativeResponseValue;
14698 }
14699         // 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);
14700 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 {
14701         if(!isWasmInitialized) {
14702                 throw new Error("initializeWasm() must be awaited first!");
14703         }
14704         const nativeResponseValue = wasm.TS_ChannelManager_create_inbound_payment_for_hash_legacy(this_arg, payment_hash, min_value_msat, invoice_expiry_delta_secs);
14705         return nativeResponseValue;
14706 }
14707         // 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);
14708 export function ChannelManager_get_payment_preimage(this_arg: number, payment_hash: number, payment_secret: number): number {
14709         if(!isWasmInitialized) {
14710                 throw new Error("initializeWasm() must be awaited first!");
14711         }
14712         const nativeResponseValue = wasm.TS_ChannelManager_get_payment_preimage(this_arg, payment_hash, payment_secret);
14713         return nativeResponseValue;
14714 }
14715         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
14716 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
14717         if(!isWasmInitialized) {
14718                 throw new Error("initializeWasm() must be awaited first!");
14719         }
14720         const nativeResponseValue = wasm.TS_ChannelManager_as_MessageSendEventsProvider(this_arg);
14721         return nativeResponseValue;
14722 }
14723         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
14724 export function ChannelManager_as_EventsProvider(this_arg: number): number {
14725         if(!isWasmInitialized) {
14726                 throw new Error("initializeWasm() must be awaited first!");
14727         }
14728         const nativeResponseValue = wasm.TS_ChannelManager_as_EventsProvider(this_arg);
14729         return nativeResponseValue;
14730 }
14731         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
14732 export function ChannelManager_as_Listen(this_arg: number): number {
14733         if(!isWasmInitialized) {
14734                 throw new Error("initializeWasm() must be awaited first!");
14735         }
14736         const nativeResponseValue = wasm.TS_ChannelManager_as_Listen(this_arg);
14737         return nativeResponseValue;
14738 }
14739         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
14740 export function ChannelManager_as_Confirm(this_arg: number): number {
14741         if(!isWasmInitialized) {
14742                 throw new Error("initializeWasm() must be awaited first!");
14743         }
14744         const nativeResponseValue = wasm.TS_ChannelManager_as_Confirm(this_arg);
14745         return nativeResponseValue;
14746 }
14747         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
14748 export function ChannelManager_await_persistable_update(this_arg: number): void {
14749         if(!isWasmInitialized) {
14750                 throw new Error("initializeWasm() must be awaited first!");
14751         }
14752         const nativeResponseValue = wasm.TS_ChannelManager_await_persistable_update(this_arg);
14753         // debug statements here
14754 }
14755         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
14756 export function ChannelManager_current_best_block(this_arg: number): number {
14757         if(!isWasmInitialized) {
14758                 throw new Error("initializeWasm() must be awaited first!");
14759         }
14760         const nativeResponseValue = wasm.TS_ChannelManager_current_best_block(this_arg);
14761         return nativeResponseValue;
14762 }
14763         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
14764 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
14765         if(!isWasmInitialized) {
14766                 throw new Error("initializeWasm() must be awaited first!");
14767         }
14768         const nativeResponseValue = wasm.TS_ChannelManager_as_ChannelMessageHandler(this_arg);
14769         return nativeResponseValue;
14770 }
14771         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
14772 export function ChannelManager_write(obj: number): number {
14773         if(!isWasmInitialized) {
14774                 throw new Error("initializeWasm() must be awaited first!");
14775         }
14776         const nativeResponseValue = wasm.TS_ChannelManager_write(obj);
14777         return nativeResponseValue;
14778 }
14779         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
14780 export function ChannelManagerReadArgs_free(this_obj: number): void {
14781         if(!isWasmInitialized) {
14782                 throw new Error("initializeWasm() must be awaited first!");
14783         }
14784         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_free(this_obj);
14785         // debug statements here
14786 }
14787         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14788 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
14789         if(!isWasmInitialized) {
14790                 throw new Error("initializeWasm() must be awaited first!");
14791         }
14792         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_keys_manager(this_ptr);
14793         return nativeResponseValue;
14794 }
14795         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
14796 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
14797         if(!isWasmInitialized) {
14798                 throw new Error("initializeWasm() must be awaited first!");
14799         }
14800         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
14801         // debug statements here
14802 }
14803         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14804 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
14805         if(!isWasmInitialized) {
14806                 throw new Error("initializeWasm() must be awaited first!");
14807         }
14808         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_fee_estimator(this_ptr);
14809         return nativeResponseValue;
14810 }
14811         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
14812 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
14813         if(!isWasmInitialized) {
14814                 throw new Error("initializeWasm() must be awaited first!");
14815         }
14816         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
14817         // debug statements here
14818 }
14819         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14820 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
14821         if(!isWasmInitialized) {
14822                 throw new Error("initializeWasm() must be awaited first!");
14823         }
14824         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_chain_monitor(this_ptr);
14825         return nativeResponseValue;
14826 }
14827         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
14828 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
14829         if(!isWasmInitialized) {
14830                 throw new Error("initializeWasm() must be awaited first!");
14831         }
14832         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
14833         // debug statements here
14834 }
14835         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14836 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
14837         if(!isWasmInitialized) {
14838                 throw new Error("initializeWasm() must be awaited first!");
14839         }
14840         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
14841         return nativeResponseValue;
14842 }
14843         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
14844 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
14845         if(!isWasmInitialized) {
14846                 throw new Error("initializeWasm() must be awaited first!");
14847         }
14848         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
14849         // debug statements here
14850 }
14851         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14852 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
14853         if(!isWasmInitialized) {
14854                 throw new Error("initializeWasm() must be awaited first!");
14855         }
14856         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_logger(this_ptr);
14857         return nativeResponseValue;
14858 }
14859         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
14860 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
14861         if(!isWasmInitialized) {
14862                 throw new Error("initializeWasm() must be awaited first!");
14863         }
14864         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_logger(this_ptr, val);
14865         // debug statements here
14866 }
14867         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
14868 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
14869         if(!isWasmInitialized) {
14870                 throw new Error("initializeWasm() must be awaited first!");
14871         }
14872         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_get_default_config(this_ptr);
14873         return nativeResponseValue;
14874 }
14875         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
14876 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
14877         if(!isWasmInitialized) {
14878                 throw new Error("initializeWasm() must be awaited first!");
14879         }
14880         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_set_default_config(this_ptr, val);
14881         // debug statements here
14882 }
14883         // 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);
14884 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 {
14885         if(!isWasmInitialized) {
14886                 throw new Error("initializeWasm() must be awaited first!");
14887         }
14888         const nativeResponseValue = wasm.TS_ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
14889         return nativeResponseValue;
14890 }
14891         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
14892 export function C2Tuple_BlockHashChannelManagerZ_read(ser: number, arg: number): number {
14893         if(!isWasmInitialized) {
14894                 throw new Error("initializeWasm() must be awaited first!");
14895         }
14896         const nativeResponseValue = wasm.TS_C2Tuple_BlockHashChannelManagerZ_read(ser, arg);
14897         return nativeResponseValue;
14898 }
14899         // void DecodeError_free(struct LDKDecodeError this_obj);
14900 export function DecodeError_free(this_obj: number): void {
14901         if(!isWasmInitialized) {
14902                 throw new Error("initializeWasm() must be awaited first!");
14903         }
14904         const nativeResponseValue = wasm.TS_DecodeError_free(this_obj);
14905         // debug statements here
14906 }
14907         // uintptr_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
14908 export function DecodeError_clone_ptr(arg: number): number {
14909         if(!isWasmInitialized) {
14910                 throw new Error("initializeWasm() must be awaited first!");
14911         }
14912         const nativeResponseValue = wasm.TS_DecodeError_clone_ptr(arg);
14913         return nativeResponseValue;
14914 }
14915         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
14916 export function DecodeError_clone(orig: number): number {
14917         if(!isWasmInitialized) {
14918                 throw new Error("initializeWasm() must be awaited first!");
14919         }
14920         const nativeResponseValue = wasm.TS_DecodeError_clone(orig);
14921         return nativeResponseValue;
14922 }
14923         // void Init_free(struct LDKInit this_obj);
14924 export function Init_free(this_obj: number): void {
14925         if(!isWasmInitialized) {
14926                 throw new Error("initializeWasm() must be awaited first!");
14927         }
14928         const nativeResponseValue = wasm.TS_Init_free(this_obj);
14929         // debug statements here
14930 }
14931         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
14932 export function Init_get_features(this_ptr: number): number {
14933         if(!isWasmInitialized) {
14934                 throw new Error("initializeWasm() must be awaited first!");
14935         }
14936         const nativeResponseValue = wasm.TS_Init_get_features(this_ptr);
14937         return nativeResponseValue;
14938 }
14939         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
14940 export function Init_set_features(this_ptr: number, val: number): void {
14941         if(!isWasmInitialized) {
14942                 throw new Error("initializeWasm() must be awaited first!");
14943         }
14944         const nativeResponseValue = wasm.TS_Init_set_features(this_ptr, val);
14945         // debug statements here
14946 }
14947         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
14948 export function Init_new(features_arg: number): number {
14949         if(!isWasmInitialized) {
14950                 throw new Error("initializeWasm() must be awaited first!");
14951         }
14952         const nativeResponseValue = wasm.TS_Init_new(features_arg);
14953         return nativeResponseValue;
14954 }
14955         // uintptr_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
14956 export function Init_clone_ptr(arg: number): number {
14957         if(!isWasmInitialized) {
14958                 throw new Error("initializeWasm() must be awaited first!");
14959         }
14960         const nativeResponseValue = wasm.TS_Init_clone_ptr(arg);
14961         return nativeResponseValue;
14962 }
14963         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
14964 export function Init_clone(orig: number): number {
14965         if(!isWasmInitialized) {
14966                 throw new Error("initializeWasm() must be awaited first!");
14967         }
14968         const nativeResponseValue = wasm.TS_Init_clone(orig);
14969         return nativeResponseValue;
14970 }
14971         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
14972 export function ErrorMessage_free(this_obj: number): void {
14973         if(!isWasmInitialized) {
14974                 throw new Error("initializeWasm() must be awaited first!");
14975         }
14976         const nativeResponseValue = wasm.TS_ErrorMessage_free(this_obj);
14977         // debug statements here
14978 }
14979         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
14980 export function ErrorMessage_get_channel_id(this_ptr: number): number {
14981         if(!isWasmInitialized) {
14982                 throw new Error("initializeWasm() must be awaited first!");
14983         }
14984         const nativeResponseValue = wasm.TS_ErrorMessage_get_channel_id(this_ptr);
14985         return nativeResponseValue;
14986 }
14987         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14988 export function ErrorMessage_set_channel_id(this_ptr: number, val: number): void {
14989         if(!isWasmInitialized) {
14990                 throw new Error("initializeWasm() must be awaited first!");
14991         }
14992         const nativeResponseValue = wasm.TS_ErrorMessage_set_channel_id(this_ptr, val);
14993         // debug statements here
14994 }
14995         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
14996 export function ErrorMessage_get_data(this_ptr: number): number {
14997         if(!isWasmInitialized) {
14998                 throw new Error("initializeWasm() must be awaited first!");
14999         }
15000         const nativeResponseValue = wasm.TS_ErrorMessage_get_data(this_ptr);
15001         return nativeResponseValue;
15002 }
15003         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
15004 export function ErrorMessage_set_data(this_ptr: number, val: number): void {
15005         if(!isWasmInitialized) {
15006                 throw new Error("initializeWasm() must be awaited first!");
15007         }
15008         const nativeResponseValue = wasm.TS_ErrorMessage_set_data(this_ptr, val);
15009         // debug statements here
15010 }
15011         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
15012 export function ErrorMessage_new(channel_id_arg: number, data_arg: number): number {
15013         if(!isWasmInitialized) {
15014                 throw new Error("initializeWasm() must be awaited first!");
15015         }
15016         const nativeResponseValue = wasm.TS_ErrorMessage_new(channel_id_arg, data_arg);
15017         return nativeResponseValue;
15018 }
15019         // uintptr_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
15020 export function ErrorMessage_clone_ptr(arg: number): number {
15021         if(!isWasmInitialized) {
15022                 throw new Error("initializeWasm() must be awaited first!");
15023         }
15024         const nativeResponseValue = wasm.TS_ErrorMessage_clone_ptr(arg);
15025         return nativeResponseValue;
15026 }
15027         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
15028 export function ErrorMessage_clone(orig: number): number {
15029         if(!isWasmInitialized) {
15030                 throw new Error("initializeWasm() must be awaited first!");
15031         }
15032         const nativeResponseValue = wasm.TS_ErrorMessage_clone(orig);
15033         return nativeResponseValue;
15034 }
15035         // void Ping_free(struct LDKPing this_obj);
15036 export function Ping_free(this_obj: number): void {
15037         if(!isWasmInitialized) {
15038                 throw new Error("initializeWasm() must be awaited first!");
15039         }
15040         const nativeResponseValue = wasm.TS_Ping_free(this_obj);
15041         // debug statements here
15042 }
15043         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
15044 export function Ping_get_ponglen(this_ptr: number): number {
15045         if(!isWasmInitialized) {
15046                 throw new Error("initializeWasm() must be awaited first!");
15047         }
15048         const nativeResponseValue = wasm.TS_Ping_get_ponglen(this_ptr);
15049         return nativeResponseValue;
15050 }
15051         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
15052 export function Ping_set_ponglen(this_ptr: number, val: number): void {
15053         if(!isWasmInitialized) {
15054                 throw new Error("initializeWasm() must be awaited first!");
15055         }
15056         const nativeResponseValue = wasm.TS_Ping_set_ponglen(this_ptr, val);
15057         // debug statements here
15058 }
15059         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
15060 export function Ping_get_byteslen(this_ptr: number): number {
15061         if(!isWasmInitialized) {
15062                 throw new Error("initializeWasm() must be awaited first!");
15063         }
15064         const nativeResponseValue = wasm.TS_Ping_get_byteslen(this_ptr);
15065         return nativeResponseValue;
15066 }
15067         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
15068 export function Ping_set_byteslen(this_ptr: number, val: number): void {
15069         if(!isWasmInitialized) {
15070                 throw new Error("initializeWasm() must be awaited first!");
15071         }
15072         const nativeResponseValue = wasm.TS_Ping_set_byteslen(this_ptr, val);
15073         // debug statements here
15074 }
15075         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
15076 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
15077         if(!isWasmInitialized) {
15078                 throw new Error("initializeWasm() must be awaited first!");
15079         }
15080         const nativeResponseValue = wasm.TS_Ping_new(ponglen_arg, byteslen_arg);
15081         return nativeResponseValue;
15082 }
15083         // uintptr_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
15084 export function Ping_clone_ptr(arg: number): number {
15085         if(!isWasmInitialized) {
15086                 throw new Error("initializeWasm() must be awaited first!");
15087         }
15088         const nativeResponseValue = wasm.TS_Ping_clone_ptr(arg);
15089         return nativeResponseValue;
15090 }
15091         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
15092 export function Ping_clone(orig: number): number {
15093         if(!isWasmInitialized) {
15094                 throw new Error("initializeWasm() must be awaited first!");
15095         }
15096         const nativeResponseValue = wasm.TS_Ping_clone(orig);
15097         return nativeResponseValue;
15098 }
15099         // void Pong_free(struct LDKPong this_obj);
15100 export function Pong_free(this_obj: number): void {
15101         if(!isWasmInitialized) {
15102                 throw new Error("initializeWasm() must be awaited first!");
15103         }
15104         const nativeResponseValue = wasm.TS_Pong_free(this_obj);
15105         // debug statements here
15106 }
15107         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
15108 export function Pong_get_byteslen(this_ptr: number): number {
15109         if(!isWasmInitialized) {
15110                 throw new Error("initializeWasm() must be awaited first!");
15111         }
15112         const nativeResponseValue = wasm.TS_Pong_get_byteslen(this_ptr);
15113         return nativeResponseValue;
15114 }
15115         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
15116 export function Pong_set_byteslen(this_ptr: number, val: number): void {
15117         if(!isWasmInitialized) {
15118                 throw new Error("initializeWasm() must be awaited first!");
15119         }
15120         const nativeResponseValue = wasm.TS_Pong_set_byteslen(this_ptr, val);
15121         // debug statements here
15122 }
15123         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
15124 export function Pong_new(byteslen_arg: number): number {
15125         if(!isWasmInitialized) {
15126                 throw new Error("initializeWasm() must be awaited first!");
15127         }
15128         const nativeResponseValue = wasm.TS_Pong_new(byteslen_arg);
15129         return nativeResponseValue;
15130 }
15131         // uintptr_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
15132 export function Pong_clone_ptr(arg: number): number {
15133         if(!isWasmInitialized) {
15134                 throw new Error("initializeWasm() must be awaited first!");
15135         }
15136         const nativeResponseValue = wasm.TS_Pong_clone_ptr(arg);
15137         return nativeResponseValue;
15138 }
15139         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
15140 export function Pong_clone(orig: number): number {
15141         if(!isWasmInitialized) {
15142                 throw new Error("initializeWasm() must be awaited first!");
15143         }
15144         const nativeResponseValue = wasm.TS_Pong_clone(orig);
15145         return nativeResponseValue;
15146 }
15147         // void OpenChannel_free(struct LDKOpenChannel this_obj);
15148 export function OpenChannel_free(this_obj: number): void {
15149         if(!isWasmInitialized) {
15150                 throw new Error("initializeWasm() must be awaited first!");
15151         }
15152         const nativeResponseValue = wasm.TS_OpenChannel_free(this_obj);
15153         // debug statements here
15154 }
15155         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
15156 export function OpenChannel_get_chain_hash(this_ptr: number): number {
15157         if(!isWasmInitialized) {
15158                 throw new Error("initializeWasm() must be awaited first!");
15159         }
15160         const nativeResponseValue = wasm.TS_OpenChannel_get_chain_hash(this_ptr);
15161         return nativeResponseValue;
15162 }
15163         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15164 export function OpenChannel_set_chain_hash(this_ptr: number, val: number): void {
15165         if(!isWasmInitialized) {
15166                 throw new Error("initializeWasm() must be awaited first!");
15167         }
15168         const nativeResponseValue = wasm.TS_OpenChannel_set_chain_hash(this_ptr, val);
15169         // debug statements here
15170 }
15171         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
15172 export function OpenChannel_get_temporary_channel_id(this_ptr: number): number {
15173         if(!isWasmInitialized) {
15174                 throw new Error("initializeWasm() must be awaited first!");
15175         }
15176         const nativeResponseValue = wasm.TS_OpenChannel_get_temporary_channel_id(this_ptr);
15177         return nativeResponseValue;
15178 }
15179         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15180 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: number): void {
15181         if(!isWasmInitialized) {
15182                 throw new Error("initializeWasm() must be awaited first!");
15183         }
15184         const nativeResponseValue = wasm.TS_OpenChannel_set_temporary_channel_id(this_ptr, val);
15185         // debug statements here
15186 }
15187         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15188 export function OpenChannel_get_funding_satoshis(this_ptr: number): bigint {
15189         if(!isWasmInitialized) {
15190                 throw new Error("initializeWasm() must be awaited first!");
15191         }
15192         const nativeResponseValue = wasm.TS_OpenChannel_get_funding_satoshis(this_ptr);
15193         return nativeResponseValue;
15194 }
15195         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
15196 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: bigint): void {
15197         if(!isWasmInitialized) {
15198                 throw new Error("initializeWasm() must be awaited first!");
15199         }
15200         const nativeResponseValue = wasm.TS_OpenChannel_set_funding_satoshis(this_ptr, val);
15201         // debug statements here
15202 }
15203         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15204 export function OpenChannel_get_push_msat(this_ptr: number): bigint {
15205         if(!isWasmInitialized) {
15206                 throw new Error("initializeWasm() must be awaited first!");
15207         }
15208         const nativeResponseValue = wasm.TS_OpenChannel_get_push_msat(this_ptr);
15209         return nativeResponseValue;
15210 }
15211         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
15212 export function OpenChannel_set_push_msat(this_ptr: number, val: bigint): void {
15213         if(!isWasmInitialized) {
15214                 throw new Error("initializeWasm() must be awaited first!");
15215         }
15216         const nativeResponseValue = wasm.TS_OpenChannel_set_push_msat(this_ptr, val);
15217         // debug statements here
15218 }
15219         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15220 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): bigint {
15221         if(!isWasmInitialized) {
15222                 throw new Error("initializeWasm() must be awaited first!");
15223         }
15224         const nativeResponseValue = wasm.TS_OpenChannel_get_dust_limit_satoshis(this_ptr);
15225         return nativeResponseValue;
15226 }
15227         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
15228 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: bigint): void {
15229         if(!isWasmInitialized) {
15230                 throw new Error("initializeWasm() must be awaited first!");
15231         }
15232         const nativeResponseValue = wasm.TS_OpenChannel_set_dust_limit_satoshis(this_ptr, val);
15233         // debug statements here
15234 }
15235         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15236 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): bigint {
15237         if(!isWasmInitialized) {
15238                 throw new Error("initializeWasm() must be awaited first!");
15239         }
15240         const nativeResponseValue = wasm.TS_OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
15241         return nativeResponseValue;
15242 }
15243         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
15244 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: bigint): void {
15245         if(!isWasmInitialized) {
15246                 throw new Error("initializeWasm() must be awaited first!");
15247         }
15248         const nativeResponseValue = wasm.TS_OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
15249         // debug statements here
15250 }
15251         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15252 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): bigint {
15253         if(!isWasmInitialized) {
15254                 throw new Error("initializeWasm() must be awaited first!");
15255         }
15256         const nativeResponseValue = wasm.TS_OpenChannel_get_channel_reserve_satoshis(this_ptr);
15257         return nativeResponseValue;
15258 }
15259         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
15260 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: bigint): void {
15261         if(!isWasmInitialized) {
15262                 throw new Error("initializeWasm() must be awaited first!");
15263         }
15264         const nativeResponseValue = wasm.TS_OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
15265         // debug statements here
15266 }
15267         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15268 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): bigint {
15269         if(!isWasmInitialized) {
15270                 throw new Error("initializeWasm() must be awaited first!");
15271         }
15272         const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_minimum_msat(this_ptr);
15273         return nativeResponseValue;
15274 }
15275         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
15276 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
15277         if(!isWasmInitialized) {
15278                 throw new Error("initializeWasm() must be awaited first!");
15279         }
15280         const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_minimum_msat(this_ptr, val);
15281         // debug statements here
15282 }
15283         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15284 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
15285         if(!isWasmInitialized) {
15286                 throw new Error("initializeWasm() must be awaited first!");
15287         }
15288         const nativeResponseValue = wasm.TS_OpenChannel_get_feerate_per_kw(this_ptr);
15289         return nativeResponseValue;
15290 }
15291         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
15292 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
15293         if(!isWasmInitialized) {
15294                 throw new Error("initializeWasm() must be awaited first!");
15295         }
15296         const nativeResponseValue = wasm.TS_OpenChannel_set_feerate_per_kw(this_ptr, val);
15297         // debug statements here
15298 }
15299         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15300 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
15301         if(!isWasmInitialized) {
15302                 throw new Error("initializeWasm() must be awaited first!");
15303         }
15304         const nativeResponseValue = wasm.TS_OpenChannel_get_to_self_delay(this_ptr);
15305         return nativeResponseValue;
15306 }
15307         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
15308 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
15309         if(!isWasmInitialized) {
15310                 throw new Error("initializeWasm() must be awaited first!");
15311         }
15312         const nativeResponseValue = wasm.TS_OpenChannel_set_to_self_delay(this_ptr, val);
15313         // debug statements here
15314 }
15315         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15316 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
15317         if(!isWasmInitialized) {
15318                 throw new Error("initializeWasm() must be awaited first!");
15319         }
15320         const nativeResponseValue = wasm.TS_OpenChannel_get_max_accepted_htlcs(this_ptr);
15321         return nativeResponseValue;
15322 }
15323         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
15324 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
15325         if(!isWasmInitialized) {
15326                 throw new Error("initializeWasm() must be awaited first!");
15327         }
15328         const nativeResponseValue = wasm.TS_OpenChannel_set_max_accepted_htlcs(this_ptr, val);
15329         // debug statements here
15330 }
15331         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15332 export function OpenChannel_get_funding_pubkey(this_ptr: number): number {
15333         if(!isWasmInitialized) {
15334                 throw new Error("initializeWasm() must be awaited first!");
15335         }
15336         const nativeResponseValue = wasm.TS_OpenChannel_get_funding_pubkey(this_ptr);
15337         return nativeResponseValue;
15338 }
15339         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15340 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: number): void {
15341         if(!isWasmInitialized) {
15342                 throw new Error("initializeWasm() must be awaited first!");
15343         }
15344         const nativeResponseValue = wasm.TS_OpenChannel_set_funding_pubkey(this_ptr, val);
15345         // debug statements here
15346 }
15347         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15348 export function OpenChannel_get_revocation_basepoint(this_ptr: number): number {
15349         if(!isWasmInitialized) {
15350                 throw new Error("initializeWasm() must be awaited first!");
15351         }
15352         const nativeResponseValue = wasm.TS_OpenChannel_get_revocation_basepoint(this_ptr);
15353         return nativeResponseValue;
15354 }
15355         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15356 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: number): void {
15357         if(!isWasmInitialized) {
15358                 throw new Error("initializeWasm() must be awaited first!");
15359         }
15360         const nativeResponseValue = wasm.TS_OpenChannel_set_revocation_basepoint(this_ptr, val);
15361         // debug statements here
15362 }
15363         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15364 export function OpenChannel_get_payment_point(this_ptr: number): number {
15365         if(!isWasmInitialized) {
15366                 throw new Error("initializeWasm() must be awaited first!");
15367         }
15368         const nativeResponseValue = wasm.TS_OpenChannel_get_payment_point(this_ptr);
15369         return nativeResponseValue;
15370 }
15371         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15372 export function OpenChannel_set_payment_point(this_ptr: number, val: number): void {
15373         if(!isWasmInitialized) {
15374                 throw new Error("initializeWasm() must be awaited first!");
15375         }
15376         const nativeResponseValue = wasm.TS_OpenChannel_set_payment_point(this_ptr, val);
15377         // debug statements here
15378 }
15379         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15380 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): number {
15381         if(!isWasmInitialized) {
15382                 throw new Error("initializeWasm() must be awaited first!");
15383         }
15384         const nativeResponseValue = wasm.TS_OpenChannel_get_delayed_payment_basepoint(this_ptr);
15385         return nativeResponseValue;
15386 }
15387         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15388 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: number): void {
15389         if(!isWasmInitialized) {
15390                 throw new Error("initializeWasm() must be awaited first!");
15391         }
15392         const nativeResponseValue = wasm.TS_OpenChannel_set_delayed_payment_basepoint(this_ptr, val);
15393         // debug statements here
15394 }
15395         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15396 export function OpenChannel_get_htlc_basepoint(this_ptr: number): number {
15397         if(!isWasmInitialized) {
15398                 throw new Error("initializeWasm() must be awaited first!");
15399         }
15400         const nativeResponseValue = wasm.TS_OpenChannel_get_htlc_basepoint(this_ptr);
15401         return nativeResponseValue;
15402 }
15403         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15404 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: number): void {
15405         if(!isWasmInitialized) {
15406                 throw new Error("initializeWasm() must be awaited first!");
15407         }
15408         const nativeResponseValue = wasm.TS_OpenChannel_set_htlc_basepoint(this_ptr, val);
15409         // debug statements here
15410 }
15411         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15412 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): number {
15413         if(!isWasmInitialized) {
15414                 throw new Error("initializeWasm() must be awaited first!");
15415         }
15416         const nativeResponseValue = wasm.TS_OpenChannel_get_first_per_commitment_point(this_ptr);
15417         return nativeResponseValue;
15418 }
15419         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15420 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: number): void {
15421         if(!isWasmInitialized) {
15422                 throw new Error("initializeWasm() must be awaited first!");
15423         }
15424         const nativeResponseValue = wasm.TS_OpenChannel_set_first_per_commitment_point(this_ptr, val);
15425         // debug statements here
15426 }
15427         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15428 export function OpenChannel_get_channel_flags(this_ptr: number): number {
15429         if(!isWasmInitialized) {
15430                 throw new Error("initializeWasm() must be awaited first!");
15431         }
15432         const nativeResponseValue = wasm.TS_OpenChannel_get_channel_flags(this_ptr);
15433         return nativeResponseValue;
15434 }
15435         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
15436 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
15437         if(!isWasmInitialized) {
15438                 throw new Error("initializeWasm() must be awaited first!");
15439         }
15440         const nativeResponseValue = wasm.TS_OpenChannel_set_channel_flags(this_ptr, val);
15441         // debug statements here
15442 }
15443         // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
15444 export function OpenChannel_get_channel_type(this_ptr: number): number {
15445         if(!isWasmInitialized) {
15446                 throw new Error("initializeWasm() must be awaited first!");
15447         }
15448         const nativeResponseValue = wasm.TS_OpenChannel_get_channel_type(this_ptr);
15449         return nativeResponseValue;
15450 }
15451         // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
15452 export function OpenChannel_set_channel_type(this_ptr: number, val: number): void {
15453         if(!isWasmInitialized) {
15454                 throw new Error("initializeWasm() must be awaited first!");
15455         }
15456         const nativeResponseValue = wasm.TS_OpenChannel_set_channel_type(this_ptr, val);
15457         // debug statements here
15458 }
15459         // uintptr_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
15460 export function OpenChannel_clone_ptr(arg: number): number {
15461         if(!isWasmInitialized) {
15462                 throw new Error("initializeWasm() must be awaited first!");
15463         }
15464         const nativeResponseValue = wasm.TS_OpenChannel_clone_ptr(arg);
15465         return nativeResponseValue;
15466 }
15467         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
15468 export function OpenChannel_clone(orig: number): number {
15469         if(!isWasmInitialized) {
15470                 throw new Error("initializeWasm() must be awaited first!");
15471         }
15472         const nativeResponseValue = wasm.TS_OpenChannel_clone(orig);
15473         return nativeResponseValue;
15474 }
15475         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
15476 export function AcceptChannel_free(this_obj: number): void {
15477         if(!isWasmInitialized) {
15478                 throw new Error("initializeWasm() must be awaited first!");
15479         }
15480         const nativeResponseValue = wasm.TS_AcceptChannel_free(this_obj);
15481         // debug statements here
15482 }
15483         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
15484 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): number {
15485         if(!isWasmInitialized) {
15486                 throw new Error("initializeWasm() must be awaited first!");
15487         }
15488         const nativeResponseValue = wasm.TS_AcceptChannel_get_temporary_channel_id(this_ptr);
15489         return nativeResponseValue;
15490 }
15491         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15492 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: number): void {
15493         if(!isWasmInitialized) {
15494                 throw new Error("initializeWasm() must be awaited first!");
15495         }
15496         const nativeResponseValue = wasm.TS_AcceptChannel_set_temporary_channel_id(this_ptr, val);
15497         // debug statements here
15498 }
15499         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15500 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): bigint {
15501         if(!isWasmInitialized) {
15502                 throw new Error("initializeWasm() must be awaited first!");
15503         }
15504         const nativeResponseValue = wasm.TS_AcceptChannel_get_dust_limit_satoshis(this_ptr);
15505         return nativeResponseValue;
15506 }
15507         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
15508 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: bigint): void {
15509         if(!isWasmInitialized) {
15510                 throw new Error("initializeWasm() must be awaited first!");
15511         }
15512         const nativeResponseValue = wasm.TS_AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
15513         // debug statements here
15514 }
15515         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15516 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): bigint {
15517         if(!isWasmInitialized) {
15518                 throw new Error("initializeWasm() must be awaited first!");
15519         }
15520         const nativeResponseValue = wasm.TS_AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
15521         return nativeResponseValue;
15522 }
15523         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
15524 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: bigint): void {
15525         if(!isWasmInitialized) {
15526                 throw new Error("initializeWasm() must be awaited first!");
15527         }
15528         const nativeResponseValue = wasm.TS_AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
15529         // debug statements here
15530 }
15531         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15532 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): bigint {
15533         if(!isWasmInitialized) {
15534                 throw new Error("initializeWasm() must be awaited first!");
15535         }
15536         const nativeResponseValue = wasm.TS_AcceptChannel_get_channel_reserve_satoshis(this_ptr);
15537         return nativeResponseValue;
15538 }
15539         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
15540 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: bigint): void {
15541         if(!isWasmInitialized) {
15542                 throw new Error("initializeWasm() must be awaited first!");
15543         }
15544         const nativeResponseValue = wasm.TS_AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
15545         // debug statements here
15546 }
15547         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15548 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): bigint {
15549         if(!isWasmInitialized) {
15550                 throw new Error("initializeWasm() must be awaited first!");
15551         }
15552         const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_minimum_msat(this_ptr);
15553         return nativeResponseValue;
15554 }
15555         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
15556 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
15557         if(!isWasmInitialized) {
15558                 throw new Error("initializeWasm() must be awaited first!");
15559         }
15560         const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
15561         // debug statements here
15562 }
15563         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15564 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
15565         if(!isWasmInitialized) {
15566                 throw new Error("initializeWasm() must be awaited first!");
15567         }
15568         const nativeResponseValue = wasm.TS_AcceptChannel_get_minimum_depth(this_ptr);
15569         return nativeResponseValue;
15570 }
15571         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
15572 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
15573         if(!isWasmInitialized) {
15574                 throw new Error("initializeWasm() must be awaited first!");
15575         }
15576         const nativeResponseValue = wasm.TS_AcceptChannel_set_minimum_depth(this_ptr, val);
15577         // debug statements here
15578 }
15579         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15580 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
15581         if(!isWasmInitialized) {
15582                 throw new Error("initializeWasm() must be awaited first!");
15583         }
15584         const nativeResponseValue = wasm.TS_AcceptChannel_get_to_self_delay(this_ptr);
15585         return nativeResponseValue;
15586 }
15587         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
15588 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
15589         if(!isWasmInitialized) {
15590                 throw new Error("initializeWasm() must be awaited first!");
15591         }
15592         const nativeResponseValue = wasm.TS_AcceptChannel_set_to_self_delay(this_ptr, val);
15593         // debug statements here
15594 }
15595         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15596 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
15597         if(!isWasmInitialized) {
15598                 throw new Error("initializeWasm() must be awaited first!");
15599         }
15600         const nativeResponseValue = wasm.TS_AcceptChannel_get_max_accepted_htlcs(this_ptr);
15601         return nativeResponseValue;
15602 }
15603         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
15604 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
15605         if(!isWasmInitialized) {
15606                 throw new Error("initializeWasm() must be awaited first!");
15607         }
15608         const nativeResponseValue = wasm.TS_AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
15609         // debug statements here
15610 }
15611         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15612 export function AcceptChannel_get_funding_pubkey(this_ptr: number): number {
15613         if(!isWasmInitialized) {
15614                 throw new Error("initializeWasm() must be awaited first!");
15615         }
15616         const nativeResponseValue = wasm.TS_AcceptChannel_get_funding_pubkey(this_ptr);
15617         return nativeResponseValue;
15618 }
15619         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15620 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: number): void {
15621         if(!isWasmInitialized) {
15622                 throw new Error("initializeWasm() must be awaited first!");
15623         }
15624         const nativeResponseValue = wasm.TS_AcceptChannel_set_funding_pubkey(this_ptr, val);
15625         // debug statements here
15626 }
15627         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15628 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): number {
15629         if(!isWasmInitialized) {
15630                 throw new Error("initializeWasm() must be awaited first!");
15631         }
15632         const nativeResponseValue = wasm.TS_AcceptChannel_get_revocation_basepoint(this_ptr);
15633         return nativeResponseValue;
15634 }
15635         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15636 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: number): void {
15637         if(!isWasmInitialized) {
15638                 throw new Error("initializeWasm() must be awaited first!");
15639         }
15640         const nativeResponseValue = wasm.TS_AcceptChannel_set_revocation_basepoint(this_ptr, val);
15641         // debug statements here
15642 }
15643         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15644 export function AcceptChannel_get_payment_point(this_ptr: number): number {
15645         if(!isWasmInitialized) {
15646                 throw new Error("initializeWasm() must be awaited first!");
15647         }
15648         const nativeResponseValue = wasm.TS_AcceptChannel_get_payment_point(this_ptr);
15649         return nativeResponseValue;
15650 }
15651         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15652 export function AcceptChannel_set_payment_point(this_ptr: number, val: number): void {
15653         if(!isWasmInitialized) {
15654                 throw new Error("initializeWasm() must be awaited first!");
15655         }
15656         const nativeResponseValue = wasm.TS_AcceptChannel_set_payment_point(this_ptr, val);
15657         // debug statements here
15658 }
15659         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15660 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): number {
15661         if(!isWasmInitialized) {
15662                 throw new Error("initializeWasm() must be awaited first!");
15663         }
15664         const nativeResponseValue = wasm.TS_AcceptChannel_get_delayed_payment_basepoint(this_ptr);
15665         return nativeResponseValue;
15666 }
15667         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15668 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: number): void {
15669         if(!isWasmInitialized) {
15670                 throw new Error("initializeWasm() must be awaited first!");
15671         }
15672         const nativeResponseValue = wasm.TS_AcceptChannel_set_delayed_payment_basepoint(this_ptr, val);
15673         // debug statements here
15674 }
15675         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15676 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): number {
15677         if(!isWasmInitialized) {
15678                 throw new Error("initializeWasm() must be awaited first!");
15679         }
15680         const nativeResponseValue = wasm.TS_AcceptChannel_get_htlc_basepoint(this_ptr);
15681         return nativeResponseValue;
15682 }
15683         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15684 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: number): void {
15685         if(!isWasmInitialized) {
15686                 throw new Error("initializeWasm() must be awaited first!");
15687         }
15688         const nativeResponseValue = wasm.TS_AcceptChannel_set_htlc_basepoint(this_ptr, val);
15689         // debug statements here
15690 }
15691         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
15692 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): number {
15693         if(!isWasmInitialized) {
15694                 throw new Error("initializeWasm() must be awaited first!");
15695         }
15696         const nativeResponseValue = wasm.TS_AcceptChannel_get_first_per_commitment_point(this_ptr);
15697         return nativeResponseValue;
15698 }
15699         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15700 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: number): void {
15701         if(!isWasmInitialized) {
15702                 throw new Error("initializeWasm() must be awaited first!");
15703         }
15704         const nativeResponseValue = wasm.TS_AcceptChannel_set_first_per_commitment_point(this_ptr, val);
15705         // debug statements here
15706 }
15707         // uintptr_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
15708 export function AcceptChannel_clone_ptr(arg: number): number {
15709         if(!isWasmInitialized) {
15710                 throw new Error("initializeWasm() must be awaited first!");
15711         }
15712         const nativeResponseValue = wasm.TS_AcceptChannel_clone_ptr(arg);
15713         return nativeResponseValue;
15714 }
15715         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
15716 export function AcceptChannel_clone(orig: number): number {
15717         if(!isWasmInitialized) {
15718                 throw new Error("initializeWasm() must be awaited first!");
15719         }
15720         const nativeResponseValue = wasm.TS_AcceptChannel_clone(orig);
15721         return nativeResponseValue;
15722 }
15723         // void FundingCreated_free(struct LDKFundingCreated this_obj);
15724 export function FundingCreated_free(this_obj: number): void {
15725         if(!isWasmInitialized) {
15726                 throw new Error("initializeWasm() must be awaited first!");
15727         }
15728         const nativeResponseValue = wasm.TS_FundingCreated_free(this_obj);
15729         // debug statements here
15730 }
15731         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
15732 export function FundingCreated_get_temporary_channel_id(this_ptr: number): number {
15733         if(!isWasmInitialized) {
15734                 throw new Error("initializeWasm() must be awaited first!");
15735         }
15736         const nativeResponseValue = wasm.TS_FundingCreated_get_temporary_channel_id(this_ptr);
15737         return nativeResponseValue;
15738 }
15739         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15740 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: number): void {
15741         if(!isWasmInitialized) {
15742                 throw new Error("initializeWasm() must be awaited first!");
15743         }
15744         const nativeResponseValue = wasm.TS_FundingCreated_set_temporary_channel_id(this_ptr, val);
15745         // debug statements here
15746 }
15747         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
15748 export function FundingCreated_get_funding_txid(this_ptr: number): number {
15749         if(!isWasmInitialized) {
15750                 throw new Error("initializeWasm() must be awaited first!");
15751         }
15752         const nativeResponseValue = wasm.TS_FundingCreated_get_funding_txid(this_ptr);
15753         return nativeResponseValue;
15754 }
15755         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15756 export function FundingCreated_set_funding_txid(this_ptr: number, val: number): void {
15757         if(!isWasmInitialized) {
15758                 throw new Error("initializeWasm() must be awaited first!");
15759         }
15760         const nativeResponseValue = wasm.TS_FundingCreated_set_funding_txid(this_ptr, val);
15761         // debug statements here
15762 }
15763         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
15764 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
15765         if(!isWasmInitialized) {
15766                 throw new Error("initializeWasm() must be awaited first!");
15767         }
15768         const nativeResponseValue = wasm.TS_FundingCreated_get_funding_output_index(this_ptr);
15769         return nativeResponseValue;
15770 }
15771         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
15772 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
15773         if(!isWasmInitialized) {
15774                 throw new Error("initializeWasm() must be awaited first!");
15775         }
15776         const nativeResponseValue = wasm.TS_FundingCreated_set_funding_output_index(this_ptr, val);
15777         // debug statements here
15778 }
15779         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
15780 export function FundingCreated_get_signature(this_ptr: number): number {
15781         if(!isWasmInitialized) {
15782                 throw new Error("initializeWasm() must be awaited first!");
15783         }
15784         const nativeResponseValue = wasm.TS_FundingCreated_get_signature(this_ptr);
15785         return nativeResponseValue;
15786 }
15787         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
15788 export function FundingCreated_set_signature(this_ptr: number, val: number): void {
15789         if(!isWasmInitialized) {
15790                 throw new Error("initializeWasm() must be awaited first!");
15791         }
15792         const nativeResponseValue = wasm.TS_FundingCreated_set_signature(this_ptr, val);
15793         // debug statements here
15794 }
15795         // 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);
15796 export function FundingCreated_new(temporary_channel_id_arg: number, funding_txid_arg: number, funding_output_index_arg: number, signature_arg: number): number {
15797         if(!isWasmInitialized) {
15798                 throw new Error("initializeWasm() must be awaited first!");
15799         }
15800         const nativeResponseValue = wasm.TS_FundingCreated_new(temporary_channel_id_arg, funding_txid_arg, funding_output_index_arg, signature_arg);
15801         return nativeResponseValue;
15802 }
15803         // uintptr_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
15804 export function FundingCreated_clone_ptr(arg: number): number {
15805         if(!isWasmInitialized) {
15806                 throw new Error("initializeWasm() must be awaited first!");
15807         }
15808         const nativeResponseValue = wasm.TS_FundingCreated_clone_ptr(arg);
15809         return nativeResponseValue;
15810 }
15811         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
15812 export function FundingCreated_clone(orig: number): number {
15813         if(!isWasmInitialized) {
15814                 throw new Error("initializeWasm() must be awaited first!");
15815         }
15816         const nativeResponseValue = wasm.TS_FundingCreated_clone(orig);
15817         return nativeResponseValue;
15818 }
15819         // void FundingSigned_free(struct LDKFundingSigned this_obj);
15820 export function FundingSigned_free(this_obj: number): void {
15821         if(!isWasmInitialized) {
15822                 throw new Error("initializeWasm() must be awaited first!");
15823         }
15824         const nativeResponseValue = wasm.TS_FundingSigned_free(this_obj);
15825         // debug statements here
15826 }
15827         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
15828 export function FundingSigned_get_channel_id(this_ptr: number): number {
15829         if(!isWasmInitialized) {
15830                 throw new Error("initializeWasm() must be awaited first!");
15831         }
15832         const nativeResponseValue = wasm.TS_FundingSigned_get_channel_id(this_ptr);
15833         return nativeResponseValue;
15834 }
15835         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15836 export function FundingSigned_set_channel_id(this_ptr: number, val: number): void {
15837         if(!isWasmInitialized) {
15838                 throw new Error("initializeWasm() must be awaited first!");
15839         }
15840         const nativeResponseValue = wasm.TS_FundingSigned_set_channel_id(this_ptr, val);
15841         // debug statements here
15842 }
15843         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
15844 export function FundingSigned_get_signature(this_ptr: number): number {
15845         if(!isWasmInitialized) {
15846                 throw new Error("initializeWasm() must be awaited first!");
15847         }
15848         const nativeResponseValue = wasm.TS_FundingSigned_get_signature(this_ptr);
15849         return nativeResponseValue;
15850 }
15851         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
15852 export function FundingSigned_set_signature(this_ptr: number, val: number): void {
15853         if(!isWasmInitialized) {
15854                 throw new Error("initializeWasm() must be awaited first!");
15855         }
15856         const nativeResponseValue = wasm.TS_FundingSigned_set_signature(this_ptr, val);
15857         // debug statements here
15858 }
15859         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
15860 export function FundingSigned_new(channel_id_arg: number, signature_arg: number): number {
15861         if(!isWasmInitialized) {
15862                 throw new Error("initializeWasm() must be awaited first!");
15863         }
15864         const nativeResponseValue = wasm.TS_FundingSigned_new(channel_id_arg, signature_arg);
15865         return nativeResponseValue;
15866 }
15867         // uintptr_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
15868 export function FundingSigned_clone_ptr(arg: number): number {
15869         if(!isWasmInitialized) {
15870                 throw new Error("initializeWasm() must be awaited first!");
15871         }
15872         const nativeResponseValue = wasm.TS_FundingSigned_clone_ptr(arg);
15873         return nativeResponseValue;
15874 }
15875         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
15876 export function FundingSigned_clone(orig: number): number {
15877         if(!isWasmInitialized) {
15878                 throw new Error("initializeWasm() must be awaited first!");
15879         }
15880         const nativeResponseValue = wasm.TS_FundingSigned_clone(orig);
15881         return nativeResponseValue;
15882 }
15883         // void FundingLocked_free(struct LDKFundingLocked this_obj);
15884 export function FundingLocked_free(this_obj: number): void {
15885         if(!isWasmInitialized) {
15886                 throw new Error("initializeWasm() must be awaited first!");
15887         }
15888         const nativeResponseValue = wasm.TS_FundingLocked_free(this_obj);
15889         // debug statements here
15890 }
15891         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
15892 export function FundingLocked_get_channel_id(this_ptr: number): number {
15893         if(!isWasmInitialized) {
15894                 throw new Error("initializeWasm() must be awaited first!");
15895         }
15896         const nativeResponseValue = wasm.TS_FundingLocked_get_channel_id(this_ptr);
15897         return nativeResponseValue;
15898 }
15899         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15900 export function FundingLocked_set_channel_id(this_ptr: number, val: number): void {
15901         if(!isWasmInitialized) {
15902                 throw new Error("initializeWasm() must be awaited first!");
15903         }
15904         const nativeResponseValue = wasm.TS_FundingLocked_set_channel_id(this_ptr, val);
15905         // debug statements here
15906 }
15907         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
15908 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): number {
15909         if(!isWasmInitialized) {
15910                 throw new Error("initializeWasm() must be awaited first!");
15911         }
15912         const nativeResponseValue = wasm.TS_FundingLocked_get_next_per_commitment_point(this_ptr);
15913         return nativeResponseValue;
15914 }
15915         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15916 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: number): void {
15917         if(!isWasmInitialized) {
15918                 throw new Error("initializeWasm() must be awaited first!");
15919         }
15920         const nativeResponseValue = wasm.TS_FundingLocked_set_next_per_commitment_point(this_ptr, val);
15921         // debug statements here
15922 }
15923         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
15924 export function FundingLocked_new(channel_id_arg: number, next_per_commitment_point_arg: number): number {
15925         if(!isWasmInitialized) {
15926                 throw new Error("initializeWasm() must be awaited first!");
15927         }
15928         const nativeResponseValue = wasm.TS_FundingLocked_new(channel_id_arg, next_per_commitment_point_arg);
15929         return nativeResponseValue;
15930 }
15931         // uintptr_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
15932 export function FundingLocked_clone_ptr(arg: number): number {
15933         if(!isWasmInitialized) {
15934                 throw new Error("initializeWasm() must be awaited first!");
15935         }
15936         const nativeResponseValue = wasm.TS_FundingLocked_clone_ptr(arg);
15937         return nativeResponseValue;
15938 }
15939         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
15940 export function FundingLocked_clone(orig: number): number {
15941         if(!isWasmInitialized) {
15942                 throw new Error("initializeWasm() must be awaited first!");
15943         }
15944         const nativeResponseValue = wasm.TS_FundingLocked_clone(orig);
15945         return nativeResponseValue;
15946 }
15947         // void Shutdown_free(struct LDKShutdown this_obj);
15948 export function Shutdown_free(this_obj: number): void {
15949         if(!isWasmInitialized) {
15950                 throw new Error("initializeWasm() must be awaited first!");
15951         }
15952         const nativeResponseValue = wasm.TS_Shutdown_free(this_obj);
15953         // debug statements here
15954 }
15955         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
15956 export function Shutdown_get_channel_id(this_ptr: number): number {
15957         if(!isWasmInitialized) {
15958                 throw new Error("initializeWasm() must be awaited first!");
15959         }
15960         const nativeResponseValue = wasm.TS_Shutdown_get_channel_id(this_ptr);
15961         return nativeResponseValue;
15962 }
15963         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15964 export function Shutdown_set_channel_id(this_ptr: number, val: number): void {
15965         if(!isWasmInitialized) {
15966                 throw new Error("initializeWasm() must be awaited first!");
15967         }
15968         const nativeResponseValue = wasm.TS_Shutdown_set_channel_id(this_ptr, val);
15969         // debug statements here
15970 }
15971         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
15972 export function Shutdown_get_scriptpubkey(this_ptr: number): number {
15973         if(!isWasmInitialized) {
15974                 throw new Error("initializeWasm() must be awaited first!");
15975         }
15976         const nativeResponseValue = wasm.TS_Shutdown_get_scriptpubkey(this_ptr);
15977         return nativeResponseValue;
15978 }
15979         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15980 export function Shutdown_set_scriptpubkey(this_ptr: number, val: number): void {
15981         if(!isWasmInitialized) {
15982                 throw new Error("initializeWasm() must be awaited first!");
15983         }
15984         const nativeResponseValue = wasm.TS_Shutdown_set_scriptpubkey(this_ptr, val);
15985         // debug statements here
15986 }
15987         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
15988 export function Shutdown_new(channel_id_arg: number, scriptpubkey_arg: number): number {
15989         if(!isWasmInitialized) {
15990                 throw new Error("initializeWasm() must be awaited first!");
15991         }
15992         const nativeResponseValue = wasm.TS_Shutdown_new(channel_id_arg, scriptpubkey_arg);
15993         return nativeResponseValue;
15994 }
15995         // uintptr_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
15996 export function Shutdown_clone_ptr(arg: number): number {
15997         if(!isWasmInitialized) {
15998                 throw new Error("initializeWasm() must be awaited first!");
15999         }
16000         const nativeResponseValue = wasm.TS_Shutdown_clone_ptr(arg);
16001         return nativeResponseValue;
16002 }
16003         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
16004 export function Shutdown_clone(orig: number): number {
16005         if(!isWasmInitialized) {
16006                 throw new Error("initializeWasm() must be awaited first!");
16007         }
16008         const nativeResponseValue = wasm.TS_Shutdown_clone(orig);
16009         return nativeResponseValue;
16010 }
16011         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
16012 export function ClosingSignedFeeRange_free(this_obj: number): void {
16013         if(!isWasmInitialized) {
16014                 throw new Error("initializeWasm() must be awaited first!");
16015         }
16016         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_free(this_obj);
16017         // debug statements here
16018 }
16019         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
16020 export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): bigint {
16021         if(!isWasmInitialized) {
16022                 throw new Error("initializeWasm() must be awaited first!");
16023         }
16024         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
16025         return nativeResponseValue;
16026 }
16027         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
16028 export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: bigint): void {
16029         if(!isWasmInitialized) {
16030                 throw new Error("initializeWasm() must be awaited first!");
16031         }
16032         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
16033         // debug statements here
16034 }
16035         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
16036 export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): bigint {
16037         if(!isWasmInitialized) {
16038                 throw new Error("initializeWasm() must be awaited first!");
16039         }
16040         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
16041         return nativeResponseValue;
16042 }
16043         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
16044 export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: bigint): void {
16045         if(!isWasmInitialized) {
16046                 throw new Error("initializeWasm() must be awaited first!");
16047         }
16048         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
16049         // debug statements here
16050 }
16051         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
16052 export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: bigint, max_fee_satoshis_arg: bigint): number {
16053         if(!isWasmInitialized) {
16054                 throw new Error("initializeWasm() must be awaited first!");
16055         }
16056         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
16057         return nativeResponseValue;
16058 }
16059         // uintptr_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
16060 export function ClosingSignedFeeRange_clone_ptr(arg: number): number {
16061         if(!isWasmInitialized) {
16062                 throw new Error("initializeWasm() must be awaited first!");
16063         }
16064         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone_ptr(arg);
16065         return nativeResponseValue;
16066 }
16067         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
16068 export function ClosingSignedFeeRange_clone(orig: number): number {
16069         if(!isWasmInitialized) {
16070                 throw new Error("initializeWasm() must be awaited first!");
16071         }
16072         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_clone(orig);
16073         return nativeResponseValue;
16074 }
16075         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
16076 export function ClosingSigned_free(this_obj: number): void {
16077         if(!isWasmInitialized) {
16078                 throw new Error("initializeWasm() must be awaited first!");
16079         }
16080         const nativeResponseValue = wasm.TS_ClosingSigned_free(this_obj);
16081         // debug statements here
16082 }
16083         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
16084 export function ClosingSigned_get_channel_id(this_ptr: number): number {
16085         if(!isWasmInitialized) {
16086                 throw new Error("initializeWasm() must be awaited first!");
16087         }
16088         const nativeResponseValue = wasm.TS_ClosingSigned_get_channel_id(this_ptr);
16089         return nativeResponseValue;
16090 }
16091         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16092 export function ClosingSigned_set_channel_id(this_ptr: number, val: number): void {
16093         if(!isWasmInitialized) {
16094                 throw new Error("initializeWasm() must be awaited first!");
16095         }
16096         const nativeResponseValue = wasm.TS_ClosingSigned_set_channel_id(this_ptr, val);
16097         // debug statements here
16098 }
16099         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
16100 export function ClosingSigned_get_fee_satoshis(this_ptr: number): bigint {
16101         if(!isWasmInitialized) {
16102                 throw new Error("initializeWasm() must be awaited first!");
16103         }
16104         const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_satoshis(this_ptr);
16105         return nativeResponseValue;
16106 }
16107         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
16108 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: bigint): void {
16109         if(!isWasmInitialized) {
16110                 throw new Error("initializeWasm() must be awaited first!");
16111         }
16112         const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_satoshis(this_ptr, val);
16113         // debug statements here
16114 }
16115         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
16116 export function ClosingSigned_get_signature(this_ptr: number): number {
16117         if(!isWasmInitialized) {
16118                 throw new Error("initializeWasm() must be awaited first!");
16119         }
16120         const nativeResponseValue = wasm.TS_ClosingSigned_get_signature(this_ptr);
16121         return nativeResponseValue;
16122 }
16123         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
16124 export function ClosingSigned_set_signature(this_ptr: number, val: number): void {
16125         if(!isWasmInitialized) {
16126                 throw new Error("initializeWasm() must be awaited first!");
16127         }
16128         const nativeResponseValue = wasm.TS_ClosingSigned_set_signature(this_ptr, val);
16129         // debug statements here
16130 }
16131         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
16132 export function ClosingSigned_get_fee_range(this_ptr: number): number {
16133         if(!isWasmInitialized) {
16134                 throw new Error("initializeWasm() must be awaited first!");
16135         }
16136         const nativeResponseValue = wasm.TS_ClosingSigned_get_fee_range(this_ptr);
16137         return nativeResponseValue;
16138 }
16139         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
16140 export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
16141         if(!isWasmInitialized) {
16142                 throw new Error("initializeWasm() must be awaited first!");
16143         }
16144         const nativeResponseValue = wasm.TS_ClosingSigned_set_fee_range(this_ptr, val);
16145         // debug statements here
16146 }
16147         // 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);
16148 export function ClosingSigned_new(channel_id_arg: number, fee_satoshis_arg: bigint, signature_arg: number, fee_range_arg: number): number {
16149         if(!isWasmInitialized) {
16150                 throw new Error("initializeWasm() must be awaited first!");
16151         }
16152         const nativeResponseValue = wasm.TS_ClosingSigned_new(channel_id_arg, fee_satoshis_arg, signature_arg, fee_range_arg);
16153         return nativeResponseValue;
16154 }
16155         // uintptr_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
16156 export function ClosingSigned_clone_ptr(arg: number): number {
16157         if(!isWasmInitialized) {
16158                 throw new Error("initializeWasm() must be awaited first!");
16159         }
16160         const nativeResponseValue = wasm.TS_ClosingSigned_clone_ptr(arg);
16161         return nativeResponseValue;
16162 }
16163         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
16164 export function ClosingSigned_clone(orig: number): number {
16165         if(!isWasmInitialized) {
16166                 throw new Error("initializeWasm() must be awaited first!");
16167         }
16168         const nativeResponseValue = wasm.TS_ClosingSigned_clone(orig);
16169         return nativeResponseValue;
16170 }
16171         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
16172 export function UpdateAddHTLC_free(this_obj: number): void {
16173         if(!isWasmInitialized) {
16174                 throw new Error("initializeWasm() must be awaited first!");
16175         }
16176         const nativeResponseValue = wasm.TS_UpdateAddHTLC_free(this_obj);
16177         // debug statements here
16178 }
16179         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
16180 export function UpdateAddHTLC_get_channel_id(this_ptr: number): number {
16181         if(!isWasmInitialized) {
16182                 throw new Error("initializeWasm() must be awaited first!");
16183         }
16184         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_channel_id(this_ptr);
16185         return nativeResponseValue;
16186 }
16187         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16188 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: number): void {
16189         if(!isWasmInitialized) {
16190                 throw new Error("initializeWasm() must be awaited first!");
16191         }
16192         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_channel_id(this_ptr, val);
16193         // debug statements here
16194 }
16195         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
16196 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): bigint {
16197         if(!isWasmInitialized) {
16198                 throw new Error("initializeWasm() must be awaited first!");
16199         }
16200         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_htlc_id(this_ptr);
16201         return nativeResponseValue;
16202 }
16203         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
16204 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
16205         if(!isWasmInitialized) {
16206                 throw new Error("initializeWasm() must be awaited first!");
16207         }
16208         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_htlc_id(this_ptr, val);
16209         // debug statements here
16210 }
16211         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
16212 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): bigint {
16213         if(!isWasmInitialized) {
16214                 throw new Error("initializeWasm() must be awaited first!");
16215         }
16216         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_amount_msat(this_ptr);
16217         return nativeResponseValue;
16218 }
16219         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
16220 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: bigint): void {
16221         if(!isWasmInitialized) {
16222                 throw new Error("initializeWasm() must be awaited first!");
16223         }
16224         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_amount_msat(this_ptr, val);
16225         // debug statements here
16226 }
16227         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
16228 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): number {
16229         if(!isWasmInitialized) {
16230                 throw new Error("initializeWasm() must be awaited first!");
16231         }
16232         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_payment_hash(this_ptr);
16233         return nativeResponseValue;
16234 }
16235         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16236 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: number): void {
16237         if(!isWasmInitialized) {
16238                 throw new Error("initializeWasm() must be awaited first!");
16239         }
16240         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_payment_hash(this_ptr, val);
16241         // debug statements here
16242 }
16243         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
16244 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
16245         if(!isWasmInitialized) {
16246                 throw new Error("initializeWasm() must be awaited first!");
16247         }
16248         const nativeResponseValue = wasm.TS_UpdateAddHTLC_get_cltv_expiry(this_ptr);
16249         return nativeResponseValue;
16250 }
16251         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
16252 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
16253         if(!isWasmInitialized) {
16254                 throw new Error("initializeWasm() must be awaited first!");
16255         }
16256         const nativeResponseValue = wasm.TS_UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
16257         // debug statements here
16258 }
16259         // uintptr_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
16260 export function UpdateAddHTLC_clone_ptr(arg: number): number {
16261         if(!isWasmInitialized) {
16262                 throw new Error("initializeWasm() must be awaited first!");
16263         }
16264         const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone_ptr(arg);
16265         return nativeResponseValue;
16266 }
16267         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
16268 export function UpdateAddHTLC_clone(orig: number): number {
16269         if(!isWasmInitialized) {
16270                 throw new Error("initializeWasm() must be awaited first!");
16271         }
16272         const nativeResponseValue = wasm.TS_UpdateAddHTLC_clone(orig);
16273         return nativeResponseValue;
16274 }
16275         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
16276 export function UpdateFulfillHTLC_free(this_obj: number): void {
16277         if(!isWasmInitialized) {
16278                 throw new Error("initializeWasm() must be awaited first!");
16279         }
16280         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_free(this_obj);
16281         // debug statements here
16282 }
16283         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
16284 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): number {
16285         if(!isWasmInitialized) {
16286                 throw new Error("initializeWasm() must be awaited first!");
16287         }
16288         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_channel_id(this_ptr);
16289         return nativeResponseValue;
16290 }
16291         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16292 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: number): void {
16293         if(!isWasmInitialized) {
16294                 throw new Error("initializeWasm() must be awaited first!");
16295         }
16296         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_channel_id(this_ptr, val);
16297         // debug statements here
16298 }
16299         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
16300 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): bigint {
16301         if(!isWasmInitialized) {
16302                 throw new Error("initializeWasm() must be awaited first!");
16303         }
16304         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_htlc_id(this_ptr);
16305         return nativeResponseValue;
16306 }
16307         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
16308 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
16309         if(!isWasmInitialized) {
16310                 throw new Error("initializeWasm() must be awaited first!");
16311         }
16312         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
16313         // debug statements here
16314 }
16315         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
16316 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): number {
16317         if(!isWasmInitialized) {
16318                 throw new Error("initializeWasm() must be awaited first!");
16319         }
16320         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_get_payment_preimage(this_ptr);
16321         return nativeResponseValue;
16322 }
16323         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16324 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: number): void {
16325         if(!isWasmInitialized) {
16326                 throw new Error("initializeWasm() must be awaited first!");
16327         }
16328         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_set_payment_preimage(this_ptr, val);
16329         // debug statements here
16330 }
16331         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
16332 export function UpdateFulfillHTLC_new(channel_id_arg: number, htlc_id_arg: bigint, payment_preimage_arg: number): number {
16333         if(!isWasmInitialized) {
16334                 throw new Error("initializeWasm() must be awaited first!");
16335         }
16336         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_new(channel_id_arg, htlc_id_arg, payment_preimage_arg);
16337         return nativeResponseValue;
16338 }
16339         // uintptr_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
16340 export function UpdateFulfillHTLC_clone_ptr(arg: number): number {
16341         if(!isWasmInitialized) {
16342                 throw new Error("initializeWasm() must be awaited first!");
16343         }
16344         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone_ptr(arg);
16345         return nativeResponseValue;
16346 }
16347         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
16348 export function UpdateFulfillHTLC_clone(orig: number): number {
16349         if(!isWasmInitialized) {
16350                 throw new Error("initializeWasm() must be awaited first!");
16351         }
16352         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_clone(orig);
16353         return nativeResponseValue;
16354 }
16355         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
16356 export function UpdateFailHTLC_free(this_obj: number): void {
16357         if(!isWasmInitialized) {
16358                 throw new Error("initializeWasm() must be awaited first!");
16359         }
16360         const nativeResponseValue = wasm.TS_UpdateFailHTLC_free(this_obj);
16361         // debug statements here
16362 }
16363         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
16364 export function UpdateFailHTLC_get_channel_id(this_ptr: number): number {
16365         if(!isWasmInitialized) {
16366                 throw new Error("initializeWasm() must be awaited first!");
16367         }
16368         const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_channel_id(this_ptr);
16369         return nativeResponseValue;
16370 }
16371         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16372 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: number): void {
16373         if(!isWasmInitialized) {
16374                 throw new Error("initializeWasm() must be awaited first!");
16375         }
16376         const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_channel_id(this_ptr, val);
16377         // debug statements here
16378 }
16379         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
16380 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): bigint {
16381         if(!isWasmInitialized) {
16382                 throw new Error("initializeWasm() must be awaited first!");
16383         }
16384         const nativeResponseValue = wasm.TS_UpdateFailHTLC_get_htlc_id(this_ptr);
16385         return nativeResponseValue;
16386 }
16387         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
16388 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
16389         if(!isWasmInitialized) {
16390                 throw new Error("initializeWasm() must be awaited first!");
16391         }
16392         const nativeResponseValue = wasm.TS_UpdateFailHTLC_set_htlc_id(this_ptr, val);
16393         // debug statements here
16394 }
16395         // uintptr_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
16396 export function UpdateFailHTLC_clone_ptr(arg: number): number {
16397         if(!isWasmInitialized) {
16398                 throw new Error("initializeWasm() must be awaited first!");
16399         }
16400         const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone_ptr(arg);
16401         return nativeResponseValue;
16402 }
16403         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
16404 export function UpdateFailHTLC_clone(orig: number): number {
16405         if(!isWasmInitialized) {
16406                 throw new Error("initializeWasm() must be awaited first!");
16407         }
16408         const nativeResponseValue = wasm.TS_UpdateFailHTLC_clone(orig);
16409         return nativeResponseValue;
16410 }
16411         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
16412 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
16413         if(!isWasmInitialized) {
16414                 throw new Error("initializeWasm() must be awaited first!");
16415         }
16416         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_free(this_obj);
16417         // debug statements here
16418 }
16419         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
16420 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): number {
16421         if(!isWasmInitialized) {
16422                 throw new Error("initializeWasm() must be awaited first!");
16423         }
16424         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_channel_id(this_ptr);
16425         return nativeResponseValue;
16426 }
16427         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16428 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: number): void {
16429         if(!isWasmInitialized) {
16430                 throw new Error("initializeWasm() must be awaited first!");
16431         }
16432         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_channel_id(this_ptr, val);
16433         // debug statements here
16434 }
16435         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
16436 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): bigint {
16437         if(!isWasmInitialized) {
16438                 throw new Error("initializeWasm() must be awaited first!");
16439         }
16440         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
16441         return nativeResponseValue;
16442 }
16443         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
16444 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: bigint): void {
16445         if(!isWasmInitialized) {
16446                 throw new Error("initializeWasm() must be awaited first!");
16447         }
16448         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
16449         // debug statements here
16450 }
16451         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
16452 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
16453         if(!isWasmInitialized) {
16454                 throw new Error("initializeWasm() must be awaited first!");
16455         }
16456         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_get_failure_code(this_ptr);
16457         return nativeResponseValue;
16458 }
16459         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
16460 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
16461         if(!isWasmInitialized) {
16462                 throw new Error("initializeWasm() must be awaited first!");
16463         }
16464         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
16465         // debug statements here
16466 }
16467         // uintptr_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
16468 export function UpdateFailMalformedHTLC_clone_ptr(arg: number): number {
16469         if(!isWasmInitialized) {
16470                 throw new Error("initializeWasm() must be awaited first!");
16471         }
16472         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone_ptr(arg);
16473         return nativeResponseValue;
16474 }
16475         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
16476 export function UpdateFailMalformedHTLC_clone(orig: number): number {
16477         if(!isWasmInitialized) {
16478                 throw new Error("initializeWasm() must be awaited first!");
16479         }
16480         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_clone(orig);
16481         return nativeResponseValue;
16482 }
16483         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
16484 export function CommitmentSigned_free(this_obj: number): void {
16485         if(!isWasmInitialized) {
16486                 throw new Error("initializeWasm() must be awaited first!");
16487         }
16488         const nativeResponseValue = wasm.TS_CommitmentSigned_free(this_obj);
16489         // debug statements here
16490 }
16491         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
16492 export function CommitmentSigned_get_channel_id(this_ptr: number): number {
16493         if(!isWasmInitialized) {
16494                 throw new Error("initializeWasm() must be awaited first!");
16495         }
16496         const nativeResponseValue = wasm.TS_CommitmentSigned_get_channel_id(this_ptr);
16497         return nativeResponseValue;
16498 }
16499         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16500 export function CommitmentSigned_set_channel_id(this_ptr: number, val: number): void {
16501         if(!isWasmInitialized) {
16502                 throw new Error("initializeWasm() must be awaited first!");
16503         }
16504         const nativeResponseValue = wasm.TS_CommitmentSigned_set_channel_id(this_ptr, val);
16505         // debug statements here
16506 }
16507         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
16508 export function CommitmentSigned_get_signature(this_ptr: number): number {
16509         if(!isWasmInitialized) {
16510                 throw new Error("initializeWasm() must be awaited first!");
16511         }
16512         const nativeResponseValue = wasm.TS_CommitmentSigned_get_signature(this_ptr);
16513         return nativeResponseValue;
16514 }
16515         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
16516 export function CommitmentSigned_set_signature(this_ptr: number, val: number): void {
16517         if(!isWasmInitialized) {
16518                 throw new Error("initializeWasm() must be awaited first!");
16519         }
16520         const nativeResponseValue = wasm.TS_CommitmentSigned_set_signature(this_ptr, val);
16521         // debug statements here
16522 }
16523         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
16524 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: number): void {
16525         if(!isWasmInitialized) {
16526                 throw new Error("initializeWasm() must be awaited first!");
16527         }
16528         const nativeResponseValue = wasm.TS_CommitmentSigned_set_htlc_signatures(this_ptr, val);
16529         // debug statements here
16530 }
16531         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
16532 export function CommitmentSigned_new(channel_id_arg: number, signature_arg: number, htlc_signatures_arg: number): number {
16533         if(!isWasmInitialized) {
16534                 throw new Error("initializeWasm() must be awaited first!");
16535         }
16536         const nativeResponseValue = wasm.TS_CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg);
16537         return nativeResponseValue;
16538 }
16539         // uintptr_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
16540 export function CommitmentSigned_clone_ptr(arg: number): number {
16541         if(!isWasmInitialized) {
16542                 throw new Error("initializeWasm() must be awaited first!");
16543         }
16544         const nativeResponseValue = wasm.TS_CommitmentSigned_clone_ptr(arg);
16545         return nativeResponseValue;
16546 }
16547         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
16548 export function CommitmentSigned_clone(orig: number): number {
16549         if(!isWasmInitialized) {
16550                 throw new Error("initializeWasm() must be awaited first!");
16551         }
16552         const nativeResponseValue = wasm.TS_CommitmentSigned_clone(orig);
16553         return nativeResponseValue;
16554 }
16555         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
16556 export function RevokeAndACK_free(this_obj: number): void {
16557         if(!isWasmInitialized) {
16558                 throw new Error("initializeWasm() must be awaited first!");
16559         }
16560         const nativeResponseValue = wasm.TS_RevokeAndACK_free(this_obj);
16561         // debug statements here
16562 }
16563         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
16564 export function RevokeAndACK_get_channel_id(this_ptr: number): number {
16565         if(!isWasmInitialized) {
16566                 throw new Error("initializeWasm() must be awaited first!");
16567         }
16568         const nativeResponseValue = wasm.TS_RevokeAndACK_get_channel_id(this_ptr);
16569         return nativeResponseValue;
16570 }
16571         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16572 export function RevokeAndACK_set_channel_id(this_ptr: number, val: number): void {
16573         if(!isWasmInitialized) {
16574                 throw new Error("initializeWasm() must be awaited first!");
16575         }
16576         const nativeResponseValue = wasm.TS_RevokeAndACK_set_channel_id(this_ptr, val);
16577         // debug statements here
16578 }
16579         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
16580 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): number {
16581         if(!isWasmInitialized) {
16582                 throw new Error("initializeWasm() must be awaited first!");
16583         }
16584         const nativeResponseValue = wasm.TS_RevokeAndACK_get_per_commitment_secret(this_ptr);
16585         return nativeResponseValue;
16586 }
16587         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16588 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: number): void {
16589         if(!isWasmInitialized) {
16590                 throw new Error("initializeWasm() must be awaited first!");
16591         }
16592         const nativeResponseValue = wasm.TS_RevokeAndACK_set_per_commitment_secret(this_ptr, val);
16593         // debug statements here
16594 }
16595         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
16596 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): number {
16597         if(!isWasmInitialized) {
16598                 throw new Error("initializeWasm() must be awaited first!");
16599         }
16600         const nativeResponseValue = wasm.TS_RevokeAndACK_get_next_per_commitment_point(this_ptr);
16601         return nativeResponseValue;
16602 }
16603         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16604 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: number): void {
16605         if(!isWasmInitialized) {
16606                 throw new Error("initializeWasm() must be awaited first!");
16607         }
16608         const nativeResponseValue = wasm.TS_RevokeAndACK_set_next_per_commitment_point(this_ptr, val);
16609         // debug statements here
16610 }
16611         // 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);
16612 export function RevokeAndACK_new(channel_id_arg: number, per_commitment_secret_arg: number, next_per_commitment_point_arg: number): number {
16613         if(!isWasmInitialized) {
16614                 throw new Error("initializeWasm() must be awaited first!");
16615         }
16616         const nativeResponseValue = wasm.TS_RevokeAndACK_new(channel_id_arg, per_commitment_secret_arg, next_per_commitment_point_arg);
16617         return nativeResponseValue;
16618 }
16619         // uintptr_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
16620 export function RevokeAndACK_clone_ptr(arg: number): number {
16621         if(!isWasmInitialized) {
16622                 throw new Error("initializeWasm() must be awaited first!");
16623         }
16624         const nativeResponseValue = wasm.TS_RevokeAndACK_clone_ptr(arg);
16625         return nativeResponseValue;
16626 }
16627         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
16628 export function RevokeAndACK_clone(orig: number): number {
16629         if(!isWasmInitialized) {
16630                 throw new Error("initializeWasm() must be awaited first!");
16631         }
16632         const nativeResponseValue = wasm.TS_RevokeAndACK_clone(orig);
16633         return nativeResponseValue;
16634 }
16635         // void UpdateFee_free(struct LDKUpdateFee this_obj);
16636 export function UpdateFee_free(this_obj: number): void {
16637         if(!isWasmInitialized) {
16638                 throw new Error("initializeWasm() must be awaited first!");
16639         }
16640         const nativeResponseValue = wasm.TS_UpdateFee_free(this_obj);
16641         // debug statements here
16642 }
16643         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
16644 export function UpdateFee_get_channel_id(this_ptr: number): number {
16645         if(!isWasmInitialized) {
16646                 throw new Error("initializeWasm() must be awaited first!");
16647         }
16648         const nativeResponseValue = wasm.TS_UpdateFee_get_channel_id(this_ptr);
16649         return nativeResponseValue;
16650 }
16651         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16652 export function UpdateFee_set_channel_id(this_ptr: number, val: number): void {
16653         if(!isWasmInitialized) {
16654                 throw new Error("initializeWasm() must be awaited first!");
16655         }
16656         const nativeResponseValue = wasm.TS_UpdateFee_set_channel_id(this_ptr, val);
16657         // debug statements here
16658 }
16659         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
16660 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
16661         if(!isWasmInitialized) {
16662                 throw new Error("initializeWasm() must be awaited first!");
16663         }
16664         const nativeResponseValue = wasm.TS_UpdateFee_get_feerate_per_kw(this_ptr);
16665         return nativeResponseValue;
16666 }
16667         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
16668 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
16669         if(!isWasmInitialized) {
16670                 throw new Error("initializeWasm() must be awaited first!");
16671         }
16672         const nativeResponseValue = wasm.TS_UpdateFee_set_feerate_per_kw(this_ptr, val);
16673         // debug statements here
16674 }
16675         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
16676 export function UpdateFee_new(channel_id_arg: number, feerate_per_kw_arg: number): number {
16677         if(!isWasmInitialized) {
16678                 throw new Error("initializeWasm() must be awaited first!");
16679         }
16680         const nativeResponseValue = wasm.TS_UpdateFee_new(channel_id_arg, feerate_per_kw_arg);
16681         return nativeResponseValue;
16682 }
16683         // uintptr_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
16684 export function UpdateFee_clone_ptr(arg: number): number {
16685         if(!isWasmInitialized) {
16686                 throw new Error("initializeWasm() must be awaited first!");
16687         }
16688         const nativeResponseValue = wasm.TS_UpdateFee_clone_ptr(arg);
16689         return nativeResponseValue;
16690 }
16691         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
16692 export function UpdateFee_clone(orig: number): number {
16693         if(!isWasmInitialized) {
16694                 throw new Error("initializeWasm() must be awaited first!");
16695         }
16696         const nativeResponseValue = wasm.TS_UpdateFee_clone(orig);
16697         return nativeResponseValue;
16698 }
16699         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
16700 export function DataLossProtect_free(this_obj: number): void {
16701         if(!isWasmInitialized) {
16702                 throw new Error("initializeWasm() must be awaited first!");
16703         }
16704         const nativeResponseValue = wasm.TS_DataLossProtect_free(this_obj);
16705         // debug statements here
16706 }
16707         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
16708 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): number {
16709         if(!isWasmInitialized) {
16710                 throw new Error("initializeWasm() must be awaited first!");
16711         }
16712         const nativeResponseValue = wasm.TS_DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
16713         return nativeResponseValue;
16714 }
16715         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16716 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: number): void {
16717         if(!isWasmInitialized) {
16718                 throw new Error("initializeWasm() must be awaited first!");
16719         }
16720         const nativeResponseValue = wasm.TS_DataLossProtect_set_your_last_per_commitment_secret(this_ptr, val);
16721         // debug statements here
16722 }
16723         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
16724 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): number {
16725         if(!isWasmInitialized) {
16726                 throw new Error("initializeWasm() must be awaited first!");
16727         }
16728         const nativeResponseValue = wasm.TS_DataLossProtect_get_my_current_per_commitment_point(this_ptr);
16729         return nativeResponseValue;
16730 }
16731         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16732 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: number): void {
16733         if(!isWasmInitialized) {
16734                 throw new Error("initializeWasm() must be awaited first!");
16735         }
16736         const nativeResponseValue = wasm.TS_DataLossProtect_set_my_current_per_commitment_point(this_ptr, val);
16737         // debug statements here
16738 }
16739         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
16740 export function DataLossProtect_new(your_last_per_commitment_secret_arg: number, my_current_per_commitment_point_arg: number): number {
16741         if(!isWasmInitialized) {
16742                 throw new Error("initializeWasm() must be awaited first!");
16743         }
16744         const nativeResponseValue = wasm.TS_DataLossProtect_new(your_last_per_commitment_secret_arg, my_current_per_commitment_point_arg);
16745         return nativeResponseValue;
16746 }
16747         // uintptr_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
16748 export function DataLossProtect_clone_ptr(arg: number): number {
16749         if(!isWasmInitialized) {
16750                 throw new Error("initializeWasm() must be awaited first!");
16751         }
16752         const nativeResponseValue = wasm.TS_DataLossProtect_clone_ptr(arg);
16753         return nativeResponseValue;
16754 }
16755         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
16756 export function DataLossProtect_clone(orig: number): number {
16757         if(!isWasmInitialized) {
16758                 throw new Error("initializeWasm() must be awaited first!");
16759         }
16760         const nativeResponseValue = wasm.TS_DataLossProtect_clone(orig);
16761         return nativeResponseValue;
16762 }
16763         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
16764 export function ChannelReestablish_free(this_obj: number): void {
16765         if(!isWasmInitialized) {
16766                 throw new Error("initializeWasm() must be awaited first!");
16767         }
16768         const nativeResponseValue = wasm.TS_ChannelReestablish_free(this_obj);
16769         // debug statements here
16770 }
16771         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
16772 export function ChannelReestablish_get_channel_id(this_ptr: number): number {
16773         if(!isWasmInitialized) {
16774                 throw new Error("initializeWasm() must be awaited first!");
16775         }
16776         const nativeResponseValue = wasm.TS_ChannelReestablish_get_channel_id(this_ptr);
16777         return nativeResponseValue;
16778 }
16779         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16780 export function ChannelReestablish_set_channel_id(this_ptr: number, val: number): void {
16781         if(!isWasmInitialized) {
16782                 throw new Error("initializeWasm() must be awaited first!");
16783         }
16784         const nativeResponseValue = wasm.TS_ChannelReestablish_set_channel_id(this_ptr, val);
16785         // debug statements here
16786 }
16787         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
16788 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): bigint {
16789         if(!isWasmInitialized) {
16790                 throw new Error("initializeWasm() must be awaited first!");
16791         }
16792         const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_local_commitment_number(this_ptr);
16793         return nativeResponseValue;
16794 }
16795         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
16796 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: bigint): void {
16797         if(!isWasmInitialized) {
16798                 throw new Error("initializeWasm() must be awaited first!");
16799         }
16800         const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
16801         // debug statements here
16802 }
16803         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
16804 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): bigint {
16805         if(!isWasmInitialized) {
16806                 throw new Error("initializeWasm() must be awaited first!");
16807         }
16808         const nativeResponseValue = wasm.TS_ChannelReestablish_get_next_remote_commitment_number(this_ptr);
16809         return nativeResponseValue;
16810 }
16811         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
16812 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: bigint): void {
16813         if(!isWasmInitialized) {
16814                 throw new Error("initializeWasm() must be awaited first!");
16815         }
16816         const nativeResponseValue = wasm.TS_ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
16817         // debug statements here
16818 }
16819         // uintptr_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
16820 export function ChannelReestablish_clone_ptr(arg: number): number {
16821         if(!isWasmInitialized) {
16822                 throw new Error("initializeWasm() must be awaited first!");
16823         }
16824         const nativeResponseValue = wasm.TS_ChannelReestablish_clone_ptr(arg);
16825         return nativeResponseValue;
16826 }
16827         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
16828 export function ChannelReestablish_clone(orig: number): number {
16829         if(!isWasmInitialized) {
16830                 throw new Error("initializeWasm() must be awaited first!");
16831         }
16832         const nativeResponseValue = wasm.TS_ChannelReestablish_clone(orig);
16833         return nativeResponseValue;
16834 }
16835         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
16836 export function AnnouncementSignatures_free(this_obj: number): void {
16837         if(!isWasmInitialized) {
16838                 throw new Error("initializeWasm() must be awaited first!");
16839         }
16840         const nativeResponseValue = wasm.TS_AnnouncementSignatures_free(this_obj);
16841         // debug statements here
16842 }
16843         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
16844 export function AnnouncementSignatures_get_channel_id(this_ptr: number): number {
16845         if(!isWasmInitialized) {
16846                 throw new Error("initializeWasm() must be awaited first!");
16847         }
16848         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_channel_id(this_ptr);
16849         return nativeResponseValue;
16850 }
16851         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16852 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: number): void {
16853         if(!isWasmInitialized) {
16854                 throw new Error("initializeWasm() must be awaited first!");
16855         }
16856         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_channel_id(this_ptr, val);
16857         // debug statements here
16858 }
16859         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16860 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): bigint {
16861         if(!isWasmInitialized) {
16862                 throw new Error("initializeWasm() must be awaited first!");
16863         }
16864         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_short_channel_id(this_ptr);
16865         return nativeResponseValue;
16866 }
16867         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
16868 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: bigint): void {
16869         if(!isWasmInitialized) {
16870                 throw new Error("initializeWasm() must be awaited first!");
16871         }
16872         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_short_channel_id(this_ptr, val);
16873         // debug statements here
16874 }
16875         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16876 export function AnnouncementSignatures_get_node_signature(this_ptr: number): number {
16877         if(!isWasmInitialized) {
16878                 throw new Error("initializeWasm() must be awaited first!");
16879         }
16880         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_node_signature(this_ptr);
16881         return nativeResponseValue;
16882 }
16883         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
16884 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: number): void {
16885         if(!isWasmInitialized) {
16886                 throw new Error("initializeWasm() must be awaited first!");
16887         }
16888         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_node_signature(this_ptr, val);
16889         // debug statements here
16890 }
16891         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
16892 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): number {
16893         if(!isWasmInitialized) {
16894                 throw new Error("initializeWasm() must be awaited first!");
16895         }
16896         const nativeResponseValue = wasm.TS_AnnouncementSignatures_get_bitcoin_signature(this_ptr);
16897         return nativeResponseValue;
16898 }
16899         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
16900 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: number): void {
16901         if(!isWasmInitialized) {
16902                 throw new Error("initializeWasm() must be awaited first!");
16903         }
16904         const nativeResponseValue = wasm.TS_AnnouncementSignatures_set_bitcoin_signature(this_ptr, val);
16905         // debug statements here
16906 }
16907         // 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);
16908 export function AnnouncementSignatures_new(channel_id_arg: number, short_channel_id_arg: bigint, node_signature_arg: number, bitcoin_signature_arg: number): number {
16909         if(!isWasmInitialized) {
16910                 throw new Error("initializeWasm() must be awaited first!");
16911         }
16912         const nativeResponseValue = wasm.TS_AnnouncementSignatures_new(channel_id_arg, short_channel_id_arg, node_signature_arg, bitcoin_signature_arg);
16913         return nativeResponseValue;
16914 }
16915         // uintptr_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
16916 export function AnnouncementSignatures_clone_ptr(arg: number): number {
16917         if(!isWasmInitialized) {
16918                 throw new Error("initializeWasm() must be awaited first!");
16919         }
16920         const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone_ptr(arg);
16921         return nativeResponseValue;
16922 }
16923         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
16924 export function AnnouncementSignatures_clone(orig: number): number {
16925         if(!isWasmInitialized) {
16926                 throw new Error("initializeWasm() must be awaited first!");
16927         }
16928         const nativeResponseValue = wasm.TS_AnnouncementSignatures_clone(orig);
16929         return nativeResponseValue;
16930 }
16931         // void NetAddress_free(struct LDKNetAddress this_ptr);
16932 export function NetAddress_free(this_ptr: number): void {
16933         if(!isWasmInitialized) {
16934                 throw new Error("initializeWasm() must be awaited first!");
16935         }
16936         const nativeResponseValue = wasm.TS_NetAddress_free(this_ptr);
16937         // debug statements here
16938 }
16939         // uintptr_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
16940 export function NetAddress_clone_ptr(arg: number): number {
16941         if(!isWasmInitialized) {
16942                 throw new Error("initializeWasm() must be awaited first!");
16943         }
16944         const nativeResponseValue = wasm.TS_NetAddress_clone_ptr(arg);
16945         return nativeResponseValue;
16946 }
16947         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
16948 export function NetAddress_clone(orig: number): number {
16949         if(!isWasmInitialized) {
16950                 throw new Error("initializeWasm() must be awaited first!");
16951         }
16952         const nativeResponseValue = wasm.TS_NetAddress_clone(orig);
16953         return nativeResponseValue;
16954 }
16955         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
16956 export function NetAddress_ipv4(addr: number, port: number): number {
16957         if(!isWasmInitialized) {
16958                 throw new Error("initializeWasm() must be awaited first!");
16959         }
16960         const nativeResponseValue = wasm.TS_NetAddress_ipv4(addr, port);
16961         return nativeResponseValue;
16962 }
16963         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
16964 export function NetAddress_ipv6(addr: number, port: number): number {
16965         if(!isWasmInitialized) {
16966                 throw new Error("initializeWasm() must be awaited first!");
16967         }
16968         const nativeResponseValue = wasm.TS_NetAddress_ipv6(addr, port);
16969         return nativeResponseValue;
16970 }
16971         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
16972 export function NetAddress_onion_v2(a: number): number {
16973         if(!isWasmInitialized) {
16974                 throw new Error("initializeWasm() must be awaited first!");
16975         }
16976         const nativeResponseValue = wasm.TS_NetAddress_onion_v2(a);
16977         return nativeResponseValue;
16978 }
16979         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
16980 export function NetAddress_onion_v3(ed25519_pubkey: number, checksum: number, version: number, port: number): number {
16981         if(!isWasmInitialized) {
16982                 throw new Error("initializeWasm() must be awaited first!");
16983         }
16984         const nativeResponseValue = wasm.TS_NetAddress_onion_v3(ed25519_pubkey, checksum, version, port);
16985         return nativeResponseValue;
16986 }
16987         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
16988 export function NetAddress_write(obj: number): number {
16989         if(!isWasmInitialized) {
16990                 throw new Error("initializeWasm() must be awaited first!");
16991         }
16992         const nativeResponseValue = wasm.TS_NetAddress_write(obj);
16993         return nativeResponseValue;
16994 }
16995         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
16996 export function NetAddress_read(ser: number): number {
16997         if(!isWasmInitialized) {
16998                 throw new Error("initializeWasm() must be awaited first!");
16999         }
17000         const nativeResponseValue = wasm.TS_NetAddress_read(ser);
17001         return nativeResponseValue;
17002 }
17003         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
17004 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
17005         if(!isWasmInitialized) {
17006                 throw new Error("initializeWasm() must be awaited first!");
17007         }
17008         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_free(this_obj);
17009         // debug statements here
17010 }
17011         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
17012 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
17013         if(!isWasmInitialized) {
17014                 throw new Error("initializeWasm() must be awaited first!");
17015         }
17016         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_features(this_ptr);
17017         return nativeResponseValue;
17018 }
17019         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
17020 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
17021         if(!isWasmInitialized) {
17022                 throw new Error("initializeWasm() must be awaited first!");
17023         }
17024         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_features(this_ptr, val);
17025         // debug statements here
17026 }
17027         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
17028 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
17029         if(!isWasmInitialized) {
17030                 throw new Error("initializeWasm() must be awaited first!");
17031         }
17032         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_timestamp(this_ptr);
17033         return nativeResponseValue;
17034 }
17035         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
17036 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
17037         if(!isWasmInitialized) {
17038                 throw new Error("initializeWasm() must be awaited first!");
17039         }
17040         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
17041         // debug statements here
17042 }
17043         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
17044 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): number {
17045         if(!isWasmInitialized) {
17046                 throw new Error("initializeWasm() must be awaited first!");
17047         }
17048         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_node_id(this_ptr);
17049         return nativeResponseValue;
17050 }
17051         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17052 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: number): void {
17053         if(!isWasmInitialized) {
17054                 throw new Error("initializeWasm() must be awaited first!");
17055         }
17056         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_node_id(this_ptr, val);
17057         // debug statements here
17058 }
17059         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
17060 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): number {
17061         if(!isWasmInitialized) {
17062                 throw new Error("initializeWasm() must be awaited first!");
17063         }
17064         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_rgb(this_ptr);
17065         return nativeResponseValue;
17066 }
17067         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
17068 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: number): void {
17069         if(!isWasmInitialized) {
17070                 throw new Error("initializeWasm() must be awaited first!");
17071         }
17072         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_rgb(this_ptr, val);
17073         // debug statements here
17074 }
17075         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
17076 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): number {
17077         if(!isWasmInitialized) {
17078                 throw new Error("initializeWasm() must be awaited first!");
17079         }
17080         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_get_alias(this_ptr);
17081         return nativeResponseValue;
17082 }
17083         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17084 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: number): void {
17085         if(!isWasmInitialized) {
17086                 throw new Error("initializeWasm() must be awaited first!");
17087         }
17088         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_alias(this_ptr, val);
17089         // debug statements here
17090 }
17091         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
17092 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number): void {
17093         if(!isWasmInitialized) {
17094                 throw new Error("initializeWasm() must be awaited first!");
17095         }
17096         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
17097         // debug statements here
17098 }
17099         // uintptr_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
17100 export function UnsignedNodeAnnouncement_clone_ptr(arg: number): number {
17101         if(!isWasmInitialized) {
17102                 throw new Error("initializeWasm() must be awaited first!");
17103         }
17104         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone_ptr(arg);
17105         return nativeResponseValue;
17106 }
17107         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
17108 export function UnsignedNodeAnnouncement_clone(orig: number): number {
17109         if(!isWasmInitialized) {
17110                 throw new Error("initializeWasm() must be awaited first!");
17111         }
17112         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_clone(orig);
17113         return nativeResponseValue;
17114 }
17115         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
17116 export function NodeAnnouncement_free(this_obj: number): void {
17117         if(!isWasmInitialized) {
17118                 throw new Error("initializeWasm() must be awaited first!");
17119         }
17120         const nativeResponseValue = wasm.TS_NodeAnnouncement_free(this_obj);
17121         // debug statements here
17122 }
17123         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
17124 export function NodeAnnouncement_get_signature(this_ptr: number): number {
17125         if(!isWasmInitialized) {
17126                 throw new Error("initializeWasm() must be awaited first!");
17127         }
17128         const nativeResponseValue = wasm.TS_NodeAnnouncement_get_signature(this_ptr);
17129         return nativeResponseValue;
17130 }
17131         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
17132 export function NodeAnnouncement_set_signature(this_ptr: number, val: number): void {
17133         if(!isWasmInitialized) {
17134                 throw new Error("initializeWasm() must be awaited first!");
17135         }
17136         const nativeResponseValue = wasm.TS_NodeAnnouncement_set_signature(this_ptr, val);
17137         // debug statements here
17138 }
17139         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
17140 export function NodeAnnouncement_get_contents(this_ptr: number): number {
17141         if(!isWasmInitialized) {
17142                 throw new Error("initializeWasm() must be awaited first!");
17143         }
17144         const nativeResponseValue = wasm.TS_NodeAnnouncement_get_contents(this_ptr);
17145         return nativeResponseValue;
17146 }
17147         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
17148 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
17149         if(!isWasmInitialized) {
17150                 throw new Error("initializeWasm() must be awaited first!");
17151         }
17152         const nativeResponseValue = wasm.TS_NodeAnnouncement_set_contents(this_ptr, val);
17153         // debug statements here
17154 }
17155         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
17156 export function NodeAnnouncement_new(signature_arg: number, contents_arg: number): number {
17157         if(!isWasmInitialized) {
17158                 throw new Error("initializeWasm() must be awaited first!");
17159         }
17160         const nativeResponseValue = wasm.TS_NodeAnnouncement_new(signature_arg, contents_arg);
17161         return nativeResponseValue;
17162 }
17163         // uintptr_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
17164 export function NodeAnnouncement_clone_ptr(arg: number): number {
17165         if(!isWasmInitialized) {
17166                 throw new Error("initializeWasm() must be awaited first!");
17167         }
17168         const nativeResponseValue = wasm.TS_NodeAnnouncement_clone_ptr(arg);
17169         return nativeResponseValue;
17170 }
17171         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
17172 export function NodeAnnouncement_clone(orig: number): number {
17173         if(!isWasmInitialized) {
17174                 throw new Error("initializeWasm() must be awaited first!");
17175         }
17176         const nativeResponseValue = wasm.TS_NodeAnnouncement_clone(orig);
17177         return nativeResponseValue;
17178 }
17179         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
17180 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
17181         if(!isWasmInitialized) {
17182                 throw new Error("initializeWasm() must be awaited first!");
17183         }
17184         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_free(this_obj);
17185         // debug statements here
17186 }
17187         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
17188 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
17189         if(!isWasmInitialized) {
17190                 throw new Error("initializeWasm() must be awaited first!");
17191         }
17192         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_features(this_ptr);
17193         return nativeResponseValue;
17194 }
17195         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
17196 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
17197         if(!isWasmInitialized) {
17198                 throw new Error("initializeWasm() must be awaited first!");
17199         }
17200         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_features(this_ptr, val);
17201         // debug statements here
17202 }
17203         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
17204 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): number {
17205         if(!isWasmInitialized) {
17206                 throw new Error("initializeWasm() must be awaited first!");
17207         }
17208         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
17209         return nativeResponseValue;
17210 }
17211         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17212 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: number): void {
17213         if(!isWasmInitialized) {
17214                 throw new Error("initializeWasm() must be awaited first!");
17215         }
17216         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_chain_hash(this_ptr, val);
17217         // debug statements here
17218 }
17219         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
17220 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): bigint {
17221         if(!isWasmInitialized) {
17222                 throw new Error("initializeWasm() must be awaited first!");
17223         }
17224         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
17225         return nativeResponseValue;
17226 }
17227         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
17228 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: bigint): void {
17229         if(!isWasmInitialized) {
17230                 throw new Error("initializeWasm() must be awaited first!");
17231         }
17232         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
17233         // debug statements here
17234 }
17235         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
17236 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): number {
17237         if(!isWasmInitialized) {
17238                 throw new Error("initializeWasm() must be awaited first!");
17239         }
17240         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
17241         return nativeResponseValue;
17242 }
17243         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17244 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: number): void {
17245         if(!isWasmInitialized) {
17246                 throw new Error("initializeWasm() must be awaited first!");
17247         }
17248         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_1(this_ptr, val);
17249         // debug statements here
17250 }
17251         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
17252 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): number {
17253         if(!isWasmInitialized) {
17254                 throw new Error("initializeWasm() must be awaited first!");
17255         }
17256         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
17257         return nativeResponseValue;
17258 }
17259         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17260 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: number): void {
17261         if(!isWasmInitialized) {
17262                 throw new Error("initializeWasm() must be awaited first!");
17263         }
17264         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_node_id_2(this_ptr, val);
17265         // debug statements here
17266 }
17267         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
17268 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): number {
17269         if(!isWasmInitialized) {
17270                 throw new Error("initializeWasm() must be awaited first!");
17271         }
17272         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
17273         return nativeResponseValue;
17274 }
17275         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17276 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: number): void {
17277         if(!isWasmInitialized) {
17278                 throw new Error("initializeWasm() must be awaited first!");
17279         }
17280         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, val);
17281         // debug statements here
17282 }
17283         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
17284 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): number {
17285         if(!isWasmInitialized) {
17286                 throw new Error("initializeWasm() must be awaited first!");
17287         }
17288         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
17289         return nativeResponseValue;
17290 }
17291         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17292 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: number): void {
17293         if(!isWasmInitialized) {
17294                 throw new Error("initializeWasm() must be awaited first!");
17295         }
17296         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, val);
17297         // debug statements here
17298 }
17299         // uintptr_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
17300 export function UnsignedChannelAnnouncement_clone_ptr(arg: number): number {
17301         if(!isWasmInitialized) {
17302                 throw new Error("initializeWasm() must be awaited first!");
17303         }
17304         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone_ptr(arg);
17305         return nativeResponseValue;
17306 }
17307         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
17308 export function UnsignedChannelAnnouncement_clone(orig: number): number {
17309         if(!isWasmInitialized) {
17310                 throw new Error("initializeWasm() must be awaited first!");
17311         }
17312         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_clone(orig);
17313         return nativeResponseValue;
17314 }
17315         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
17316 export function ChannelAnnouncement_free(this_obj: number): void {
17317         if(!isWasmInitialized) {
17318                 throw new Error("initializeWasm() must be awaited first!");
17319         }
17320         const nativeResponseValue = wasm.TS_ChannelAnnouncement_free(this_obj);
17321         // debug statements here
17322 }
17323         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
17324 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): number {
17325         if(!isWasmInitialized) {
17326                 throw new Error("initializeWasm() must be awaited first!");
17327         }
17328         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_1(this_ptr);
17329         return nativeResponseValue;
17330 }
17331         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
17332 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: number): void {
17333         if(!isWasmInitialized) {
17334                 throw new Error("initializeWasm() must be awaited first!");
17335         }
17336         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_1(this_ptr, val);
17337         // debug statements here
17338 }
17339         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
17340 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): number {
17341         if(!isWasmInitialized) {
17342                 throw new Error("initializeWasm() must be awaited first!");
17343         }
17344         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_node_signature_2(this_ptr);
17345         return nativeResponseValue;
17346 }
17347         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
17348 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: number): void {
17349         if(!isWasmInitialized) {
17350                 throw new Error("initializeWasm() must be awaited first!");
17351         }
17352         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_node_signature_2(this_ptr, val);
17353         // debug statements here
17354 }
17355         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
17356 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): number {
17357         if(!isWasmInitialized) {
17358                 throw new Error("initializeWasm() must be awaited first!");
17359         }
17360         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
17361         return nativeResponseValue;
17362 }
17363         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
17364 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: number): void {
17365         if(!isWasmInitialized) {
17366                 throw new Error("initializeWasm() must be awaited first!");
17367         }
17368         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, val);
17369         // debug statements here
17370 }
17371         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
17372 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): number {
17373         if(!isWasmInitialized) {
17374                 throw new Error("initializeWasm() must be awaited first!");
17375         }
17376         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
17377         return nativeResponseValue;
17378 }
17379         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
17380 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: number): void {
17381         if(!isWasmInitialized) {
17382                 throw new Error("initializeWasm() must be awaited first!");
17383         }
17384         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, val);
17385         // debug statements here
17386 }
17387         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
17388 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
17389         if(!isWasmInitialized) {
17390                 throw new Error("initializeWasm() must be awaited first!");
17391         }
17392         const nativeResponseValue = wasm.TS_ChannelAnnouncement_get_contents(this_ptr);
17393         return nativeResponseValue;
17394 }
17395         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
17396 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
17397         if(!isWasmInitialized) {
17398                 throw new Error("initializeWasm() must be awaited first!");
17399         }
17400         const nativeResponseValue = wasm.TS_ChannelAnnouncement_set_contents(this_ptr, val);
17401         // debug statements here
17402 }
17403         // 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);
17404 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 {
17405         if(!isWasmInitialized) {
17406                 throw new Error("initializeWasm() must be awaited first!");
17407         }
17408         const nativeResponseValue = wasm.TS_ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg);
17409         return nativeResponseValue;
17410 }
17411         // uintptr_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
17412 export function ChannelAnnouncement_clone_ptr(arg: number): number {
17413         if(!isWasmInitialized) {
17414                 throw new Error("initializeWasm() must be awaited first!");
17415         }
17416         const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone_ptr(arg);
17417         return nativeResponseValue;
17418 }
17419         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
17420 export function ChannelAnnouncement_clone(orig: number): number {
17421         if(!isWasmInitialized) {
17422                 throw new Error("initializeWasm() must be awaited first!");
17423         }
17424         const nativeResponseValue = wasm.TS_ChannelAnnouncement_clone(orig);
17425         return nativeResponseValue;
17426 }
17427         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
17428 export function UnsignedChannelUpdate_free(this_obj: number): void {
17429         if(!isWasmInitialized) {
17430                 throw new Error("initializeWasm() must be awaited first!");
17431         }
17432         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_free(this_obj);
17433         // debug statements here
17434 }
17435         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
17436 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): number {
17437         if(!isWasmInitialized) {
17438                 throw new Error("initializeWasm() must be awaited first!");
17439         }
17440         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_chain_hash(this_ptr);
17441         return nativeResponseValue;
17442 }
17443         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17444 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: number): void {
17445         if(!isWasmInitialized) {
17446                 throw new Error("initializeWasm() must be awaited first!");
17447         }
17448         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_chain_hash(this_ptr, val);
17449         // debug statements here
17450 }
17451         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17452 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): bigint {
17453         if(!isWasmInitialized) {
17454                 throw new Error("initializeWasm() must be awaited first!");
17455         }
17456         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_short_channel_id(this_ptr);
17457         return nativeResponseValue;
17458 }
17459         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
17460 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: bigint): void {
17461         if(!isWasmInitialized) {
17462                 throw new Error("initializeWasm() must be awaited first!");
17463         }
17464         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
17465         // debug statements here
17466 }
17467         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17468 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
17469         if(!isWasmInitialized) {
17470                 throw new Error("initializeWasm() must be awaited first!");
17471         }
17472         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_timestamp(this_ptr);
17473         return nativeResponseValue;
17474 }
17475         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
17476 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
17477         if(!isWasmInitialized) {
17478                 throw new Error("initializeWasm() must be awaited first!");
17479         }
17480         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_timestamp(this_ptr, val);
17481         // debug statements here
17482 }
17483         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17484 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
17485         if(!isWasmInitialized) {
17486                 throw new Error("initializeWasm() must be awaited first!");
17487         }
17488         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_flags(this_ptr);
17489         return nativeResponseValue;
17490 }
17491         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
17492 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
17493         if(!isWasmInitialized) {
17494                 throw new Error("initializeWasm() must be awaited first!");
17495         }
17496         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_flags(this_ptr, val);
17497         // debug statements here
17498 }
17499         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17500 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
17501         if(!isWasmInitialized) {
17502                 throw new Error("initializeWasm() must be awaited first!");
17503         }
17504         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
17505         return nativeResponseValue;
17506 }
17507         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
17508 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
17509         if(!isWasmInitialized) {
17510                 throw new Error("initializeWasm() must be awaited first!");
17511         }
17512         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
17513         // debug statements here
17514 }
17515         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17516 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): bigint {
17517         if(!isWasmInitialized) {
17518                 throw new Error("initializeWasm() must be awaited first!");
17519         }
17520         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
17521         return nativeResponseValue;
17522 }
17523         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
17524 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
17525         if(!isWasmInitialized) {
17526                 throw new Error("initializeWasm() must be awaited first!");
17527         }
17528         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
17529         // debug statements here
17530 }
17531         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17532 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
17533         if(!isWasmInitialized) {
17534                 throw new Error("initializeWasm() must be awaited first!");
17535         }
17536         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
17537         return nativeResponseValue;
17538 }
17539         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
17540 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
17541         if(!isWasmInitialized) {
17542                 throw new Error("initializeWasm() must be awaited first!");
17543         }
17544         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
17545         // debug statements here
17546 }
17547         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
17548 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
17549         if(!isWasmInitialized) {
17550                 throw new Error("initializeWasm() must be awaited first!");
17551         }
17552         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
17553         return nativeResponseValue;
17554 }
17555         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
17556 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
17557         if(!isWasmInitialized) {
17558                 throw new Error("initializeWasm() must be awaited first!");
17559         }
17560         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
17561         // debug statements here
17562 }
17563         // uintptr_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
17564 export function UnsignedChannelUpdate_clone_ptr(arg: number): number {
17565         if(!isWasmInitialized) {
17566                 throw new Error("initializeWasm() must be awaited first!");
17567         }
17568         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone_ptr(arg);
17569         return nativeResponseValue;
17570 }
17571         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
17572 export function UnsignedChannelUpdate_clone(orig: number): number {
17573         if(!isWasmInitialized) {
17574                 throw new Error("initializeWasm() must be awaited first!");
17575         }
17576         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_clone(orig);
17577         return nativeResponseValue;
17578 }
17579         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
17580 export function ChannelUpdate_free(this_obj: number): void {
17581         if(!isWasmInitialized) {
17582                 throw new Error("initializeWasm() must be awaited first!");
17583         }
17584         const nativeResponseValue = wasm.TS_ChannelUpdate_free(this_obj);
17585         // debug statements here
17586 }
17587         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
17588 export function ChannelUpdate_get_signature(this_ptr: number): number {
17589         if(!isWasmInitialized) {
17590                 throw new Error("initializeWasm() must be awaited first!");
17591         }
17592         const nativeResponseValue = wasm.TS_ChannelUpdate_get_signature(this_ptr);
17593         return nativeResponseValue;
17594 }
17595         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
17596 export function ChannelUpdate_set_signature(this_ptr: number, val: number): void {
17597         if(!isWasmInitialized) {
17598                 throw new Error("initializeWasm() must be awaited first!");
17599         }
17600         const nativeResponseValue = wasm.TS_ChannelUpdate_set_signature(this_ptr, val);
17601         // debug statements here
17602 }
17603         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
17604 export function ChannelUpdate_get_contents(this_ptr: number): number {
17605         if(!isWasmInitialized) {
17606                 throw new Error("initializeWasm() must be awaited first!");
17607         }
17608         const nativeResponseValue = wasm.TS_ChannelUpdate_get_contents(this_ptr);
17609         return nativeResponseValue;
17610 }
17611         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
17612 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
17613         if(!isWasmInitialized) {
17614                 throw new Error("initializeWasm() must be awaited first!");
17615         }
17616         const nativeResponseValue = wasm.TS_ChannelUpdate_set_contents(this_ptr, val);
17617         // debug statements here
17618 }
17619         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
17620 export function ChannelUpdate_new(signature_arg: number, contents_arg: number): number {
17621         if(!isWasmInitialized) {
17622                 throw new Error("initializeWasm() must be awaited first!");
17623         }
17624         const nativeResponseValue = wasm.TS_ChannelUpdate_new(signature_arg, contents_arg);
17625         return nativeResponseValue;
17626 }
17627         // uintptr_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
17628 export function ChannelUpdate_clone_ptr(arg: number): number {
17629         if(!isWasmInitialized) {
17630                 throw new Error("initializeWasm() must be awaited first!");
17631         }
17632         const nativeResponseValue = wasm.TS_ChannelUpdate_clone_ptr(arg);
17633         return nativeResponseValue;
17634 }
17635         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
17636 export function ChannelUpdate_clone(orig: number): number {
17637         if(!isWasmInitialized) {
17638                 throw new Error("initializeWasm() must be awaited first!");
17639         }
17640         const nativeResponseValue = wasm.TS_ChannelUpdate_clone(orig);
17641         return nativeResponseValue;
17642 }
17643         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
17644 export function QueryChannelRange_free(this_obj: number): void {
17645         if(!isWasmInitialized) {
17646                 throw new Error("initializeWasm() must be awaited first!");
17647         }
17648         const nativeResponseValue = wasm.TS_QueryChannelRange_free(this_obj);
17649         // debug statements here
17650 }
17651         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
17652 export function QueryChannelRange_get_chain_hash(this_ptr: number): number {
17653         if(!isWasmInitialized) {
17654                 throw new Error("initializeWasm() must be awaited first!");
17655         }
17656         const nativeResponseValue = wasm.TS_QueryChannelRange_get_chain_hash(this_ptr);
17657         return nativeResponseValue;
17658 }
17659         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17660 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: number): void {
17661         if(!isWasmInitialized) {
17662                 throw new Error("initializeWasm() must be awaited first!");
17663         }
17664         const nativeResponseValue = wasm.TS_QueryChannelRange_set_chain_hash(this_ptr, val);
17665         // debug statements here
17666 }
17667         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
17668 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
17669         if(!isWasmInitialized) {
17670                 throw new Error("initializeWasm() must be awaited first!");
17671         }
17672         const nativeResponseValue = wasm.TS_QueryChannelRange_get_first_blocknum(this_ptr);
17673         return nativeResponseValue;
17674 }
17675         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
17676 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
17677         if(!isWasmInitialized) {
17678                 throw new Error("initializeWasm() must be awaited first!");
17679         }
17680         const nativeResponseValue = wasm.TS_QueryChannelRange_set_first_blocknum(this_ptr, val);
17681         // debug statements here
17682 }
17683         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
17684 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
17685         if(!isWasmInitialized) {
17686                 throw new Error("initializeWasm() must be awaited first!");
17687         }
17688         const nativeResponseValue = wasm.TS_QueryChannelRange_get_number_of_blocks(this_ptr);
17689         return nativeResponseValue;
17690 }
17691         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
17692 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
17693         if(!isWasmInitialized) {
17694                 throw new Error("initializeWasm() must be awaited first!");
17695         }
17696         const nativeResponseValue = wasm.TS_QueryChannelRange_set_number_of_blocks(this_ptr, val);
17697         // debug statements here
17698 }
17699         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
17700 export function QueryChannelRange_new(chain_hash_arg: number, first_blocknum_arg: number, number_of_blocks_arg: number): number {
17701         if(!isWasmInitialized) {
17702                 throw new Error("initializeWasm() must be awaited first!");
17703         }
17704         const nativeResponseValue = wasm.TS_QueryChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg);
17705         return nativeResponseValue;
17706 }
17707         // uintptr_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
17708 export function QueryChannelRange_clone_ptr(arg: number): number {
17709         if(!isWasmInitialized) {
17710                 throw new Error("initializeWasm() must be awaited first!");
17711         }
17712         const nativeResponseValue = wasm.TS_QueryChannelRange_clone_ptr(arg);
17713         return nativeResponseValue;
17714 }
17715         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
17716 export function QueryChannelRange_clone(orig: number): number {
17717         if(!isWasmInitialized) {
17718                 throw new Error("initializeWasm() must be awaited first!");
17719         }
17720         const nativeResponseValue = wasm.TS_QueryChannelRange_clone(orig);
17721         return nativeResponseValue;
17722 }
17723         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
17724 export function ReplyChannelRange_free(this_obj: number): void {
17725         if(!isWasmInitialized) {
17726                 throw new Error("initializeWasm() must be awaited first!");
17727         }
17728         const nativeResponseValue = wasm.TS_ReplyChannelRange_free(this_obj);
17729         // debug statements here
17730 }
17731         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
17732 export function ReplyChannelRange_get_chain_hash(this_ptr: number): number {
17733         if(!isWasmInitialized) {
17734                 throw new Error("initializeWasm() must be awaited first!");
17735         }
17736         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_chain_hash(this_ptr);
17737         return nativeResponseValue;
17738 }
17739         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17740 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: number): void {
17741         if(!isWasmInitialized) {
17742                 throw new Error("initializeWasm() must be awaited first!");
17743         }
17744         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_chain_hash(this_ptr, val);
17745         // debug statements here
17746 }
17747         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
17748 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
17749         if(!isWasmInitialized) {
17750                 throw new Error("initializeWasm() must be awaited first!");
17751         }
17752         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_first_blocknum(this_ptr);
17753         return nativeResponseValue;
17754 }
17755         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
17756 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
17757         if(!isWasmInitialized) {
17758                 throw new Error("initializeWasm() must be awaited first!");
17759         }
17760         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_first_blocknum(this_ptr, val);
17761         // debug statements here
17762 }
17763         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
17764 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
17765         if(!isWasmInitialized) {
17766                 throw new Error("initializeWasm() must be awaited first!");
17767         }
17768         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_number_of_blocks(this_ptr);
17769         return nativeResponseValue;
17770 }
17771         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
17772 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
17773         if(!isWasmInitialized) {
17774                 throw new Error("initializeWasm() must be awaited first!");
17775         }
17776         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_number_of_blocks(this_ptr, val);
17777         // debug statements here
17778 }
17779         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
17780 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
17781         if(!isWasmInitialized) {
17782                 throw new Error("initializeWasm() must be awaited first!");
17783         }
17784         const nativeResponseValue = wasm.TS_ReplyChannelRange_get_sync_complete(this_ptr);
17785         return nativeResponseValue;
17786 }
17787         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
17788 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
17789         if(!isWasmInitialized) {
17790                 throw new Error("initializeWasm() must be awaited first!");
17791         }
17792         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_sync_complete(this_ptr, val);
17793         // debug statements here
17794 }
17795         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
17796 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number): void {
17797         if(!isWasmInitialized) {
17798                 throw new Error("initializeWasm() must be awaited first!");
17799         }
17800         const nativeResponseValue = wasm.TS_ReplyChannelRange_set_short_channel_ids(this_ptr, val);
17801         // debug statements here
17802 }
17803         // 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);
17804 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 {
17805         if(!isWasmInitialized) {
17806                 throw new Error("initializeWasm() must be awaited first!");
17807         }
17808         const nativeResponseValue = wasm.TS_ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
17809         return nativeResponseValue;
17810 }
17811         // uintptr_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
17812 export function ReplyChannelRange_clone_ptr(arg: number): number {
17813         if(!isWasmInitialized) {
17814                 throw new Error("initializeWasm() must be awaited first!");
17815         }
17816         const nativeResponseValue = wasm.TS_ReplyChannelRange_clone_ptr(arg);
17817         return nativeResponseValue;
17818 }
17819         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
17820 export function ReplyChannelRange_clone(orig: number): number {
17821         if(!isWasmInitialized) {
17822                 throw new Error("initializeWasm() must be awaited first!");
17823         }
17824         const nativeResponseValue = wasm.TS_ReplyChannelRange_clone(orig);
17825         return nativeResponseValue;
17826 }
17827         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
17828 export function QueryShortChannelIds_free(this_obj: number): void {
17829         if(!isWasmInitialized) {
17830                 throw new Error("initializeWasm() must be awaited first!");
17831         }
17832         const nativeResponseValue = wasm.TS_QueryShortChannelIds_free(this_obj);
17833         // debug statements here
17834 }
17835         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
17836 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): number {
17837         if(!isWasmInitialized) {
17838                 throw new Error("initializeWasm() must be awaited first!");
17839         }
17840         const nativeResponseValue = wasm.TS_QueryShortChannelIds_get_chain_hash(this_ptr);
17841         return nativeResponseValue;
17842 }
17843         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17844 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: number): void {
17845         if(!isWasmInitialized) {
17846                 throw new Error("initializeWasm() must be awaited first!");
17847         }
17848         const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_chain_hash(this_ptr, val);
17849         // debug statements here
17850 }
17851         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
17852 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number): void {
17853         if(!isWasmInitialized) {
17854                 throw new Error("initializeWasm() must be awaited first!");
17855         }
17856         const nativeResponseValue = wasm.TS_QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
17857         // debug statements here
17858 }
17859         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
17860 export function QueryShortChannelIds_new(chain_hash_arg: number, short_channel_ids_arg: number): number {
17861         if(!isWasmInitialized) {
17862                 throw new Error("initializeWasm() must be awaited first!");
17863         }
17864         const nativeResponseValue = wasm.TS_QueryShortChannelIds_new(chain_hash_arg, short_channel_ids_arg);
17865         return nativeResponseValue;
17866 }
17867         // uintptr_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
17868 export function QueryShortChannelIds_clone_ptr(arg: number): number {
17869         if(!isWasmInitialized) {
17870                 throw new Error("initializeWasm() must be awaited first!");
17871         }
17872         const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone_ptr(arg);
17873         return nativeResponseValue;
17874 }
17875         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
17876 export function QueryShortChannelIds_clone(orig: number): number {
17877         if(!isWasmInitialized) {
17878                 throw new Error("initializeWasm() must be awaited first!");
17879         }
17880         const nativeResponseValue = wasm.TS_QueryShortChannelIds_clone(orig);
17881         return nativeResponseValue;
17882 }
17883         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
17884 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
17885         if(!isWasmInitialized) {
17886                 throw new Error("initializeWasm() must be awaited first!");
17887         }
17888         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_free(this_obj);
17889         // debug statements here
17890 }
17891         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
17892 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): number {
17893         if(!isWasmInitialized) {
17894                 throw new Error("initializeWasm() must be awaited first!");
17895         }
17896         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
17897         return nativeResponseValue;
17898 }
17899         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17900 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: number): void {
17901         if(!isWasmInitialized) {
17902                 throw new Error("initializeWasm() must be awaited first!");
17903         }
17904         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, val);
17905         // debug statements here
17906 }
17907         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
17908 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
17909         if(!isWasmInitialized) {
17910                 throw new Error("initializeWasm() must be awaited first!");
17911         }
17912         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_get_full_information(this_ptr);
17913         return nativeResponseValue;
17914 }
17915         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
17916 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
17917         if(!isWasmInitialized) {
17918                 throw new Error("initializeWasm() must be awaited first!");
17919         }
17920         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
17921         // debug statements here
17922 }
17923         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
17924 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: number, full_information_arg: boolean): number {
17925         if(!isWasmInitialized) {
17926                 throw new Error("initializeWasm() must be awaited first!");
17927         }
17928         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_new(chain_hash_arg, full_information_arg);
17929         return nativeResponseValue;
17930 }
17931         // uintptr_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
17932 export function ReplyShortChannelIdsEnd_clone_ptr(arg: number): number {
17933         if(!isWasmInitialized) {
17934                 throw new Error("initializeWasm() must be awaited first!");
17935         }
17936         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone_ptr(arg);
17937         return nativeResponseValue;
17938 }
17939         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
17940 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
17941         if(!isWasmInitialized) {
17942                 throw new Error("initializeWasm() must be awaited first!");
17943         }
17944         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_clone(orig);
17945         return nativeResponseValue;
17946 }
17947         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
17948 export function GossipTimestampFilter_free(this_obj: number): void {
17949         if(!isWasmInitialized) {
17950                 throw new Error("initializeWasm() must be awaited first!");
17951         }
17952         const nativeResponseValue = wasm.TS_GossipTimestampFilter_free(this_obj);
17953         // debug statements here
17954 }
17955         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
17956 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): number {
17957         if(!isWasmInitialized) {
17958                 throw new Error("initializeWasm() must be awaited first!");
17959         }
17960         const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_chain_hash(this_ptr);
17961         return nativeResponseValue;
17962 }
17963         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17964 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: number): void {
17965         if(!isWasmInitialized) {
17966                 throw new Error("initializeWasm() must be awaited first!");
17967         }
17968         const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_chain_hash(this_ptr, val);
17969         // debug statements here
17970 }
17971         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
17972 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
17973         if(!isWasmInitialized) {
17974                 throw new Error("initializeWasm() must be awaited first!");
17975         }
17976         const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_first_timestamp(this_ptr);
17977         return nativeResponseValue;
17978 }
17979         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
17980 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
17981         if(!isWasmInitialized) {
17982                 throw new Error("initializeWasm() must be awaited first!");
17983         }
17984         const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_first_timestamp(this_ptr, val);
17985         // debug statements here
17986 }
17987         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
17988 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
17989         if(!isWasmInitialized) {
17990                 throw new Error("initializeWasm() must be awaited first!");
17991         }
17992         const nativeResponseValue = wasm.TS_GossipTimestampFilter_get_timestamp_range(this_ptr);
17993         return nativeResponseValue;
17994 }
17995         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
17996 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
17997         if(!isWasmInitialized) {
17998                 throw new Error("initializeWasm() must be awaited first!");
17999         }
18000         const nativeResponseValue = wasm.TS_GossipTimestampFilter_set_timestamp_range(this_ptr, val);
18001         // debug statements here
18002 }
18003         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
18004 export function GossipTimestampFilter_new(chain_hash_arg: number, first_timestamp_arg: number, timestamp_range_arg: number): number {
18005         if(!isWasmInitialized) {
18006                 throw new Error("initializeWasm() must be awaited first!");
18007         }
18008         const nativeResponseValue = wasm.TS_GossipTimestampFilter_new(chain_hash_arg, first_timestamp_arg, timestamp_range_arg);
18009         return nativeResponseValue;
18010 }
18011         // uintptr_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
18012 export function GossipTimestampFilter_clone_ptr(arg: number): number {
18013         if(!isWasmInitialized) {
18014                 throw new Error("initializeWasm() must be awaited first!");
18015         }
18016         const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone_ptr(arg);
18017         return nativeResponseValue;
18018 }
18019         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
18020 export function GossipTimestampFilter_clone(orig: number): number {
18021         if(!isWasmInitialized) {
18022                 throw new Error("initializeWasm() must be awaited first!");
18023         }
18024         const nativeResponseValue = wasm.TS_GossipTimestampFilter_clone(orig);
18025         return nativeResponseValue;
18026 }
18027         // void ErrorAction_free(struct LDKErrorAction this_ptr);
18028 export function ErrorAction_free(this_ptr: number): void {
18029         if(!isWasmInitialized) {
18030                 throw new Error("initializeWasm() must be awaited first!");
18031         }
18032         const nativeResponseValue = wasm.TS_ErrorAction_free(this_ptr);
18033         // debug statements here
18034 }
18035         // uintptr_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
18036 export function ErrorAction_clone_ptr(arg: number): number {
18037         if(!isWasmInitialized) {
18038                 throw new Error("initializeWasm() must be awaited first!");
18039         }
18040         const nativeResponseValue = wasm.TS_ErrorAction_clone_ptr(arg);
18041         return nativeResponseValue;
18042 }
18043         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
18044 export function ErrorAction_clone(orig: number): number {
18045         if(!isWasmInitialized) {
18046                 throw new Error("initializeWasm() must be awaited first!");
18047         }
18048         const nativeResponseValue = wasm.TS_ErrorAction_clone(orig);
18049         return nativeResponseValue;
18050 }
18051         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
18052 export function ErrorAction_disconnect_peer(msg: number): number {
18053         if(!isWasmInitialized) {
18054                 throw new Error("initializeWasm() must be awaited first!");
18055         }
18056         const nativeResponseValue = wasm.TS_ErrorAction_disconnect_peer(msg);
18057         return nativeResponseValue;
18058 }
18059         // struct LDKErrorAction ErrorAction_ignore_error(void);
18060 export function ErrorAction_ignore_error(): number {
18061         if(!isWasmInitialized) {
18062                 throw new Error("initializeWasm() must be awaited first!");
18063         }
18064         const nativeResponseValue = wasm.TS_ErrorAction_ignore_error();
18065         return nativeResponseValue;
18066 }
18067         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
18068 export function ErrorAction_ignore_and_log(a: Level): number {
18069         if(!isWasmInitialized) {
18070                 throw new Error("initializeWasm() must be awaited first!");
18071         }
18072         const nativeResponseValue = wasm.TS_ErrorAction_ignore_and_log(a);
18073         return nativeResponseValue;
18074 }
18075         // struct LDKErrorAction ErrorAction_ignore_duplicate_gossip(void);
18076 export function ErrorAction_ignore_duplicate_gossip(): number {
18077         if(!isWasmInitialized) {
18078                 throw new Error("initializeWasm() must be awaited first!");
18079         }
18080         const nativeResponseValue = wasm.TS_ErrorAction_ignore_duplicate_gossip();
18081         return nativeResponseValue;
18082 }
18083         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
18084 export function ErrorAction_send_error_message(msg: number): number {
18085         if(!isWasmInitialized) {
18086                 throw new Error("initializeWasm() must be awaited first!");
18087         }
18088         const nativeResponseValue = wasm.TS_ErrorAction_send_error_message(msg);
18089         return nativeResponseValue;
18090 }
18091         // void LightningError_free(struct LDKLightningError this_obj);
18092 export function LightningError_free(this_obj: number): void {
18093         if(!isWasmInitialized) {
18094                 throw new Error("initializeWasm() must be awaited first!");
18095         }
18096         const nativeResponseValue = wasm.TS_LightningError_free(this_obj);
18097         // debug statements here
18098 }
18099         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
18100 export function LightningError_get_err(this_ptr: number): number {
18101         if(!isWasmInitialized) {
18102                 throw new Error("initializeWasm() must be awaited first!");
18103         }
18104         const nativeResponseValue = wasm.TS_LightningError_get_err(this_ptr);
18105         return nativeResponseValue;
18106 }
18107         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
18108 export function LightningError_set_err(this_ptr: number, val: number): void {
18109         if(!isWasmInitialized) {
18110                 throw new Error("initializeWasm() must be awaited first!");
18111         }
18112         const nativeResponseValue = wasm.TS_LightningError_set_err(this_ptr, val);
18113         // debug statements here
18114 }
18115         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
18116 export function LightningError_get_action(this_ptr: number): number {
18117         if(!isWasmInitialized) {
18118                 throw new Error("initializeWasm() must be awaited first!");
18119         }
18120         const nativeResponseValue = wasm.TS_LightningError_get_action(this_ptr);
18121         return nativeResponseValue;
18122 }
18123         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
18124 export function LightningError_set_action(this_ptr: number, val: number): void {
18125         if(!isWasmInitialized) {
18126                 throw new Error("initializeWasm() must be awaited first!");
18127         }
18128         const nativeResponseValue = wasm.TS_LightningError_set_action(this_ptr, val);
18129         // debug statements here
18130 }
18131         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
18132 export function LightningError_new(err_arg: number, action_arg: number): number {
18133         if(!isWasmInitialized) {
18134                 throw new Error("initializeWasm() must be awaited first!");
18135         }
18136         const nativeResponseValue = wasm.TS_LightningError_new(err_arg, action_arg);
18137         return nativeResponseValue;
18138 }
18139         // uintptr_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
18140 export function LightningError_clone_ptr(arg: number): number {
18141         if(!isWasmInitialized) {
18142                 throw new Error("initializeWasm() must be awaited first!");
18143         }
18144         const nativeResponseValue = wasm.TS_LightningError_clone_ptr(arg);
18145         return nativeResponseValue;
18146 }
18147         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
18148 export function LightningError_clone(orig: number): number {
18149         if(!isWasmInitialized) {
18150                 throw new Error("initializeWasm() must be awaited first!");
18151         }
18152         const nativeResponseValue = wasm.TS_LightningError_clone(orig);
18153         return nativeResponseValue;
18154 }
18155         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
18156 export function CommitmentUpdate_free(this_obj: number): void {
18157         if(!isWasmInitialized) {
18158                 throw new Error("initializeWasm() must be awaited first!");
18159         }
18160         const nativeResponseValue = wasm.TS_CommitmentUpdate_free(this_obj);
18161         // debug statements here
18162 }
18163         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
18164 export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number {
18165         if(!isWasmInitialized) {
18166                 throw new Error("initializeWasm() must be awaited first!");
18167         }
18168         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_add_htlcs(this_ptr);
18169         return nativeResponseValue;
18170 }
18171         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
18172 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number): void {
18173         if(!isWasmInitialized) {
18174                 throw new Error("initializeWasm() must be awaited first!");
18175         }
18176         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
18177         // debug statements here
18178 }
18179         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
18180 export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number {
18181         if(!isWasmInitialized) {
18182                 throw new Error("initializeWasm() must be awaited first!");
18183         }
18184         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
18185         return nativeResponseValue;
18186 }
18187         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
18188 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number): void {
18189         if(!isWasmInitialized) {
18190                 throw new Error("initializeWasm() must be awaited first!");
18191         }
18192         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
18193         // debug statements here
18194 }
18195         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
18196 export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number {
18197         if(!isWasmInitialized) {
18198                 throw new Error("initializeWasm() must be awaited first!");
18199         }
18200         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_htlcs(this_ptr);
18201         return nativeResponseValue;
18202 }
18203         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
18204 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number): void {
18205         if(!isWasmInitialized) {
18206                 throw new Error("initializeWasm() must be awaited first!");
18207         }
18208         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
18209         // debug statements here
18210 }
18211         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
18212 export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number {
18213         if(!isWasmInitialized) {
18214                 throw new Error("initializeWasm() must be awaited first!");
18215         }
18216         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
18217         return nativeResponseValue;
18218 }
18219         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
18220 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number): void {
18221         if(!isWasmInitialized) {
18222                 throw new Error("initializeWasm() must be awaited first!");
18223         }
18224         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
18225         // debug statements here
18226 }
18227         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
18228 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
18229         if(!isWasmInitialized) {
18230                 throw new Error("initializeWasm() must be awaited first!");
18231         }
18232         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_update_fee(this_ptr);
18233         return nativeResponseValue;
18234 }
18235         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
18236 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
18237         if(!isWasmInitialized) {
18238                 throw new Error("initializeWasm() must be awaited first!");
18239         }
18240         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_update_fee(this_ptr, val);
18241         // debug statements here
18242 }
18243         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
18244 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
18245         if(!isWasmInitialized) {
18246                 throw new Error("initializeWasm() must be awaited first!");
18247         }
18248         const nativeResponseValue = wasm.TS_CommitmentUpdate_get_commitment_signed(this_ptr);
18249         return nativeResponseValue;
18250 }
18251         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
18252 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
18253         if(!isWasmInitialized) {
18254                 throw new Error("initializeWasm() must be awaited first!");
18255         }
18256         const nativeResponseValue = wasm.TS_CommitmentUpdate_set_commitment_signed(this_ptr, val);
18257         // debug statements here
18258 }
18259         // 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);
18260 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 {
18261         if(!isWasmInitialized) {
18262                 throw new Error("initializeWasm() must be awaited first!");
18263         }
18264         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);
18265         return nativeResponseValue;
18266 }
18267         // uintptr_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
18268 export function CommitmentUpdate_clone_ptr(arg: number): number {
18269         if(!isWasmInitialized) {
18270                 throw new Error("initializeWasm() must be awaited first!");
18271         }
18272         const nativeResponseValue = wasm.TS_CommitmentUpdate_clone_ptr(arg);
18273         return nativeResponseValue;
18274 }
18275         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
18276 export function CommitmentUpdate_clone(orig: number): number {
18277         if(!isWasmInitialized) {
18278                 throw new Error("initializeWasm() must be awaited first!");
18279         }
18280         const nativeResponseValue = wasm.TS_CommitmentUpdate_clone(orig);
18281         return nativeResponseValue;
18282 }
18283         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
18284 export function ChannelMessageHandler_free(this_ptr: number): void {
18285         if(!isWasmInitialized) {
18286                 throw new Error("initializeWasm() must be awaited first!");
18287         }
18288         const nativeResponseValue = wasm.TS_ChannelMessageHandler_free(this_ptr);
18289         // debug statements here
18290 }
18291         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
18292 export function RoutingMessageHandler_free(this_ptr: number): void {
18293         if(!isWasmInitialized) {
18294                 throw new Error("initializeWasm() must be awaited first!");
18295         }
18296         const nativeResponseValue = wasm.TS_RoutingMessageHandler_free(this_ptr);
18297         // debug statements here
18298 }
18299         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
18300 export function AcceptChannel_write(obj: number): number {
18301         if(!isWasmInitialized) {
18302                 throw new Error("initializeWasm() must be awaited first!");
18303         }
18304         const nativeResponseValue = wasm.TS_AcceptChannel_write(obj);
18305         return nativeResponseValue;
18306 }
18307         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
18308 export function AcceptChannel_read(ser: number): number {
18309         if(!isWasmInitialized) {
18310                 throw new Error("initializeWasm() must be awaited first!");
18311         }
18312         const nativeResponseValue = wasm.TS_AcceptChannel_read(ser);
18313         return nativeResponseValue;
18314 }
18315         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
18316 export function AnnouncementSignatures_write(obj: number): number {
18317         if(!isWasmInitialized) {
18318                 throw new Error("initializeWasm() must be awaited first!");
18319         }
18320         const nativeResponseValue = wasm.TS_AnnouncementSignatures_write(obj);
18321         return nativeResponseValue;
18322 }
18323         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
18324 export function AnnouncementSignatures_read(ser: number): number {
18325         if(!isWasmInitialized) {
18326                 throw new Error("initializeWasm() must be awaited first!");
18327         }
18328         const nativeResponseValue = wasm.TS_AnnouncementSignatures_read(ser);
18329         return nativeResponseValue;
18330 }
18331         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
18332 export function ChannelReestablish_write(obj: number): number {
18333         if(!isWasmInitialized) {
18334                 throw new Error("initializeWasm() must be awaited first!");
18335         }
18336         const nativeResponseValue = wasm.TS_ChannelReestablish_write(obj);
18337         return nativeResponseValue;
18338 }
18339         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
18340 export function ChannelReestablish_read(ser: number): number {
18341         if(!isWasmInitialized) {
18342                 throw new Error("initializeWasm() must be awaited first!");
18343         }
18344         const nativeResponseValue = wasm.TS_ChannelReestablish_read(ser);
18345         return nativeResponseValue;
18346 }
18347         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
18348 export function ClosingSigned_write(obj: number): number {
18349         if(!isWasmInitialized) {
18350                 throw new Error("initializeWasm() must be awaited first!");
18351         }
18352         const nativeResponseValue = wasm.TS_ClosingSigned_write(obj);
18353         return nativeResponseValue;
18354 }
18355         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
18356 export function ClosingSigned_read(ser: number): number {
18357         if(!isWasmInitialized) {
18358                 throw new Error("initializeWasm() must be awaited first!");
18359         }
18360         const nativeResponseValue = wasm.TS_ClosingSigned_read(ser);
18361         return nativeResponseValue;
18362 }
18363         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
18364 export function ClosingSignedFeeRange_write(obj: number): number {
18365         if(!isWasmInitialized) {
18366                 throw new Error("initializeWasm() must be awaited first!");
18367         }
18368         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_write(obj);
18369         return nativeResponseValue;
18370 }
18371         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
18372 export function ClosingSignedFeeRange_read(ser: number): number {
18373         if(!isWasmInitialized) {
18374                 throw new Error("initializeWasm() must be awaited first!");
18375         }
18376         const nativeResponseValue = wasm.TS_ClosingSignedFeeRange_read(ser);
18377         return nativeResponseValue;
18378 }
18379         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
18380 export function CommitmentSigned_write(obj: number): number {
18381         if(!isWasmInitialized) {
18382                 throw new Error("initializeWasm() must be awaited first!");
18383         }
18384         const nativeResponseValue = wasm.TS_CommitmentSigned_write(obj);
18385         return nativeResponseValue;
18386 }
18387         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
18388 export function CommitmentSigned_read(ser: number): number {
18389         if(!isWasmInitialized) {
18390                 throw new Error("initializeWasm() must be awaited first!");
18391         }
18392         const nativeResponseValue = wasm.TS_CommitmentSigned_read(ser);
18393         return nativeResponseValue;
18394 }
18395         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
18396 export function FundingCreated_write(obj: number): number {
18397         if(!isWasmInitialized) {
18398                 throw new Error("initializeWasm() must be awaited first!");
18399         }
18400         const nativeResponseValue = wasm.TS_FundingCreated_write(obj);
18401         return nativeResponseValue;
18402 }
18403         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
18404 export function FundingCreated_read(ser: number): number {
18405         if(!isWasmInitialized) {
18406                 throw new Error("initializeWasm() must be awaited first!");
18407         }
18408         const nativeResponseValue = wasm.TS_FundingCreated_read(ser);
18409         return nativeResponseValue;
18410 }
18411         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
18412 export function FundingSigned_write(obj: number): number {
18413         if(!isWasmInitialized) {
18414                 throw new Error("initializeWasm() must be awaited first!");
18415         }
18416         const nativeResponseValue = wasm.TS_FundingSigned_write(obj);
18417         return nativeResponseValue;
18418 }
18419         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
18420 export function FundingSigned_read(ser: number): number {
18421         if(!isWasmInitialized) {
18422                 throw new Error("initializeWasm() must be awaited first!");
18423         }
18424         const nativeResponseValue = wasm.TS_FundingSigned_read(ser);
18425         return nativeResponseValue;
18426 }
18427         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
18428 export function FundingLocked_write(obj: number): number {
18429         if(!isWasmInitialized) {
18430                 throw new Error("initializeWasm() must be awaited first!");
18431         }
18432         const nativeResponseValue = wasm.TS_FundingLocked_write(obj);
18433         return nativeResponseValue;
18434 }
18435         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
18436 export function FundingLocked_read(ser: number): number {
18437         if(!isWasmInitialized) {
18438                 throw new Error("initializeWasm() must be awaited first!");
18439         }
18440         const nativeResponseValue = wasm.TS_FundingLocked_read(ser);
18441         return nativeResponseValue;
18442 }
18443         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
18444 export function Init_write(obj: number): number {
18445         if(!isWasmInitialized) {
18446                 throw new Error("initializeWasm() must be awaited first!");
18447         }
18448         const nativeResponseValue = wasm.TS_Init_write(obj);
18449         return nativeResponseValue;
18450 }
18451         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
18452 export function Init_read(ser: number): number {
18453         if(!isWasmInitialized) {
18454                 throw new Error("initializeWasm() must be awaited first!");
18455         }
18456         const nativeResponseValue = wasm.TS_Init_read(ser);
18457         return nativeResponseValue;
18458 }
18459         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
18460 export function OpenChannel_write(obj: number): number {
18461         if(!isWasmInitialized) {
18462                 throw new Error("initializeWasm() must be awaited first!");
18463         }
18464         const nativeResponseValue = wasm.TS_OpenChannel_write(obj);
18465         return nativeResponseValue;
18466 }
18467         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
18468 export function OpenChannel_read(ser: number): number {
18469         if(!isWasmInitialized) {
18470                 throw new Error("initializeWasm() must be awaited first!");
18471         }
18472         const nativeResponseValue = wasm.TS_OpenChannel_read(ser);
18473         return nativeResponseValue;
18474 }
18475         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
18476 export function RevokeAndACK_write(obj: number): number {
18477         if(!isWasmInitialized) {
18478                 throw new Error("initializeWasm() must be awaited first!");
18479         }
18480         const nativeResponseValue = wasm.TS_RevokeAndACK_write(obj);
18481         return nativeResponseValue;
18482 }
18483         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
18484 export function RevokeAndACK_read(ser: number): number {
18485         if(!isWasmInitialized) {
18486                 throw new Error("initializeWasm() must be awaited first!");
18487         }
18488         const nativeResponseValue = wasm.TS_RevokeAndACK_read(ser);
18489         return nativeResponseValue;
18490 }
18491         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
18492 export function Shutdown_write(obj: number): number {
18493         if(!isWasmInitialized) {
18494                 throw new Error("initializeWasm() must be awaited first!");
18495         }
18496         const nativeResponseValue = wasm.TS_Shutdown_write(obj);
18497         return nativeResponseValue;
18498 }
18499         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
18500 export function Shutdown_read(ser: number): number {
18501         if(!isWasmInitialized) {
18502                 throw new Error("initializeWasm() must be awaited first!");
18503         }
18504         const nativeResponseValue = wasm.TS_Shutdown_read(ser);
18505         return nativeResponseValue;
18506 }
18507         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
18508 export function UpdateFailHTLC_write(obj: number): number {
18509         if(!isWasmInitialized) {
18510                 throw new Error("initializeWasm() must be awaited first!");
18511         }
18512         const nativeResponseValue = wasm.TS_UpdateFailHTLC_write(obj);
18513         return nativeResponseValue;
18514 }
18515         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
18516 export function UpdateFailHTLC_read(ser: number): number {
18517         if(!isWasmInitialized) {
18518                 throw new Error("initializeWasm() must be awaited first!");
18519         }
18520         const nativeResponseValue = wasm.TS_UpdateFailHTLC_read(ser);
18521         return nativeResponseValue;
18522 }
18523         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
18524 export function UpdateFailMalformedHTLC_write(obj: number): number {
18525         if(!isWasmInitialized) {
18526                 throw new Error("initializeWasm() must be awaited first!");
18527         }
18528         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_write(obj);
18529         return nativeResponseValue;
18530 }
18531         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
18532 export function UpdateFailMalformedHTLC_read(ser: number): number {
18533         if(!isWasmInitialized) {
18534                 throw new Error("initializeWasm() must be awaited first!");
18535         }
18536         const nativeResponseValue = wasm.TS_UpdateFailMalformedHTLC_read(ser);
18537         return nativeResponseValue;
18538 }
18539         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
18540 export function UpdateFee_write(obj: number): number {
18541         if(!isWasmInitialized) {
18542                 throw new Error("initializeWasm() must be awaited first!");
18543         }
18544         const nativeResponseValue = wasm.TS_UpdateFee_write(obj);
18545         return nativeResponseValue;
18546 }
18547         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
18548 export function UpdateFee_read(ser: number): number {
18549         if(!isWasmInitialized) {
18550                 throw new Error("initializeWasm() must be awaited first!");
18551         }
18552         const nativeResponseValue = wasm.TS_UpdateFee_read(ser);
18553         return nativeResponseValue;
18554 }
18555         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
18556 export function UpdateFulfillHTLC_write(obj: number): number {
18557         if(!isWasmInitialized) {
18558                 throw new Error("initializeWasm() must be awaited first!");
18559         }
18560         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_write(obj);
18561         return nativeResponseValue;
18562 }
18563         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
18564 export function UpdateFulfillHTLC_read(ser: number): number {
18565         if(!isWasmInitialized) {
18566                 throw new Error("initializeWasm() must be awaited first!");
18567         }
18568         const nativeResponseValue = wasm.TS_UpdateFulfillHTLC_read(ser);
18569         return nativeResponseValue;
18570 }
18571         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
18572 export function UpdateAddHTLC_write(obj: number): number {
18573         if(!isWasmInitialized) {
18574                 throw new Error("initializeWasm() must be awaited first!");
18575         }
18576         const nativeResponseValue = wasm.TS_UpdateAddHTLC_write(obj);
18577         return nativeResponseValue;
18578 }
18579         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
18580 export function UpdateAddHTLC_read(ser: number): number {
18581         if(!isWasmInitialized) {
18582                 throw new Error("initializeWasm() must be awaited first!");
18583         }
18584         const nativeResponseValue = wasm.TS_UpdateAddHTLC_read(ser);
18585         return nativeResponseValue;
18586 }
18587         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
18588 export function Ping_write(obj: number): number {
18589         if(!isWasmInitialized) {
18590                 throw new Error("initializeWasm() must be awaited first!");
18591         }
18592         const nativeResponseValue = wasm.TS_Ping_write(obj);
18593         return nativeResponseValue;
18594 }
18595         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
18596 export function Ping_read(ser: number): number {
18597         if(!isWasmInitialized) {
18598                 throw new Error("initializeWasm() must be awaited first!");
18599         }
18600         const nativeResponseValue = wasm.TS_Ping_read(ser);
18601         return nativeResponseValue;
18602 }
18603         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
18604 export function Pong_write(obj: number): number {
18605         if(!isWasmInitialized) {
18606                 throw new Error("initializeWasm() must be awaited first!");
18607         }
18608         const nativeResponseValue = wasm.TS_Pong_write(obj);
18609         return nativeResponseValue;
18610 }
18611         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
18612 export function Pong_read(ser: number): number {
18613         if(!isWasmInitialized) {
18614                 throw new Error("initializeWasm() must be awaited first!");
18615         }
18616         const nativeResponseValue = wasm.TS_Pong_read(ser);
18617         return nativeResponseValue;
18618 }
18619         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
18620 export function UnsignedChannelAnnouncement_write(obj: number): number {
18621         if(!isWasmInitialized) {
18622                 throw new Error("initializeWasm() must be awaited first!");
18623         }
18624         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_write(obj);
18625         return nativeResponseValue;
18626 }
18627         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
18628 export function UnsignedChannelAnnouncement_read(ser: number): number {
18629         if(!isWasmInitialized) {
18630                 throw new Error("initializeWasm() must be awaited first!");
18631         }
18632         const nativeResponseValue = wasm.TS_UnsignedChannelAnnouncement_read(ser);
18633         return nativeResponseValue;
18634 }
18635         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
18636 export function ChannelAnnouncement_write(obj: number): number {
18637         if(!isWasmInitialized) {
18638                 throw new Error("initializeWasm() must be awaited first!");
18639         }
18640         const nativeResponseValue = wasm.TS_ChannelAnnouncement_write(obj);
18641         return nativeResponseValue;
18642 }
18643         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
18644 export function ChannelAnnouncement_read(ser: number): number {
18645         if(!isWasmInitialized) {
18646                 throw new Error("initializeWasm() must be awaited first!");
18647         }
18648         const nativeResponseValue = wasm.TS_ChannelAnnouncement_read(ser);
18649         return nativeResponseValue;
18650 }
18651         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
18652 export function UnsignedChannelUpdate_write(obj: number): number {
18653         if(!isWasmInitialized) {
18654                 throw new Error("initializeWasm() must be awaited first!");
18655         }
18656         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_write(obj);
18657         return nativeResponseValue;
18658 }
18659         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
18660 export function UnsignedChannelUpdate_read(ser: number): number {
18661         if(!isWasmInitialized) {
18662                 throw new Error("initializeWasm() must be awaited first!");
18663         }
18664         const nativeResponseValue = wasm.TS_UnsignedChannelUpdate_read(ser);
18665         return nativeResponseValue;
18666 }
18667         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
18668 export function ChannelUpdate_write(obj: number): number {
18669         if(!isWasmInitialized) {
18670                 throw new Error("initializeWasm() must be awaited first!");
18671         }
18672         const nativeResponseValue = wasm.TS_ChannelUpdate_write(obj);
18673         return nativeResponseValue;
18674 }
18675         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
18676 export function ChannelUpdate_read(ser: number): number {
18677         if(!isWasmInitialized) {
18678                 throw new Error("initializeWasm() must be awaited first!");
18679         }
18680         const nativeResponseValue = wasm.TS_ChannelUpdate_read(ser);
18681         return nativeResponseValue;
18682 }
18683         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
18684 export function ErrorMessage_write(obj: number): number {
18685         if(!isWasmInitialized) {
18686                 throw new Error("initializeWasm() must be awaited first!");
18687         }
18688         const nativeResponseValue = wasm.TS_ErrorMessage_write(obj);
18689         return nativeResponseValue;
18690 }
18691         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
18692 export function ErrorMessage_read(ser: number): number {
18693         if(!isWasmInitialized) {
18694                 throw new Error("initializeWasm() must be awaited first!");
18695         }
18696         const nativeResponseValue = wasm.TS_ErrorMessage_read(ser);
18697         return nativeResponseValue;
18698 }
18699         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
18700 export function UnsignedNodeAnnouncement_write(obj: number): number {
18701         if(!isWasmInitialized) {
18702                 throw new Error("initializeWasm() must be awaited first!");
18703         }
18704         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_write(obj);
18705         return nativeResponseValue;
18706 }
18707         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
18708 export function UnsignedNodeAnnouncement_read(ser: number): number {
18709         if(!isWasmInitialized) {
18710                 throw new Error("initializeWasm() must be awaited first!");
18711         }
18712         const nativeResponseValue = wasm.TS_UnsignedNodeAnnouncement_read(ser);
18713         return nativeResponseValue;
18714 }
18715         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
18716 export function NodeAnnouncement_write(obj: number): number {
18717         if(!isWasmInitialized) {
18718                 throw new Error("initializeWasm() must be awaited first!");
18719         }
18720         const nativeResponseValue = wasm.TS_NodeAnnouncement_write(obj);
18721         return nativeResponseValue;
18722 }
18723         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
18724 export function NodeAnnouncement_read(ser: number): number {
18725         if(!isWasmInitialized) {
18726                 throw new Error("initializeWasm() must be awaited first!");
18727         }
18728         const nativeResponseValue = wasm.TS_NodeAnnouncement_read(ser);
18729         return nativeResponseValue;
18730 }
18731         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
18732 export function QueryShortChannelIds_read(ser: number): number {
18733         if(!isWasmInitialized) {
18734                 throw new Error("initializeWasm() must be awaited first!");
18735         }
18736         const nativeResponseValue = wasm.TS_QueryShortChannelIds_read(ser);
18737         return nativeResponseValue;
18738 }
18739         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
18740 export function QueryShortChannelIds_write(obj: number): number {
18741         if(!isWasmInitialized) {
18742                 throw new Error("initializeWasm() must be awaited first!");
18743         }
18744         const nativeResponseValue = wasm.TS_QueryShortChannelIds_write(obj);
18745         return nativeResponseValue;
18746 }
18747         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
18748 export function ReplyShortChannelIdsEnd_write(obj: number): number {
18749         if(!isWasmInitialized) {
18750                 throw new Error("initializeWasm() must be awaited first!");
18751         }
18752         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_write(obj);
18753         return nativeResponseValue;
18754 }
18755         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
18756 export function ReplyShortChannelIdsEnd_read(ser: number): number {
18757         if(!isWasmInitialized) {
18758                 throw new Error("initializeWasm() must be awaited first!");
18759         }
18760         const nativeResponseValue = wasm.TS_ReplyShortChannelIdsEnd_read(ser);
18761         return nativeResponseValue;
18762 }
18763         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
18764 export function QueryChannelRange_end_blocknum(this_arg: number): number {
18765         if(!isWasmInitialized) {
18766                 throw new Error("initializeWasm() must be awaited first!");
18767         }
18768         const nativeResponseValue = wasm.TS_QueryChannelRange_end_blocknum(this_arg);
18769         return nativeResponseValue;
18770 }
18771         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
18772 export function QueryChannelRange_write(obj: number): number {
18773         if(!isWasmInitialized) {
18774                 throw new Error("initializeWasm() must be awaited first!");
18775         }
18776         const nativeResponseValue = wasm.TS_QueryChannelRange_write(obj);
18777         return nativeResponseValue;
18778 }
18779         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
18780 export function QueryChannelRange_read(ser: number): number {
18781         if(!isWasmInitialized) {
18782                 throw new Error("initializeWasm() must be awaited first!");
18783         }
18784         const nativeResponseValue = wasm.TS_QueryChannelRange_read(ser);
18785         return nativeResponseValue;
18786 }
18787         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
18788 export function ReplyChannelRange_read(ser: number): number {
18789         if(!isWasmInitialized) {
18790                 throw new Error("initializeWasm() must be awaited first!");
18791         }
18792         const nativeResponseValue = wasm.TS_ReplyChannelRange_read(ser);
18793         return nativeResponseValue;
18794 }
18795         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
18796 export function ReplyChannelRange_write(obj: number): number {
18797         if(!isWasmInitialized) {
18798                 throw new Error("initializeWasm() must be awaited first!");
18799         }
18800         const nativeResponseValue = wasm.TS_ReplyChannelRange_write(obj);
18801         return nativeResponseValue;
18802 }
18803         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
18804 export function GossipTimestampFilter_write(obj: number): number {
18805         if(!isWasmInitialized) {
18806                 throw new Error("initializeWasm() must be awaited first!");
18807         }
18808         const nativeResponseValue = wasm.TS_GossipTimestampFilter_write(obj);
18809         return nativeResponseValue;
18810 }
18811         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
18812 export function GossipTimestampFilter_read(ser: number): number {
18813         if(!isWasmInitialized) {
18814                 throw new Error("initializeWasm() must be awaited first!");
18815         }
18816         const nativeResponseValue = wasm.TS_GossipTimestampFilter_read(ser);
18817         return nativeResponseValue;
18818 }
18819         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
18820 export function CustomMessageHandler_free(this_ptr: number): void {
18821         if(!isWasmInitialized) {
18822                 throw new Error("initializeWasm() must be awaited first!");
18823         }
18824         const nativeResponseValue = wasm.TS_CustomMessageHandler_free(this_ptr);
18825         // debug statements here
18826 }
18827         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
18828 export function IgnoringMessageHandler_free(this_obj: number): void {
18829         if(!isWasmInitialized) {
18830                 throw new Error("initializeWasm() must be awaited first!");
18831         }
18832         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_free(this_obj);
18833         // debug statements here
18834 }
18835         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
18836 export function IgnoringMessageHandler_new(): number {
18837         if(!isWasmInitialized) {
18838                 throw new Error("initializeWasm() must be awaited first!");
18839         }
18840         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_new();
18841         return nativeResponseValue;
18842 }
18843         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18844 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
18845         if(!isWasmInitialized) {
18846                 throw new Error("initializeWasm() must be awaited first!");
18847         }
18848         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
18849         return nativeResponseValue;
18850 }
18851         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18852 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
18853         if(!isWasmInitialized) {
18854                 throw new Error("initializeWasm() must be awaited first!");
18855         }
18856         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
18857         return nativeResponseValue;
18858 }
18859         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18860 export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
18861         if(!isWasmInitialized) {
18862                 throw new Error("initializeWasm() must be awaited first!");
18863         }
18864         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageReader(this_arg);
18865         return nativeResponseValue;
18866 }
18867         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
18868 export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
18869         if(!isWasmInitialized) {
18870                 throw new Error("initializeWasm() must be awaited first!");
18871         }
18872         const nativeResponseValue = wasm.TS_IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
18873         return nativeResponseValue;
18874 }
18875         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
18876 export function ErroringMessageHandler_free(this_obj: number): void {
18877         if(!isWasmInitialized) {
18878                 throw new Error("initializeWasm() must be awaited first!");
18879         }
18880         const nativeResponseValue = wasm.TS_ErroringMessageHandler_free(this_obj);
18881         // debug statements here
18882 }
18883         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
18884 export function ErroringMessageHandler_new(): number {
18885         if(!isWasmInitialized) {
18886                 throw new Error("initializeWasm() must be awaited first!");
18887         }
18888         const nativeResponseValue = wasm.TS_ErroringMessageHandler_new();
18889         return nativeResponseValue;
18890 }
18891         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
18892 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
18893         if(!isWasmInitialized) {
18894                 throw new Error("initializeWasm() must be awaited first!");
18895         }
18896         const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
18897         return nativeResponseValue;
18898 }
18899         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
18900 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
18901         if(!isWasmInitialized) {
18902                 throw new Error("initializeWasm() must be awaited first!");
18903         }
18904         const nativeResponseValue = wasm.TS_ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
18905         return nativeResponseValue;
18906 }
18907         // void MessageHandler_free(struct LDKMessageHandler this_obj);
18908 export function MessageHandler_free(this_obj: number): void {
18909         if(!isWasmInitialized) {
18910                 throw new Error("initializeWasm() must be awaited first!");
18911         }
18912         const nativeResponseValue = wasm.TS_MessageHandler_free(this_obj);
18913         // debug statements here
18914 }
18915         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
18916 export function MessageHandler_get_chan_handler(this_ptr: number): number {
18917         if(!isWasmInitialized) {
18918                 throw new Error("initializeWasm() must be awaited first!");
18919         }
18920         const nativeResponseValue = wasm.TS_MessageHandler_get_chan_handler(this_ptr);
18921         return nativeResponseValue;
18922 }
18923         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
18924 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
18925         if(!isWasmInitialized) {
18926                 throw new Error("initializeWasm() must be awaited first!");
18927         }
18928         const nativeResponseValue = wasm.TS_MessageHandler_set_chan_handler(this_ptr, val);
18929         // debug statements here
18930 }
18931         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
18932 export function MessageHandler_get_route_handler(this_ptr: number): number {
18933         if(!isWasmInitialized) {
18934                 throw new Error("initializeWasm() must be awaited first!");
18935         }
18936         const nativeResponseValue = wasm.TS_MessageHandler_get_route_handler(this_ptr);
18937         return nativeResponseValue;
18938 }
18939         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
18940 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
18941         if(!isWasmInitialized) {
18942                 throw new Error("initializeWasm() must be awaited first!");
18943         }
18944         const nativeResponseValue = wasm.TS_MessageHandler_set_route_handler(this_ptr, val);
18945         // debug statements here
18946 }
18947         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
18948 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
18949         if(!isWasmInitialized) {
18950                 throw new Error("initializeWasm() must be awaited first!");
18951         }
18952         const nativeResponseValue = wasm.TS_MessageHandler_new(chan_handler_arg, route_handler_arg);
18953         return nativeResponseValue;
18954 }
18955         // uintptr_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
18956 export function SocketDescriptor_clone_ptr(arg: number): number {
18957         if(!isWasmInitialized) {
18958                 throw new Error("initializeWasm() must be awaited first!");
18959         }
18960         const nativeResponseValue = wasm.TS_SocketDescriptor_clone_ptr(arg);
18961         return nativeResponseValue;
18962 }
18963         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
18964 export function SocketDescriptor_clone(orig: number): number {
18965         if(!isWasmInitialized) {
18966                 throw new Error("initializeWasm() must be awaited first!");
18967         }
18968         const nativeResponseValue = wasm.TS_SocketDescriptor_clone(orig);
18969         return nativeResponseValue;
18970 }
18971         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
18972 export function SocketDescriptor_free(this_ptr: number): void {
18973         if(!isWasmInitialized) {
18974                 throw new Error("initializeWasm() must be awaited first!");
18975         }
18976         const nativeResponseValue = wasm.TS_SocketDescriptor_free(this_ptr);
18977         // debug statements here
18978 }
18979         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
18980 export function PeerHandleError_free(this_obj: number): void {
18981         if(!isWasmInitialized) {
18982                 throw new Error("initializeWasm() must be awaited first!");
18983         }
18984         const nativeResponseValue = wasm.TS_PeerHandleError_free(this_obj);
18985         // debug statements here
18986 }
18987         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
18988 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
18989         if(!isWasmInitialized) {
18990                 throw new Error("initializeWasm() must be awaited first!");
18991         }
18992         const nativeResponseValue = wasm.TS_PeerHandleError_get_no_connection_possible(this_ptr);
18993         return nativeResponseValue;
18994 }
18995         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
18996 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
18997         if(!isWasmInitialized) {
18998                 throw new Error("initializeWasm() must be awaited first!");
18999         }
19000         const nativeResponseValue = wasm.TS_PeerHandleError_set_no_connection_possible(this_ptr, val);
19001         // debug statements here
19002 }
19003         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
19004 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
19005         if(!isWasmInitialized) {
19006                 throw new Error("initializeWasm() must be awaited first!");
19007         }
19008         const nativeResponseValue = wasm.TS_PeerHandleError_new(no_connection_possible_arg);
19009         return nativeResponseValue;
19010 }
19011         // uintptr_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
19012 export function PeerHandleError_clone_ptr(arg: number): number {
19013         if(!isWasmInitialized) {
19014                 throw new Error("initializeWasm() must be awaited first!");
19015         }
19016         const nativeResponseValue = wasm.TS_PeerHandleError_clone_ptr(arg);
19017         return nativeResponseValue;
19018 }
19019         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
19020 export function PeerHandleError_clone(orig: number): number {
19021         if(!isWasmInitialized) {
19022                 throw new Error("initializeWasm() must be awaited first!");
19023         }
19024         const nativeResponseValue = wasm.TS_PeerHandleError_clone(orig);
19025         return nativeResponseValue;
19026 }
19027         // void PeerManager_free(struct LDKPeerManager this_obj);
19028 export function PeerManager_free(this_obj: number): void {
19029         if(!isWasmInitialized) {
19030                 throw new Error("initializeWasm() must be awaited first!");
19031         }
19032         const nativeResponseValue = wasm.TS_PeerManager_free(this_obj);
19033         // debug statements here
19034 }
19035         // 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);
19036 export function PeerManager_new(message_handler: number, our_node_secret: number, ephemeral_random_data: number, logger: number, custom_message_handler: number): number {
19037         if(!isWasmInitialized) {
19038                 throw new Error("initializeWasm() must be awaited first!");
19039         }
19040         const nativeResponseValue = wasm.TS_PeerManager_new(message_handler, our_node_secret, ephemeral_random_data, logger, custom_message_handler);
19041         return nativeResponseValue;
19042 }
19043         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
19044 export function PeerManager_get_peer_node_ids(this_arg: number): number {
19045         if(!isWasmInitialized) {
19046                 throw new Error("initializeWasm() must be awaited first!");
19047         }
19048         const nativeResponseValue = wasm.TS_PeerManager_get_peer_node_ids(this_arg);
19049         return nativeResponseValue;
19050 }
19051         // 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);
19052 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: number, descriptor: number): number {
19053         if(!isWasmInitialized) {
19054                 throw new Error("initializeWasm() must be awaited first!");
19055         }
19056         const nativeResponseValue = wasm.TS_PeerManager_new_outbound_connection(this_arg, their_node_id, descriptor);
19057         return nativeResponseValue;
19058 }
19059         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
19060 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
19061         if(!isWasmInitialized) {
19062                 throw new Error("initializeWasm() must be awaited first!");
19063         }
19064         const nativeResponseValue = wasm.TS_PeerManager_new_inbound_connection(this_arg, descriptor);
19065         return nativeResponseValue;
19066 }
19067         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
19068 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
19069         if(!isWasmInitialized) {
19070                 throw new Error("initializeWasm() must be awaited first!");
19071         }
19072         const nativeResponseValue = wasm.TS_PeerManager_write_buffer_space_avail(this_arg, descriptor);
19073         return nativeResponseValue;
19074 }
19075         // 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);
19076 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: number): number {
19077         if(!isWasmInitialized) {
19078                 throw new Error("initializeWasm() must be awaited first!");
19079         }
19080         const nativeResponseValue = wasm.TS_PeerManager_read_event(this_arg, peer_descriptor, data);
19081         return nativeResponseValue;
19082 }
19083         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
19084 export function PeerManager_process_events(this_arg: number): void {
19085         if(!isWasmInitialized) {
19086                 throw new Error("initializeWasm() must be awaited first!");
19087         }
19088         const nativeResponseValue = wasm.TS_PeerManager_process_events(this_arg);
19089         // debug statements here
19090 }
19091         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
19092 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
19093         if(!isWasmInitialized) {
19094                 throw new Error("initializeWasm() must be awaited first!");
19095         }
19096         const nativeResponseValue = wasm.TS_PeerManager_socket_disconnected(this_arg, descriptor);
19097         // debug statements here
19098 }
19099         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
19100 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: number, no_connection_possible: boolean): void {
19101         if(!isWasmInitialized) {
19102                 throw new Error("initializeWasm() must be awaited first!");
19103         }
19104         const nativeResponseValue = wasm.TS_PeerManager_disconnect_by_node_id(this_arg, node_id, no_connection_possible);
19105         // debug statements here
19106 }
19107         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
19108 export function PeerManager_disconnect_all_peers(this_arg: number): void {
19109         if(!isWasmInitialized) {
19110                 throw new Error("initializeWasm() must be awaited first!");
19111         }
19112         const nativeResponseValue = wasm.TS_PeerManager_disconnect_all_peers(this_arg);
19113         // debug statements here
19114 }
19115         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
19116 export function PeerManager_timer_tick_occurred(this_arg: number): void {
19117         if(!isWasmInitialized) {
19118                 throw new Error("initializeWasm() must be awaited first!");
19119         }
19120         const nativeResponseValue = wasm.TS_PeerManager_timer_tick_occurred(this_arg);
19121         // debug statements here
19122 }
19123         // uint64_t htlc_success_tx_weight(bool opt_anchors);
19124 export function htlc_success_tx_weight(opt_anchors: boolean): bigint {
19125         if(!isWasmInitialized) {
19126                 throw new Error("initializeWasm() must be awaited first!");
19127         }
19128         const nativeResponseValue = wasm.TS_htlc_success_tx_weight(opt_anchors);
19129         return nativeResponseValue;
19130 }
19131         // uint64_t htlc_timeout_tx_weight(bool opt_anchors);
19132 export function htlc_timeout_tx_weight(opt_anchors: boolean): bigint {
19133         if(!isWasmInitialized) {
19134                 throw new Error("initializeWasm() must be awaited first!");
19135         }
19136         const nativeResponseValue = wasm.TS_htlc_timeout_tx_weight(opt_anchors);
19137         return nativeResponseValue;
19138 }
19139         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
19140 export function build_commitment_secret(commitment_seed: number, idx: bigint): number {
19141         if(!isWasmInitialized) {
19142                 throw new Error("initializeWasm() must be awaited first!");
19143         }
19144         const nativeResponseValue = wasm.TS_build_commitment_secret(commitment_seed, idx);
19145         return nativeResponseValue;
19146 }
19147         // 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);
19148 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 {
19149         if(!isWasmInitialized) {
19150                 throw new Error("initializeWasm() must be awaited first!");
19151         }
19152         const nativeResponseValue = wasm.TS_build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint);
19153         return nativeResponseValue;
19154 }
19155         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
19156 export function derive_private_key(per_commitment_point: number, base_secret: number): number {
19157         if(!isWasmInitialized) {
19158                 throw new Error("initializeWasm() must be awaited first!");
19159         }
19160         const nativeResponseValue = wasm.TS_derive_private_key(per_commitment_point, base_secret);
19161         return nativeResponseValue;
19162 }
19163         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
19164 export function derive_public_key(per_commitment_point: number, base_point: number): number {
19165         if(!isWasmInitialized) {
19166                 throw new Error("initializeWasm() must be awaited first!");
19167         }
19168         const nativeResponseValue = wasm.TS_derive_public_key(per_commitment_point, base_point);
19169         return nativeResponseValue;
19170 }
19171         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
19172 export function derive_private_revocation_key(per_commitment_secret: number, countersignatory_revocation_base_secret: number): number {
19173         if(!isWasmInitialized) {
19174                 throw new Error("initializeWasm() must be awaited first!");
19175         }
19176         const nativeResponseValue = wasm.TS_derive_private_revocation_key(per_commitment_secret, countersignatory_revocation_base_secret);
19177         return nativeResponseValue;
19178 }
19179         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
19180 export function derive_public_revocation_key(per_commitment_point: number, countersignatory_revocation_base_point: number): number {
19181         if(!isWasmInitialized) {
19182                 throw new Error("initializeWasm() must be awaited first!");
19183         }
19184         const nativeResponseValue = wasm.TS_derive_public_revocation_key(per_commitment_point, countersignatory_revocation_base_point);
19185         return nativeResponseValue;
19186 }
19187         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
19188 export function TxCreationKeys_free(this_obj: number): void {
19189         if(!isWasmInitialized) {
19190                 throw new Error("initializeWasm() must be awaited first!");
19191         }
19192         const nativeResponseValue = wasm.TS_TxCreationKeys_free(this_obj);
19193         // debug statements here
19194 }
19195         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
19196 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): number {
19197         if(!isWasmInitialized) {
19198                 throw new Error("initializeWasm() must be awaited first!");
19199         }
19200         const nativeResponseValue = wasm.TS_TxCreationKeys_get_per_commitment_point(this_ptr);
19201         return nativeResponseValue;
19202 }
19203         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19204 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: number): void {
19205         if(!isWasmInitialized) {
19206                 throw new Error("initializeWasm() must be awaited first!");
19207         }
19208         const nativeResponseValue = wasm.TS_TxCreationKeys_set_per_commitment_point(this_ptr, val);
19209         // debug statements here
19210 }
19211         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
19212 export function TxCreationKeys_get_revocation_key(this_ptr: number): number {
19213         if(!isWasmInitialized) {
19214                 throw new Error("initializeWasm() must be awaited first!");
19215         }
19216         const nativeResponseValue = wasm.TS_TxCreationKeys_get_revocation_key(this_ptr);
19217         return nativeResponseValue;
19218 }
19219         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19220 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: number): void {
19221         if(!isWasmInitialized) {
19222                 throw new Error("initializeWasm() must be awaited first!");
19223         }
19224         const nativeResponseValue = wasm.TS_TxCreationKeys_set_revocation_key(this_ptr, val);
19225         // debug statements here
19226 }
19227         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
19228 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): number {
19229         if(!isWasmInitialized) {
19230                 throw new Error("initializeWasm() must be awaited first!");
19231         }
19232         const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
19233         return nativeResponseValue;
19234 }
19235         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19236 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: number): void {
19237         if(!isWasmInitialized) {
19238                 throw new Error("initializeWasm() must be awaited first!");
19239         }
19240         const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_htlc_key(this_ptr, val);
19241         // debug statements here
19242 }
19243         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
19244 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): number {
19245         if(!isWasmInitialized) {
19246                 throw new Error("initializeWasm() must be awaited first!");
19247         }
19248         const nativeResponseValue = wasm.TS_TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
19249         return nativeResponseValue;
19250 }
19251         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19252 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: number): void {
19253         if(!isWasmInitialized) {
19254                 throw new Error("initializeWasm() must be awaited first!");
19255         }
19256         const nativeResponseValue = wasm.TS_TxCreationKeys_set_countersignatory_htlc_key(this_ptr, val);
19257         // debug statements here
19258 }
19259         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
19260 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): number {
19261         if(!isWasmInitialized) {
19262                 throw new Error("initializeWasm() must be awaited first!");
19263         }
19264         const nativeResponseValue = wasm.TS_TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
19265         return nativeResponseValue;
19266 }
19267         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19268 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: number): void {
19269         if(!isWasmInitialized) {
19270                 throw new Error("initializeWasm() must be awaited first!");
19271         }
19272         const nativeResponseValue = wasm.TS_TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, val);
19273         // debug statements here
19274 }
19275         // 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);
19276 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 {
19277         if(!isWasmInitialized) {
19278                 throw new Error("initializeWasm() must be awaited first!");
19279         }
19280         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);
19281         return nativeResponseValue;
19282 }
19283         // uintptr_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
19284 export function TxCreationKeys_clone_ptr(arg: number): number {
19285         if(!isWasmInitialized) {
19286                 throw new Error("initializeWasm() must be awaited first!");
19287         }
19288         const nativeResponseValue = wasm.TS_TxCreationKeys_clone_ptr(arg);
19289         return nativeResponseValue;
19290 }
19291         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
19292 export function TxCreationKeys_clone(orig: number): number {
19293         if(!isWasmInitialized) {
19294                 throw new Error("initializeWasm() must be awaited first!");
19295         }
19296         const nativeResponseValue = wasm.TS_TxCreationKeys_clone(orig);
19297         return nativeResponseValue;
19298 }
19299         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
19300 export function TxCreationKeys_write(obj: number): number {
19301         if(!isWasmInitialized) {
19302                 throw new Error("initializeWasm() must be awaited first!");
19303         }
19304         const nativeResponseValue = wasm.TS_TxCreationKeys_write(obj);
19305         return nativeResponseValue;
19306 }
19307         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
19308 export function TxCreationKeys_read(ser: number): number {
19309         if(!isWasmInitialized) {
19310                 throw new Error("initializeWasm() must be awaited first!");
19311         }
19312         const nativeResponseValue = wasm.TS_TxCreationKeys_read(ser);
19313         return nativeResponseValue;
19314 }
19315         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
19316 export function ChannelPublicKeys_free(this_obj: number): void {
19317         if(!isWasmInitialized) {
19318                 throw new Error("initializeWasm() must be awaited first!");
19319         }
19320         const nativeResponseValue = wasm.TS_ChannelPublicKeys_free(this_obj);
19321         // debug statements here
19322 }
19323         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
19324 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): number {
19325         if(!isWasmInitialized) {
19326                 throw new Error("initializeWasm() must be awaited first!");
19327         }
19328         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_funding_pubkey(this_ptr);
19329         return nativeResponseValue;
19330 }
19331         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19332 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: number): void {
19333         if(!isWasmInitialized) {
19334                 throw new Error("initializeWasm() must be awaited first!");
19335         }
19336         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_funding_pubkey(this_ptr, val);
19337         // debug statements here
19338 }
19339         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
19340 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): number {
19341         if(!isWasmInitialized) {
19342                 throw new Error("initializeWasm() must be awaited first!");
19343         }
19344         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_revocation_basepoint(this_ptr);
19345         return nativeResponseValue;
19346 }
19347         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19348 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: number): void {
19349         if(!isWasmInitialized) {
19350                 throw new Error("initializeWasm() must be awaited first!");
19351         }
19352         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_revocation_basepoint(this_ptr, val);
19353         // debug statements here
19354 }
19355         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
19356 export function ChannelPublicKeys_get_payment_point(this_ptr: number): number {
19357         if(!isWasmInitialized) {
19358                 throw new Error("initializeWasm() must be awaited first!");
19359         }
19360         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_payment_point(this_ptr);
19361         return nativeResponseValue;
19362 }
19363         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19364 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: number): void {
19365         if(!isWasmInitialized) {
19366                 throw new Error("initializeWasm() must be awaited first!");
19367         }
19368         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_payment_point(this_ptr, val);
19369         // debug statements here
19370 }
19371         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
19372 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): number {
19373         if(!isWasmInitialized) {
19374                 throw new Error("initializeWasm() must be awaited first!");
19375         }
19376         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
19377         return nativeResponseValue;
19378 }
19379         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19380 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: number): void {
19381         if(!isWasmInitialized) {
19382                 throw new Error("initializeWasm() must be awaited first!");
19383         }
19384         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, val);
19385         // debug statements here
19386 }
19387         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
19388 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): number {
19389         if(!isWasmInitialized) {
19390                 throw new Error("initializeWasm() must be awaited first!");
19391         }
19392         const nativeResponseValue = wasm.TS_ChannelPublicKeys_get_htlc_basepoint(this_ptr);
19393         return nativeResponseValue;
19394 }
19395         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19396 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: number): void {
19397         if(!isWasmInitialized) {
19398                 throw new Error("initializeWasm() must be awaited first!");
19399         }
19400         const nativeResponseValue = wasm.TS_ChannelPublicKeys_set_htlc_basepoint(this_ptr, val);
19401         // debug statements here
19402 }
19403         // 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);
19404 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 {
19405         if(!isWasmInitialized) {
19406                 throw new Error("initializeWasm() must be awaited first!");
19407         }
19408         const nativeResponseValue = wasm.TS_ChannelPublicKeys_new(funding_pubkey_arg, revocation_basepoint_arg, payment_point_arg, delayed_payment_basepoint_arg, htlc_basepoint_arg);
19409         return nativeResponseValue;
19410 }
19411         // uintptr_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
19412 export function ChannelPublicKeys_clone_ptr(arg: number): number {
19413         if(!isWasmInitialized) {
19414                 throw new Error("initializeWasm() must be awaited first!");
19415         }
19416         const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone_ptr(arg);
19417         return nativeResponseValue;
19418 }
19419         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
19420 export function ChannelPublicKeys_clone(orig: number): number {
19421         if(!isWasmInitialized) {
19422                 throw new Error("initializeWasm() must be awaited first!");
19423         }
19424         const nativeResponseValue = wasm.TS_ChannelPublicKeys_clone(orig);
19425         return nativeResponseValue;
19426 }
19427         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
19428 export function ChannelPublicKeys_write(obj: number): number {
19429         if(!isWasmInitialized) {
19430                 throw new Error("initializeWasm() must be awaited first!");
19431         }
19432         const nativeResponseValue = wasm.TS_ChannelPublicKeys_write(obj);
19433         return nativeResponseValue;
19434 }
19435         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
19436 export function ChannelPublicKeys_read(ser: number): number {
19437         if(!isWasmInitialized) {
19438                 throw new Error("initializeWasm() must be awaited first!");
19439         }
19440         const nativeResponseValue = wasm.TS_ChannelPublicKeys_read(ser);
19441         return nativeResponseValue;
19442 }
19443         // 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);
19444 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 {
19445         if(!isWasmInitialized) {
19446                 throw new Error("initializeWasm() must be awaited first!");
19447         }
19448         const nativeResponseValue = wasm.TS_TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
19449         return nativeResponseValue;
19450 }
19451         // 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);
19452 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: number, broadcaster_keys: number, countersignatory_keys: number): number {
19453         if(!isWasmInitialized) {
19454                 throw new Error("initializeWasm() must be awaited first!");
19455         }
19456         const nativeResponseValue = wasm.TS_TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys, countersignatory_keys);
19457         return nativeResponseValue;
19458 }
19459         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
19460 export function get_revokeable_redeemscript(revocation_key: number, contest_delay: number, broadcaster_delayed_payment_key: number): number {
19461         if(!isWasmInitialized) {
19462                 throw new Error("initializeWasm() must be awaited first!");
19463         }
19464         const nativeResponseValue = wasm.TS_get_revokeable_redeemscript(revocation_key, contest_delay, broadcaster_delayed_payment_key);
19465         return nativeResponseValue;
19466 }
19467         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
19468 export function HTLCOutputInCommitment_free(this_obj: number): void {
19469         if(!isWasmInitialized) {
19470                 throw new Error("initializeWasm() must be awaited first!");
19471         }
19472         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_free(this_obj);
19473         // debug statements here
19474 }
19475         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
19476 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
19477         if(!isWasmInitialized) {
19478                 throw new Error("initializeWasm() must be awaited first!");
19479         }
19480         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_offered(this_ptr);
19481         return nativeResponseValue;
19482 }
19483         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
19484 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
19485         if(!isWasmInitialized) {
19486                 throw new Error("initializeWasm() must be awaited first!");
19487         }
19488         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_offered(this_ptr, val);
19489         // debug statements here
19490 }
19491         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
19492 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): bigint {
19493         if(!isWasmInitialized) {
19494                 throw new Error("initializeWasm() must be awaited first!");
19495         }
19496         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_amount_msat(this_ptr);
19497         return nativeResponseValue;
19498 }
19499         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
19500 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: bigint): void {
19501         if(!isWasmInitialized) {
19502                 throw new Error("initializeWasm() must be awaited first!");
19503         }
19504         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
19505         // debug statements here
19506 }
19507         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
19508 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
19509         if(!isWasmInitialized) {
19510                 throw new Error("initializeWasm() must be awaited first!");
19511         }
19512         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
19513         return nativeResponseValue;
19514 }
19515         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
19516 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
19517         if(!isWasmInitialized) {
19518                 throw new Error("initializeWasm() must be awaited first!");
19519         }
19520         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
19521         // debug statements here
19522 }
19523         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
19524 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): number {
19525         if(!isWasmInitialized) {
19526                 throw new Error("initializeWasm() must be awaited first!");
19527         }
19528         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_payment_hash(this_ptr);
19529         return nativeResponseValue;
19530 }
19531         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19532 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: number): void {
19533         if(!isWasmInitialized) {
19534                 throw new Error("initializeWasm() must be awaited first!");
19535         }
19536         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_payment_hash(this_ptr, val);
19537         // debug statements here
19538 }
19539         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
19540 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
19541         if(!isWasmInitialized) {
19542                 throw new Error("initializeWasm() must be awaited first!");
19543         }
19544         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
19545         return nativeResponseValue;
19546 }
19547         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
19548 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
19549         if(!isWasmInitialized) {
19550                 throw new Error("initializeWasm() must be awaited first!");
19551         }
19552         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
19553         // debug statements here
19554 }
19555         // 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);
19556 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 {
19557         if(!isWasmInitialized) {
19558                 throw new Error("initializeWasm() must be awaited first!");
19559         }
19560         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg);
19561         return nativeResponseValue;
19562 }
19563         // uintptr_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
19564 export function HTLCOutputInCommitment_clone_ptr(arg: number): number {
19565         if(!isWasmInitialized) {
19566                 throw new Error("initializeWasm() must be awaited first!");
19567         }
19568         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone_ptr(arg);
19569         return nativeResponseValue;
19570 }
19571         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
19572 export function HTLCOutputInCommitment_clone(orig: number): number {
19573         if(!isWasmInitialized) {
19574                 throw new Error("initializeWasm() must be awaited first!");
19575         }
19576         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_clone(orig);
19577         return nativeResponseValue;
19578 }
19579         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
19580 export function HTLCOutputInCommitment_write(obj: number): number {
19581         if(!isWasmInitialized) {
19582                 throw new Error("initializeWasm() must be awaited first!");
19583         }
19584         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_write(obj);
19585         return nativeResponseValue;
19586 }
19587         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
19588 export function HTLCOutputInCommitment_read(ser: number): number {
19589         if(!isWasmInitialized) {
19590                 throw new Error("initializeWasm() must be awaited first!");
19591         }
19592         const nativeResponseValue = wasm.TS_HTLCOutputInCommitment_read(ser);
19593         return nativeResponseValue;
19594 }
19595         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, const struct LDKTxCreationKeys *NONNULL_PTR keys);
19596 export function get_htlc_redeemscript(htlc: number, opt_anchors: boolean, keys: number): number {
19597         if(!isWasmInitialized) {
19598                 throw new Error("initializeWasm() must be awaited first!");
19599         }
19600         const nativeResponseValue = wasm.TS_get_htlc_redeemscript(htlc, opt_anchors, keys);
19601         return nativeResponseValue;
19602 }
19603         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
19604 export function make_funding_redeemscript(broadcaster: number, countersignatory: number): number {
19605         if(!isWasmInitialized) {
19606                 throw new Error("initializeWasm() must be awaited first!");
19607         }
19608         const nativeResponseValue = wasm.TS_make_funding_redeemscript(broadcaster, countersignatory);
19609         return nativeResponseValue;
19610 }
19611         // 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);
19612 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 {
19613         if(!isWasmInitialized) {
19614                 throw new Error("initializeWasm() must be awaited first!");
19615         }
19616         const nativeResponseValue = wasm.TS_build_htlc_transaction(commitment_txid, feerate_per_kw, contest_delay, htlc, opt_anchors, broadcaster_delayed_payment_key, revocation_key);
19617         return nativeResponseValue;
19618 }
19619         // struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
19620 export function get_anchor_redeemscript(funding_pubkey: number): number {
19621         if(!isWasmInitialized) {
19622                 throw new Error("initializeWasm() must be awaited first!");
19623         }
19624         const nativeResponseValue = wasm.TS_get_anchor_redeemscript(funding_pubkey);
19625         return nativeResponseValue;
19626 }
19627         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
19628 export function ChannelTransactionParameters_free(this_obj: number): void {
19629         if(!isWasmInitialized) {
19630                 throw new Error("initializeWasm() must be awaited first!");
19631         }
19632         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_free(this_obj);
19633         // debug statements here
19634 }
19635         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
19636 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
19637         if(!isWasmInitialized) {
19638                 throw new Error("initializeWasm() must be awaited first!");
19639         }
19640         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
19641         return nativeResponseValue;
19642 }
19643         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
19644 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
19645         if(!isWasmInitialized) {
19646                 throw new Error("initializeWasm() must be awaited first!");
19647         }
19648         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
19649         // debug statements here
19650 }
19651         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
19652 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
19653         if(!isWasmInitialized) {
19654                 throw new Error("initializeWasm() must be awaited first!");
19655         }
19656         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
19657         return nativeResponseValue;
19658 }
19659         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
19660 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
19661         if(!isWasmInitialized) {
19662                 throw new Error("initializeWasm() must be awaited first!");
19663         }
19664         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
19665         // debug statements here
19666 }
19667         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
19668 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
19669         if(!isWasmInitialized) {
19670                 throw new Error("initializeWasm() must be awaited first!");
19671         }
19672         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
19673         return nativeResponseValue;
19674 }
19675         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
19676 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
19677         if(!isWasmInitialized) {
19678                 throw new Error("initializeWasm() must be awaited first!");
19679         }
19680         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
19681         // debug statements here
19682 }
19683         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
19684 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
19685         if(!isWasmInitialized) {
19686                 throw new Error("initializeWasm() must be awaited first!");
19687         }
19688         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
19689         return nativeResponseValue;
19690 }
19691         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
19692 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
19693         if(!isWasmInitialized) {
19694                 throw new Error("initializeWasm() must be awaited first!");
19695         }
19696         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
19697         // debug statements here
19698 }
19699         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
19700 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
19701         if(!isWasmInitialized) {
19702                 throw new Error("initializeWasm() must be awaited first!");
19703         }
19704         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_funding_outpoint(this_ptr);
19705         return nativeResponseValue;
19706 }
19707         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
19708 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
19709         if(!isWasmInitialized) {
19710                 throw new Error("initializeWasm() must be awaited first!");
19711         }
19712         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
19713         // debug statements here
19714 }
19715         // enum LDKCOption_NoneZ ChannelTransactionParameters_get_opt_anchors(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
19716 export function ChannelTransactionParameters_get_opt_anchors(this_ptr: number): COption_NoneZ {
19717         if(!isWasmInitialized) {
19718                 throw new Error("initializeWasm() must be awaited first!");
19719         }
19720         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_get_opt_anchors(this_ptr);
19721         return nativeResponseValue;
19722 }
19723         // void ChannelTransactionParameters_set_opt_anchors(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
19724 export function ChannelTransactionParameters_set_opt_anchors(this_ptr: number, val: COption_NoneZ): void {
19725         if(!isWasmInitialized) {
19726                 throw new Error("initializeWasm() must be awaited first!");
19727         }
19728         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_set_opt_anchors(this_ptr, val);
19729         // debug statements here
19730 }
19731         // 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);
19732 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 {
19733         if(!isWasmInitialized) {
19734                 throw new Error("initializeWasm() must be awaited first!");
19735         }
19736         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);
19737         return nativeResponseValue;
19738 }
19739         // uintptr_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
19740 export function ChannelTransactionParameters_clone_ptr(arg: number): number {
19741         if(!isWasmInitialized) {
19742                 throw new Error("initializeWasm() must be awaited first!");
19743         }
19744         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone_ptr(arg);
19745         return nativeResponseValue;
19746 }
19747         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
19748 export function ChannelTransactionParameters_clone(orig: number): number {
19749         if(!isWasmInitialized) {
19750                 throw new Error("initializeWasm() must be awaited first!");
19751         }
19752         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_clone(orig);
19753         return nativeResponseValue;
19754 }
19755         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
19756 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
19757         if(!isWasmInitialized) {
19758                 throw new Error("initializeWasm() must be awaited first!");
19759         }
19760         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_free(this_obj);
19761         // debug statements here
19762 }
19763         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
19764 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
19765         if(!isWasmInitialized) {
19766                 throw new Error("initializeWasm() must be awaited first!");
19767         }
19768         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
19769         return nativeResponseValue;
19770 }
19771         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
19772 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
19773         if(!isWasmInitialized) {
19774                 throw new Error("initializeWasm() must be awaited first!");
19775         }
19776         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
19777         // debug statements here
19778 }
19779         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
19780 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
19781         if(!isWasmInitialized) {
19782                 throw new Error("initializeWasm() must be awaited first!");
19783         }
19784         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
19785         return nativeResponseValue;
19786 }
19787         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
19788 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
19789         if(!isWasmInitialized) {
19790                 throw new Error("initializeWasm() must be awaited first!");
19791         }
19792         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
19793         // debug statements here
19794 }
19795         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
19796 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
19797         if(!isWasmInitialized) {
19798                 throw new Error("initializeWasm() must be awaited first!");
19799         }
19800         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
19801         return nativeResponseValue;
19802 }
19803         // uintptr_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
19804 export function CounterpartyChannelTransactionParameters_clone_ptr(arg: number): number {
19805         if(!isWasmInitialized) {
19806                 throw new Error("initializeWasm() must be awaited first!");
19807         }
19808         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone_ptr(arg);
19809         return nativeResponseValue;
19810 }
19811         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
19812 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
19813         if(!isWasmInitialized) {
19814                 throw new Error("initializeWasm() must be awaited first!");
19815         }
19816         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_clone(orig);
19817         return nativeResponseValue;
19818 }
19819         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19820 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
19821         if(!isWasmInitialized) {
19822                 throw new Error("initializeWasm() must be awaited first!");
19823         }
19824         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_is_populated(this_arg);
19825         return nativeResponseValue;
19826 }
19827         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19828 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
19829         if(!isWasmInitialized) {
19830                 throw new Error("initializeWasm() must be awaited first!");
19831         }
19832         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_holder_broadcastable(this_arg);
19833         return nativeResponseValue;
19834 }
19835         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
19836 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
19837         if(!isWasmInitialized) {
19838                 throw new Error("initializeWasm() must be awaited first!");
19839         }
19840         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
19841         return nativeResponseValue;
19842 }
19843         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
19844 export function CounterpartyChannelTransactionParameters_write(obj: number): number {
19845         if(!isWasmInitialized) {
19846                 throw new Error("initializeWasm() must be awaited first!");
19847         }
19848         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_write(obj);
19849         return nativeResponseValue;
19850 }
19851         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
19852 export function CounterpartyChannelTransactionParameters_read(ser: number): number {
19853         if(!isWasmInitialized) {
19854                 throw new Error("initializeWasm() must be awaited first!");
19855         }
19856         const nativeResponseValue = wasm.TS_CounterpartyChannelTransactionParameters_read(ser);
19857         return nativeResponseValue;
19858 }
19859         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
19860 export function ChannelTransactionParameters_write(obj: number): number {
19861         if(!isWasmInitialized) {
19862                 throw new Error("initializeWasm() must be awaited first!");
19863         }
19864         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_write(obj);
19865         return nativeResponseValue;
19866 }
19867         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
19868 export function ChannelTransactionParameters_read(ser: number): number {
19869         if(!isWasmInitialized) {
19870                 throw new Error("initializeWasm() must be awaited first!");
19871         }
19872         const nativeResponseValue = wasm.TS_ChannelTransactionParameters_read(ser);
19873         return nativeResponseValue;
19874 }
19875         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
19876 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
19877         if(!isWasmInitialized) {
19878                 throw new Error("initializeWasm() must be awaited first!");
19879         }
19880         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_free(this_obj);
19881         // debug statements here
19882 }
19883         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19884 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
19885         if(!isWasmInitialized) {
19886                 throw new Error("initializeWasm() must be awaited first!");
19887         }
19888         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
19889         return nativeResponseValue;
19890 }
19891         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19892 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
19893         if(!isWasmInitialized) {
19894                 throw new Error("initializeWasm() must be awaited first!");
19895         }
19896         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
19897         return nativeResponseValue;
19898 }
19899         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19900 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
19901         if(!isWasmInitialized) {
19902                 throw new Error("initializeWasm() must be awaited first!");
19903         }
19904         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_contest_delay(this_arg);
19905         return nativeResponseValue;
19906 }
19907         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19908 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
19909         if(!isWasmInitialized) {
19910                 throw new Error("initializeWasm() must be awaited first!");
19911         }
19912         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_is_outbound(this_arg);
19913         return nativeResponseValue;
19914 }
19915         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19916 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
19917         if(!isWasmInitialized) {
19918                 throw new Error("initializeWasm() must be awaited first!");
19919         }
19920         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_funding_outpoint(this_arg);
19921         return nativeResponseValue;
19922 }
19923         // MUST_USE_RES bool DirectedChannelTransactionParameters_opt_anchors(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
19924 export function DirectedChannelTransactionParameters_opt_anchors(this_arg: number): boolean {
19925         if(!isWasmInitialized) {
19926                 throw new Error("initializeWasm() must be awaited first!");
19927         }
19928         const nativeResponseValue = wasm.TS_DirectedChannelTransactionParameters_opt_anchors(this_arg);
19929         return nativeResponseValue;
19930 }
19931         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
19932 export function HolderCommitmentTransaction_free(this_obj: number): void {
19933         if(!isWasmInitialized) {
19934                 throw new Error("initializeWasm() must be awaited first!");
19935         }
19936         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_free(this_obj);
19937         // debug statements here
19938 }
19939         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
19940 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): number {
19941         if(!isWasmInitialized) {
19942                 throw new Error("initializeWasm() must be awaited first!");
19943         }
19944         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
19945         return nativeResponseValue;
19946 }
19947         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
19948 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: number): void {
19949         if(!isWasmInitialized) {
19950                 throw new Error("initializeWasm() must be awaited first!");
19951         }
19952         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_sig(this_ptr, val);
19953         // debug statements here
19954 }
19955         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
19956 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: number): void {
19957         if(!isWasmInitialized) {
19958                 throw new Error("initializeWasm() must be awaited first!");
19959         }
19960         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
19961         // debug statements here
19962 }
19963         // uintptr_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
19964 export function HolderCommitmentTransaction_clone_ptr(arg: number): number {
19965         if(!isWasmInitialized) {
19966                 throw new Error("initializeWasm() must be awaited first!");
19967         }
19968         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone_ptr(arg);
19969         return nativeResponseValue;
19970 }
19971         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
19972 export function HolderCommitmentTransaction_clone(orig: number): number {
19973         if(!isWasmInitialized) {
19974                 throw new Error("initializeWasm() must be awaited first!");
19975         }
19976         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_clone(orig);
19977         return nativeResponseValue;
19978 }
19979         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
19980 export function HolderCommitmentTransaction_write(obj: number): number {
19981         if(!isWasmInitialized) {
19982                 throw new Error("initializeWasm() must be awaited first!");
19983         }
19984         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_write(obj);
19985         return nativeResponseValue;
19986 }
19987         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
19988 export function HolderCommitmentTransaction_read(ser: number): number {
19989         if(!isWasmInitialized) {
19990                 throw new Error("initializeWasm() must be awaited first!");
19991         }
19992         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_read(ser);
19993         return nativeResponseValue;
19994 }
19995         // 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);
19996 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: number, counterparty_htlc_sigs: number, holder_funding_key: number, counterparty_funding_key: number): number {
19997         if(!isWasmInitialized) {
19998                 throw new Error("initializeWasm() must be awaited first!");
19999         }
20000         const nativeResponseValue = wasm.TS_HolderCommitmentTransaction_new(commitment_tx, counterparty_sig, counterparty_htlc_sigs, holder_funding_key, counterparty_funding_key);
20001         return nativeResponseValue;
20002 }
20003         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
20004 export function BuiltCommitmentTransaction_free(this_obj: number): void {
20005         if(!isWasmInitialized) {
20006                 throw new Error("initializeWasm() must be awaited first!");
20007         }
20008         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_free(this_obj);
20009         // debug statements here
20010 }
20011         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
20012 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): number {
20013         if(!isWasmInitialized) {
20014                 throw new Error("initializeWasm() must be awaited first!");
20015         }
20016         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_transaction(this_ptr);
20017         return nativeResponseValue;
20018 }
20019         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
20020 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: number): void {
20021         if(!isWasmInitialized) {
20022                 throw new Error("initializeWasm() must be awaited first!");
20023         }
20024         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_transaction(this_ptr, val);
20025         // debug statements here
20026 }
20027         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
20028 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): number {
20029         if(!isWasmInitialized) {
20030                 throw new Error("initializeWasm() must be awaited first!");
20031         }
20032         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_txid(this_ptr);
20033         return nativeResponseValue;
20034 }
20035         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
20036 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: number): void {
20037         if(!isWasmInitialized) {
20038                 throw new Error("initializeWasm() must be awaited first!");
20039         }
20040         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_set_txid(this_ptr, val);
20041         // debug statements here
20042 }
20043         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
20044 export function BuiltCommitmentTransaction_new(transaction_arg: number, txid_arg: number): number {
20045         if(!isWasmInitialized) {
20046                 throw new Error("initializeWasm() must be awaited first!");
20047         }
20048         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_new(transaction_arg, txid_arg);
20049         return nativeResponseValue;
20050 }
20051         // uintptr_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
20052 export function BuiltCommitmentTransaction_clone_ptr(arg: number): number {
20053         if(!isWasmInitialized) {
20054                 throw new Error("initializeWasm() must be awaited first!");
20055         }
20056         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone_ptr(arg);
20057         return nativeResponseValue;
20058 }
20059         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
20060 export function BuiltCommitmentTransaction_clone(orig: number): number {
20061         if(!isWasmInitialized) {
20062                 throw new Error("initializeWasm() must be awaited first!");
20063         }
20064         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_clone(orig);
20065         return nativeResponseValue;
20066 }
20067         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
20068 export function BuiltCommitmentTransaction_write(obj: number): number {
20069         if(!isWasmInitialized) {
20070                 throw new Error("initializeWasm() must be awaited first!");
20071         }
20072         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_write(obj);
20073         return nativeResponseValue;
20074 }
20075         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
20076 export function BuiltCommitmentTransaction_read(ser: number): number {
20077         if(!isWasmInitialized) {
20078                 throw new Error("initializeWasm() must be awaited first!");
20079         }
20080         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_read(ser);
20081         return nativeResponseValue;
20082 }
20083         // 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);
20084 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
20085         if(!isWasmInitialized) {
20086                 throw new Error("initializeWasm() must be awaited first!");
20087         }
20088         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_get_sighash_all(this_arg, funding_redeemscript, channel_value_satoshis);
20089         return nativeResponseValue;
20090 }
20091         // 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);
20092 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
20093         if(!isWasmInitialized) {
20094                 throw new Error("initializeWasm() must be awaited first!");
20095         }
20096         const nativeResponseValue = wasm.TS_BuiltCommitmentTransaction_sign(this_arg, funding_key, funding_redeemscript, channel_value_satoshis);
20097         return nativeResponseValue;
20098 }
20099         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
20100 export function ClosingTransaction_free(this_obj: number): void {
20101         if(!isWasmInitialized) {
20102                 throw new Error("initializeWasm() must be awaited first!");
20103         }
20104         const nativeResponseValue = wasm.TS_ClosingTransaction_free(this_obj);
20105         // debug statements here
20106 }
20107         // uintptr_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
20108 export function ClosingTransaction_clone_ptr(arg: number): number {
20109         if(!isWasmInitialized) {
20110                 throw new Error("initializeWasm() must be awaited first!");
20111         }
20112         const nativeResponseValue = wasm.TS_ClosingTransaction_clone_ptr(arg);
20113         return nativeResponseValue;
20114 }
20115         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
20116 export function ClosingTransaction_clone(orig: number): number {
20117         if(!isWasmInitialized) {
20118                 throw new Error("initializeWasm() must be awaited first!");
20119         }
20120         const nativeResponseValue = wasm.TS_ClosingTransaction_clone(orig);
20121         return nativeResponseValue;
20122 }
20123         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
20124 export function ClosingTransaction_hash(o: number): bigint {
20125         if(!isWasmInitialized) {
20126                 throw new Error("initializeWasm() must be awaited first!");
20127         }
20128         const nativeResponseValue = wasm.TS_ClosingTransaction_hash(o);
20129         return nativeResponseValue;
20130 }
20131         // 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);
20132 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 {
20133         if(!isWasmInitialized) {
20134                 throw new Error("initializeWasm() must be awaited first!");
20135         }
20136         const nativeResponseValue = wasm.TS_ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, to_holder_script, to_counterparty_script, funding_outpoint);
20137         return nativeResponseValue;
20138 }
20139         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
20140 export function ClosingTransaction_trust(this_arg: number): number {
20141         if(!isWasmInitialized) {
20142                 throw new Error("initializeWasm() must be awaited first!");
20143         }
20144         const nativeResponseValue = wasm.TS_ClosingTransaction_trust(this_arg);
20145         return nativeResponseValue;
20146 }
20147         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
20148 export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
20149         if(!isWasmInitialized) {
20150                 throw new Error("initializeWasm() must be awaited first!");
20151         }
20152         const nativeResponseValue = wasm.TS_ClosingTransaction_verify(this_arg, funding_outpoint);
20153         return nativeResponseValue;
20154 }
20155         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
20156 export function ClosingTransaction_to_holder_value_sat(this_arg: number): bigint {
20157         if(!isWasmInitialized) {
20158                 throw new Error("initializeWasm() must be awaited first!");
20159         }
20160         const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_value_sat(this_arg);
20161         return nativeResponseValue;
20162 }
20163         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
20164 export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): bigint {
20165         if(!isWasmInitialized) {
20166                 throw new Error("initializeWasm() must be awaited first!");
20167         }
20168         const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_value_sat(this_arg);
20169         return nativeResponseValue;
20170 }
20171         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
20172 export function ClosingTransaction_to_holder_script(this_arg: number): number {
20173         if(!isWasmInitialized) {
20174                 throw new Error("initializeWasm() must be awaited first!");
20175         }
20176         const nativeResponseValue = wasm.TS_ClosingTransaction_to_holder_script(this_arg);
20177         return nativeResponseValue;
20178 }
20179         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
20180 export function ClosingTransaction_to_counterparty_script(this_arg: number): number {
20181         if(!isWasmInitialized) {
20182                 throw new Error("initializeWasm() must be awaited first!");
20183         }
20184         const nativeResponseValue = wasm.TS_ClosingTransaction_to_counterparty_script(this_arg);
20185         return nativeResponseValue;
20186 }
20187         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
20188 export function TrustedClosingTransaction_free(this_obj: number): void {
20189         if(!isWasmInitialized) {
20190                 throw new Error("initializeWasm() must be awaited first!");
20191         }
20192         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_free(this_obj);
20193         // debug statements here
20194 }
20195         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
20196 export function TrustedClosingTransaction_built_transaction(this_arg: number): number {
20197         if(!isWasmInitialized) {
20198                 throw new Error("initializeWasm() must be awaited first!");
20199         }
20200         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_built_transaction(this_arg);
20201         return nativeResponseValue;
20202 }
20203         // 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);
20204 export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
20205         if(!isWasmInitialized) {
20206                 throw new Error("initializeWasm() must be awaited first!");
20207         }
20208         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_get_sighash_all(this_arg, funding_redeemscript, channel_value_satoshis);
20209         return nativeResponseValue;
20210 }
20211         // 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);
20212 export function TrustedClosingTransaction_sign(this_arg: number, funding_key: number, funding_redeemscript: number, channel_value_satoshis: bigint): number {
20213         if(!isWasmInitialized) {
20214                 throw new Error("initializeWasm() must be awaited first!");
20215         }
20216         const nativeResponseValue = wasm.TS_TrustedClosingTransaction_sign(this_arg, funding_key, funding_redeemscript, channel_value_satoshis);
20217         return nativeResponseValue;
20218 }
20219         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
20220 export function CommitmentTransaction_free(this_obj: number): void {
20221         if(!isWasmInitialized) {
20222                 throw new Error("initializeWasm() must be awaited first!");
20223         }
20224         const nativeResponseValue = wasm.TS_CommitmentTransaction_free(this_obj);
20225         // debug statements here
20226 }
20227         // uintptr_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
20228 export function CommitmentTransaction_clone_ptr(arg: number): number {
20229         if(!isWasmInitialized) {
20230                 throw new Error("initializeWasm() must be awaited first!");
20231         }
20232         const nativeResponseValue = wasm.TS_CommitmentTransaction_clone_ptr(arg);
20233         return nativeResponseValue;
20234 }
20235         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
20236 export function CommitmentTransaction_clone(orig: number): number {
20237         if(!isWasmInitialized) {
20238                 throw new Error("initializeWasm() must be awaited first!");
20239         }
20240         const nativeResponseValue = wasm.TS_CommitmentTransaction_clone(orig);
20241         return nativeResponseValue;
20242 }
20243         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
20244 export function CommitmentTransaction_write(obj: number): number {
20245         if(!isWasmInitialized) {
20246                 throw new Error("initializeWasm() must be awaited first!");
20247         }
20248         const nativeResponseValue = wasm.TS_CommitmentTransaction_write(obj);
20249         return nativeResponseValue;
20250 }
20251         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
20252 export function CommitmentTransaction_read(ser: number): number {
20253         if(!isWasmInitialized) {
20254                 throw new Error("initializeWasm() must be awaited first!");
20255         }
20256         const nativeResponseValue = wasm.TS_CommitmentTransaction_read(ser);
20257         return nativeResponseValue;
20258 }
20259         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
20260 export function CommitmentTransaction_commitment_number(this_arg: number): bigint {
20261         if(!isWasmInitialized) {
20262                 throw new Error("initializeWasm() must be awaited first!");
20263         }
20264         const nativeResponseValue = wasm.TS_CommitmentTransaction_commitment_number(this_arg);
20265         return nativeResponseValue;
20266 }
20267         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
20268 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): bigint {
20269         if(!isWasmInitialized) {
20270                 throw new Error("initializeWasm() must be awaited first!");
20271         }
20272         const nativeResponseValue = wasm.TS_CommitmentTransaction_to_broadcaster_value_sat(this_arg);
20273         return nativeResponseValue;
20274 }
20275         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
20276 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): bigint {
20277         if(!isWasmInitialized) {
20278                 throw new Error("initializeWasm() must be awaited first!");
20279         }
20280         const nativeResponseValue = wasm.TS_CommitmentTransaction_to_countersignatory_value_sat(this_arg);
20281         return nativeResponseValue;
20282 }
20283         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
20284 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
20285         if(!isWasmInitialized) {
20286                 throw new Error("initializeWasm() must be awaited first!");
20287         }
20288         const nativeResponseValue = wasm.TS_CommitmentTransaction_feerate_per_kw(this_arg);
20289         return nativeResponseValue;
20290 }
20291         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
20292 export function CommitmentTransaction_trust(this_arg: number): number {
20293         if(!isWasmInitialized) {
20294                 throw new Error("initializeWasm() must be awaited first!");
20295         }
20296         const nativeResponseValue = wasm.TS_CommitmentTransaction_trust(this_arg);
20297         return nativeResponseValue;
20298 }
20299         // 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);
20300 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
20301         if(!isWasmInitialized) {
20302                 throw new Error("initializeWasm() must be awaited first!");
20303         }
20304         const nativeResponseValue = wasm.TS_CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
20305         return nativeResponseValue;
20306 }
20307         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
20308 export function TrustedCommitmentTransaction_free(this_obj: number): void {
20309         if(!isWasmInitialized) {
20310                 throw new Error("initializeWasm() must be awaited first!");
20311         }
20312         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_free(this_obj);
20313         // debug statements here
20314 }
20315         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
20316 export function TrustedCommitmentTransaction_txid(this_arg: number): number {
20317         if(!isWasmInitialized) {
20318                 throw new Error("initializeWasm() must be awaited first!");
20319         }
20320         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_txid(this_arg);
20321         return nativeResponseValue;
20322 }
20323         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
20324 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
20325         if(!isWasmInitialized) {
20326                 throw new Error("initializeWasm() must be awaited first!");
20327         }
20328         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_built_transaction(this_arg);
20329         return nativeResponseValue;
20330 }
20331         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
20332 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
20333         if(!isWasmInitialized) {
20334                 throw new Error("initializeWasm() must be awaited first!");
20335         }
20336         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_keys(this_arg);
20337         return nativeResponseValue;
20338 }
20339         // MUST_USE_RES bool TrustedCommitmentTransaction_opt_anchors(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
20340 export function TrustedCommitmentTransaction_opt_anchors(this_arg: number): boolean {
20341         if(!isWasmInitialized) {
20342                 throw new Error("initializeWasm() must be awaited first!");
20343         }
20344         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_opt_anchors(this_arg);
20345         return nativeResponseValue;
20346 }
20347         // 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);
20348 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: number, channel_parameters: number): number {
20349         if(!isWasmInitialized) {
20350                 throw new Error("initializeWasm() must be awaited first!");
20351         }
20352         const nativeResponseValue = wasm.TS_TrustedCommitmentTransaction_get_htlc_sigs(this_arg, htlc_base_key, channel_parameters);
20353         return nativeResponseValue;
20354 }
20355         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
20356 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: number, countersignatory_payment_basepoint: number, outbound_from_broadcaster: boolean): bigint {
20357         if(!isWasmInitialized) {
20358                 throw new Error("initializeWasm() must be awaited first!");
20359         }
20360         const nativeResponseValue = wasm.TS_get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint, countersignatory_payment_basepoint, outbound_from_broadcaster);
20361         return nativeResponseValue;
20362 }
20363         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
20364 export function InitFeatures_eq(a: number, b: number): boolean {
20365         if(!isWasmInitialized) {
20366                 throw new Error("initializeWasm() must be awaited first!");
20367         }
20368         const nativeResponseValue = wasm.TS_InitFeatures_eq(a, b);
20369         return nativeResponseValue;
20370 }
20371         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
20372 export function NodeFeatures_eq(a: number, b: number): boolean {
20373         if(!isWasmInitialized) {
20374                 throw new Error("initializeWasm() must be awaited first!");
20375         }
20376         const nativeResponseValue = wasm.TS_NodeFeatures_eq(a, b);
20377         return nativeResponseValue;
20378 }
20379         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
20380 export function ChannelFeatures_eq(a: number, b: number): boolean {
20381         if(!isWasmInitialized) {
20382                 throw new Error("initializeWasm() must be awaited first!");
20383         }
20384         const nativeResponseValue = wasm.TS_ChannelFeatures_eq(a, b);
20385         return nativeResponseValue;
20386 }
20387         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
20388 export function InvoiceFeatures_eq(a: number, b: number): boolean {
20389         if(!isWasmInitialized) {
20390                 throw new Error("initializeWasm() must be awaited first!");
20391         }
20392         const nativeResponseValue = wasm.TS_InvoiceFeatures_eq(a, b);
20393         return nativeResponseValue;
20394 }
20395         // bool ChannelTypeFeatures_eq(const struct LDKChannelTypeFeatures *NONNULL_PTR a, const struct LDKChannelTypeFeatures *NONNULL_PTR b);
20396 export function ChannelTypeFeatures_eq(a: number, b: number): boolean {
20397         if(!isWasmInitialized) {
20398                 throw new Error("initializeWasm() must be awaited first!");
20399         }
20400         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_eq(a, b);
20401         return nativeResponseValue;
20402 }
20403         // uintptr_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
20404 export function InitFeatures_clone_ptr(arg: number): number {
20405         if(!isWasmInitialized) {
20406                 throw new Error("initializeWasm() must be awaited first!");
20407         }
20408         const nativeResponseValue = wasm.TS_InitFeatures_clone_ptr(arg);
20409         return nativeResponseValue;
20410 }
20411         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
20412 export function InitFeatures_clone(orig: number): number {
20413         if(!isWasmInitialized) {
20414                 throw new Error("initializeWasm() must be awaited first!");
20415         }
20416         const nativeResponseValue = wasm.TS_InitFeatures_clone(orig);
20417         return nativeResponseValue;
20418 }
20419         // uintptr_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
20420 export function NodeFeatures_clone_ptr(arg: number): number {
20421         if(!isWasmInitialized) {
20422                 throw new Error("initializeWasm() must be awaited first!");
20423         }
20424         const nativeResponseValue = wasm.TS_NodeFeatures_clone_ptr(arg);
20425         return nativeResponseValue;
20426 }
20427         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
20428 export function NodeFeatures_clone(orig: number): number {
20429         if(!isWasmInitialized) {
20430                 throw new Error("initializeWasm() must be awaited first!");
20431         }
20432         const nativeResponseValue = wasm.TS_NodeFeatures_clone(orig);
20433         return nativeResponseValue;
20434 }
20435         // uintptr_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
20436 export function ChannelFeatures_clone_ptr(arg: number): number {
20437         if(!isWasmInitialized) {
20438                 throw new Error("initializeWasm() must be awaited first!");
20439         }
20440         const nativeResponseValue = wasm.TS_ChannelFeatures_clone_ptr(arg);
20441         return nativeResponseValue;
20442 }
20443         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
20444 export function ChannelFeatures_clone(orig: number): number {
20445         if(!isWasmInitialized) {
20446                 throw new Error("initializeWasm() must be awaited first!");
20447         }
20448         const nativeResponseValue = wasm.TS_ChannelFeatures_clone(orig);
20449         return nativeResponseValue;
20450 }
20451         // uintptr_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
20452 export function InvoiceFeatures_clone_ptr(arg: number): number {
20453         if(!isWasmInitialized) {
20454                 throw new Error("initializeWasm() must be awaited first!");
20455         }
20456         const nativeResponseValue = wasm.TS_InvoiceFeatures_clone_ptr(arg);
20457         return nativeResponseValue;
20458 }
20459         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
20460 export function InvoiceFeatures_clone(orig: number): number {
20461         if(!isWasmInitialized) {
20462                 throw new Error("initializeWasm() must be awaited first!");
20463         }
20464         const nativeResponseValue = wasm.TS_InvoiceFeatures_clone(orig);
20465         return nativeResponseValue;
20466 }
20467         // uintptr_t ChannelTypeFeatures_clone_ptr(LDKChannelTypeFeatures *NONNULL_PTR arg);
20468 export function ChannelTypeFeatures_clone_ptr(arg: number): number {
20469         if(!isWasmInitialized) {
20470                 throw new Error("initializeWasm() must be awaited first!");
20471         }
20472         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone_ptr(arg);
20473         return nativeResponseValue;
20474 }
20475         // struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
20476 export function ChannelTypeFeatures_clone(orig: number): number {
20477         if(!isWasmInitialized) {
20478                 throw new Error("initializeWasm() must be awaited first!");
20479         }
20480         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_clone(orig);
20481         return nativeResponseValue;
20482 }
20483         // void InitFeatures_free(struct LDKInitFeatures this_obj);
20484 export function InitFeatures_free(this_obj: number): void {
20485         if(!isWasmInitialized) {
20486                 throw new Error("initializeWasm() must be awaited first!");
20487         }
20488         const nativeResponseValue = wasm.TS_InitFeatures_free(this_obj);
20489         // debug statements here
20490 }
20491         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
20492 export function NodeFeatures_free(this_obj: number): void {
20493         if(!isWasmInitialized) {
20494                 throw new Error("initializeWasm() must be awaited first!");
20495         }
20496         const nativeResponseValue = wasm.TS_NodeFeatures_free(this_obj);
20497         // debug statements here
20498 }
20499         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
20500 export function ChannelFeatures_free(this_obj: number): void {
20501         if(!isWasmInitialized) {
20502                 throw new Error("initializeWasm() must be awaited first!");
20503         }
20504         const nativeResponseValue = wasm.TS_ChannelFeatures_free(this_obj);
20505         // debug statements here
20506 }
20507         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
20508 export function InvoiceFeatures_free(this_obj: number): void {
20509         if(!isWasmInitialized) {
20510                 throw new Error("initializeWasm() must be awaited first!");
20511         }
20512         const nativeResponseValue = wasm.TS_InvoiceFeatures_free(this_obj);
20513         // debug statements here
20514 }
20515         // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
20516 export function ChannelTypeFeatures_free(this_obj: number): void {
20517         if(!isWasmInitialized) {
20518                 throw new Error("initializeWasm() must be awaited first!");
20519         }
20520         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_free(this_obj);
20521         // debug statements here
20522 }
20523         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
20524 export function InitFeatures_empty(): number {
20525         if(!isWasmInitialized) {
20526                 throw new Error("initializeWasm() must be awaited first!");
20527         }
20528         const nativeResponseValue = wasm.TS_InitFeatures_empty();
20529         return nativeResponseValue;
20530 }
20531         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
20532 export function InitFeatures_known(): number {
20533         if(!isWasmInitialized) {
20534                 throw new Error("initializeWasm() must be awaited first!");
20535         }
20536         const nativeResponseValue = wasm.TS_InitFeatures_known();
20537         return nativeResponseValue;
20538 }
20539         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
20540 export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
20541         if(!isWasmInitialized) {
20542                 throw new Error("initializeWasm() must be awaited first!");
20543         }
20544         const nativeResponseValue = wasm.TS_InitFeatures_requires_unknown_bits(this_arg);
20545         return nativeResponseValue;
20546 }
20547         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
20548 export function NodeFeatures_empty(): number {
20549         if(!isWasmInitialized) {
20550                 throw new Error("initializeWasm() must be awaited first!");
20551         }
20552         const nativeResponseValue = wasm.TS_NodeFeatures_empty();
20553         return nativeResponseValue;
20554 }
20555         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
20556 export function NodeFeatures_known(): number {
20557         if(!isWasmInitialized) {
20558                 throw new Error("initializeWasm() must be awaited first!");
20559         }
20560         const nativeResponseValue = wasm.TS_NodeFeatures_known();
20561         return nativeResponseValue;
20562 }
20563         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
20564 export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
20565         if(!isWasmInitialized) {
20566                 throw new Error("initializeWasm() must be awaited first!");
20567         }
20568         const nativeResponseValue = wasm.TS_NodeFeatures_requires_unknown_bits(this_arg);
20569         return nativeResponseValue;
20570 }
20571         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
20572 export function ChannelFeatures_empty(): number {
20573         if(!isWasmInitialized) {
20574                 throw new Error("initializeWasm() must be awaited first!");
20575         }
20576         const nativeResponseValue = wasm.TS_ChannelFeatures_empty();
20577         return nativeResponseValue;
20578 }
20579         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
20580 export function ChannelFeatures_known(): number {
20581         if(!isWasmInitialized) {
20582                 throw new Error("initializeWasm() must be awaited first!");
20583         }
20584         const nativeResponseValue = wasm.TS_ChannelFeatures_known();
20585         return nativeResponseValue;
20586 }
20587         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
20588 export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
20589         if(!isWasmInitialized) {
20590                 throw new Error("initializeWasm() must be awaited first!");
20591         }
20592         const nativeResponseValue = wasm.TS_ChannelFeatures_requires_unknown_bits(this_arg);
20593         return nativeResponseValue;
20594 }
20595         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
20596 export function InvoiceFeatures_empty(): number {
20597         if(!isWasmInitialized) {
20598                 throw new Error("initializeWasm() must be awaited first!");
20599         }
20600         const nativeResponseValue = wasm.TS_InvoiceFeatures_empty();
20601         return nativeResponseValue;
20602 }
20603         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
20604 export function InvoiceFeatures_known(): number {
20605         if(!isWasmInitialized) {
20606                 throw new Error("initializeWasm() must be awaited first!");
20607         }
20608         const nativeResponseValue = wasm.TS_InvoiceFeatures_known();
20609         return nativeResponseValue;
20610 }
20611         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
20612 export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
20613         if(!isWasmInitialized) {
20614                 throw new Error("initializeWasm() must be awaited first!");
20615         }
20616         const nativeResponseValue = wasm.TS_InvoiceFeatures_requires_unknown_bits(this_arg);
20617         return nativeResponseValue;
20618 }
20619         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
20620 export function ChannelTypeFeatures_empty(): number {
20621         if(!isWasmInitialized) {
20622                 throw new Error("initializeWasm() must be awaited first!");
20623         }
20624         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_empty();
20625         return nativeResponseValue;
20626 }
20627         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
20628 export function ChannelTypeFeatures_known(): number {
20629         if(!isWasmInitialized) {
20630                 throw new Error("initializeWasm() must be awaited first!");
20631         }
20632         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_known();
20633         return nativeResponseValue;
20634 }
20635         // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
20636 export function ChannelTypeFeatures_requires_unknown_bits(this_arg: number): boolean {
20637         if(!isWasmInitialized) {
20638                 throw new Error("initializeWasm() must be awaited first!");
20639         }
20640         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_requires_unknown_bits(this_arg);
20641         return nativeResponseValue;
20642 }
20643         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
20644 export function InitFeatures_write(obj: number): number {
20645         if(!isWasmInitialized) {
20646                 throw new Error("initializeWasm() must be awaited first!");
20647         }
20648         const nativeResponseValue = wasm.TS_InitFeatures_write(obj);
20649         return nativeResponseValue;
20650 }
20651         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
20652 export function InitFeatures_read(ser: number): number {
20653         if(!isWasmInitialized) {
20654                 throw new Error("initializeWasm() must be awaited first!");
20655         }
20656         const nativeResponseValue = wasm.TS_InitFeatures_read(ser);
20657         return nativeResponseValue;
20658 }
20659         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
20660 export function ChannelFeatures_write(obj: number): number {
20661         if(!isWasmInitialized) {
20662                 throw new Error("initializeWasm() must be awaited first!");
20663         }
20664         const nativeResponseValue = wasm.TS_ChannelFeatures_write(obj);
20665         return nativeResponseValue;
20666 }
20667         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
20668 export function ChannelFeatures_read(ser: number): number {
20669         if(!isWasmInitialized) {
20670                 throw new Error("initializeWasm() must be awaited first!");
20671         }
20672         const nativeResponseValue = wasm.TS_ChannelFeatures_read(ser);
20673         return nativeResponseValue;
20674 }
20675         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
20676 export function NodeFeatures_write(obj: number): number {
20677         if(!isWasmInitialized) {
20678                 throw new Error("initializeWasm() must be awaited first!");
20679         }
20680         const nativeResponseValue = wasm.TS_NodeFeatures_write(obj);
20681         return nativeResponseValue;
20682 }
20683         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
20684 export function NodeFeatures_read(ser: number): number {
20685         if(!isWasmInitialized) {
20686                 throw new Error("initializeWasm() must be awaited first!");
20687         }
20688         const nativeResponseValue = wasm.TS_NodeFeatures_read(ser);
20689         return nativeResponseValue;
20690 }
20691         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
20692 export function InvoiceFeatures_write(obj: number): number {
20693         if(!isWasmInitialized) {
20694                 throw new Error("initializeWasm() must be awaited first!");
20695         }
20696         const nativeResponseValue = wasm.TS_InvoiceFeatures_write(obj);
20697         return nativeResponseValue;
20698 }
20699         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
20700 export function InvoiceFeatures_read(ser: number): number {
20701         if(!isWasmInitialized) {
20702                 throw new Error("initializeWasm() must be awaited first!");
20703         }
20704         const nativeResponseValue = wasm.TS_InvoiceFeatures_read(ser);
20705         return nativeResponseValue;
20706 }
20707         // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
20708 export function ChannelTypeFeatures_write(obj: number): number {
20709         if(!isWasmInitialized) {
20710                 throw new Error("initializeWasm() must be awaited first!");
20711         }
20712         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_write(obj);
20713         return nativeResponseValue;
20714 }
20715         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
20716 export function ChannelTypeFeatures_read(ser: number): number {
20717         if(!isWasmInitialized) {
20718                 throw new Error("initializeWasm() must be awaited first!");
20719         }
20720         const nativeResponseValue = wasm.TS_ChannelTypeFeatures_read(ser);
20721         return nativeResponseValue;
20722 }
20723         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
20724 export function ShutdownScript_free(this_obj: number): void {
20725         if(!isWasmInitialized) {
20726                 throw new Error("initializeWasm() must be awaited first!");
20727         }
20728         const nativeResponseValue = wasm.TS_ShutdownScript_free(this_obj);
20729         // debug statements here
20730 }
20731         // uintptr_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
20732 export function ShutdownScript_clone_ptr(arg: number): number {
20733         if(!isWasmInitialized) {
20734                 throw new Error("initializeWasm() must be awaited first!");
20735         }
20736         const nativeResponseValue = wasm.TS_ShutdownScript_clone_ptr(arg);
20737         return nativeResponseValue;
20738 }
20739         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
20740 export function ShutdownScript_clone(orig: number): number {
20741         if(!isWasmInitialized) {
20742                 throw new Error("initializeWasm() must be awaited first!");
20743         }
20744         const nativeResponseValue = wasm.TS_ShutdownScript_clone(orig);
20745         return nativeResponseValue;
20746 }
20747         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
20748 export function InvalidShutdownScript_free(this_obj: number): void {
20749         if(!isWasmInitialized) {
20750                 throw new Error("initializeWasm() must be awaited first!");
20751         }
20752         const nativeResponseValue = wasm.TS_InvalidShutdownScript_free(this_obj);
20753         // debug statements here
20754 }
20755         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
20756 export function InvalidShutdownScript_get_script(this_ptr: number): number {
20757         if(!isWasmInitialized) {
20758                 throw new Error("initializeWasm() must be awaited first!");
20759         }
20760         const nativeResponseValue = wasm.TS_InvalidShutdownScript_get_script(this_ptr);
20761         return nativeResponseValue;
20762 }
20763         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
20764 export function InvalidShutdownScript_set_script(this_ptr: number, val: number): void {
20765         if(!isWasmInitialized) {
20766                 throw new Error("initializeWasm() must be awaited first!");
20767         }
20768         const nativeResponseValue = wasm.TS_InvalidShutdownScript_set_script(this_ptr, val);
20769         // debug statements here
20770 }
20771         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
20772 export function InvalidShutdownScript_new(script_arg: number): number {
20773         if(!isWasmInitialized) {
20774                 throw new Error("initializeWasm() must be awaited first!");
20775         }
20776         const nativeResponseValue = wasm.TS_InvalidShutdownScript_new(script_arg);
20777         return nativeResponseValue;
20778 }
20779         // uintptr_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
20780 export function InvalidShutdownScript_clone_ptr(arg: number): number {
20781         if(!isWasmInitialized) {
20782                 throw new Error("initializeWasm() must be awaited first!");
20783         }
20784         const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone_ptr(arg);
20785         return nativeResponseValue;
20786 }
20787         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
20788 export function InvalidShutdownScript_clone(orig: number): number {
20789         if(!isWasmInitialized) {
20790                 throw new Error("initializeWasm() must be awaited first!");
20791         }
20792         const nativeResponseValue = wasm.TS_InvalidShutdownScript_clone(orig);
20793         return nativeResponseValue;
20794 }
20795         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
20796 export function ShutdownScript_write(obj: number): number {
20797         if(!isWasmInitialized) {
20798                 throw new Error("initializeWasm() must be awaited first!");
20799         }
20800         const nativeResponseValue = wasm.TS_ShutdownScript_write(obj);
20801         return nativeResponseValue;
20802 }
20803         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
20804 export function ShutdownScript_read(ser: number): number {
20805         if(!isWasmInitialized) {
20806                 throw new Error("initializeWasm() must be awaited first!");
20807         }
20808         const nativeResponseValue = wasm.TS_ShutdownScript_read(ser);
20809         return nativeResponseValue;
20810 }
20811         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
20812 export function ShutdownScript_new_p2wpkh(pubkey_hash: number): number {
20813         if(!isWasmInitialized) {
20814                 throw new Error("initializeWasm() must be awaited first!");
20815         }
20816         const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wpkh(pubkey_hash);
20817         return nativeResponseValue;
20818 }
20819         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
20820 export function ShutdownScript_new_p2wsh(script_hash: number): number {
20821         if(!isWasmInitialized) {
20822                 throw new Error("initializeWasm() must be awaited first!");
20823         }
20824         const nativeResponseValue = wasm.TS_ShutdownScript_new_p2wsh(script_hash);
20825         return nativeResponseValue;
20826 }
20827         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
20828 export function ShutdownScript_new_witness_program(version: number, program: number): number {
20829         if(!isWasmInitialized) {
20830                 throw new Error("initializeWasm() must be awaited first!");
20831         }
20832         const nativeResponseValue = wasm.TS_ShutdownScript_new_witness_program(version, program);
20833         return nativeResponseValue;
20834 }
20835         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
20836 export function ShutdownScript_into_inner(this_arg: number): number {
20837         if(!isWasmInitialized) {
20838                 throw new Error("initializeWasm() must be awaited first!");
20839         }
20840         const nativeResponseValue = wasm.TS_ShutdownScript_into_inner(this_arg);
20841         return nativeResponseValue;
20842 }
20843         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
20844 export function ShutdownScript_as_legacy_pubkey(this_arg: number): number {
20845         if(!isWasmInitialized) {
20846                 throw new Error("initializeWasm() must be awaited first!");
20847         }
20848         const nativeResponseValue = wasm.TS_ShutdownScript_as_legacy_pubkey(this_arg);
20849         return nativeResponseValue;
20850 }
20851         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
20852 export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
20853         if(!isWasmInitialized) {
20854                 throw new Error("initializeWasm() must be awaited first!");
20855         }
20856         const nativeResponseValue = wasm.TS_ShutdownScript_is_compatible(this_arg, features);
20857         return nativeResponseValue;
20858 }
20859         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
20860 export function CustomMessageReader_free(this_ptr: number): void {
20861         if(!isWasmInitialized) {
20862                 throw new Error("initializeWasm() must be awaited first!");
20863         }
20864         const nativeResponseValue = wasm.TS_CustomMessageReader_free(this_ptr);
20865         // debug statements here
20866 }
20867         // uintptr_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
20868 export function Type_clone_ptr(arg: number): number {
20869         if(!isWasmInitialized) {
20870                 throw new Error("initializeWasm() must be awaited first!");
20871         }
20872         const nativeResponseValue = wasm.TS_Type_clone_ptr(arg);
20873         return nativeResponseValue;
20874 }
20875         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
20876 export function Type_clone(orig: number): number {
20877         if(!isWasmInitialized) {
20878                 throw new Error("initializeWasm() must be awaited first!");
20879         }
20880         const nativeResponseValue = wasm.TS_Type_clone(orig);
20881         return nativeResponseValue;
20882 }
20883         // void Type_free(struct LDKType this_ptr);
20884 export function Type_free(this_ptr: number): void {
20885         if(!isWasmInitialized) {
20886                 throw new Error("initializeWasm() must be awaited first!");
20887         }
20888         const nativeResponseValue = wasm.TS_Type_free(this_ptr);
20889         // debug statements here
20890 }
20891         // void NodeId_free(struct LDKNodeId this_obj);
20892 export function NodeId_free(this_obj: number): void {
20893         if(!isWasmInitialized) {
20894                 throw new Error("initializeWasm() must be awaited first!");
20895         }
20896         const nativeResponseValue = wasm.TS_NodeId_free(this_obj);
20897         // debug statements here
20898 }
20899         // uintptr_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
20900 export function NodeId_clone_ptr(arg: number): number {
20901         if(!isWasmInitialized) {
20902                 throw new Error("initializeWasm() must be awaited first!");
20903         }
20904         const nativeResponseValue = wasm.TS_NodeId_clone_ptr(arg);
20905         return nativeResponseValue;
20906 }
20907         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
20908 export function NodeId_clone(orig: number): number {
20909         if(!isWasmInitialized) {
20910                 throw new Error("initializeWasm() must be awaited first!");
20911         }
20912         const nativeResponseValue = wasm.TS_NodeId_clone(orig);
20913         return nativeResponseValue;
20914 }
20915         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
20916 export function NodeId_from_pubkey(pubkey: number): number {
20917         if(!isWasmInitialized) {
20918                 throw new Error("initializeWasm() must be awaited first!");
20919         }
20920         const nativeResponseValue = wasm.TS_NodeId_from_pubkey(pubkey);
20921         return nativeResponseValue;
20922 }
20923         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
20924 export function NodeId_as_slice(this_arg: number): number {
20925         if(!isWasmInitialized) {
20926                 throw new Error("initializeWasm() must be awaited first!");
20927         }
20928         const nativeResponseValue = wasm.TS_NodeId_as_slice(this_arg);
20929         return nativeResponseValue;
20930 }
20931         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
20932 export function NodeId_hash(o: number): bigint {
20933         if(!isWasmInitialized) {
20934                 throw new Error("initializeWasm() must be awaited first!");
20935         }
20936         const nativeResponseValue = wasm.TS_NodeId_hash(o);
20937         return nativeResponseValue;
20938 }
20939         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
20940 export function NodeId_write(obj: number): number {
20941         if(!isWasmInitialized) {
20942                 throw new Error("initializeWasm() must be awaited first!");
20943         }
20944         const nativeResponseValue = wasm.TS_NodeId_write(obj);
20945         return nativeResponseValue;
20946 }
20947         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
20948 export function NodeId_read(ser: number): number {
20949         if(!isWasmInitialized) {
20950                 throw new Error("initializeWasm() must be awaited first!");
20951         }
20952         const nativeResponseValue = wasm.TS_NodeId_read(ser);
20953         return nativeResponseValue;
20954 }
20955         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
20956 export function NetworkGraph_free(this_obj: number): void {
20957         if(!isWasmInitialized) {
20958                 throw new Error("initializeWasm() must be awaited first!");
20959         }
20960         const nativeResponseValue = wasm.TS_NetworkGraph_free(this_obj);
20961         // debug statements here
20962 }
20963         // uintptr_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
20964 export function NetworkGraph_clone_ptr(arg: number): number {
20965         if(!isWasmInitialized) {
20966                 throw new Error("initializeWasm() must be awaited first!");
20967         }
20968         const nativeResponseValue = wasm.TS_NetworkGraph_clone_ptr(arg);
20969         return nativeResponseValue;
20970 }
20971         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
20972 export function NetworkGraph_clone(orig: number): number {
20973         if(!isWasmInitialized) {
20974                 throw new Error("initializeWasm() must be awaited first!");
20975         }
20976         const nativeResponseValue = wasm.TS_NetworkGraph_clone(orig);
20977         return nativeResponseValue;
20978 }
20979         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
20980 export function ReadOnlyNetworkGraph_free(this_obj: number): void {
20981         if(!isWasmInitialized) {
20982                 throw new Error("initializeWasm() must be awaited first!");
20983         }
20984         const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_free(this_obj);
20985         // debug statements here
20986 }
20987         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
20988 export function NetworkUpdate_free(this_ptr: number): void {
20989         if(!isWasmInitialized) {
20990                 throw new Error("initializeWasm() must be awaited first!");
20991         }
20992         const nativeResponseValue = wasm.TS_NetworkUpdate_free(this_ptr);
20993         // debug statements here
20994 }
20995         // uintptr_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
20996 export function NetworkUpdate_clone_ptr(arg: number): number {
20997         if(!isWasmInitialized) {
20998                 throw new Error("initializeWasm() must be awaited first!");
20999         }
21000         const nativeResponseValue = wasm.TS_NetworkUpdate_clone_ptr(arg);
21001         return nativeResponseValue;
21002 }
21003         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
21004 export function NetworkUpdate_clone(orig: number): number {
21005         if(!isWasmInitialized) {
21006                 throw new Error("initializeWasm() must be awaited first!");
21007         }
21008         const nativeResponseValue = wasm.TS_NetworkUpdate_clone(orig);
21009         return nativeResponseValue;
21010 }
21011         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
21012 export function NetworkUpdate_channel_update_message(msg: number): number {
21013         if(!isWasmInitialized) {
21014                 throw new Error("initializeWasm() must be awaited first!");
21015         }
21016         const nativeResponseValue = wasm.TS_NetworkUpdate_channel_update_message(msg);
21017         return nativeResponseValue;
21018 }
21019         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
21020 export function NetworkUpdate_channel_closed(short_channel_id: bigint, is_permanent: boolean): number {
21021         if(!isWasmInitialized) {
21022                 throw new Error("initializeWasm() must be awaited first!");
21023         }
21024         const nativeResponseValue = wasm.TS_NetworkUpdate_channel_closed(short_channel_id, is_permanent);
21025         return nativeResponseValue;
21026 }
21027         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
21028 export function NetworkUpdate_node_failure(node_id: number, is_permanent: boolean): number {
21029         if(!isWasmInitialized) {
21030                 throw new Error("initializeWasm() must be awaited first!");
21031         }
21032         const nativeResponseValue = wasm.TS_NetworkUpdate_node_failure(node_id, is_permanent);
21033         return nativeResponseValue;
21034 }
21035         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
21036 export function NetworkUpdate_write(obj: number): number {
21037         if(!isWasmInitialized) {
21038                 throw new Error("initializeWasm() must be awaited first!");
21039         }
21040         const nativeResponseValue = wasm.TS_NetworkUpdate_write(obj);
21041         return nativeResponseValue;
21042 }
21043         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
21044 export function NetworkUpdate_read(ser: number): number {
21045         if(!isWasmInitialized) {
21046                 throw new Error("initializeWasm() must be awaited first!");
21047         }
21048         const nativeResponseValue = wasm.TS_NetworkUpdate_read(ser);
21049         return nativeResponseValue;
21050 }
21051         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
21052 export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
21053         if(!isWasmInitialized) {
21054                 throw new Error("initializeWasm() must be awaited first!");
21055         }
21056         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_EventHandler(this_arg);
21057         return nativeResponseValue;
21058 }
21059         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
21060 export function NetGraphMsgHandler_free(this_obj: number): void {
21061         if(!isWasmInitialized) {
21062                 throw new Error("initializeWasm() must be awaited first!");
21063         }
21064         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_free(this_obj);
21065         // debug statements here
21066 }
21067         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
21068 export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
21069         if(!isWasmInitialized) {
21070                 throw new Error("initializeWasm() must be awaited first!");
21071         }
21072         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_new(network_graph, chain_access, logger);
21073         return nativeResponseValue;
21074 }
21075         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
21076 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
21077         if(!isWasmInitialized) {
21078                 throw new Error("initializeWasm() must be awaited first!");
21079         }
21080         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
21081         // debug statements here
21082 }
21083         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
21084 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
21085         if(!isWasmInitialized) {
21086                 throw new Error("initializeWasm() must be awaited first!");
21087         }
21088         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
21089         return nativeResponseValue;
21090 }
21091         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
21092 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
21093         if(!isWasmInitialized) {
21094                 throw new Error("initializeWasm() must be awaited first!");
21095         }
21096         const nativeResponseValue = wasm.TS_NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
21097         return nativeResponseValue;
21098 }
21099         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
21100 export function DirectionalChannelInfo_free(this_obj: number): void {
21101         if(!isWasmInitialized) {
21102                 throw new Error("initializeWasm() must be awaited first!");
21103         }
21104         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_free(this_obj);
21105         // debug statements here
21106 }
21107         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21108 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
21109         if(!isWasmInitialized) {
21110                 throw new Error("initializeWasm() must be awaited first!");
21111         }
21112         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update(this_ptr);
21113         return nativeResponseValue;
21114 }
21115         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
21116 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
21117         if(!isWasmInitialized) {
21118                 throw new Error("initializeWasm() must be awaited first!");
21119         }
21120         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update(this_ptr, val);
21121         // debug statements here
21122 }
21123         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21124 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
21125         if(!isWasmInitialized) {
21126                 throw new Error("initializeWasm() must be awaited first!");
21127         }
21128         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_enabled(this_ptr);
21129         return nativeResponseValue;
21130 }
21131         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
21132 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
21133         if(!isWasmInitialized) {
21134                 throw new Error("initializeWasm() must be awaited first!");
21135         }
21136         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_enabled(this_ptr, val);
21137         // debug statements here
21138 }
21139         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21140 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
21141         if(!isWasmInitialized) {
21142                 throw new Error("initializeWasm() must be awaited first!");
21143         }
21144         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
21145         return nativeResponseValue;
21146 }
21147         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
21148 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21149         if(!isWasmInitialized) {
21150                 throw new Error("initializeWasm() must be awaited first!");
21151         }
21152         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
21153         // debug statements here
21154 }
21155         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21156 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): bigint {
21157         if(!isWasmInitialized) {
21158                 throw new Error("initializeWasm() must be awaited first!");
21159         }
21160         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
21161         return nativeResponseValue;
21162 }
21163         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
21164 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: bigint): void {
21165         if(!isWasmInitialized) {
21166                 throw new Error("initializeWasm() must be awaited first!");
21167         }
21168         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
21169         // debug statements here
21170 }
21171         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21172 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
21173         if(!isWasmInitialized) {
21174                 throw new Error("initializeWasm() must be awaited first!");
21175         }
21176         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
21177         return nativeResponseValue;
21178 }
21179         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21180 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
21181         if(!isWasmInitialized) {
21182                 throw new Error("initializeWasm() must be awaited first!");
21183         }
21184         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
21185         // debug statements here
21186 }
21187         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21188 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
21189         if(!isWasmInitialized) {
21190                 throw new Error("initializeWasm() must be awaited first!");
21191         }
21192         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_fees(this_ptr);
21193         return nativeResponseValue;
21194 }
21195         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
21196 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
21197         if(!isWasmInitialized) {
21198                 throw new Error("initializeWasm() must be awaited first!");
21199         }
21200         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_fees(this_ptr, val);
21201         // debug statements here
21202 }
21203         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
21204 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
21205         if(!isWasmInitialized) {
21206                 throw new Error("initializeWasm() must be awaited first!");
21207         }
21208         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_get_last_update_message(this_ptr);
21209         return nativeResponseValue;
21210 }
21211         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
21212 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
21213         if(!isWasmInitialized) {
21214                 throw new Error("initializeWasm() must be awaited first!");
21215         }
21216         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_set_last_update_message(this_ptr, val);
21217         // debug statements here
21218 }
21219         // 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);
21220 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 {
21221         if(!isWasmInitialized) {
21222                 throw new Error("initializeWasm() must be awaited first!");
21223         }
21224         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);
21225         return nativeResponseValue;
21226 }
21227         // uintptr_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
21228 export function DirectionalChannelInfo_clone_ptr(arg: number): number {
21229         if(!isWasmInitialized) {
21230                 throw new Error("initializeWasm() must be awaited first!");
21231         }
21232         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone_ptr(arg);
21233         return nativeResponseValue;
21234 }
21235         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
21236 export function DirectionalChannelInfo_clone(orig: number): number {
21237         if(!isWasmInitialized) {
21238                 throw new Error("initializeWasm() must be awaited first!");
21239         }
21240         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_clone(orig);
21241         return nativeResponseValue;
21242 }
21243         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
21244 export function DirectionalChannelInfo_write(obj: number): number {
21245         if(!isWasmInitialized) {
21246                 throw new Error("initializeWasm() must be awaited first!");
21247         }
21248         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_write(obj);
21249         return nativeResponseValue;
21250 }
21251         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
21252 export function DirectionalChannelInfo_read(ser: number): number {
21253         if(!isWasmInitialized) {
21254                 throw new Error("initializeWasm() must be awaited first!");
21255         }
21256         const nativeResponseValue = wasm.TS_DirectionalChannelInfo_read(ser);
21257         return nativeResponseValue;
21258 }
21259         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
21260 export function ChannelInfo_free(this_obj: number): void {
21261         if(!isWasmInitialized) {
21262                 throw new Error("initializeWasm() must be awaited first!");
21263         }
21264         const nativeResponseValue = wasm.TS_ChannelInfo_free(this_obj);
21265         // debug statements here
21266 }
21267         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21268 export function ChannelInfo_get_features(this_ptr: number): number {
21269         if(!isWasmInitialized) {
21270                 throw new Error("initializeWasm() must be awaited first!");
21271         }
21272         const nativeResponseValue = wasm.TS_ChannelInfo_get_features(this_ptr);
21273         return nativeResponseValue;
21274 }
21275         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
21276 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
21277         if(!isWasmInitialized) {
21278                 throw new Error("initializeWasm() must be awaited first!");
21279         }
21280         const nativeResponseValue = wasm.TS_ChannelInfo_set_features(this_ptr, val);
21281         // debug statements here
21282 }
21283         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21284 export function ChannelInfo_get_node_one(this_ptr: number): number {
21285         if(!isWasmInitialized) {
21286                 throw new Error("initializeWasm() must be awaited first!");
21287         }
21288         const nativeResponseValue = wasm.TS_ChannelInfo_get_node_one(this_ptr);
21289         return nativeResponseValue;
21290 }
21291         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
21292 export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
21293         if(!isWasmInitialized) {
21294                 throw new Error("initializeWasm() must be awaited first!");
21295         }
21296         const nativeResponseValue = wasm.TS_ChannelInfo_set_node_one(this_ptr, val);
21297         // debug statements here
21298 }
21299         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21300 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
21301         if(!isWasmInitialized) {
21302                 throw new Error("initializeWasm() must be awaited first!");
21303         }
21304         const nativeResponseValue = wasm.TS_ChannelInfo_get_one_to_two(this_ptr);
21305         return nativeResponseValue;
21306 }
21307         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
21308 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
21309         if(!isWasmInitialized) {
21310                 throw new Error("initializeWasm() must be awaited first!");
21311         }
21312         const nativeResponseValue = wasm.TS_ChannelInfo_set_one_to_two(this_ptr, val);
21313         // debug statements here
21314 }
21315         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21316 export function ChannelInfo_get_node_two(this_ptr: number): number {
21317         if(!isWasmInitialized) {
21318                 throw new Error("initializeWasm() must be awaited first!");
21319         }
21320         const nativeResponseValue = wasm.TS_ChannelInfo_get_node_two(this_ptr);
21321         return nativeResponseValue;
21322 }
21323         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
21324 export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
21325         if(!isWasmInitialized) {
21326                 throw new Error("initializeWasm() must be awaited first!");
21327         }
21328         const nativeResponseValue = wasm.TS_ChannelInfo_set_node_two(this_ptr, val);
21329         // debug statements here
21330 }
21331         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21332 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
21333         if(!isWasmInitialized) {
21334                 throw new Error("initializeWasm() must be awaited first!");
21335         }
21336         const nativeResponseValue = wasm.TS_ChannelInfo_get_two_to_one(this_ptr);
21337         return nativeResponseValue;
21338 }
21339         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
21340 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
21341         if(!isWasmInitialized) {
21342                 throw new Error("initializeWasm() must be awaited first!");
21343         }
21344         const nativeResponseValue = wasm.TS_ChannelInfo_set_two_to_one(this_ptr, val);
21345         // debug statements here
21346 }
21347         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21348 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
21349         if(!isWasmInitialized) {
21350                 throw new Error("initializeWasm() must be awaited first!");
21351         }
21352         const nativeResponseValue = wasm.TS_ChannelInfo_get_capacity_sats(this_ptr);
21353         return nativeResponseValue;
21354 }
21355         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
21356 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
21357         if(!isWasmInitialized) {
21358                 throw new Error("initializeWasm() must be awaited first!");
21359         }
21360         const nativeResponseValue = wasm.TS_ChannelInfo_set_capacity_sats(this_ptr, val);
21361         // debug statements here
21362 }
21363         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
21364 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
21365         if(!isWasmInitialized) {
21366                 throw new Error("initializeWasm() must be awaited first!");
21367         }
21368         const nativeResponseValue = wasm.TS_ChannelInfo_get_announcement_message(this_ptr);
21369         return nativeResponseValue;
21370 }
21371         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
21372 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
21373         if(!isWasmInitialized) {
21374                 throw new Error("initializeWasm() must be awaited first!");
21375         }
21376         const nativeResponseValue = wasm.TS_ChannelInfo_set_announcement_message(this_ptr, val);
21377         // debug statements here
21378 }
21379         // uintptr_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
21380 export function ChannelInfo_clone_ptr(arg: number): number {
21381         if(!isWasmInitialized) {
21382                 throw new Error("initializeWasm() must be awaited first!");
21383         }
21384         const nativeResponseValue = wasm.TS_ChannelInfo_clone_ptr(arg);
21385         return nativeResponseValue;
21386 }
21387         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
21388 export function ChannelInfo_clone(orig: number): number {
21389         if(!isWasmInitialized) {
21390                 throw new Error("initializeWasm() must be awaited first!");
21391         }
21392         const nativeResponseValue = wasm.TS_ChannelInfo_clone(orig);
21393         return nativeResponseValue;
21394 }
21395         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
21396 export function ChannelInfo_write(obj: number): number {
21397         if(!isWasmInitialized) {
21398                 throw new Error("initializeWasm() must be awaited first!");
21399         }
21400         const nativeResponseValue = wasm.TS_ChannelInfo_write(obj);
21401         return nativeResponseValue;
21402 }
21403         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
21404 export function ChannelInfo_read(ser: number): number {
21405         if(!isWasmInitialized) {
21406                 throw new Error("initializeWasm() must be awaited first!");
21407         }
21408         const nativeResponseValue = wasm.TS_ChannelInfo_read(ser);
21409         return nativeResponseValue;
21410 }
21411         // void RoutingFees_free(struct LDKRoutingFees this_obj);
21412 export function RoutingFees_free(this_obj: number): void {
21413         if(!isWasmInitialized) {
21414                 throw new Error("initializeWasm() must be awaited first!");
21415         }
21416         const nativeResponseValue = wasm.TS_RoutingFees_free(this_obj);
21417         // debug statements here
21418 }
21419         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
21420 export function RoutingFees_get_base_msat(this_ptr: number): number {
21421         if(!isWasmInitialized) {
21422                 throw new Error("initializeWasm() must be awaited first!");
21423         }
21424         const nativeResponseValue = wasm.TS_RoutingFees_get_base_msat(this_ptr);
21425         return nativeResponseValue;
21426 }
21427         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
21428 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
21429         if(!isWasmInitialized) {
21430                 throw new Error("initializeWasm() must be awaited first!");
21431         }
21432         const nativeResponseValue = wasm.TS_RoutingFees_set_base_msat(this_ptr, val);
21433         // debug statements here
21434 }
21435         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
21436 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
21437         if(!isWasmInitialized) {
21438                 throw new Error("initializeWasm() must be awaited first!");
21439         }
21440         const nativeResponseValue = wasm.TS_RoutingFees_get_proportional_millionths(this_ptr);
21441         return nativeResponseValue;
21442 }
21443         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
21444 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
21445         if(!isWasmInitialized) {
21446                 throw new Error("initializeWasm() must be awaited first!");
21447         }
21448         const nativeResponseValue = wasm.TS_RoutingFees_set_proportional_millionths(this_ptr, val);
21449         // debug statements here
21450 }
21451         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
21452 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
21453         if(!isWasmInitialized) {
21454                 throw new Error("initializeWasm() must be awaited first!");
21455         }
21456         const nativeResponseValue = wasm.TS_RoutingFees_new(base_msat_arg, proportional_millionths_arg);
21457         return nativeResponseValue;
21458 }
21459         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
21460 export function RoutingFees_eq(a: number, b: number): boolean {
21461         if(!isWasmInitialized) {
21462                 throw new Error("initializeWasm() must be awaited first!");
21463         }
21464         const nativeResponseValue = wasm.TS_RoutingFees_eq(a, b);
21465         return nativeResponseValue;
21466 }
21467         // uintptr_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
21468 export function RoutingFees_clone_ptr(arg: number): number {
21469         if(!isWasmInitialized) {
21470                 throw new Error("initializeWasm() must be awaited first!");
21471         }
21472         const nativeResponseValue = wasm.TS_RoutingFees_clone_ptr(arg);
21473         return nativeResponseValue;
21474 }
21475         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
21476 export function RoutingFees_clone(orig: number): number {
21477         if(!isWasmInitialized) {
21478                 throw new Error("initializeWasm() must be awaited first!");
21479         }
21480         const nativeResponseValue = wasm.TS_RoutingFees_clone(orig);
21481         return nativeResponseValue;
21482 }
21483         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
21484 export function RoutingFees_hash(o: number): bigint {
21485         if(!isWasmInitialized) {
21486                 throw new Error("initializeWasm() must be awaited first!");
21487         }
21488         const nativeResponseValue = wasm.TS_RoutingFees_hash(o);
21489         return nativeResponseValue;
21490 }
21491         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
21492 export function RoutingFees_write(obj: number): number {
21493         if(!isWasmInitialized) {
21494                 throw new Error("initializeWasm() must be awaited first!");
21495         }
21496         const nativeResponseValue = wasm.TS_RoutingFees_write(obj);
21497         return nativeResponseValue;
21498 }
21499         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
21500 export function RoutingFees_read(ser: number): number {
21501         if(!isWasmInitialized) {
21502                 throw new Error("initializeWasm() must be awaited first!");
21503         }
21504         const nativeResponseValue = wasm.TS_RoutingFees_read(ser);
21505         return nativeResponseValue;
21506 }
21507         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
21508 export function NodeAnnouncementInfo_free(this_obj: number): void {
21509         if(!isWasmInitialized) {
21510                 throw new Error("initializeWasm() must be awaited first!");
21511         }
21512         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_free(this_obj);
21513         // debug statements here
21514 }
21515         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
21516 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
21517         if(!isWasmInitialized) {
21518                 throw new Error("initializeWasm() must be awaited first!");
21519         }
21520         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_features(this_ptr);
21521         return nativeResponseValue;
21522 }
21523         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
21524 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
21525         if(!isWasmInitialized) {
21526                 throw new Error("initializeWasm() must be awaited first!");
21527         }
21528         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_features(this_ptr, val);
21529         // debug statements here
21530 }
21531         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
21532 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
21533         if(!isWasmInitialized) {
21534                 throw new Error("initializeWasm() must be awaited first!");
21535         }
21536         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_last_update(this_ptr);
21537         return nativeResponseValue;
21538 }
21539         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
21540 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
21541         if(!isWasmInitialized) {
21542                 throw new Error("initializeWasm() must be awaited first!");
21543         }
21544         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_last_update(this_ptr, val);
21545         // debug statements here
21546 }
21547         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
21548 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): number {
21549         if(!isWasmInitialized) {
21550                 throw new Error("initializeWasm() must be awaited first!");
21551         }
21552         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_rgb(this_ptr);
21553         return nativeResponseValue;
21554 }
21555         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
21556 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: number): void {
21557         if(!isWasmInitialized) {
21558                 throw new Error("initializeWasm() must be awaited first!");
21559         }
21560         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_rgb(this_ptr, val);
21561         // debug statements here
21562 }
21563         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
21564 export function NodeAnnouncementInfo_get_alias(this_ptr: number): number {
21565         if(!isWasmInitialized) {
21566                 throw new Error("initializeWasm() must be awaited first!");
21567         }
21568         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_alias(this_ptr);
21569         return nativeResponseValue;
21570 }
21571         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
21572 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: number): void {
21573         if(!isWasmInitialized) {
21574                 throw new Error("initializeWasm() must be awaited first!");
21575         }
21576         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_alias(this_ptr, val);
21577         // debug statements here
21578 }
21579         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
21580 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number): void {
21581         if(!isWasmInitialized) {
21582                 throw new Error("initializeWasm() must be awaited first!");
21583         }
21584         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_addresses(this_ptr, val);
21585         // debug statements here
21586 }
21587         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
21588 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
21589         if(!isWasmInitialized) {
21590                 throw new Error("initializeWasm() must be awaited first!");
21591         }
21592         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_get_announcement_message(this_ptr);
21593         return nativeResponseValue;
21594 }
21595         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
21596 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
21597         if(!isWasmInitialized) {
21598                 throw new Error("initializeWasm() must be awaited first!");
21599         }
21600         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
21601         // debug statements here
21602 }
21603         // 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);
21604 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 {
21605         if(!isWasmInitialized) {
21606                 throw new Error("initializeWasm() must be awaited first!");
21607         }
21608         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_new(features_arg, last_update_arg, rgb_arg, alias_arg, addresses_arg, announcement_message_arg);
21609         return nativeResponseValue;
21610 }
21611         // uintptr_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
21612 export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
21613         if(!isWasmInitialized) {
21614                 throw new Error("initializeWasm() must be awaited first!");
21615         }
21616         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone_ptr(arg);
21617         return nativeResponseValue;
21618 }
21619         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
21620 export function NodeAnnouncementInfo_clone(orig: number): number {
21621         if(!isWasmInitialized) {
21622                 throw new Error("initializeWasm() must be awaited first!");
21623         }
21624         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_clone(orig);
21625         return nativeResponseValue;
21626 }
21627         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
21628 export function NodeAnnouncementInfo_write(obj: number): number {
21629         if(!isWasmInitialized) {
21630                 throw new Error("initializeWasm() must be awaited first!");
21631         }
21632         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_write(obj);
21633         return nativeResponseValue;
21634 }
21635         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
21636 export function NodeAnnouncementInfo_read(ser: number): number {
21637         if(!isWasmInitialized) {
21638                 throw new Error("initializeWasm() must be awaited first!");
21639         }
21640         const nativeResponseValue = wasm.TS_NodeAnnouncementInfo_read(ser);
21641         return nativeResponseValue;
21642 }
21643         // void NodeInfo_free(struct LDKNodeInfo this_obj);
21644 export function NodeInfo_free(this_obj: number): void {
21645         if(!isWasmInitialized) {
21646                 throw new Error("initializeWasm() must be awaited first!");
21647         }
21648         const nativeResponseValue = wasm.TS_NodeInfo_free(this_obj);
21649         // debug statements here
21650 }
21651         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
21652 export function NodeInfo_set_channels(this_ptr: number, val: number): void {
21653         if(!isWasmInitialized) {
21654                 throw new Error("initializeWasm() must be awaited first!");
21655         }
21656         const nativeResponseValue = wasm.TS_NodeInfo_set_channels(this_ptr, val);
21657         // debug statements here
21658 }
21659         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
21660 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
21661         if(!isWasmInitialized) {
21662                 throw new Error("initializeWasm() must be awaited first!");
21663         }
21664         const nativeResponseValue = wasm.TS_NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
21665         return nativeResponseValue;
21666 }
21667         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
21668 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
21669         if(!isWasmInitialized) {
21670                 throw new Error("initializeWasm() must be awaited first!");
21671         }
21672         const nativeResponseValue = wasm.TS_NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
21673         // debug statements here
21674 }
21675         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
21676 export function NodeInfo_get_announcement_info(this_ptr: number): number {
21677         if(!isWasmInitialized) {
21678                 throw new Error("initializeWasm() must be awaited first!");
21679         }
21680         const nativeResponseValue = wasm.TS_NodeInfo_get_announcement_info(this_ptr);
21681         return nativeResponseValue;
21682 }
21683         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
21684 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
21685         if(!isWasmInitialized) {
21686                 throw new Error("initializeWasm() must be awaited first!");
21687         }
21688         const nativeResponseValue = wasm.TS_NodeInfo_set_announcement_info(this_ptr, val);
21689         // debug statements here
21690 }
21691         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
21692 export function NodeInfo_new(channels_arg: number, lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
21693         if(!isWasmInitialized) {
21694                 throw new Error("initializeWasm() must be awaited first!");
21695         }
21696         const nativeResponseValue = wasm.TS_NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
21697         return nativeResponseValue;
21698 }
21699         // uintptr_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
21700 export function NodeInfo_clone_ptr(arg: number): number {
21701         if(!isWasmInitialized) {
21702                 throw new Error("initializeWasm() must be awaited first!");
21703         }
21704         const nativeResponseValue = wasm.TS_NodeInfo_clone_ptr(arg);
21705         return nativeResponseValue;
21706 }
21707         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
21708 export function NodeInfo_clone(orig: number): number {
21709         if(!isWasmInitialized) {
21710                 throw new Error("initializeWasm() must be awaited first!");
21711         }
21712         const nativeResponseValue = wasm.TS_NodeInfo_clone(orig);
21713         return nativeResponseValue;
21714 }
21715         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
21716 export function NodeInfo_write(obj: number): number {
21717         if(!isWasmInitialized) {
21718                 throw new Error("initializeWasm() must be awaited first!");
21719         }
21720         const nativeResponseValue = wasm.TS_NodeInfo_write(obj);
21721         return nativeResponseValue;
21722 }
21723         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
21724 export function NodeInfo_read(ser: number): number {
21725         if(!isWasmInitialized) {
21726                 throw new Error("initializeWasm() must be awaited first!");
21727         }
21728         const nativeResponseValue = wasm.TS_NodeInfo_read(ser);
21729         return nativeResponseValue;
21730 }
21731         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
21732 export function NetworkGraph_write(obj: number): number {
21733         if(!isWasmInitialized) {
21734                 throw new Error("initializeWasm() must be awaited first!");
21735         }
21736         const nativeResponseValue = wasm.TS_NetworkGraph_write(obj);
21737         return nativeResponseValue;
21738 }
21739         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
21740 export function NetworkGraph_read(ser: number): number {
21741         if(!isWasmInitialized) {
21742                 throw new Error("initializeWasm() must be awaited first!");
21743         }
21744         const nativeResponseValue = wasm.TS_NetworkGraph_read(ser);
21745         return nativeResponseValue;
21746 }
21747         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
21748 export function NetworkGraph_new(genesis_hash: number): number {
21749         if(!isWasmInitialized) {
21750                 throw new Error("initializeWasm() must be awaited first!");
21751         }
21752         const nativeResponseValue = wasm.TS_NetworkGraph_new(genesis_hash);
21753         return nativeResponseValue;
21754 }
21755         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
21756 export function NetworkGraph_read_only(this_arg: number): number {
21757         if(!isWasmInitialized) {
21758                 throw new Error("initializeWasm() must be awaited first!");
21759         }
21760         const nativeResponseValue = wasm.TS_NetworkGraph_read_only(this_arg);
21761         return nativeResponseValue;
21762 }
21763         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
21764 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
21765         if(!isWasmInitialized) {
21766                 throw new Error("initializeWasm() must be awaited first!");
21767         }
21768         const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_announcement(this_arg, msg);
21769         return nativeResponseValue;
21770 }
21771         // 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);
21772 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
21773         if(!isWasmInitialized) {
21774                 throw new Error("initializeWasm() must be awaited first!");
21775         }
21776         const nativeResponseValue = wasm.TS_NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
21777         return nativeResponseValue;
21778 }
21779         // 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);
21780 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
21781         if(!isWasmInitialized) {
21782                 throw new Error("initializeWasm() must be awaited first!");
21783         }
21784         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
21785         return nativeResponseValue;
21786 }
21787         // 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);
21788 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
21789         if(!isWasmInitialized) {
21790                 throw new Error("initializeWasm() must be awaited first!");
21791         }
21792         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
21793         return nativeResponseValue;
21794 }
21795         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
21796 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: bigint, is_permanent: boolean): void {
21797         if(!isWasmInitialized) {
21798                 throw new Error("initializeWasm() must be awaited first!");
21799         }
21800         const nativeResponseValue = wasm.TS_NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
21801         // debug statements here
21802 }
21803         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
21804 export function NetworkGraph_fail_node(this_arg: number, _node_id: number, is_permanent: boolean): void {
21805         if(!isWasmInitialized) {
21806                 throw new Error("initializeWasm() must be awaited first!");
21807         }
21808         const nativeResponseValue = wasm.TS_NetworkGraph_fail_node(this_arg, _node_id, is_permanent);
21809         // debug statements here
21810 }
21811         // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
21812 export function NetworkGraph_remove_stale_channels_with_time(this_arg: number, current_time_unix: bigint): void {
21813         if(!isWasmInitialized) {
21814                 throw new Error("initializeWasm() must be awaited first!");
21815         }
21816         const nativeResponseValue = wasm.TS_NetworkGraph_remove_stale_channels_with_time(this_arg, current_time_unix);
21817         // debug statements here
21818 }
21819         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
21820 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
21821         if(!isWasmInitialized) {
21822                 throw new Error("initializeWasm() must be awaited first!");
21823         }
21824         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel(this_arg, msg);
21825         return nativeResponseValue;
21826 }
21827         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
21828 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
21829         if(!isWasmInitialized) {
21830                 throw new Error("initializeWasm() must be awaited first!");
21831         }
21832         const nativeResponseValue = wasm.TS_NetworkGraph_update_channel_unsigned(this_arg, msg);
21833         return nativeResponseValue;
21834 }
21835         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
21836 export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: number): number {
21837         if(!isWasmInitialized) {
21838                 throw new Error("initializeWasm() must be awaited first!");
21839         }
21840         const nativeResponseValue = wasm.TS_ReadOnlyNetworkGraph_get_addresses(this_arg, pubkey);
21841         return nativeResponseValue;
21842 }
21843         // void RouteHop_free(struct LDKRouteHop this_obj);
21844 export function RouteHop_free(this_obj: number): void {
21845         if(!isWasmInitialized) {
21846                 throw new Error("initializeWasm() must be awaited first!");
21847         }
21848         const nativeResponseValue = wasm.TS_RouteHop_free(this_obj);
21849         // debug statements here
21850 }
21851         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21852 export function RouteHop_get_pubkey(this_ptr: number): number {
21853         if(!isWasmInitialized) {
21854                 throw new Error("initializeWasm() must be awaited first!");
21855         }
21856         const nativeResponseValue = wasm.TS_RouteHop_get_pubkey(this_ptr);
21857         return nativeResponseValue;
21858 }
21859         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21860 export function RouteHop_set_pubkey(this_ptr: number, val: number): void {
21861         if(!isWasmInitialized) {
21862                 throw new Error("initializeWasm() must be awaited first!");
21863         }
21864         const nativeResponseValue = wasm.TS_RouteHop_set_pubkey(this_ptr, val);
21865         // debug statements here
21866 }
21867         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21868 export function RouteHop_get_node_features(this_ptr: number): number {
21869         if(!isWasmInitialized) {
21870                 throw new Error("initializeWasm() must be awaited first!");
21871         }
21872         const nativeResponseValue = wasm.TS_RouteHop_get_node_features(this_ptr);
21873         return nativeResponseValue;
21874 }
21875         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
21876 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
21877         if(!isWasmInitialized) {
21878                 throw new Error("initializeWasm() must be awaited first!");
21879         }
21880         const nativeResponseValue = wasm.TS_RouteHop_set_node_features(this_ptr, val);
21881         // debug statements here
21882 }
21883         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21884 export function RouteHop_get_short_channel_id(this_ptr: number): bigint {
21885         if(!isWasmInitialized) {
21886                 throw new Error("initializeWasm() must be awaited first!");
21887         }
21888         const nativeResponseValue = wasm.TS_RouteHop_get_short_channel_id(this_ptr);
21889         return nativeResponseValue;
21890 }
21891         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
21892 export function RouteHop_set_short_channel_id(this_ptr: number, val: bigint): void {
21893         if(!isWasmInitialized) {
21894                 throw new Error("initializeWasm() must be awaited first!");
21895         }
21896         const nativeResponseValue = wasm.TS_RouteHop_set_short_channel_id(this_ptr, val);
21897         // debug statements here
21898 }
21899         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21900 export function RouteHop_get_channel_features(this_ptr: number): number {
21901         if(!isWasmInitialized) {
21902                 throw new Error("initializeWasm() must be awaited first!");
21903         }
21904         const nativeResponseValue = wasm.TS_RouteHop_get_channel_features(this_ptr);
21905         return nativeResponseValue;
21906 }
21907         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
21908 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
21909         if(!isWasmInitialized) {
21910                 throw new Error("initializeWasm() must be awaited first!");
21911         }
21912         const nativeResponseValue = wasm.TS_RouteHop_set_channel_features(this_ptr, val);
21913         // debug statements here
21914 }
21915         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21916 export function RouteHop_get_fee_msat(this_ptr: number): bigint {
21917         if(!isWasmInitialized) {
21918                 throw new Error("initializeWasm() must be awaited first!");
21919         }
21920         const nativeResponseValue = wasm.TS_RouteHop_get_fee_msat(this_ptr);
21921         return nativeResponseValue;
21922 }
21923         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
21924 export function RouteHop_set_fee_msat(this_ptr: number, val: bigint): void {
21925         if(!isWasmInitialized) {
21926                 throw new Error("initializeWasm() must be awaited first!");
21927         }
21928         const nativeResponseValue = wasm.TS_RouteHop_set_fee_msat(this_ptr, val);
21929         // debug statements here
21930 }
21931         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
21932 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
21933         if(!isWasmInitialized) {
21934                 throw new Error("initializeWasm() must be awaited first!");
21935         }
21936         const nativeResponseValue = wasm.TS_RouteHop_get_cltv_expiry_delta(this_ptr);
21937         return nativeResponseValue;
21938 }
21939         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
21940 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
21941         if(!isWasmInitialized) {
21942                 throw new Error("initializeWasm() must be awaited first!");
21943         }
21944         const nativeResponseValue = wasm.TS_RouteHop_set_cltv_expiry_delta(this_ptr, val);
21945         // debug statements here
21946 }
21947         // 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);
21948 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 {
21949         if(!isWasmInitialized) {
21950                 throw new Error("initializeWasm() must be awaited first!");
21951         }
21952         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);
21953         return nativeResponseValue;
21954 }
21955         // uintptr_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
21956 export function RouteHop_clone_ptr(arg: number): number {
21957         if(!isWasmInitialized) {
21958                 throw new Error("initializeWasm() must be awaited first!");
21959         }
21960         const nativeResponseValue = wasm.TS_RouteHop_clone_ptr(arg);
21961         return nativeResponseValue;
21962 }
21963         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
21964 export function RouteHop_clone(orig: number): number {
21965         if(!isWasmInitialized) {
21966                 throw new Error("initializeWasm() must be awaited first!");
21967         }
21968         const nativeResponseValue = wasm.TS_RouteHop_clone(orig);
21969         return nativeResponseValue;
21970 }
21971         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
21972 export function RouteHop_hash(o: number): bigint {
21973         if(!isWasmInitialized) {
21974                 throw new Error("initializeWasm() must be awaited first!");
21975         }
21976         const nativeResponseValue = wasm.TS_RouteHop_hash(o);
21977         return nativeResponseValue;
21978 }
21979         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
21980 export function RouteHop_eq(a: number, b: number): boolean {
21981         if(!isWasmInitialized) {
21982                 throw new Error("initializeWasm() must be awaited first!");
21983         }
21984         const nativeResponseValue = wasm.TS_RouteHop_eq(a, b);
21985         return nativeResponseValue;
21986 }
21987         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
21988 export function RouteHop_write(obj: number): number {
21989         if(!isWasmInitialized) {
21990                 throw new Error("initializeWasm() must be awaited first!");
21991         }
21992         const nativeResponseValue = wasm.TS_RouteHop_write(obj);
21993         return nativeResponseValue;
21994 }
21995         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
21996 export function RouteHop_read(ser: number): number {
21997         if(!isWasmInitialized) {
21998                 throw new Error("initializeWasm() must be awaited first!");
21999         }
22000         const nativeResponseValue = wasm.TS_RouteHop_read(ser);
22001         return nativeResponseValue;
22002 }
22003         // void Route_free(struct LDKRoute this_obj);
22004 export function Route_free(this_obj: number): void {
22005         if(!isWasmInitialized) {
22006                 throw new Error("initializeWasm() must be awaited first!");
22007         }
22008         const nativeResponseValue = wasm.TS_Route_free(this_obj);
22009         // debug statements here
22010 }
22011         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
22012 export function Route_get_paths(this_ptr: number): number {
22013         if(!isWasmInitialized) {
22014                 throw new Error("initializeWasm() must be awaited first!");
22015         }
22016         const nativeResponseValue = wasm.TS_Route_get_paths(this_ptr);
22017         return nativeResponseValue;
22018 }
22019         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
22020 export function Route_set_paths(this_ptr: number, val: number): void {
22021         if(!isWasmInitialized) {
22022                 throw new Error("initializeWasm() must be awaited first!");
22023         }
22024         const nativeResponseValue = wasm.TS_Route_set_paths(this_ptr, val);
22025         // debug statements here
22026 }
22027         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
22028 export function Route_get_payee(this_ptr: number): number {
22029         if(!isWasmInitialized) {
22030                 throw new Error("initializeWasm() must be awaited first!");
22031         }
22032         const nativeResponseValue = wasm.TS_Route_get_payee(this_ptr);
22033         return nativeResponseValue;
22034 }
22035         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
22036 export function Route_set_payee(this_ptr: number, val: number): void {
22037         if(!isWasmInitialized) {
22038                 throw new Error("initializeWasm() must be awaited first!");
22039         }
22040         const nativeResponseValue = wasm.TS_Route_set_payee(this_ptr, val);
22041         // debug statements here
22042 }
22043         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
22044 export function Route_new(paths_arg: number, payee_arg: number): number {
22045         if(!isWasmInitialized) {
22046                 throw new Error("initializeWasm() must be awaited first!");
22047         }
22048         const nativeResponseValue = wasm.TS_Route_new(paths_arg, payee_arg);
22049         return nativeResponseValue;
22050 }
22051         // uintptr_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
22052 export function Route_clone_ptr(arg: number): number {
22053         if(!isWasmInitialized) {
22054                 throw new Error("initializeWasm() must be awaited first!");
22055         }
22056         const nativeResponseValue = wasm.TS_Route_clone_ptr(arg);
22057         return nativeResponseValue;
22058 }
22059         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
22060 export function Route_clone(orig: number): number {
22061         if(!isWasmInitialized) {
22062                 throw new Error("initializeWasm() must be awaited first!");
22063         }
22064         const nativeResponseValue = wasm.TS_Route_clone(orig);
22065         return nativeResponseValue;
22066 }
22067         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
22068 export function Route_hash(o: number): bigint {
22069         if(!isWasmInitialized) {
22070                 throw new Error("initializeWasm() must be awaited first!");
22071         }
22072         const nativeResponseValue = wasm.TS_Route_hash(o);
22073         return nativeResponseValue;
22074 }
22075         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
22076 export function Route_eq(a: number, b: number): boolean {
22077         if(!isWasmInitialized) {
22078                 throw new Error("initializeWasm() must be awaited first!");
22079         }
22080         const nativeResponseValue = wasm.TS_Route_eq(a, b);
22081         return nativeResponseValue;
22082 }
22083         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
22084 export function Route_get_total_fees(this_arg: number): bigint {
22085         if(!isWasmInitialized) {
22086                 throw new Error("initializeWasm() must be awaited first!");
22087         }
22088         const nativeResponseValue = wasm.TS_Route_get_total_fees(this_arg);
22089         return nativeResponseValue;
22090 }
22091         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
22092 export function Route_get_total_amount(this_arg: number): bigint {
22093         if(!isWasmInitialized) {
22094                 throw new Error("initializeWasm() must be awaited first!");
22095         }
22096         const nativeResponseValue = wasm.TS_Route_get_total_amount(this_arg);
22097         return nativeResponseValue;
22098 }
22099         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
22100 export function Route_write(obj: number): number {
22101         if(!isWasmInitialized) {
22102                 throw new Error("initializeWasm() must be awaited first!");
22103         }
22104         const nativeResponseValue = wasm.TS_Route_write(obj);
22105         return nativeResponseValue;
22106 }
22107         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
22108 export function Route_read(ser: number): number {
22109         if(!isWasmInitialized) {
22110                 throw new Error("initializeWasm() must be awaited first!");
22111         }
22112         const nativeResponseValue = wasm.TS_Route_read(ser);
22113         return nativeResponseValue;
22114 }
22115         // void RouteParameters_free(struct LDKRouteParameters this_obj);
22116 export function RouteParameters_free(this_obj: number): void {
22117         if(!isWasmInitialized) {
22118                 throw new Error("initializeWasm() must be awaited first!");
22119         }
22120         const nativeResponseValue = wasm.TS_RouteParameters_free(this_obj);
22121         // debug statements here
22122 }
22123         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
22124 export function RouteParameters_get_payee(this_ptr: number): number {
22125         if(!isWasmInitialized) {
22126                 throw new Error("initializeWasm() must be awaited first!");
22127         }
22128         const nativeResponseValue = wasm.TS_RouteParameters_get_payee(this_ptr);
22129         return nativeResponseValue;
22130 }
22131         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
22132 export function RouteParameters_set_payee(this_ptr: number, val: number): void {
22133         if(!isWasmInitialized) {
22134                 throw new Error("initializeWasm() must be awaited first!");
22135         }
22136         const nativeResponseValue = wasm.TS_RouteParameters_set_payee(this_ptr, val);
22137         // debug statements here
22138 }
22139         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
22140 export function RouteParameters_get_final_value_msat(this_ptr: number): bigint {
22141         if(!isWasmInitialized) {
22142                 throw new Error("initializeWasm() must be awaited first!");
22143         }
22144         const nativeResponseValue = wasm.TS_RouteParameters_get_final_value_msat(this_ptr);
22145         return nativeResponseValue;
22146 }
22147         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
22148 export function RouteParameters_set_final_value_msat(this_ptr: number, val: bigint): void {
22149         if(!isWasmInitialized) {
22150                 throw new Error("initializeWasm() must be awaited first!");
22151         }
22152         const nativeResponseValue = wasm.TS_RouteParameters_set_final_value_msat(this_ptr, val);
22153         // debug statements here
22154 }
22155         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
22156 export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
22157         if(!isWasmInitialized) {
22158                 throw new Error("initializeWasm() must be awaited first!");
22159         }
22160         const nativeResponseValue = wasm.TS_RouteParameters_get_final_cltv_expiry_delta(this_ptr);
22161         return nativeResponseValue;
22162 }
22163         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
22164 export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
22165         if(!isWasmInitialized) {
22166                 throw new Error("initializeWasm() must be awaited first!");
22167         }
22168         const nativeResponseValue = wasm.TS_RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
22169         // debug statements here
22170 }
22171         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
22172 export function RouteParameters_new(payee_arg: number, final_value_msat_arg: bigint, final_cltv_expiry_delta_arg: number): number {
22173         if(!isWasmInitialized) {
22174                 throw new Error("initializeWasm() must be awaited first!");
22175         }
22176         const nativeResponseValue = wasm.TS_RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
22177         return nativeResponseValue;
22178 }
22179         // uintptr_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
22180 export function RouteParameters_clone_ptr(arg: number): number {
22181         if(!isWasmInitialized) {
22182                 throw new Error("initializeWasm() must be awaited first!");
22183         }
22184         const nativeResponseValue = wasm.TS_RouteParameters_clone_ptr(arg);
22185         return nativeResponseValue;
22186 }
22187         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
22188 export function RouteParameters_clone(orig: number): number {
22189         if(!isWasmInitialized) {
22190                 throw new Error("initializeWasm() must be awaited first!");
22191         }
22192         const nativeResponseValue = wasm.TS_RouteParameters_clone(orig);
22193         return nativeResponseValue;
22194 }
22195         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
22196 export function RouteParameters_write(obj: number): number {
22197         if(!isWasmInitialized) {
22198                 throw new Error("initializeWasm() must be awaited first!");
22199         }
22200         const nativeResponseValue = wasm.TS_RouteParameters_write(obj);
22201         return nativeResponseValue;
22202 }
22203         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
22204 export function RouteParameters_read(ser: number): number {
22205         if(!isWasmInitialized) {
22206                 throw new Error("initializeWasm() must be awaited first!");
22207         }
22208         const nativeResponseValue = wasm.TS_RouteParameters_read(ser);
22209         return nativeResponseValue;
22210 }
22211         // void Payee_free(struct LDKPayee this_obj);
22212 export function Payee_free(this_obj: number): void {
22213         if(!isWasmInitialized) {
22214                 throw new Error("initializeWasm() must be awaited first!");
22215         }
22216         const nativeResponseValue = wasm.TS_Payee_free(this_obj);
22217         // debug statements here
22218 }
22219         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
22220 export function Payee_get_pubkey(this_ptr: number): number {
22221         if(!isWasmInitialized) {
22222                 throw new Error("initializeWasm() must be awaited first!");
22223         }
22224         const nativeResponseValue = wasm.TS_Payee_get_pubkey(this_ptr);
22225         return nativeResponseValue;
22226 }
22227         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
22228 export function Payee_set_pubkey(this_ptr: number, val: number): void {
22229         if(!isWasmInitialized) {
22230                 throw new Error("initializeWasm() must be awaited first!");
22231         }
22232         const nativeResponseValue = wasm.TS_Payee_set_pubkey(this_ptr, val);
22233         // debug statements here
22234 }
22235         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
22236 export function Payee_get_features(this_ptr: number): number {
22237         if(!isWasmInitialized) {
22238                 throw new Error("initializeWasm() must be awaited first!");
22239         }
22240         const nativeResponseValue = wasm.TS_Payee_get_features(this_ptr);
22241         return nativeResponseValue;
22242 }
22243         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
22244 export function Payee_set_features(this_ptr: number, val: number): void {
22245         if(!isWasmInitialized) {
22246                 throw new Error("initializeWasm() must be awaited first!");
22247         }
22248         const nativeResponseValue = wasm.TS_Payee_set_features(this_ptr, val);
22249         // debug statements here
22250 }
22251         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
22252 export function Payee_get_route_hints(this_ptr: number): number {
22253         if(!isWasmInitialized) {
22254                 throw new Error("initializeWasm() must be awaited first!");
22255         }
22256         const nativeResponseValue = wasm.TS_Payee_get_route_hints(this_ptr);
22257         return nativeResponseValue;
22258 }
22259         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
22260 export function Payee_set_route_hints(this_ptr: number, val: number): void {
22261         if(!isWasmInitialized) {
22262                 throw new Error("initializeWasm() must be awaited first!");
22263         }
22264         const nativeResponseValue = wasm.TS_Payee_set_route_hints(this_ptr, val);
22265         // debug statements here
22266 }
22267         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
22268 export function Payee_get_expiry_time(this_ptr: number): number {
22269         if(!isWasmInitialized) {
22270                 throw new Error("initializeWasm() must be awaited first!");
22271         }
22272         const nativeResponseValue = wasm.TS_Payee_get_expiry_time(this_ptr);
22273         return nativeResponseValue;
22274 }
22275         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
22276 export function Payee_set_expiry_time(this_ptr: number, val: number): void {
22277         if(!isWasmInitialized) {
22278                 throw new Error("initializeWasm() must be awaited first!");
22279         }
22280         const nativeResponseValue = wasm.TS_Payee_set_expiry_time(this_ptr, val);
22281         // debug statements here
22282 }
22283         // 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);
22284 export function Payee_new(pubkey_arg: number, features_arg: number, route_hints_arg: number, expiry_time_arg: number): number {
22285         if(!isWasmInitialized) {
22286                 throw new Error("initializeWasm() must be awaited first!");
22287         }
22288         const nativeResponseValue = wasm.TS_Payee_new(pubkey_arg, features_arg, route_hints_arg, expiry_time_arg);
22289         return nativeResponseValue;
22290 }
22291         // uintptr_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
22292 export function Payee_clone_ptr(arg: number): number {
22293         if(!isWasmInitialized) {
22294                 throw new Error("initializeWasm() must be awaited first!");
22295         }
22296         const nativeResponseValue = wasm.TS_Payee_clone_ptr(arg);
22297         return nativeResponseValue;
22298 }
22299         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
22300 export function Payee_clone(orig: number): number {
22301         if(!isWasmInitialized) {
22302                 throw new Error("initializeWasm() must be awaited first!");
22303         }
22304         const nativeResponseValue = wasm.TS_Payee_clone(orig);
22305         return nativeResponseValue;
22306 }
22307         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
22308 export function Payee_hash(o: number): bigint {
22309         if(!isWasmInitialized) {
22310                 throw new Error("initializeWasm() must be awaited first!");
22311         }
22312         const nativeResponseValue = wasm.TS_Payee_hash(o);
22313         return nativeResponseValue;
22314 }
22315         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
22316 export function Payee_eq(a: number, b: number): boolean {
22317         if(!isWasmInitialized) {
22318                 throw new Error("initializeWasm() must be awaited first!");
22319         }
22320         const nativeResponseValue = wasm.TS_Payee_eq(a, b);
22321         return nativeResponseValue;
22322 }
22323         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
22324 export function Payee_write(obj: number): number {
22325         if(!isWasmInitialized) {
22326                 throw new Error("initializeWasm() must be awaited first!");
22327         }
22328         const nativeResponseValue = wasm.TS_Payee_write(obj);
22329         return nativeResponseValue;
22330 }
22331         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
22332 export function Payee_read(ser: number): number {
22333         if(!isWasmInitialized) {
22334                 throw new Error("initializeWasm() must be awaited first!");
22335         }
22336         const nativeResponseValue = wasm.TS_Payee_read(ser);
22337         return nativeResponseValue;
22338 }
22339         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
22340 export function Payee_from_node_id(pubkey: number): number {
22341         if(!isWasmInitialized) {
22342                 throw new Error("initializeWasm() must be awaited first!");
22343         }
22344         const nativeResponseValue = wasm.TS_Payee_from_node_id(pubkey);
22345         return nativeResponseValue;
22346 }
22347         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
22348 export function Payee_for_keysend(pubkey: number): number {
22349         if(!isWasmInitialized) {
22350                 throw new Error("initializeWasm() must be awaited first!");
22351         }
22352         const nativeResponseValue = wasm.TS_Payee_for_keysend(pubkey);
22353         return nativeResponseValue;
22354 }
22355         // void RouteHint_free(struct LDKRouteHint this_obj);
22356 export function RouteHint_free(this_obj: number): void {
22357         if(!isWasmInitialized) {
22358                 throw new Error("initializeWasm() must be awaited first!");
22359         }
22360         const nativeResponseValue = wasm.TS_RouteHint_free(this_obj);
22361         // debug statements here
22362 }
22363         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
22364 export function RouteHint_get_a(this_ptr: number): number {
22365         if(!isWasmInitialized) {
22366                 throw new Error("initializeWasm() must be awaited first!");
22367         }
22368         const nativeResponseValue = wasm.TS_RouteHint_get_a(this_ptr);
22369         return nativeResponseValue;
22370 }
22371         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
22372 export function RouteHint_set_a(this_ptr: number, val: number): void {
22373         if(!isWasmInitialized) {
22374                 throw new Error("initializeWasm() must be awaited first!");
22375         }
22376         const nativeResponseValue = wasm.TS_RouteHint_set_a(this_ptr, val);
22377         // debug statements here
22378 }
22379         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
22380 export function RouteHint_new(a_arg: number): number {
22381         if(!isWasmInitialized) {
22382                 throw new Error("initializeWasm() must be awaited first!");
22383         }
22384         const nativeResponseValue = wasm.TS_RouteHint_new(a_arg);
22385         return nativeResponseValue;
22386 }
22387         // uintptr_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
22388 export function RouteHint_clone_ptr(arg: number): number {
22389         if(!isWasmInitialized) {
22390                 throw new Error("initializeWasm() must be awaited first!");
22391         }
22392         const nativeResponseValue = wasm.TS_RouteHint_clone_ptr(arg);
22393         return nativeResponseValue;
22394 }
22395         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
22396 export function RouteHint_clone(orig: number): number {
22397         if(!isWasmInitialized) {
22398                 throw new Error("initializeWasm() must be awaited first!");
22399         }
22400         const nativeResponseValue = wasm.TS_RouteHint_clone(orig);
22401         return nativeResponseValue;
22402 }
22403         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
22404 export function RouteHint_hash(o: number): bigint {
22405         if(!isWasmInitialized) {
22406                 throw new Error("initializeWasm() must be awaited first!");
22407         }
22408         const nativeResponseValue = wasm.TS_RouteHint_hash(o);
22409         return nativeResponseValue;
22410 }
22411         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
22412 export function RouteHint_eq(a: number, b: number): boolean {
22413         if(!isWasmInitialized) {
22414                 throw new Error("initializeWasm() must be awaited first!");
22415         }
22416         const nativeResponseValue = wasm.TS_RouteHint_eq(a, b);
22417         return nativeResponseValue;
22418 }
22419         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
22420 export function RouteHint_write(obj: number): number {
22421         if(!isWasmInitialized) {
22422                 throw new Error("initializeWasm() must be awaited first!");
22423         }
22424         const nativeResponseValue = wasm.TS_RouteHint_write(obj);
22425         return nativeResponseValue;
22426 }
22427         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
22428 export function RouteHint_read(ser: number): number {
22429         if(!isWasmInitialized) {
22430                 throw new Error("initializeWasm() must be awaited first!");
22431         }
22432         const nativeResponseValue = wasm.TS_RouteHint_read(ser);
22433         return nativeResponseValue;
22434 }
22435         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
22436 export function RouteHintHop_free(this_obj: number): void {
22437         if(!isWasmInitialized) {
22438                 throw new Error("initializeWasm() must be awaited first!");
22439         }
22440         const nativeResponseValue = wasm.TS_RouteHintHop_free(this_obj);
22441         // debug statements here
22442 }
22443         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
22444 export function RouteHintHop_get_src_node_id(this_ptr: number): number {
22445         if(!isWasmInitialized) {
22446                 throw new Error("initializeWasm() must be awaited first!");
22447         }
22448         const nativeResponseValue = wasm.TS_RouteHintHop_get_src_node_id(this_ptr);
22449         return nativeResponseValue;
22450 }
22451         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
22452 export function RouteHintHop_set_src_node_id(this_ptr: number, val: number): void {
22453         if(!isWasmInitialized) {
22454                 throw new Error("initializeWasm() must be awaited first!");
22455         }
22456         const nativeResponseValue = wasm.TS_RouteHintHop_set_src_node_id(this_ptr, val);
22457         // debug statements here
22458 }
22459         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
22460 export function RouteHintHop_get_short_channel_id(this_ptr: number): bigint {
22461         if(!isWasmInitialized) {
22462                 throw new Error("initializeWasm() must be awaited first!");
22463         }
22464         const nativeResponseValue = wasm.TS_RouteHintHop_get_short_channel_id(this_ptr);
22465         return nativeResponseValue;
22466 }
22467         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
22468 export function RouteHintHop_set_short_channel_id(this_ptr: number, val: bigint): void {
22469         if(!isWasmInitialized) {
22470                 throw new Error("initializeWasm() must be awaited first!");
22471         }
22472         const nativeResponseValue = wasm.TS_RouteHintHop_set_short_channel_id(this_ptr, val);
22473         // debug statements here
22474 }
22475         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
22476 export function RouteHintHop_get_fees(this_ptr: number): number {
22477         if(!isWasmInitialized) {
22478                 throw new Error("initializeWasm() must be awaited first!");
22479         }
22480         const nativeResponseValue = wasm.TS_RouteHintHop_get_fees(this_ptr);
22481         return nativeResponseValue;
22482 }
22483         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
22484 export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
22485         if(!isWasmInitialized) {
22486                 throw new Error("initializeWasm() must be awaited first!");
22487         }
22488         const nativeResponseValue = wasm.TS_RouteHintHop_set_fees(this_ptr, val);
22489         // debug statements here
22490 }
22491         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
22492 export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
22493         if(!isWasmInitialized) {
22494                 throw new Error("initializeWasm() must be awaited first!");
22495         }
22496         const nativeResponseValue = wasm.TS_RouteHintHop_get_cltv_expiry_delta(this_ptr);
22497         return nativeResponseValue;
22498 }
22499         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
22500 export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
22501         if(!isWasmInitialized) {
22502                 throw new Error("initializeWasm() must be awaited first!");
22503         }
22504         const nativeResponseValue = wasm.TS_RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
22505         // debug statements here
22506 }
22507         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
22508 export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
22509         if(!isWasmInitialized) {
22510                 throw new Error("initializeWasm() must be awaited first!");
22511         }
22512         const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_minimum_msat(this_ptr);
22513         return nativeResponseValue;
22514 }
22515         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
22516 export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
22517         if(!isWasmInitialized) {
22518                 throw new Error("initializeWasm() must be awaited first!");
22519         }
22520         const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
22521         // debug statements here
22522 }
22523         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
22524 export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
22525         if(!isWasmInitialized) {
22526                 throw new Error("initializeWasm() must be awaited first!");
22527         }
22528         const nativeResponseValue = wasm.TS_RouteHintHop_get_htlc_maximum_msat(this_ptr);
22529         return nativeResponseValue;
22530 }
22531         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
22532 export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
22533         if(!isWasmInitialized) {
22534                 throw new Error("initializeWasm() must be awaited first!");
22535         }
22536         const nativeResponseValue = wasm.TS_RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
22537         // debug statements here
22538 }
22539         // 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);
22540 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 {
22541         if(!isWasmInitialized) {
22542                 throw new Error("initializeWasm() must be awaited first!");
22543         }
22544         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);
22545         return nativeResponseValue;
22546 }
22547         // uintptr_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
22548 export function RouteHintHop_clone_ptr(arg: number): number {
22549         if(!isWasmInitialized) {
22550                 throw new Error("initializeWasm() must be awaited first!");
22551         }
22552         const nativeResponseValue = wasm.TS_RouteHintHop_clone_ptr(arg);
22553         return nativeResponseValue;
22554 }
22555         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
22556 export function RouteHintHop_clone(orig: number): number {
22557         if(!isWasmInitialized) {
22558                 throw new Error("initializeWasm() must be awaited first!");
22559         }
22560         const nativeResponseValue = wasm.TS_RouteHintHop_clone(orig);
22561         return nativeResponseValue;
22562 }
22563         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
22564 export function RouteHintHop_hash(o: number): bigint {
22565         if(!isWasmInitialized) {
22566                 throw new Error("initializeWasm() must be awaited first!");
22567         }
22568         const nativeResponseValue = wasm.TS_RouteHintHop_hash(o);
22569         return nativeResponseValue;
22570 }
22571         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
22572 export function RouteHintHop_eq(a: number, b: number): boolean {
22573         if(!isWasmInitialized) {
22574                 throw new Error("initializeWasm() must be awaited first!");
22575         }
22576         const nativeResponseValue = wasm.TS_RouteHintHop_eq(a, b);
22577         return nativeResponseValue;
22578 }
22579         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
22580 export function RouteHintHop_write(obj: number): number {
22581         if(!isWasmInitialized) {
22582                 throw new Error("initializeWasm() must be awaited first!");
22583         }
22584         const nativeResponseValue = wasm.TS_RouteHintHop_write(obj);
22585         return nativeResponseValue;
22586 }
22587         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
22588 export function RouteHintHop_read(ser: number): number {
22589         if(!isWasmInitialized) {
22590                 throw new Error("initializeWasm() must be awaited first!");
22591         }
22592         const nativeResponseValue = wasm.TS_RouteHintHop_read(ser);
22593         return nativeResponseValue;
22594 }
22595         // 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);
22596 export function find_route(our_node_pubkey: number, params: number, network: number, first_hops: number, logger: number, scorer: number): number {
22597         if(!isWasmInitialized) {
22598                 throw new Error("initializeWasm() must be awaited first!");
22599         }
22600         const nativeResponseValue = wasm.TS_find_route(our_node_pubkey, params, network, first_hops, logger, scorer);
22601         return nativeResponseValue;
22602 }
22603         // void Score_free(struct LDKScore this_ptr);
22604 export function Score_free(this_ptr: number): void {
22605         if(!isWasmInitialized) {
22606                 throw new Error("initializeWasm() must be awaited first!");
22607         }
22608         const nativeResponseValue = wasm.TS_Score_free(this_ptr);
22609         // debug statements here
22610 }
22611         // void LockableScore_free(struct LDKLockableScore this_ptr);
22612 export function LockableScore_free(this_ptr: number): void {
22613         if(!isWasmInitialized) {
22614                 throw new Error("initializeWasm() must be awaited first!");
22615         }
22616         const nativeResponseValue = wasm.TS_LockableScore_free(this_ptr);
22617         // debug statements here
22618 }
22619         // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
22620 export function MultiThreadedLockableScore_free(this_obj: number): void {
22621         if(!isWasmInitialized) {
22622                 throw new Error("initializeWasm() must be awaited first!");
22623         }
22624         const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_free(this_obj);
22625         // debug statements here
22626 }
22627         // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
22628 export function MultiThreadedLockableScore_new(score: number): number {
22629         if(!isWasmInitialized) {
22630                 throw new Error("initializeWasm() must be awaited first!");
22631         }
22632         const nativeResponseValue = wasm.TS_MultiThreadedLockableScore_new(score);
22633         return nativeResponseValue;
22634 }
22635         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
22636 export function ScoringParameters_free(this_obj: number): void {
22637         if(!isWasmInitialized) {
22638                 throw new Error("initializeWasm() must be awaited first!");
22639         }
22640         const nativeResponseValue = wasm.TS_ScoringParameters_free(this_obj);
22641         // debug statements here
22642 }
22643         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
22644 export function ScoringParameters_get_base_penalty_msat(this_ptr: number): bigint {
22645         if(!isWasmInitialized) {
22646                 throw new Error("initializeWasm() must be awaited first!");
22647         }
22648         const nativeResponseValue = wasm.TS_ScoringParameters_get_base_penalty_msat(this_ptr);
22649         return nativeResponseValue;
22650 }
22651         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
22652 export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: bigint): void {
22653         if(!isWasmInitialized) {
22654                 throw new Error("initializeWasm() must be awaited first!");
22655         }
22656         const nativeResponseValue = wasm.TS_ScoringParameters_set_base_penalty_msat(this_ptr, val);
22657         // debug statements here
22658 }
22659         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
22660 export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): bigint {
22661         if(!isWasmInitialized) {
22662                 throw new Error("initializeWasm() must be awaited first!");
22663         }
22664         const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_msat(this_ptr);
22665         return nativeResponseValue;
22666 }
22667         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
22668 export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: bigint): void {
22669         if(!isWasmInitialized) {
22670                 throw new Error("initializeWasm() must be awaited first!");
22671         }
22672         const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_msat(this_ptr, val);
22673         // debug statements here
22674 }
22675         // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
22676 export function ScoringParameters_get_overuse_penalty_start_1024th(this_ptr: number): number {
22677         if(!isWasmInitialized) {
22678                 throw new Error("initializeWasm() must be awaited first!");
22679         }
22680         const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_start_1024th(this_ptr);
22681         return nativeResponseValue;
22682 }
22683         // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
22684 export function ScoringParameters_set_overuse_penalty_start_1024th(this_ptr: number, val: number): void {
22685         if(!isWasmInitialized) {
22686                 throw new Error("initializeWasm() must be awaited first!");
22687         }
22688         const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_start_1024th(this_ptr, val);
22689         // debug statements here
22690 }
22691         // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
22692 export function ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr: number): bigint {
22693         if(!isWasmInitialized) {
22694                 throw new Error("initializeWasm() must be awaited first!");
22695         }
22696         const nativeResponseValue = wasm.TS_ScoringParameters_get_overuse_penalty_msat_per_1024th(this_ptr);
22697         return nativeResponseValue;
22698 }
22699         // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
22700 export function ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr: number, val: bigint): void {
22701         if(!isWasmInitialized) {
22702                 throw new Error("initializeWasm() must be awaited first!");
22703         }
22704         const nativeResponseValue = wasm.TS_ScoringParameters_set_overuse_penalty_msat_per_1024th(this_ptr, val);
22705         // debug statements here
22706 }
22707         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
22708 export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): bigint {
22709         if(!isWasmInitialized) {
22710                 throw new Error("initializeWasm() must be awaited first!");
22711         }
22712         const nativeResponseValue = wasm.TS_ScoringParameters_get_failure_penalty_half_life(this_ptr);
22713         return nativeResponseValue;
22714 }
22715         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
22716 export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: bigint): void {
22717         if(!isWasmInitialized) {
22718                 throw new Error("initializeWasm() must be awaited first!");
22719         }
22720         const nativeResponseValue = wasm.TS_ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
22721         // debug statements here
22722 }
22723         // 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);
22724 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 {
22725         if(!isWasmInitialized) {
22726                 throw new Error("initializeWasm() must be awaited first!");
22727         }
22728         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);
22729         return nativeResponseValue;
22730 }
22731         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
22732 export function ScoringParameters_write(obj: number): number {
22733         if(!isWasmInitialized) {
22734                 throw new Error("initializeWasm() must be awaited first!");
22735         }
22736         const nativeResponseValue = wasm.TS_ScoringParameters_write(obj);
22737         return nativeResponseValue;
22738 }
22739         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
22740 export function ScoringParameters_read(ser: number): number {
22741         if(!isWasmInitialized) {
22742                 throw new Error("initializeWasm() must be awaited first!");
22743         }
22744         const nativeResponseValue = wasm.TS_ScoringParameters_read(ser);
22745         return nativeResponseValue;
22746 }
22747         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
22748 export function ScoringParameters_default(): number {
22749         if(!isWasmInitialized) {
22750                 throw new Error("initializeWasm() must be awaited first!");
22751         }
22752         const nativeResponseValue = wasm.TS_ScoringParameters_default();
22753         return nativeResponseValue;
22754 }
22755
22756
22757 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) {
22758         const weak: WeakRef<object> = js_objs[obj_ptr];
22759         if (weak == null || weak == undefined) {
22760                 console.error("Got function call on unknown/free'd JS object!");
22761                 throw new Error("Got function call on unknown/free'd JS object!");
22762         }
22763         const obj: object = weak.deref();
22764         if (obj == null || obj == undefined) {
22765                 console.error("Got function call on GC'd JS object!");
22766                 throw new Error("Got function call on GC'd JS object!");
22767         }
22768         var fn;
22769         switch (fn_id) {
22770                 case 0: fn = Object.getOwnPropertyDescriptor(obj, "type_id"); break;
22771                 case 1: fn = Object.getOwnPropertyDescriptor(obj, "debug_str"); break;
22772                 case 2: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
22773                 case 3: fn = Object.getOwnPropertyDescriptor(obj, "get_per_commitment_point"); break;
22774                 case 4: fn = Object.getOwnPropertyDescriptor(obj, "release_commitment_secret"); break;
22775                 case 5: fn = Object.getOwnPropertyDescriptor(obj, "validate_holder_commitment"); break;
22776                 case 6: fn = Object.getOwnPropertyDescriptor(obj, "channel_keys_id"); break;
22777                 case 7: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_commitment"); break;
22778                 case 8: fn = Object.getOwnPropertyDescriptor(obj, "validate_counterparty_revocation"); break;
22779                 case 9: fn = Object.getOwnPropertyDescriptor(obj, "sign_holder_commitment_and_htlcs"); break;
22780                 case 10: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_output"); break;
22781                 case 11: fn = Object.getOwnPropertyDescriptor(obj, "sign_justice_revoked_htlc"); break;
22782                 case 12: fn = Object.getOwnPropertyDescriptor(obj, "sign_counterparty_htlc_transaction"); break;
22783                 case 13: fn = Object.getOwnPropertyDescriptor(obj, "sign_closing_transaction"); break;
22784                 case 14: fn = Object.getOwnPropertyDescriptor(obj, "sign_channel_announcement"); break;
22785                 case 15: fn = Object.getOwnPropertyDescriptor(obj, "ready_channel"); break;
22786                 case 16: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
22787                 case 17: fn = Object.getOwnPropertyDescriptor(obj, "get_utxo"); break;
22788                 case 18: fn = Object.getOwnPropertyDescriptor(obj, "register_tx"); break;
22789                 case 19: fn = Object.getOwnPropertyDescriptor(obj, "register_output"); break;
22790                 case 20: fn = Object.getOwnPropertyDescriptor(obj, "watch_channel"); break;
22791                 case 21: fn = Object.getOwnPropertyDescriptor(obj, "update_channel"); break;
22792                 case 22: fn = Object.getOwnPropertyDescriptor(obj, "release_pending_monitor_events"); break;
22793                 case 23: fn = Object.getOwnPropertyDescriptor(obj, "broadcast_transaction"); break;
22794                 case 24: fn = Object.getOwnPropertyDescriptor(obj, "get_node_secret"); break;
22795                 case 25: fn = Object.getOwnPropertyDescriptor(obj, "get_destination_script"); break;
22796                 case 26: fn = Object.getOwnPropertyDescriptor(obj, "get_shutdown_scriptpubkey"); break;
22797                 case 27: fn = Object.getOwnPropertyDescriptor(obj, "get_channel_signer"); break;
22798                 case 28: fn = Object.getOwnPropertyDescriptor(obj, "get_secure_random_bytes"); break;
22799                 case 29: fn = Object.getOwnPropertyDescriptor(obj, "read_chan_signer"); break;
22800                 case 30: fn = Object.getOwnPropertyDescriptor(obj, "sign_invoice"); break;
22801                 case 31: fn = Object.getOwnPropertyDescriptor(obj, "get_inbound_payment_key_material"); break;
22802                 case 32: fn = Object.getOwnPropertyDescriptor(obj, "get_est_sat_per_1000_weight"); break;
22803                 case 33: fn = Object.getOwnPropertyDescriptor(obj, "log"); break;
22804                 case 34: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg_events"); break;
22805                 case 35: fn = Object.getOwnPropertyDescriptor(obj, "handle_event"); break;
22806                 case 36: fn = Object.getOwnPropertyDescriptor(obj, "process_pending_events"); break;
22807                 case 37: fn = Object.getOwnPropertyDescriptor(obj, "block_connected"); break;
22808                 case 38: fn = Object.getOwnPropertyDescriptor(obj, "block_disconnected"); break;
22809                 case 39: fn = Object.getOwnPropertyDescriptor(obj, "transactions_confirmed"); break;
22810                 case 40: fn = Object.getOwnPropertyDescriptor(obj, "transaction_unconfirmed"); break;
22811                 case 41: fn = Object.getOwnPropertyDescriptor(obj, "best_block_updated"); break;
22812                 case 42: fn = Object.getOwnPropertyDescriptor(obj, "get_relevant_txids"); break;
22813                 case 43: fn = Object.getOwnPropertyDescriptor(obj, "persist_new_channel"); break;
22814                 case 44: fn = Object.getOwnPropertyDescriptor(obj, "update_persisted_channel"); break;
22815                 case 45: fn = Object.getOwnPropertyDescriptor(obj, "handle_open_channel"); break;
22816                 case 46: fn = Object.getOwnPropertyDescriptor(obj, "handle_accept_channel"); break;
22817                 case 47: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_created"); break;
22818                 case 48: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_signed"); break;
22819                 case 49: fn = Object.getOwnPropertyDescriptor(obj, "handle_funding_locked"); break;
22820                 case 50: fn = Object.getOwnPropertyDescriptor(obj, "handle_shutdown"); break;
22821                 case 51: fn = Object.getOwnPropertyDescriptor(obj, "handle_closing_signed"); break;
22822                 case 52: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_add_htlc"); break;
22823                 case 53: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fulfill_htlc"); break;
22824                 case 54: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_htlc"); break;
22825                 case 55: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fail_malformed_htlc"); break;
22826                 case 56: fn = Object.getOwnPropertyDescriptor(obj, "handle_commitment_signed"); break;
22827                 case 57: fn = Object.getOwnPropertyDescriptor(obj, "handle_revoke_and_ack"); break;
22828                 case 58: fn = Object.getOwnPropertyDescriptor(obj, "handle_update_fee"); break;
22829                 case 59: fn = Object.getOwnPropertyDescriptor(obj, "handle_announcement_signatures"); break;
22830                 case 60: fn = Object.getOwnPropertyDescriptor(obj, "peer_disconnected"); break;
22831                 case 61: fn = Object.getOwnPropertyDescriptor(obj, "peer_connected"); break;
22832                 case 62: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_reestablish"); break;
22833                 case 63: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
22834                 case 64: fn = Object.getOwnPropertyDescriptor(obj, "handle_error"); break;
22835                 case 65: fn = Object.getOwnPropertyDescriptor(obj, "handle_node_announcement"); break;
22836                 case 66: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_announcement"); break;
22837                 case 67: fn = Object.getOwnPropertyDescriptor(obj, "handle_channel_update"); break;
22838                 case 68: fn = Object.getOwnPropertyDescriptor(obj, "get_next_channel_announcements"); break;
22839                 case 69: fn = Object.getOwnPropertyDescriptor(obj, "get_next_node_announcements"); break;
22840                 case 70: fn = Object.getOwnPropertyDescriptor(obj, "sync_routing_table"); break;
22841                 case 71: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_channel_range"); break;
22842                 case 72: fn = Object.getOwnPropertyDescriptor(obj, "handle_reply_short_channel_ids_end"); break;
22843                 case 73: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_channel_range"); break;
22844                 case 74: fn = Object.getOwnPropertyDescriptor(obj, "handle_query_short_channel_ids"); break;
22845                 case 75: fn = Object.getOwnPropertyDescriptor(obj, "read"); break;
22846                 case 76: fn = Object.getOwnPropertyDescriptor(obj, "handle_custom_message"); break;
22847                 case 77: fn = Object.getOwnPropertyDescriptor(obj, "get_and_clear_pending_msg"); break;
22848                 case 78: fn = Object.getOwnPropertyDescriptor(obj, "send_data"); break;
22849                 case 79: fn = Object.getOwnPropertyDescriptor(obj, "disconnect_socket"); break;
22850                 case 80: fn = Object.getOwnPropertyDescriptor(obj, "eq"); break;
22851                 case 81: fn = Object.getOwnPropertyDescriptor(obj, "hash"); break;
22852                 case 82: fn = Object.getOwnPropertyDescriptor(obj, "channel_penalty_msat"); break;
22853                 case 83: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_failed"); break;
22854                 case 84: fn = Object.getOwnPropertyDescriptor(obj, "payment_path_successful"); break;
22855                 case 85: fn = Object.getOwnPropertyDescriptor(obj, "write"); break;
22856                 case 86: fn = Object.getOwnPropertyDescriptor(obj, "lock"); break;
22857                 default:
22858                         console.error("Got unknown function call from C!");
22859                         throw new Error("Got unknown function call from C!");
22860         }
22861         if (fn == null || fn == undefined) {
22862                 console.error("Got function call on incorrect JS object!");
22863                 throw new Error("Got function call on incorrect JS object!");
22864         }
22865         return fn.value.bind(obj)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
22866 }