2 import * as fs from 'fs';
3 const source = fs.readFileSync('./ldk.wasm');
5 const memory = new WebAssembly.Memory({initial: 256});
6 const wasmModule = new WebAssembly.Module(source);
8 const imports: any = {};
11 imports.env.memoryBase = 0;
12 imports.env.memory = memory;
13 imports.env.tableBase = 0;
14 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
16 imports.env["abort"] = function () {
17 console.error("ABORT");
21 let isWasmInitialized: boolean = false;
26 const nextMultipleOfFour = (value: number) => {
27 return Math.ceil(value / 4) * 4;
30 const encodeUint8Array = (inputArray) => {
31 const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
32 const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
33 arrayLengthView[0] = inputArray.length;
34 const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
35 arrayMemoryView.set(inputArray);
39 const encodeUint32Array = (inputArray) => {
40 const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
41 const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
42 arrayMemoryView.set(inputArray, 1);
43 arrayMemoryView[0] = inputArray.length;
47 const getArrayLength = (arrayPointer) => {
48 const arraySizeViewer = new Uint32Array(
49 memory.buffer, // value
50 arrayPointer, // offset
53 return arraySizeViewer[0];
55 const decodeUint8Array = (arrayPointer, free = true) => {
56 const arraySize = getArrayLength(arrayPointer);
57 const actualArrayViewer = new Uint8Array(
58 memory.buffer, // value
59 arrayPointer + 4, // offset (ignoring length bytes)
60 arraySize // uint8 count
62 // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
63 // will free the underlying memory when it becomes unreachable instead of copying here.
64 const actualArray = actualArrayViewer.slice(0, arraySize);
66 wasm.TS_free(arrayPointer);
70 const decodeUint32Array = (arrayPointer, free = true) => {
71 const arraySize = getArrayLength(arrayPointer);
72 const actualArrayViewer = new Uint32Array(
73 memory.buffer, // value
74 arrayPointer + 4, // offset (ignoring length bytes)
75 arraySize // uint32 count
77 // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
78 // will free the underlying memory when it becomes unreachable instead of copying here.
79 const actualArray = actualArrayViewer.slice(0, arraySize);
81 wasm.TS_free(arrayPointer);
86 const encodeString = (string) => {
87 // make malloc count divisible by 4
88 const memoryNeed = nextMultipleOfFour(string.length + 1);
89 const stringPointer = wasm.TS_malloc(memoryNeed);
90 const stringMemoryView = new Uint8Array(
91 memory.buffer, // value
92 stringPointer, // offset
93 string.length + 1 // length
95 for (let i = 0; i < string.length; i++) {
96 stringMemoryView[i] = string.charCodeAt(i);
98 stringMemoryView[string.length] = 0;
102 const decodeString = (stringPointer, free = true) => {
103 const memoryView = new Uint8Array(memory.buffer, stringPointer);
107 while (memoryView[cursor] !== 0) {
108 result += String.fromCharCode(memoryView[cursor]);
113 wasm.wasm_free(stringPointer);
119 export class VecOrSliceDef {
120 public dataptr: number;
121 public datalen: number;
122 public stride: number;
123 public constructor(dataptr: number, datalen: number, stride: number) {
124 this.dataptr = dataptr;
125 this.datalen = datalen;
126 this.stride = stride;
133 System.loadLibrary("lightningjni");
134 init(java.lang.Enum.class, VecOrSliceDef.class);
138 static native void init(java.lang.Class c, java.lang.Class slicedef);
139 static native void init_class_cache();
141 public static native boolean deref_bool(long ptr);
142 public static native long deref_long(long ptr);
143 public static native void free_heap_ptr(long ptr);
144 public static native byte[] read_bytes(long ptr, long len);
145 public static native byte[] get_u8_slice_bytes(long slice_ptr);
146 public static native long bytes_to_u8_vec(byte[] bytes);
147 public static native long new_txpointer_copy_data(byte[] txdata);
148 public static native void txpointer_free(long ptr);
149 public static native byte[] txpointer_get_buffer(long ptr);
150 public static native long vec_slice_len(long vec);
151 public static native long new_empty_slice_vec();
154 // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
155 export function TxOut_get_script_pubkey(thing: number): Uint8Array {
156 if(!isWasmInitialized) {
157 throw new Error("initializeWasm() must be awaited first!");
159 const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
160 return decodeArray(nativeResponseValue);
162 // uint64_t TxOut_get_value (struct LDKTxOut* thing)
163 export function TxOut_get_value(thing: number): number {
164 if(!isWasmInitialized) {
165 throw new Error("initializeWasm() must be awaited first!");
167 const nativeResponseValue = wasm.TxOut_get_value(thing);
168 return nativeResponseValue;
170 public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
171 public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
172 public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
173 public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
174 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
175 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
176 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
177 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
178 public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
179 public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
180 public static class LDKCOption_u32Z {
181 private LDKCOption_u32Z() {}
182 export class Some extends LDKCOption_u32Z {
184 Some(number some) { this.some = some; }
186 export class None extends LDKCOption_u32Z {
189 static native void init();
191 static { LDKCOption_u32Z.init(); }
192 public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
193 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
194 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
195 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
196 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
197 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
198 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
199 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
200 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
201 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
202 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
203 public static native number LDKCResult_TrustedClosingTransactionNoneZ_get_ok(long arg);
204 public static native void LDKCResult_TrustedClosingTransactionNoneZ_get_err(long arg);
205 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
206 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
207 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
208 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
209 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
210 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
211 public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
212 public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
213 public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
214 public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
215 public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
216 public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
217 public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
218 public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
219 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
220 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
221 public static native number LDKCResult_RouteParametersDecodeErrorZ_get_ok(long arg);
222 public static native number LDKCResult_RouteParametersDecodeErrorZ_get_err(long arg);
223 public static class LDKCOption_u64Z {
224 private LDKCOption_u64Z() {}
225 export class Some extends LDKCOption_u64Z {
227 Some(number some) { this.some = some; }
229 export class None extends LDKCOption_u64Z {
232 static native void init();
234 static { LDKCOption_u64Z.init(); }
235 public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
236 public static native number LDKCResult_PayeeDecodeErrorZ_get_ok(long arg);
237 public static native number LDKCResult_PayeeDecodeErrorZ_get_err(long arg);
238 public static native number LDKCResult_RouteHintDecodeErrorZ_get_ok(long arg);
239 public static native number LDKCResult_RouteHintDecodeErrorZ_get_err(long arg);
240 public static native number LDKCResult_RouteHintHopDecodeErrorZ_get_ok(long arg);
241 public static native number LDKCResult_RouteHintHopDecodeErrorZ_get_err(long arg);
242 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
243 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
244 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
245 public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
246 // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
247 export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
248 if(!isWasmInitialized) {
249 throw new Error("initializeWasm() must be awaited first!");
251 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
252 return nativeResponseValue;
254 // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
255 export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
256 if(!isWasmInitialized) {
257 throw new Error("initializeWasm() must be awaited first!");
259 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
260 return decodeArray(nativeResponseValue);
262 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
263 public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
264 public static class LDKMonitorEvent {
265 private LDKMonitorEvent() {}
266 export class HTLCEvent extends LDKMonitorEvent {
267 public number htlc_event;
268 HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
270 export class CommitmentTxConfirmed extends LDKMonitorEvent {
271 public number commitment_tx_confirmed;
272 CommitmentTxConfirmed(number commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
274 export class UpdateCompleted extends LDKMonitorEvent {
275 public number funding_txo;
276 public number monitor_update_id;
277 UpdateCompleted(number funding_txo, number monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
279 export class UpdateFailed extends LDKMonitorEvent {
280 public number update_failed;
281 UpdateFailed(number update_failed) { this.update_failed = update_failed; }
283 static native void init();
285 static { LDKMonitorEvent.init(); }
286 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
287 public static class LDKCOption_C2Tuple_usizeTransactionZZ {
288 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
289 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
291 Some(number some) { this.some = some; }
293 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
296 static native void init();
298 static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
299 public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
300 public static class LDKClosureReason {
301 private LDKClosureReason() {}
302 export class CounterpartyForceClosed extends LDKClosureReason {
303 public String peer_msg;
304 CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
306 export class HolderForceClosed extends LDKClosureReason {
307 HolderForceClosed() { }
309 export class CooperativeClosure extends LDKClosureReason {
310 CooperativeClosure() { }
312 export class CommitmentTxConfirmed extends LDKClosureReason {
313 CommitmentTxConfirmed() { }
315 export class ProcessingError extends LDKClosureReason {
317 ProcessingError(String err) { this.err = err; }
319 export class DisconnectedPeer extends LDKClosureReason {
320 DisconnectedPeer() { }
322 export class OutdatedChannelManager extends LDKClosureReason {
323 OutdatedChannelManager() { }
325 static native void init();
327 static { LDKClosureReason.init(); }
328 public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
329 public static class LDKCOption_ClosureReasonZ {
330 private LDKCOption_ClosureReasonZ() {}
331 export class Some extends LDKCOption_ClosureReasonZ {
333 Some(number some) { this.some = some; }
335 export class None extends LDKCOption_ClosureReasonZ {
338 static native void init();
340 static { LDKCOption_ClosureReasonZ.init(); }
341 public static native LDKCOption_ClosureReasonZ LDKCOption_ClosureReasonZ_ref_from_ptr(long ptr);
342 public static native number LDKCResult_COption_ClosureReasonZDecodeErrorZ_get_ok(long arg);
343 public static native number LDKCResult_COption_ClosureReasonZDecodeErrorZ_get_err(long arg);
344 public static class LDKNetworkUpdate {
345 private LDKNetworkUpdate() {}
346 export class ChannelUpdateMessage extends LDKNetworkUpdate {
348 ChannelUpdateMessage(number msg) { this.msg = msg; }
350 export class ChannelClosed extends LDKNetworkUpdate {
351 public number short_channel_id;
352 public boolean is_permanent;
353 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
355 export class NodeFailure extends LDKNetworkUpdate {
356 public Uint8Array node_id;
357 public boolean is_permanent;
358 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
360 static native void init();
362 static { LDKNetworkUpdate.init(); }
363 public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
364 public static class LDKCOption_NetworkUpdateZ {
365 private LDKCOption_NetworkUpdateZ() {}
366 export class Some extends LDKCOption_NetworkUpdateZ {
368 Some(number some) { this.some = some; }
370 export class None extends LDKCOption_NetworkUpdateZ {
373 static native void init();
375 static { LDKCOption_NetworkUpdateZ.init(); }
376 public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
377 public static class LDKSpendableOutputDescriptor {
378 private LDKSpendableOutputDescriptor() {}
379 export class StaticOutput extends LDKSpendableOutputDescriptor {
380 public number outpoint;
381 public number output;
382 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
384 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
385 public number delayed_payment_output;
386 DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
388 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
389 public number static_payment_output;
390 StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
392 static native void init();
394 static { LDKSpendableOutputDescriptor.init(); }
395 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
396 public static class LDKPaymentPurpose {
397 private LDKPaymentPurpose() {}
398 export class InvoicePayment extends LDKPaymentPurpose {
399 public Uint8Array payment_preimage;
400 public Uint8Array payment_secret;
401 public number user_payment_id;
402 InvoicePayment(Uint8Array payment_preimage, Uint8Array payment_secret, number user_payment_id) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.user_payment_id = user_payment_id; }
404 export class SpontaneousPayment extends LDKPaymentPurpose {
405 public Uint8Array spontaneous_payment;
406 SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
408 static native void init();
410 static { LDKPaymentPurpose.init(); }
411 public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
412 public static class LDKEvent {
413 private LDKEvent() {}
414 export class FundingGenerationReady extends LDKEvent {
415 public Uint8Array temporary_channel_id;
416 public number channel_value_satoshis;
417 public Uint8Array output_script;
418 public number user_channel_id;
419 FundingGenerationReady(Uint8Array temporary_channel_id, number channel_value_satoshis, Uint8Array output_script, number user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
421 export class PaymentReceived extends LDKEvent {
422 public Uint8Array payment_hash;
424 public number purpose;
425 PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
427 export class PaymentSent extends LDKEvent {
428 public Uint8Array payment_id;
429 public Uint8Array payment_preimage;
430 public Uint8Array payment_hash;
431 public number fee_paid_msat;
432 PaymentSent(Uint8Array payment_id, Uint8Array payment_preimage, Uint8Array payment_hash, number fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
434 export class PaymentPathFailed extends LDKEvent {
435 public Uint8Array payment_id;
436 public Uint8Array payment_hash;
437 public boolean rejected_by_dest;
438 public number network_update;
439 public boolean all_paths_failed;
440 public number[] path;
441 public number short_channel_id;
443 PaymentPathFailed(Uint8Array payment_id, Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path, number short_channel_id, number retry) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; this.retry = retry; }
445 export class PendingHTLCsForwardable extends LDKEvent {
446 public number time_forwardable;
447 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
449 export class SpendableOutputs extends LDKEvent {
450 public number[] outputs;
451 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
453 export class PaymentForwarded extends LDKEvent {
454 public number fee_earned_msat;
455 public boolean claim_from_onchain_tx;
456 PaymentForwarded(number fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
458 export class ChannelClosed extends LDKEvent {
459 public Uint8Array channel_id;
460 public number user_channel_id;
461 public number reason;
462 ChannelClosed(Uint8Array channel_id, number user_channel_id, number reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
464 export class DiscardFunding extends LDKEvent {
465 public Uint8Array channel_id;
466 public Uint8Array transaction;
467 DiscardFunding(Uint8Array channel_id, Uint8Array transaction) { this.channel_id = channel_id; this.transaction = transaction; }
469 static native void init();
471 static { LDKEvent.init(); }
472 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
473 public static class LDKCOption_EventZ {
474 private LDKCOption_EventZ() {}
475 export class Some extends LDKCOption_EventZ {
477 Some(number some) { this.some = some; }
479 export class None extends LDKCOption_EventZ {
482 static native void init();
484 static { LDKCOption_EventZ.init(); }
485 public static native LDKCOption_EventZ LDKCOption_EventZ_ref_from_ptr(long ptr);
486 public static native number LDKCResult_COption_EventZDecodeErrorZ_get_ok(long arg);
487 public static native number LDKCResult_COption_EventZDecodeErrorZ_get_err(long arg);
488 public static class LDKErrorAction {
489 private LDKErrorAction() {}
490 export class DisconnectPeer extends LDKErrorAction {
492 DisconnectPeer(number msg) { this.msg = msg; }
494 export class IgnoreError extends LDKErrorAction {
497 export class IgnoreAndLog extends LDKErrorAction {
498 public Level ignore_and_log;
499 IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
501 export class SendErrorMessage extends LDKErrorAction {
503 SendErrorMessage(number msg) { this.msg = msg; }
505 static native void init();
507 static { LDKErrorAction.init(); }
508 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
509 public static class LDKMessageSendEvent {
510 private LDKMessageSendEvent() {}
511 export class SendAcceptChannel extends LDKMessageSendEvent {
512 public Uint8Array node_id;
514 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
516 export class SendOpenChannel extends LDKMessageSendEvent {
517 public Uint8Array node_id;
519 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
521 export class SendFundingCreated extends LDKMessageSendEvent {
522 public Uint8Array node_id;
524 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
526 export class SendFundingSigned extends LDKMessageSendEvent {
527 public Uint8Array node_id;
529 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
531 export class SendFundingLocked extends LDKMessageSendEvent {
532 public Uint8Array node_id;
534 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
536 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
537 public Uint8Array node_id;
539 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
541 export class UpdateHTLCs extends LDKMessageSendEvent {
542 public Uint8Array node_id;
543 public number updates;
544 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
546 export class SendRevokeAndACK extends LDKMessageSendEvent {
547 public Uint8Array node_id;
549 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
551 export class SendClosingSigned extends LDKMessageSendEvent {
552 public Uint8Array node_id;
554 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
556 export class SendShutdown extends LDKMessageSendEvent {
557 public Uint8Array node_id;
559 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
561 export class SendChannelReestablish extends LDKMessageSendEvent {
562 public Uint8Array node_id;
564 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
566 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
568 public number update_msg;
569 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
571 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
573 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
575 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
577 BroadcastChannelUpdate(number msg) { this.msg = msg; }
579 export class SendChannelUpdate extends LDKMessageSendEvent {
580 public Uint8Array node_id;
582 SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
584 export class HandleError extends LDKMessageSendEvent {
585 public Uint8Array node_id;
586 public number action;
587 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
589 export class SendChannelRangeQuery extends LDKMessageSendEvent {
590 public Uint8Array node_id;
592 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
594 export class SendShortIdsQuery extends LDKMessageSendEvent {
595 public Uint8Array node_id;
597 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
599 export class SendReplyChannelRange extends LDKMessageSendEvent {
600 public Uint8Array node_id;
602 SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
604 static native void init();
606 static { LDKMessageSendEvent.init(); }
607 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
608 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
609 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
610 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
611 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
612 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
613 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
614 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
615 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
616 public static native number LDKCResult_ScoringParametersDecodeErrorZ_get_ok(long arg);
617 public static native number LDKCResult_ScoringParametersDecodeErrorZ_get_err(long arg);
618 public static native number LDKCResult_ScorerDecodeErrorZ_get_ok(long arg);
619 public static native number LDKCResult_ScorerDecodeErrorZ_get_err(long arg);
620 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
621 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
622 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
623 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
624 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
625 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
626 public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
627 public static native void LDKCResult_NoneNoneZ_get_err(long arg);
628 // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
629 export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
630 if(!isWasmInitialized) {
631 throw new Error("initializeWasm() must be awaited first!");
633 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
634 return decodeArray(nativeResponseValue);
636 // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
637 export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
638 if(!isWasmInitialized) {
639 throw new Error("initializeWasm() must be awaited first!");
641 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
642 return nativeResponseValue;
644 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
645 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
646 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
647 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
651 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
653 export interface LDKBaseSign {
654 get_per_commitment_point (idx: number): Uint8Array;
655 release_commitment_secret (idx: number): Uint8Array;
656 validate_holder_commitment (holder_tx: number): number;
657 channel_keys_id (): Uint8Array;
658 sign_counterparty_commitment (commitment_tx: number): number;
659 validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
660 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
661 sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
662 sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
663 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
664 sign_closing_transaction (closing_tx: number): number;
665 sign_channel_announcement (msg: number): number;
666 ready_channel (channel_parameters: number): void;
669 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
670 throw new Error('unimplemented'); // TODO: bind to WASM
673 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
676 // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
677 export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
678 if(!isWasmInitialized) {
679 throw new Error("initializeWasm() must be awaited first!");
681 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
682 return decodeArray(nativeResponseValue);
684 // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
685 export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
686 if(!isWasmInitialized) {
687 throw new Error("initializeWasm() must be awaited first!");
689 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
690 return decodeArray(nativeResponseValue);
692 // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
693 export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
694 if(!isWasmInitialized) {
695 throw new Error("initializeWasm() must be awaited first!");
697 const nativeResponseValue = wasm.BaseSign_validate_holder_commitment(this_arg, holder_tx);
698 return nativeResponseValue;
700 // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
701 export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
702 if(!isWasmInitialized) {
703 throw new Error("initializeWasm() must be awaited first!");
705 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
706 return decodeArray(nativeResponseValue);
708 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
709 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
710 if(!isWasmInitialized) {
711 throw new Error("initializeWasm() must be awaited first!");
713 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
714 return nativeResponseValue;
716 // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
717 export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
718 if(!isWasmInitialized) {
719 throw new Error("initializeWasm() must be awaited first!");
721 const nativeResponseValue = wasm.BaseSign_validate_counterparty_revocation(this_arg, idx, encodeArray(secret));
722 return nativeResponseValue;
724 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
725 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
726 if(!isWasmInitialized) {
727 throw new Error("initializeWasm() must be awaited first!");
729 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
730 return nativeResponseValue;
732 // 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]
733 export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
734 if(!isWasmInitialized) {
735 throw new Error("initializeWasm() must be awaited first!");
737 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
738 return nativeResponseValue;
740 // 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
741 export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
742 if(!isWasmInitialized) {
743 throw new Error("initializeWasm() must be awaited first!");
745 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
746 return nativeResponseValue;
748 // 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
749 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
750 if(!isWasmInitialized) {
751 throw new Error("initializeWasm() must be awaited first!");
753 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
754 return nativeResponseValue;
756 // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
757 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
758 if(!isWasmInitialized) {
759 throw new Error("initializeWasm() must be awaited first!");
761 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, closing_tx);
762 return nativeResponseValue;
764 // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
765 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
766 if(!isWasmInitialized) {
767 throw new Error("initializeWasm() must be awaited first!");
769 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
770 return nativeResponseValue;
772 // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
773 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
774 if(!isWasmInitialized) {
775 throw new Error("initializeWasm() must be awaited first!");
777 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
778 // debug statements here
780 // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
781 export function BaseSign_get_pubkeys(this_arg: number): number {
782 if(!isWasmInitialized) {
783 throw new Error("initializeWasm() must be awaited first!");
785 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
786 return nativeResponseValue;
791 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
793 export interface LDKSign {
794 write (): Uint8Array;
797 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
798 throw new Error('unimplemented'); // TODO: bind to WASM
801 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
804 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
805 export function Sign_write(this_arg: number): Uint8Array {
806 if(!isWasmInitialized) {
807 throw new Error("initializeWasm() must be awaited first!");
809 const nativeResponseValue = wasm.Sign_write(this_arg);
810 return decodeArray(nativeResponseValue);
812 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
813 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
814 public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
815 public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
816 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
817 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
818 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
819 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
820 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
821 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
822 // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
823 export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
824 if(!isWasmInitialized) {
825 throw new Error("initializeWasm() must be awaited first!");
827 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
828 return decodeArray(nativeResponseValue);
830 // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
831 export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
832 if(!isWasmInitialized) {
833 throw new Error("initializeWasm() must be awaited first!");
835 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
836 return nativeResponseValue;
838 public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
839 public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
840 public static class LDKCOption_u16Z {
841 private LDKCOption_u16Z() {}
842 export class Some extends LDKCOption_u16Z {
844 Some(number some) { this.some = some; }
846 export class None extends LDKCOption_u16Z {
849 static native void init();
851 static { LDKCOption_u16Z.init(); }
852 public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
853 public static class LDKAPIError {
854 private LDKAPIError() {}
855 export class APIMisuseError extends LDKAPIError {
857 APIMisuseError(String err) { this.err = err; }
859 export class FeeRateTooHigh extends LDKAPIError {
861 public number feerate;
862 FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
864 export class RouteError extends LDKAPIError {
866 RouteError(String err) { this.err = err; }
868 export class ChannelUnavailable extends LDKAPIError {
870 ChannelUnavailable(String err) { this.err = err; }
872 export class MonitorUpdateFailed extends LDKAPIError {
873 MonitorUpdateFailed() { }
875 export class IncompatibleShutdownScript extends LDKAPIError {
876 public number script;
877 IncompatibleShutdownScript(number script) { this.script = script; }
879 static native void init();
881 static { LDKAPIError.init(); }
882 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
883 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
884 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
885 public static native Uint8Array LDKCResult__u832APIErrorZ_get_ok(long arg);
886 public static native number LDKCResult__u832APIErrorZ_get_err(long arg);
887 public static class LDKPaymentSendFailure {
888 private LDKPaymentSendFailure() {}
889 export class ParameterError extends LDKPaymentSendFailure {
890 public number parameter_error;
891 ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
893 export class PathParameterError extends LDKPaymentSendFailure {
894 public number[] path_parameter_error;
895 PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
897 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
898 public number[] all_failed_retry_safe;
899 AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
901 export class PartialFailure extends LDKPaymentSendFailure {
902 public number[] results;
903 public number failed_paths_retry;
904 public Uint8Array payment_id;
905 PartialFailure(number[] results, number failed_paths_retry, Uint8Array payment_id) { this.results = results; this.failed_paths_retry = failed_paths_retry; this.payment_id = payment_id; }
907 static native void init();
909 static { LDKPaymentSendFailure.init(); }
910 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
911 public static native Uint8Array LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
912 public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
913 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
914 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
915 // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
916 export function C2Tuple_PaymentHashPaymentIdZ_get_a(tuple: number): Uint8Array {
917 if(!isWasmInitialized) {
918 throw new Error("initializeWasm() must be awaited first!");
920 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_a(tuple);
921 return decodeArray(nativeResponseValue);
923 // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
924 export function C2Tuple_PaymentHashPaymentIdZ_get_b(tuple: number): Uint8Array {
925 if(!isWasmInitialized) {
926 throw new Error("initializeWasm() must be awaited first!");
928 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_b(tuple);
929 return decodeArray(nativeResponseValue);
931 public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
932 public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
933 public static class LDKNetAddress {
934 private LDKNetAddress() {}
935 export class IPv4 extends LDKNetAddress {
936 public Uint8Array addr;
938 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
940 export class IPv6 extends LDKNetAddress {
941 public Uint8Array addr;
943 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
945 export class OnionV2 extends LDKNetAddress {
946 public Uint8Array addr;
948 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
950 export class OnionV3 extends LDKNetAddress {
951 public Uint8Array ed25519_pubkey;
952 public number checksum;
953 public number version;
955 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
957 static native void init();
959 static { LDKNetAddress.init(); }
960 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
961 // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
962 export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
963 if(!isWasmInitialized) {
964 throw new Error("initializeWasm() must be awaited first!");
966 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
967 return decodeArray(nativeResponseValue);
969 // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
970 export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
971 if(!isWasmInitialized) {
972 throw new Error("initializeWasm() must be awaited first!");
974 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
975 return decodeArray(nativeResponseValue);
977 public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
978 public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
982 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
984 export interface LDKWatch {
985 watch_channel (funding_txo: number, monitor: number): number;
986 update_channel (funding_txo: number, update: number): number;
987 release_pending_monitor_events (): number[];
990 export function LDKWatch_new(impl: LDKWatch): number {
991 throw new Error('unimplemented'); // TODO: bind to WASM
994 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
997 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
998 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
999 if(!isWasmInitialized) {
1000 throw new Error("initializeWasm() must be awaited first!");
1002 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
1003 return nativeResponseValue;
1005 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
1006 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
1007 if(!isWasmInitialized) {
1008 throw new Error("initializeWasm() must be awaited first!");
1010 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
1011 return nativeResponseValue;
1013 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
1014 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
1015 if(!isWasmInitialized) {
1016 throw new Error("initializeWasm() must be awaited first!");
1018 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
1019 return nativeResponseValue;
1024 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1026 export interface LDKBroadcasterInterface {
1027 broadcast_transaction (tx: Uint8Array): void;
1030 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
1031 throw new Error('unimplemented'); // TODO: bind to WASM
1034 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1037 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
1038 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
1039 if(!isWasmInitialized) {
1040 throw new Error("initializeWasm() must be awaited first!");
1042 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
1043 // debug statements here
1048 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1050 export interface LDKKeysInterface {
1051 get_node_secret (): Uint8Array;
1052 get_destination_script (): Uint8Array;
1053 get_shutdown_scriptpubkey (): number;
1054 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
1055 get_secure_random_bytes (): Uint8Array;
1056 read_chan_signer (reader: Uint8Array): number;
1057 sign_invoice (invoice_preimage: Uint8Array): number;
1060 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
1061 throw new Error('unimplemented'); // TODO: bind to WASM
1064 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1067 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
1068 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
1069 if(!isWasmInitialized) {
1070 throw new Error("initializeWasm() must be awaited first!");
1072 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
1073 return decodeArray(nativeResponseValue);
1075 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
1076 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
1077 if(!isWasmInitialized) {
1078 throw new Error("initializeWasm() must be awaited first!");
1080 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
1081 return decodeArray(nativeResponseValue);
1083 // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
1084 export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
1085 if(!isWasmInitialized) {
1086 throw new Error("initializeWasm() must be awaited first!");
1088 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
1089 return nativeResponseValue;
1091 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
1092 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
1093 if(!isWasmInitialized) {
1094 throw new Error("initializeWasm() must be awaited first!");
1096 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
1097 return nativeResponseValue;
1099 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1100 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1101 if(!isWasmInitialized) {
1102 throw new Error("initializeWasm() must be awaited first!");
1104 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1105 return decodeArray(nativeResponseValue);
1107 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1108 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1109 if(!isWasmInitialized) {
1110 throw new Error("initializeWasm() must be awaited first!");
1112 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1113 return nativeResponseValue;
1115 // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
1116 export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
1117 if(!isWasmInitialized) {
1118 throw new Error("initializeWasm() must be awaited first!");
1120 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
1121 return nativeResponseValue;
1126 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1128 export interface LDKFeeEstimator {
1129 get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
1132 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1133 throw new Error('unimplemented'); // TODO: bind to WASM
1136 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1139 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1140 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
1141 if(!isWasmInitialized) {
1142 throw new Error("initializeWasm() must be awaited first!");
1144 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1145 return nativeResponseValue;
1150 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1152 export interface LDKLogger {
1153 log (record: number): void;
1156 export function LDKLogger_new(impl: LDKLogger): number {
1157 throw new Error('unimplemented'); // TODO: bind to WASM
1160 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1163 // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1164 export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
1165 if(!isWasmInitialized) {
1166 throw new Error("initializeWasm() must be awaited first!");
1168 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
1169 return decodeArray(nativeResponseValue);
1171 // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1172 export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
1173 if(!isWasmInitialized) {
1174 throw new Error("initializeWasm() must be awaited first!");
1176 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
1177 return nativeResponseValue;
1179 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1180 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1181 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
1182 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
1183 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
1184 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1188 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1190 export interface LDKType {
1192 debug_str (): String;
1193 write (): Uint8Array;
1196 export function LDKType_new(impl: LDKType): number {
1197 throw new Error('unimplemented'); // TODO: bind to WASM
1200 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1203 // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1204 export function Type_type_id(this_arg: number): number {
1205 if(!isWasmInitialized) {
1206 throw new Error("initializeWasm() must be awaited first!");
1208 const nativeResponseValue = wasm.Type_type_id(this_arg);
1209 return nativeResponseValue;
1211 // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1212 export function Type_debug_str(this_arg: number): String {
1213 if(!isWasmInitialized) {
1214 throw new Error("initializeWasm() must be awaited first!");
1216 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1217 return nativeResponseValue;
1219 // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1220 export function Type_write(this_arg: number): Uint8Array {
1221 if(!isWasmInitialized) {
1222 throw new Error("initializeWasm() must be awaited first!");
1224 const nativeResponseValue = wasm.Type_write(this_arg);
1225 return decodeArray(nativeResponseValue);
1227 public static class LDKCOption_TypeZ {
1228 private LDKCOption_TypeZ() {}
1229 export class Some extends LDKCOption_TypeZ {
1231 Some(number some) { this.some = some; }
1233 export class None extends LDKCOption_TypeZ {
1236 static native void init();
1238 static { LDKCOption_TypeZ.init(); }
1239 public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1240 public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1241 public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1242 public static class LDKPaymentError {
1243 private LDKPaymentError() {}
1244 export class Invoice extends LDKPaymentError {
1245 public String invoice;
1246 Invoice(String invoice) { this.invoice = invoice; }
1248 export class Routing extends LDKPaymentError {
1249 public number routing;
1250 Routing(number routing) { this.routing = routing; }
1252 export class Sending extends LDKPaymentError {
1253 public number sending;
1254 Sending(number sending) { this.sending = sending; }
1256 static native void init();
1258 static { LDKPaymentError.init(); }
1259 public static native LDKPaymentError LDKPaymentError_ref_from_ptr(long ptr);
1260 public static native Uint8Array LDKCResult_PaymentIdPaymentErrorZ_get_ok(long arg);
1261 public static native number LDKCResult_PaymentIdPaymentErrorZ_get_err(long arg);
1262 public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1263 public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1264 public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1265 public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1266 public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1267 public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1268 // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1269 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
1270 if(!isWasmInitialized) {
1271 throw new Error("initializeWasm() must be awaited first!");
1273 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
1274 return nativeResponseValue;
1276 // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1277 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
1278 if(!isWasmInitialized) {
1279 throw new Error("initializeWasm() must be awaited first!");
1281 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
1282 return decodeArray(nativeResponseValue);
1284 // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1285 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
1286 if(!isWasmInitialized) {
1287 throw new Error("initializeWasm() must be awaited first!");
1289 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
1290 return nativeResponseValue;
1292 public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1293 public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1294 public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1295 public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1296 public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1297 public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1298 public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1299 public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1300 public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1301 public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1302 public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1303 public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1304 public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1305 public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1306 public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1307 public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1308 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1309 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1310 public static class LDKCOption_MonitorEventZ {
1311 private LDKCOption_MonitorEventZ() {}
1312 export class Some extends LDKCOption_MonitorEventZ {
1314 Some(number some) { this.some = some; }
1316 export class None extends LDKCOption_MonitorEventZ {
1319 static native void init();
1321 static { LDKCOption_MonitorEventZ.init(); }
1322 public static native LDKCOption_MonitorEventZ LDKCOption_MonitorEventZ_ref_from_ptr(long ptr);
1323 public static native number LDKCResult_COption_MonitorEventZDecodeErrorZ_get_ok(long arg);
1324 public static native number LDKCResult_COption_MonitorEventZDecodeErrorZ_get_err(long arg);
1325 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1326 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1327 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1328 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1329 // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1330 export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
1331 if(!isWasmInitialized) {
1332 throw new Error("initializeWasm() must be awaited first!");
1334 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
1335 return nativeResponseValue;
1337 // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1338 export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
1339 if(!isWasmInitialized) {
1340 throw new Error("initializeWasm() must be awaited first!");
1342 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
1343 return decodeArray(nativeResponseValue);
1345 // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1346 export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
1347 if(!isWasmInitialized) {
1348 throw new Error("initializeWasm() must be awaited first!");
1350 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
1351 return nativeResponseValue;
1353 // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1354 export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
1355 if(!isWasmInitialized) {
1356 throw new Error("initializeWasm() must be awaited first!");
1358 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
1359 return decodeArray(nativeResponseValue);
1361 // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1362 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
1363 if(!isWasmInitialized) {
1364 throw new Error("initializeWasm() must be awaited first!");
1366 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
1367 return decodeArray(nativeResponseValue);
1369 // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1370 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
1371 if(!isWasmInitialized) {
1372 throw new Error("initializeWasm() must be awaited first!");
1374 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
1375 return nativeResponseValue;
1377 // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1378 export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
1379 if(!isWasmInitialized) {
1380 throw new Error("initializeWasm() must be awaited first!");
1382 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
1383 return nativeResponseValue;
1385 // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1386 export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
1387 if(!isWasmInitialized) {
1388 throw new Error("initializeWasm() must be awaited first!");
1390 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
1391 return nativeResponseValue;
1393 // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1394 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
1395 if(!isWasmInitialized) {
1396 throw new Error("initializeWasm() must be awaited first!");
1398 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
1399 return decodeArray(nativeResponseValue);
1401 // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1402 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
1403 if(!isWasmInitialized) {
1404 throw new Error("initializeWasm() must be awaited first!");
1406 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
1407 return nativeResponseValue;
1409 public static class LDKBalance {
1410 private LDKBalance() {}
1411 export class ClaimableOnChannelClose extends LDKBalance {
1412 public number claimable_amount_satoshis;
1413 ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1415 export class ClaimableAwaitingConfirmations extends LDKBalance {
1416 public number claimable_amount_satoshis;
1417 public number confirmation_height;
1418 ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1420 export class ContentiousClaimable extends LDKBalance {
1421 public number claimable_amount_satoshis;
1422 public number timeout_height;
1423 ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1425 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1426 public number claimable_amount_satoshis;
1427 public number claimable_height;
1428 MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1430 static native void init();
1432 static { LDKBalance.init(); }
1433 public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1434 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1435 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1436 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1437 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1438 // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1439 export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
1440 if(!isWasmInitialized) {
1441 throw new Error("initializeWasm() must be awaited first!");
1443 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
1444 return decodeArray(nativeResponseValue);
1446 // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1447 export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
1448 if(!isWasmInitialized) {
1449 throw new Error("initializeWasm() must be awaited first!");
1451 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
1452 return nativeResponseValue;
1454 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1455 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1456 // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1457 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
1458 if(!isWasmInitialized) {
1459 throw new Error("initializeWasm() must be awaited first!");
1461 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
1462 return nativeResponseValue;
1464 // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1465 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
1466 if(!isWasmInitialized) {
1467 throw new Error("initializeWasm() must be awaited first!");
1469 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
1470 return nativeResponseValue;
1472 // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1473 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
1474 if(!isWasmInitialized) {
1475 throw new Error("initializeWasm() must be awaited first!");
1477 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
1478 return nativeResponseValue;
1480 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1481 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1482 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1483 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1484 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1485 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1486 public static native number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
1487 public static native number LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
1488 public static native number LDKCResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(long arg);
1489 public static native number LDKCResult_COption_NetworkUpdateZDecodeErrorZ_get_err(long arg);
1493 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1495 export interface LDKAccess {
1496 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1499 export function LDKAccess_new(impl: LDKAccess): number {
1500 throw new Error('unimplemented'); // TODO: bind to WASM
1503 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1506 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1507 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1508 if(!isWasmInitialized) {
1509 throw new Error("initializeWasm() must be awaited first!");
1511 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1512 return nativeResponseValue;
1514 public static class LDKCOption_AccessZ {
1515 private LDKCOption_AccessZ() {}
1516 export class Some extends LDKCOption_AccessZ {
1518 Some(number some) { this.some = some; }
1520 export class None extends LDKCOption_AccessZ {
1523 static native void init();
1525 static { LDKCOption_AccessZ.init(); }
1526 public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1527 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1528 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1529 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1530 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1531 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1532 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1533 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1534 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1535 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1536 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1537 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1538 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1539 public static class LDKCOption_CVec_NetAddressZZ {
1540 private LDKCOption_CVec_NetAddressZZ() {}
1541 export class Some extends LDKCOption_CVec_NetAddressZZ {
1542 public number[] some;
1543 Some(number[] some) { this.some = some; }
1545 export class None extends LDKCOption_CVec_NetAddressZZ {
1548 static native void init();
1550 static { LDKCOption_CVec_NetAddressZZ.init(); }
1551 public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1552 public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1553 public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1554 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1555 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1556 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1557 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1558 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1559 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1560 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1561 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1562 public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1563 public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1564 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1565 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1566 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1567 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1568 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1569 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1570 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1571 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1572 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1573 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1574 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1575 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1576 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1577 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1578 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1579 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1580 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1581 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1582 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1583 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1584 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1585 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1586 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1587 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1588 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1589 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1590 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1591 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1592 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1593 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1594 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1595 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1596 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1597 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1598 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1599 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1600 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1601 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1602 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1603 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1604 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1605 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1606 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1607 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1608 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1609 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1610 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1611 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1612 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1613 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1614 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1615 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1616 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1617 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1618 public static class LDKSignOrCreationError {
1619 private LDKSignOrCreationError() {}
1620 export class SignError extends LDKSignOrCreationError {
1623 export class CreationError extends LDKSignOrCreationError {
1624 public CreationError creation_error;
1625 CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1627 static native void init();
1629 static { LDKSignOrCreationError.init(); }
1630 public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1631 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1632 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1636 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1638 export interface LDKFilter {
1639 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1640 register_output (output: number): number;
1643 export function LDKFilter_new(impl: LDKFilter): number {
1644 throw new Error('unimplemented'); // TODO: bind to WASM
1647 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1650 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1651 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1652 if(!isWasmInitialized) {
1653 throw new Error("initializeWasm() must be awaited first!");
1655 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1656 // debug statements here
1658 // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1659 export function Filter_register_output(this_arg: number, output: number): number {
1660 if(!isWasmInitialized) {
1661 throw new Error("initializeWasm() must be awaited first!");
1663 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1664 return nativeResponseValue;
1666 public static class LDKCOption_FilterZ {
1667 private LDKCOption_FilterZ() {}
1668 export class Some extends LDKCOption_FilterZ {
1670 Some(number some) { this.some = some; }
1672 export class None extends LDKCOption_FilterZ {
1675 static native void init();
1677 static { LDKCOption_FilterZ.init(); }
1678 public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1679 public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
1680 public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
1684 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1686 export interface LDKMessageSendEventsProvider {
1687 get_and_clear_pending_msg_events (): number[];
1690 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1691 throw new Error('unimplemented'); // TODO: bind to WASM
1694 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1697 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1698 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1699 if(!isWasmInitialized) {
1700 throw new Error("initializeWasm() must be awaited first!");
1702 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1703 return nativeResponseValue;
1708 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1710 export interface LDKEventHandler {
1711 handle_event (event: number): void;
1714 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1715 throw new Error('unimplemented'); // TODO: bind to WASM
1718 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1721 // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1722 export function EventHandler_handle_event(this_arg: number, event: number): void {
1723 if(!isWasmInitialized) {
1724 throw new Error("initializeWasm() must be awaited first!");
1726 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1727 // debug statements here
1732 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1734 export interface LDKEventsProvider {
1735 process_pending_events (handler: number): void;
1738 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1739 throw new Error('unimplemented'); // TODO: bind to WASM
1742 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1745 // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1746 export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1747 if(!isWasmInitialized) {
1748 throw new Error("initializeWasm() must be awaited first!");
1750 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1751 // debug statements here
1756 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1758 export interface LDKListen {
1759 block_connected (block: Uint8Array, height: number): void;
1760 block_disconnected (header: Uint8Array, height: number): void;
1763 export function LDKListen_new(impl: LDKListen): number {
1764 throw new Error('unimplemented'); // TODO: bind to WASM
1767 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1770 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1771 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1772 if(!isWasmInitialized) {
1773 throw new Error("initializeWasm() must be awaited first!");
1775 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1776 // debug statements here
1778 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1779 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1780 if(!isWasmInitialized) {
1781 throw new Error("initializeWasm() must be awaited first!");
1783 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1784 // debug statements here
1789 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1791 export interface LDKConfirm {
1792 transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1793 transaction_unconfirmed (txid: Uint8Array): void;
1794 best_block_updated (header: Uint8Array, height: number): void;
1795 get_relevant_txids (): Uint8Array[];
1798 export function LDKConfirm_new(impl: LDKConfirm): number {
1799 throw new Error('unimplemented'); // TODO: bind to WASM
1802 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1805 // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1806 export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1807 if(!isWasmInitialized) {
1808 throw new Error("initializeWasm() must be awaited first!");
1810 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1811 // debug statements here
1813 // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1814 export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1815 if(!isWasmInitialized) {
1816 throw new Error("initializeWasm() must be awaited first!");
1818 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1819 // debug statements here
1821 // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1822 export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1823 if(!isWasmInitialized) {
1824 throw new Error("initializeWasm() must be awaited first!");
1826 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1827 // debug statements here
1829 // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1830 export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1831 if(!isWasmInitialized) {
1832 throw new Error("initializeWasm() must be awaited first!");
1834 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1835 return nativeResponseValue;
1840 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1842 export interface LDKPersist {
1843 persist_new_channel (channel_id: number, data: number, update_id: number): number;
1844 update_persisted_channel (channel_id: number, update: number, data: number, update_id: number): number;
1847 export function LDKPersist_new(impl: LDKPersist): number {
1848 throw new Error('unimplemented'); // TODO: bind to WASM
1851 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1854 // 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
1855 export function Persist_persist_new_channel(this_arg: number, channel_id: number, data: number, update_id: number): number {
1856 if(!isWasmInitialized) {
1857 throw new Error("initializeWasm() must be awaited first!");
1859 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, channel_id, data, update_id);
1860 return nativeResponseValue;
1862 // 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
1863 export function Persist_update_persisted_channel(this_arg: number, channel_id: number, update: number, data: number, update_id: number): number {
1864 if(!isWasmInitialized) {
1865 throw new Error("initializeWasm() must be awaited first!");
1867 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, channel_id, update, data, update_id);
1868 return nativeResponseValue;
1873 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1875 export interface LDKChannelMessageHandler {
1876 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1877 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1878 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1879 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1880 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1881 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1882 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1883 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1884 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1885 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1886 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1887 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1888 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1889 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1890 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1891 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1892 peer_connected (their_node_id: Uint8Array, msg: number): void;
1893 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1894 handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1895 handle_error (their_node_id: Uint8Array, msg: number): void;
1898 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1899 throw new Error('unimplemented'); // TODO: bind to WASM
1902 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1905 // 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
1906 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1907 if(!isWasmInitialized) {
1908 throw new Error("initializeWasm() must be awaited first!");
1910 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1911 // debug statements here
1913 // 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
1914 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1915 if(!isWasmInitialized) {
1916 throw new Error("initializeWasm() must be awaited first!");
1918 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1919 // debug statements here
1921 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1922 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1923 if(!isWasmInitialized) {
1924 throw new Error("initializeWasm() must be awaited first!");
1926 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1927 // debug statements here
1929 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1930 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1931 if(!isWasmInitialized) {
1932 throw new Error("initializeWasm() must be awaited first!");
1934 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1935 // debug statements here
1937 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1938 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1939 if(!isWasmInitialized) {
1940 throw new Error("initializeWasm() must be awaited first!");
1942 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1943 // debug statements here
1945 // 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
1946 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1947 if(!isWasmInitialized) {
1948 throw new Error("initializeWasm() must be awaited first!");
1950 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1951 // debug statements here
1953 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1954 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1955 if(!isWasmInitialized) {
1956 throw new Error("initializeWasm() must be awaited first!");
1958 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1959 // debug statements here
1961 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1962 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1963 if(!isWasmInitialized) {
1964 throw new Error("initializeWasm() must be awaited first!");
1966 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1967 // debug statements here
1969 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1970 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1971 if(!isWasmInitialized) {
1972 throw new Error("initializeWasm() must be awaited first!");
1974 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1975 // debug statements here
1977 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1978 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1979 if(!isWasmInitialized) {
1980 throw new Error("initializeWasm() must be awaited first!");
1982 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1983 // debug statements here
1985 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1986 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1987 if(!isWasmInitialized) {
1988 throw new Error("initializeWasm() must be awaited first!");
1990 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1991 // debug statements here
1993 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1994 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1995 if(!isWasmInitialized) {
1996 throw new Error("initializeWasm() must be awaited first!");
1998 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1999 // debug statements here
2001 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
2002 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2003 if(!isWasmInitialized) {
2004 throw new Error("initializeWasm() must be awaited first!");
2006 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
2007 // debug statements here
2009 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
2010 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2011 if(!isWasmInitialized) {
2012 throw new Error("initializeWasm() must be awaited first!");
2014 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
2015 // debug statements here
2017 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
2018 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2019 if(!isWasmInitialized) {
2020 throw new Error("initializeWasm() must be awaited first!");
2022 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
2023 // debug statements here
2025 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
2026 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
2027 if(!isWasmInitialized) {
2028 throw new Error("initializeWasm() must be awaited first!");
2030 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
2031 // debug statements here
2033 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
2034 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2035 if(!isWasmInitialized) {
2036 throw new Error("initializeWasm() must be awaited first!");
2038 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
2039 // debug statements here
2041 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
2042 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2043 if(!isWasmInitialized) {
2044 throw new Error("initializeWasm() must be awaited first!");
2046 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
2047 // debug statements here
2049 // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
2050 export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2051 if(!isWasmInitialized) {
2052 throw new Error("initializeWasm() must be awaited first!");
2054 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
2055 // debug statements here
2057 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
2058 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2059 if(!isWasmInitialized) {
2060 throw new Error("initializeWasm() must be awaited first!");
2062 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
2063 // debug statements here
2068 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2070 export interface LDKRoutingMessageHandler {
2071 handle_node_announcement (msg: number): number;
2072 handle_channel_announcement (msg: number): number;
2073 handle_channel_update (msg: number): number;
2074 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
2075 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
2076 sync_routing_table (their_node_id: Uint8Array, init: number): void;
2077 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
2078 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
2079 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
2080 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
2083 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2084 throw new Error('unimplemented'); // TODO: bind to WASM
2087 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2090 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
2091 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
2092 if(!isWasmInitialized) {
2093 throw new Error("initializeWasm() must be awaited first!");
2095 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
2096 return nativeResponseValue;
2098 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
2099 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
2100 if(!isWasmInitialized) {
2101 throw new Error("initializeWasm() must be awaited first!");
2103 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
2104 return nativeResponseValue;
2106 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
2107 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
2108 if(!isWasmInitialized) {
2109 throw new Error("initializeWasm() must be awaited first!");
2111 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
2112 return nativeResponseValue;
2114 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
2115 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
2116 if(!isWasmInitialized) {
2117 throw new Error("initializeWasm() must be awaited first!");
2119 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
2120 return nativeResponseValue;
2122 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
2123 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
2124 if(!isWasmInitialized) {
2125 throw new Error("initializeWasm() must be awaited first!");
2127 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
2128 return nativeResponseValue;
2130 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
2131 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
2132 if(!isWasmInitialized) {
2133 throw new Error("initializeWasm() must be awaited first!");
2135 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
2136 // debug statements here
2138 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
2139 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2140 if(!isWasmInitialized) {
2141 throw new Error("initializeWasm() must be awaited first!");
2143 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
2144 return nativeResponseValue;
2146 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
2147 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2148 if(!isWasmInitialized) {
2149 throw new Error("initializeWasm() must be awaited first!");
2151 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
2152 return nativeResponseValue;
2154 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
2155 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2156 if(!isWasmInitialized) {
2157 throw new Error("initializeWasm() must be awaited first!");
2159 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
2160 return nativeResponseValue;
2162 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
2163 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2164 if(!isWasmInitialized) {
2165 throw new Error("initializeWasm() must be awaited first!");
2167 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
2168 return nativeResponseValue;
2173 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2175 export interface LDKCustomMessageReader {
2176 read (message_type: number, buffer: Uint8Array): number;
2179 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
2180 throw new Error('unimplemented'); // TODO: bind to WASM
2183 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2186 // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2187 export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2188 if(!isWasmInitialized) {
2189 throw new Error("initializeWasm() must be awaited first!");
2191 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2192 return nativeResponseValue;
2197 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2199 export interface LDKCustomMessageHandler {
2200 handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2201 get_and_clear_pending_msg (): number[];
2204 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2205 throw new Error('unimplemented'); // TODO: bind to WASM
2208 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2211 // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2212 export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2213 if(!isWasmInitialized) {
2214 throw new Error("initializeWasm() must be awaited first!");
2216 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2217 return nativeResponseValue;
2219 // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2220 export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2221 if(!isWasmInitialized) {
2222 throw new Error("initializeWasm() must be awaited first!");
2224 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2225 return nativeResponseValue;
2230 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2232 export interface LDKSocketDescriptor {
2233 send_data (data: Uint8Array, resume_read: boolean): number;
2234 disconnect_socket (): void;
2235 eq (other_arg: number): boolean;
2239 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2240 throw new Error('unimplemented'); // TODO: bind to WASM
2243 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2246 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2247 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2248 if(!isWasmInitialized) {
2249 throw new Error("initializeWasm() must be awaited first!");
2251 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2252 return nativeResponseValue;
2254 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2255 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2256 if(!isWasmInitialized) {
2257 throw new Error("initializeWasm() must be awaited first!");
2259 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2260 // debug statements here
2262 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2263 export function SocketDescriptor_hash(this_arg: number): number {
2264 if(!isWasmInitialized) {
2265 throw new Error("initializeWasm() must be awaited first!");
2267 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2268 return nativeResponseValue;
2273 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2275 export interface LDKScore {
2276 channel_penalty_msat (short_channel_id: number, source: number, target: number): number;
2277 payment_path_failed (path: number[], short_channel_id: number): void;
2278 write (): Uint8Array;
2281 export function LDKScore_new(impl: LDKScore): number {
2282 throw new Error('unimplemented'); // TODO: bind to WASM
2285 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2288 // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
2289 export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number, source: number, target: number): number {
2290 if(!isWasmInitialized) {
2291 throw new Error("initializeWasm() must be awaited first!");
2293 const nativeResponseValue = wasm.Score_channel_penalty_msat(this_arg, short_channel_id, source, target);
2294 return nativeResponseValue;
2296 // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
2297 export function Score_payment_path_failed(this_arg: number, path: number[], short_channel_id: number): void {
2298 if(!isWasmInitialized) {
2299 throw new Error("initializeWasm() must be awaited first!");
2301 const nativeResponseValue = wasm.Score_payment_path_failed(this_arg, path, short_channel_id);
2302 // debug statements here
2304 // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
2305 export function Score_write(this_arg: number): Uint8Array {
2306 if(!isWasmInitialized) {
2307 throw new Error("initializeWasm() must be awaited first!");
2309 const nativeResponseValue = wasm.Score_write(this_arg);
2310 return decodeArray(nativeResponseValue);
2315 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2317 export interface LDKChannelManagerPersister {
2318 persist_manager (channel_manager: number): number;
2321 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2322 throw new Error('unimplemented'); // TODO: bind to WASM
2325 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2328 // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2329 export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2330 if(!isWasmInitialized) {
2331 throw new Error("initializeWasm() must be awaited first!");
2333 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2334 return nativeResponseValue;
2336 public static class LDKFallback {
2337 private LDKFallback() {}
2338 export class SegWitProgram extends LDKFallback {
2339 public number version;
2340 public Uint8Array program;
2341 SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2343 export class PubKeyHash extends LDKFallback {
2344 public Uint8Array pub_key_hash;
2345 PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2347 export class ScriptHash extends LDKFallback {
2348 public Uint8Array script_hash;
2349 ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2351 static native void init();
2353 static { LDKFallback.init(); }
2354 public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2358 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2360 export interface LDKPayer {
2361 node_id (): Uint8Array;
2362 first_hops (): number[];
2363 send_payment (route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number;
2364 retry_payment (route: number, payment_id: Uint8Array): number;
2367 export function LDKPayer_new(impl: LDKPayer): number {
2368 throw new Error('unimplemented'); // TODO: bind to WASM
2371 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2374 // LDKPublicKey Payer_node_id LDKPayer *NONNULL_PTR this_arg
2375 export function Payer_node_id(this_arg: number): Uint8Array {
2376 if(!isWasmInitialized) {
2377 throw new Error("initializeWasm() must be awaited first!");
2379 const nativeResponseValue = wasm.Payer_node_id(this_arg);
2380 return decodeArray(nativeResponseValue);
2382 // LDKCVec_ChannelDetailsZ Payer_first_hops LDKPayer *NONNULL_PTR this_arg
2383 export function Payer_first_hops(this_arg: number): number[] {
2384 if(!isWasmInitialized) {
2385 throw new Error("initializeWasm() must be awaited first!");
2387 const nativeResponseValue = wasm.Payer_first_hops(this_arg);
2388 return nativeResponseValue;
2390 // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret
2391 export function Payer_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
2392 if(!isWasmInitialized) {
2393 throw new Error("initializeWasm() must be awaited first!");
2395 const nativeResponseValue = wasm.Payer_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
2396 return nativeResponseValue;
2398 // LDKCResult_NonePaymentSendFailureZ Payer_retry_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id
2399 export function Payer_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
2400 if(!isWasmInitialized) {
2401 throw new Error("initializeWasm() must be awaited first!");
2403 const nativeResponseValue = wasm.Payer_retry_payment(this_arg, route, encodeArray(payment_id));
2404 return nativeResponseValue;
2409 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2411 export interface LDKRouter {
2412 find_route (payer: Uint8Array, params: number, first_hops: number[], scorer: number): number;
2415 export function LDKRouter_new(impl: LDKRouter): number {
2416 throw new Error('unimplemented'); // TODO: bind to WASM
2419 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2422 // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR params, struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
2423 export function Router_find_route(this_arg: number, payer: Uint8Array, params: number, first_hops: number[], scorer: number): number {
2424 if(!isWasmInitialized) {
2425 throw new Error("initializeWasm() must be awaited first!");
2427 const nativeResponseValue = wasm.Router_find_route(this_arg, encodeArray(payer), params, first_hops, scorer);
2428 return nativeResponseValue;
2430 // struct LDKStr _ldk_get_compiled_version(void);
2431 export function _ldk_get_compiled_version(): String {
2432 if(!isWasmInitialized) {
2433 throw new Error("initializeWasm() must be awaited first!");
2435 const nativeResponseValue = wasm._ldk_get_compiled_version();
2436 return nativeResponseValue;
2438 // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2439 export function _ldk_c_bindings_get_compiled_version(): String {
2440 if(!isWasmInitialized) {
2441 throw new Error("initializeWasm() must be awaited first!");
2443 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2444 return nativeResponseValue;
2446 // void Transaction_free(struct LDKTransaction _res);
2447 export function Transaction_free(_res: Uint8Array): void {
2448 if(!isWasmInitialized) {
2449 throw new Error("initializeWasm() must be awaited first!");
2451 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2452 // debug statements here
2454 // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2455 export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2456 if(!isWasmInitialized) {
2457 throw new Error("initializeWasm() must be awaited first!");
2459 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2460 return nativeResponseValue;
2462 // void TxOut_free(struct LDKTxOut _res);
2463 export function TxOut_free(_res: number): void {
2464 if(!isWasmInitialized) {
2465 throw new Error("initializeWasm() must be awaited first!");
2467 const nativeResponseValue = wasm.TxOut_free(_res);
2468 // debug statements here
2470 // uint64_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
2471 export function TxOut_clone_ptr(arg: number): number {
2472 if(!isWasmInitialized) {
2473 throw new Error("initializeWasm() must be awaited first!");
2475 const nativeResponseValue = wasm.TxOut_clone_ptr(arg);
2476 return nativeResponseValue;
2478 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2479 export function TxOut_clone(orig: number): number {
2480 if(!isWasmInitialized) {
2481 throw new Error("initializeWasm() must be awaited first!");
2483 const nativeResponseValue = wasm.TxOut_clone(orig);
2484 return nativeResponseValue;
2486 // void Str_free(struct LDKStr _res);
2487 export function Str_free(_res: String): void {
2488 if(!isWasmInitialized) {
2489 throw new Error("initializeWasm() must be awaited first!");
2491 const nativeResponseValue = wasm.Str_free(_res);
2492 // debug statements here
2494 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2495 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2496 if(!isWasmInitialized) {
2497 throw new Error("initializeWasm() must be awaited first!");
2499 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2500 return nativeResponseValue;
2502 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2503 export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2504 if(!isWasmInitialized) {
2505 throw new Error("initializeWasm() must be awaited first!");
2507 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2508 return nativeResponseValue;
2510 // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
2511 export function CResult_SecretKeyErrorZ_is_ok(o: number): boolean {
2512 if(!isWasmInitialized) {
2513 throw new Error("initializeWasm() must be awaited first!");
2515 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_is_ok(o);
2516 return nativeResponseValue;
2518 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2519 export function CResult_SecretKeyErrorZ_free(_res: number): void {
2520 if(!isWasmInitialized) {
2521 throw new Error("initializeWasm() must be awaited first!");
2523 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2524 // debug statements here
2526 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2527 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2528 if(!isWasmInitialized) {
2529 throw new Error("initializeWasm() must be awaited first!");
2531 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2532 return nativeResponseValue;
2534 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2535 export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2536 if(!isWasmInitialized) {
2537 throw new Error("initializeWasm() must be awaited first!");
2539 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2540 return nativeResponseValue;
2542 // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
2543 export function CResult_PublicKeyErrorZ_is_ok(o: number): boolean {
2544 if(!isWasmInitialized) {
2545 throw new Error("initializeWasm() must be awaited first!");
2547 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_is_ok(o);
2548 return nativeResponseValue;
2550 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2551 export function CResult_PublicKeyErrorZ_free(_res: number): void {
2552 if(!isWasmInitialized) {
2553 throw new Error("initializeWasm() must be awaited first!");
2555 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2556 // debug statements here
2558 // uint64_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
2559 export function CResult_PublicKeyErrorZ_clone_ptr(arg: number): number {
2560 if(!isWasmInitialized) {
2561 throw new Error("initializeWasm() must be awaited first!");
2563 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone_ptr(arg);
2564 return nativeResponseValue;
2566 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2567 export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2568 if(!isWasmInitialized) {
2569 throw new Error("initializeWasm() must be awaited first!");
2571 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2572 return nativeResponseValue;
2574 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2575 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2576 if(!isWasmInitialized) {
2577 throw new Error("initializeWasm() must be awaited first!");
2579 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2580 return nativeResponseValue;
2582 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2583 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2584 if(!isWasmInitialized) {
2585 throw new Error("initializeWasm() must be awaited first!");
2587 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2588 return nativeResponseValue;
2590 // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
2591 export function CResult_TxCreationKeysDecodeErrorZ_is_ok(o: number): boolean {
2592 if(!isWasmInitialized) {
2593 throw new Error("initializeWasm() must be awaited first!");
2595 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_is_ok(o);
2596 return nativeResponseValue;
2598 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2599 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2600 if(!isWasmInitialized) {
2601 throw new Error("initializeWasm() must be awaited first!");
2603 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2604 // debug statements here
2606 // uint64_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
2607 export function CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg: number): number {
2608 if(!isWasmInitialized) {
2609 throw new Error("initializeWasm() must be awaited first!");
2611 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone_ptr(arg);
2612 return nativeResponseValue;
2614 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2615 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2616 if(!isWasmInitialized) {
2617 throw new Error("initializeWasm() must be awaited first!");
2619 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2620 return nativeResponseValue;
2622 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2623 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2624 if(!isWasmInitialized) {
2625 throw new Error("initializeWasm() must be awaited first!");
2627 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2628 return nativeResponseValue;
2630 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2631 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2632 if(!isWasmInitialized) {
2633 throw new Error("initializeWasm() must be awaited first!");
2635 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2636 return nativeResponseValue;
2638 // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
2639 export function CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o: number): boolean {
2640 if(!isWasmInitialized) {
2641 throw new Error("initializeWasm() must be awaited first!");
2643 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_is_ok(o);
2644 return nativeResponseValue;
2646 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2647 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2648 if(!isWasmInitialized) {
2649 throw new Error("initializeWasm() must be awaited first!");
2651 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2652 // debug statements here
2654 // uint64_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
2655 export function CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg: number): number {
2656 if(!isWasmInitialized) {
2657 throw new Error("initializeWasm() must be awaited first!");
2659 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(arg);
2660 return nativeResponseValue;
2662 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2663 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2664 if(!isWasmInitialized) {
2665 throw new Error("initializeWasm() must be awaited first!");
2667 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2668 return nativeResponseValue;
2670 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2671 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2672 if(!isWasmInitialized) {
2673 throw new Error("initializeWasm() must be awaited first!");
2675 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2676 return nativeResponseValue;
2678 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2679 export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2680 if(!isWasmInitialized) {
2681 throw new Error("initializeWasm() must be awaited first!");
2683 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2684 return nativeResponseValue;
2686 // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
2687 export function CResult_TxCreationKeysErrorZ_is_ok(o: number): boolean {
2688 if(!isWasmInitialized) {
2689 throw new Error("initializeWasm() must be awaited first!");
2691 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_is_ok(o);
2692 return nativeResponseValue;
2694 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2695 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2696 if(!isWasmInitialized) {
2697 throw new Error("initializeWasm() must be awaited first!");
2699 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2700 // debug statements here
2702 // uint64_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
2703 export function CResult_TxCreationKeysErrorZ_clone_ptr(arg: number): number {
2704 if(!isWasmInitialized) {
2705 throw new Error("initializeWasm() must be awaited first!");
2707 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone_ptr(arg);
2708 return nativeResponseValue;
2710 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2711 export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2712 if(!isWasmInitialized) {
2713 throw new Error("initializeWasm() must be awaited first!");
2715 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2716 return nativeResponseValue;
2718 // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2719 export function COption_u32Z_some(o: number): number {
2720 if(!isWasmInitialized) {
2721 throw new Error("initializeWasm() must be awaited first!");
2723 const nativeResponseValue = wasm.COption_u32Z_some(o);
2724 return nativeResponseValue;
2726 // struct LDKCOption_u32Z COption_u32Z_none(void);
2727 export function COption_u32Z_none(): number {
2728 if(!isWasmInitialized) {
2729 throw new Error("initializeWasm() must be awaited first!");
2731 const nativeResponseValue = wasm.COption_u32Z_none();
2732 return nativeResponseValue;
2734 // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2735 export function COption_u32Z_free(_res: number): void {
2736 if(!isWasmInitialized) {
2737 throw new Error("initializeWasm() must be awaited first!");
2739 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2740 // debug statements here
2742 // uint64_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
2743 export function COption_u32Z_clone_ptr(arg: number): number {
2744 if(!isWasmInitialized) {
2745 throw new Error("initializeWasm() must be awaited first!");
2747 const nativeResponseValue = wasm.COption_u32Z_clone_ptr(arg);
2748 return nativeResponseValue;
2750 // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2751 export function COption_u32Z_clone(orig: number): number {
2752 if(!isWasmInitialized) {
2753 throw new Error("initializeWasm() must be awaited first!");
2755 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2756 return nativeResponseValue;
2758 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2759 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2760 if(!isWasmInitialized) {
2761 throw new Error("initializeWasm() must be awaited first!");
2763 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2764 return nativeResponseValue;
2766 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2767 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2768 if(!isWasmInitialized) {
2769 throw new Error("initializeWasm() must be awaited first!");
2771 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2772 return nativeResponseValue;
2774 // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
2775 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o: number): boolean {
2776 if(!isWasmInitialized) {
2777 throw new Error("initializeWasm() must be awaited first!");
2779 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(o);
2780 return nativeResponseValue;
2782 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2783 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2784 if(!isWasmInitialized) {
2785 throw new Error("initializeWasm() must be awaited first!");
2787 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2788 // debug statements here
2790 // uint64_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
2791 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg: number): number {
2792 if(!isWasmInitialized) {
2793 throw new Error("initializeWasm() must be awaited first!");
2795 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(arg);
2796 return nativeResponseValue;
2798 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2799 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2800 if(!isWasmInitialized) {
2801 throw new Error("initializeWasm() must be awaited first!");
2803 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2804 return nativeResponseValue;
2806 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2807 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2808 if(!isWasmInitialized) {
2809 throw new Error("initializeWasm() must be awaited first!");
2811 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2812 return nativeResponseValue;
2814 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2815 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2816 if(!isWasmInitialized) {
2817 throw new Error("initializeWasm() must be awaited first!");
2819 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2820 return nativeResponseValue;
2822 // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
2823 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
2824 if(!isWasmInitialized) {
2825 throw new Error("initializeWasm() must be awaited first!");
2827 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(o);
2828 return nativeResponseValue;
2830 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2831 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2832 if(!isWasmInitialized) {
2833 throw new Error("initializeWasm() must be awaited first!");
2835 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2836 // debug statements here
2838 // uint64_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
2839 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
2840 if(!isWasmInitialized) {
2841 throw new Error("initializeWasm() must be awaited first!");
2843 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
2844 return nativeResponseValue;
2846 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2847 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2848 if(!isWasmInitialized) {
2849 throw new Error("initializeWasm() must be awaited first!");
2851 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2852 return nativeResponseValue;
2854 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2855 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2856 if(!isWasmInitialized) {
2857 throw new Error("initializeWasm() must be awaited first!");
2859 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2860 return nativeResponseValue;
2862 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2863 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2864 if(!isWasmInitialized) {
2865 throw new Error("initializeWasm() must be awaited first!");
2867 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2868 return nativeResponseValue;
2870 // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
2871 export function CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o: number): boolean {
2872 if(!isWasmInitialized) {
2873 throw new Error("initializeWasm() must be awaited first!");
2875 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(o);
2876 return nativeResponseValue;
2878 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2879 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2880 if(!isWasmInitialized) {
2881 throw new Error("initializeWasm() must be awaited first!");
2883 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2884 // debug statements here
2886 // uint64_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
2887 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg: number): number {
2888 if(!isWasmInitialized) {
2889 throw new Error("initializeWasm() must be awaited first!");
2891 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(arg);
2892 return nativeResponseValue;
2894 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2895 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2896 if(!isWasmInitialized) {
2897 throw new Error("initializeWasm() must be awaited first!");
2899 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2900 return nativeResponseValue;
2902 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2903 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2904 if(!isWasmInitialized) {
2905 throw new Error("initializeWasm() must be awaited first!");
2907 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2908 // debug statements here
2910 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2911 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2912 if(!isWasmInitialized) {
2913 throw new Error("initializeWasm() must be awaited first!");
2915 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2916 return nativeResponseValue;
2918 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2919 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2920 if(!isWasmInitialized) {
2921 throw new Error("initializeWasm() must be awaited first!");
2923 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2924 return nativeResponseValue;
2926 // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
2927 export function CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
2928 if(!isWasmInitialized) {
2929 throw new Error("initializeWasm() must be awaited first!");
2931 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(o);
2932 return nativeResponseValue;
2934 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2935 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2936 if(!isWasmInitialized) {
2937 throw new Error("initializeWasm() must be awaited first!");
2939 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2940 // debug statements here
2942 // uint64_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
2943 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
2944 if(!isWasmInitialized) {
2945 throw new Error("initializeWasm() must be awaited first!");
2947 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
2948 return nativeResponseValue;
2950 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2951 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2952 if(!isWasmInitialized) {
2953 throw new Error("initializeWasm() must be awaited first!");
2955 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2956 return nativeResponseValue;
2958 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2959 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2960 if(!isWasmInitialized) {
2961 throw new Error("initializeWasm() must be awaited first!");
2963 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2964 return nativeResponseValue;
2966 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2967 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2968 if(!isWasmInitialized) {
2969 throw new Error("initializeWasm() must be awaited first!");
2971 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2972 return nativeResponseValue;
2974 // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
2975 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
2976 if(!isWasmInitialized) {
2977 throw new Error("initializeWasm() must be awaited first!");
2979 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(o);
2980 return nativeResponseValue;
2982 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2983 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2984 if(!isWasmInitialized) {
2985 throw new Error("initializeWasm() must be awaited first!");
2987 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2988 // debug statements here
2990 // uint64_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
2991 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
2992 if(!isWasmInitialized) {
2993 throw new Error("initializeWasm() must be awaited first!");
2995 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(arg);
2996 return nativeResponseValue;
2998 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2999 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
3000 if(!isWasmInitialized) {
3001 throw new Error("initializeWasm() must be awaited first!");
3003 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
3004 return nativeResponseValue;
3006 // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
3007 export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
3008 if(!isWasmInitialized) {
3009 throw new Error("initializeWasm() must be awaited first!");
3011 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
3012 return nativeResponseValue;
3014 // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
3015 export function CResult_TrustedClosingTransactionNoneZ_err(): number {
3016 if(!isWasmInitialized) {
3017 throw new Error("initializeWasm() must be awaited first!");
3019 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
3020 return nativeResponseValue;
3022 // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
3023 export function CResult_TrustedClosingTransactionNoneZ_is_ok(o: number): boolean {
3024 if(!isWasmInitialized) {
3025 throw new Error("initializeWasm() must be awaited first!");
3027 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_is_ok(o);
3028 return nativeResponseValue;
3030 // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
3031 export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
3032 if(!isWasmInitialized) {
3033 throw new Error("initializeWasm() must be awaited first!");
3035 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
3036 // debug statements here
3038 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
3039 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
3040 if(!isWasmInitialized) {
3041 throw new Error("initializeWasm() must be awaited first!");
3043 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
3044 return nativeResponseValue;
3046 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
3047 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
3048 if(!isWasmInitialized) {
3049 throw new Error("initializeWasm() must be awaited first!");
3051 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
3052 return nativeResponseValue;
3054 // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
3055 export function CResult_CommitmentTransactionDecodeErrorZ_is_ok(o: number): boolean {
3056 if(!isWasmInitialized) {
3057 throw new Error("initializeWasm() must be awaited first!");
3059 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_is_ok(o);
3060 return nativeResponseValue;
3062 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
3063 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
3064 if(!isWasmInitialized) {
3065 throw new Error("initializeWasm() must be awaited first!");
3067 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
3068 // debug statements here
3070 // uint64_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
3071 export function CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg: number): number {
3072 if(!isWasmInitialized) {
3073 throw new Error("initializeWasm() must be awaited first!");
3075 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(arg);
3076 return nativeResponseValue;
3078 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
3079 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
3080 if(!isWasmInitialized) {
3081 throw new Error("initializeWasm() must be awaited first!");
3083 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
3084 return nativeResponseValue;
3086 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
3087 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
3088 if(!isWasmInitialized) {
3089 throw new Error("initializeWasm() must be awaited first!");
3091 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
3092 return nativeResponseValue;
3094 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
3095 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
3096 if(!isWasmInitialized) {
3097 throw new Error("initializeWasm() must be awaited first!");
3099 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
3100 return nativeResponseValue;
3102 // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
3103 export function CResult_TrustedCommitmentTransactionNoneZ_is_ok(o: number): boolean {
3104 if(!isWasmInitialized) {
3105 throw new Error("initializeWasm() must be awaited first!");
3107 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_is_ok(o);
3108 return nativeResponseValue;
3110 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
3111 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
3112 if(!isWasmInitialized) {
3113 throw new Error("initializeWasm() must be awaited first!");
3115 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
3116 // debug statements here
3118 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
3119 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
3120 if(!isWasmInitialized) {
3121 throw new Error("initializeWasm() must be awaited first!");
3123 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
3124 return nativeResponseValue;
3126 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
3127 export function CResult_CVec_SignatureZNoneZ_err(): number {
3128 if(!isWasmInitialized) {
3129 throw new Error("initializeWasm() must be awaited first!");
3131 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
3132 return nativeResponseValue;
3134 // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
3135 export function CResult_CVec_SignatureZNoneZ_is_ok(o: number): boolean {
3136 if(!isWasmInitialized) {
3137 throw new Error("initializeWasm() must be awaited first!");
3139 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_is_ok(o);
3140 return nativeResponseValue;
3142 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
3143 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
3144 if(!isWasmInitialized) {
3145 throw new Error("initializeWasm() must be awaited first!");
3147 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
3148 // debug statements here
3150 // uint64_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
3151 export function CResult_CVec_SignatureZNoneZ_clone_ptr(arg: number): number {
3152 if(!isWasmInitialized) {
3153 throw new Error("initializeWasm() must be awaited first!");
3155 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone_ptr(arg);
3156 return nativeResponseValue;
3158 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
3159 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
3160 if(!isWasmInitialized) {
3161 throw new Error("initializeWasm() must be awaited first!");
3163 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
3164 return nativeResponseValue;
3166 // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
3167 export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
3168 if(!isWasmInitialized) {
3169 throw new Error("initializeWasm() must be awaited first!");
3171 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
3172 return nativeResponseValue;
3174 // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
3175 export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
3176 if(!isWasmInitialized) {
3177 throw new Error("initializeWasm() must be awaited first!");
3179 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
3180 return nativeResponseValue;
3182 // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
3183 export function CResult_ShutdownScriptDecodeErrorZ_is_ok(o: number): boolean {
3184 if(!isWasmInitialized) {
3185 throw new Error("initializeWasm() must be awaited first!");
3187 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_is_ok(o);
3188 return nativeResponseValue;
3190 // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
3191 export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
3192 if(!isWasmInitialized) {
3193 throw new Error("initializeWasm() must be awaited first!");
3195 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
3196 // debug statements here
3198 // uint64_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
3199 export function CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg: number): number {
3200 if(!isWasmInitialized) {
3201 throw new Error("initializeWasm() must be awaited first!");
3203 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone_ptr(arg);
3204 return nativeResponseValue;
3206 // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
3207 export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
3208 if(!isWasmInitialized) {
3209 throw new Error("initializeWasm() must be awaited first!");
3211 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
3212 return nativeResponseValue;
3214 // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
3215 export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
3216 if(!isWasmInitialized) {
3217 throw new Error("initializeWasm() must be awaited first!");
3219 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
3220 return nativeResponseValue;
3222 // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
3223 export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
3224 if(!isWasmInitialized) {
3225 throw new Error("initializeWasm() must be awaited first!");
3227 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
3228 return nativeResponseValue;
3230 // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
3231 export function CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o: number): boolean {
3232 if(!isWasmInitialized) {
3233 throw new Error("initializeWasm() must be awaited first!");
3235 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(o);
3236 return nativeResponseValue;
3238 // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
3239 export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
3240 if(!isWasmInitialized) {
3241 throw new Error("initializeWasm() must be awaited first!");
3243 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
3244 // debug statements here
3246 // uint64_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
3247 export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg: number): number {
3248 if(!isWasmInitialized) {
3249 throw new Error("initializeWasm() must be awaited first!");
3251 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(arg);
3252 return nativeResponseValue;
3254 // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
3255 export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
3256 if(!isWasmInitialized) {
3257 throw new Error("initializeWasm() must be awaited first!");
3259 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
3260 return nativeResponseValue;
3262 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
3263 export function CResult_NoneErrorZ_ok(): number {
3264 if(!isWasmInitialized) {
3265 throw new Error("initializeWasm() must be awaited first!");
3267 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
3268 return nativeResponseValue;
3270 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
3271 export function CResult_NoneErrorZ_err(e: IOError): number {
3272 if(!isWasmInitialized) {
3273 throw new Error("initializeWasm() must be awaited first!");
3275 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
3276 return nativeResponseValue;
3278 // bool CResult_NoneErrorZ_is_ok(const struct LDKCResult_NoneErrorZ *NONNULL_PTR o);
3279 export function CResult_NoneErrorZ_is_ok(o: number): boolean {
3280 if(!isWasmInitialized) {
3281 throw new Error("initializeWasm() must be awaited first!");
3283 const nativeResponseValue = wasm.CResult_NoneErrorZ_is_ok(o);
3284 return nativeResponseValue;
3286 // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
3287 export function CResult_NoneErrorZ_free(_res: number): void {
3288 if(!isWasmInitialized) {
3289 throw new Error("initializeWasm() must be awaited first!");
3291 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
3292 // debug statements here
3294 // uint64_t CResult_NoneErrorZ_clone_ptr(LDKCResult_NoneErrorZ *NONNULL_PTR arg);
3295 export function CResult_NoneErrorZ_clone_ptr(arg: number): number {
3296 if(!isWasmInitialized) {
3297 throw new Error("initializeWasm() must be awaited first!");
3299 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone_ptr(arg);
3300 return nativeResponseValue;
3302 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
3303 export function CResult_NoneErrorZ_clone(orig: number): number {
3304 if(!isWasmInitialized) {
3305 throw new Error("initializeWasm() must be awaited first!");
3307 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
3308 return nativeResponseValue;
3310 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
3311 export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
3312 if(!isWasmInitialized) {
3313 throw new Error("initializeWasm() must be awaited first!");
3315 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
3316 return nativeResponseValue;
3318 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
3319 export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
3320 if(!isWasmInitialized) {
3321 throw new Error("initializeWasm() must be awaited first!");
3323 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
3324 return nativeResponseValue;
3326 // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
3327 export function CResult_RouteHopDecodeErrorZ_is_ok(o: number): boolean {
3328 if(!isWasmInitialized) {
3329 throw new Error("initializeWasm() must be awaited first!");
3331 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_is_ok(o);
3332 return nativeResponseValue;
3334 // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
3335 export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
3336 if(!isWasmInitialized) {
3337 throw new Error("initializeWasm() must be awaited first!");
3339 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
3340 // debug statements here
3342 // uint64_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
3343 export function CResult_RouteHopDecodeErrorZ_clone_ptr(arg: number): number {
3344 if(!isWasmInitialized) {
3345 throw new Error("initializeWasm() must be awaited first!");
3347 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone_ptr(arg);
3348 return nativeResponseValue;
3350 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
3351 export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
3352 if(!isWasmInitialized) {
3353 throw new Error("initializeWasm() must be awaited first!");
3355 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
3356 return nativeResponseValue;
3358 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3359 export function CVec_RouteHopZ_free(_res: number[]): void {
3360 if(!isWasmInitialized) {
3361 throw new Error("initializeWasm() must be awaited first!");
3363 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3364 // debug statements here
3366 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3367 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3368 if(!isWasmInitialized) {
3369 throw new Error("initializeWasm() must be awaited first!");
3371 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3372 // debug statements here
3374 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3375 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3376 if(!isWasmInitialized) {
3377 throw new Error("initializeWasm() must be awaited first!");
3379 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3380 return nativeResponseValue;
3382 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3383 export function CResult_RouteDecodeErrorZ_err(e: number): number {
3384 if(!isWasmInitialized) {
3385 throw new Error("initializeWasm() must be awaited first!");
3387 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3388 return nativeResponseValue;
3390 // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
3391 export function CResult_RouteDecodeErrorZ_is_ok(o: number): boolean {
3392 if(!isWasmInitialized) {
3393 throw new Error("initializeWasm() must be awaited first!");
3395 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_is_ok(o);
3396 return nativeResponseValue;
3398 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3399 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3400 if(!isWasmInitialized) {
3401 throw new Error("initializeWasm() must be awaited first!");
3403 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3404 // debug statements here
3406 // uint64_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
3407 export function CResult_RouteDecodeErrorZ_clone_ptr(arg: number): number {
3408 if(!isWasmInitialized) {
3409 throw new Error("initializeWasm() must be awaited first!");
3411 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone_ptr(arg);
3412 return nativeResponseValue;
3414 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3415 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3416 if(!isWasmInitialized) {
3417 throw new Error("initializeWasm() must be awaited first!");
3419 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3420 return nativeResponseValue;
3422 // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
3423 export function CResult_RouteParametersDecodeErrorZ_ok(o: number): number {
3424 if(!isWasmInitialized) {
3425 throw new Error("initializeWasm() must be awaited first!");
3427 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_ok(o);
3428 return nativeResponseValue;
3430 // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
3431 export function CResult_RouteParametersDecodeErrorZ_err(e: number): number {
3432 if(!isWasmInitialized) {
3433 throw new Error("initializeWasm() must be awaited first!");
3435 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_err(e);
3436 return nativeResponseValue;
3438 // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
3439 export function CResult_RouteParametersDecodeErrorZ_is_ok(o: number): boolean {
3440 if(!isWasmInitialized) {
3441 throw new Error("initializeWasm() must be awaited first!");
3443 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_is_ok(o);
3444 return nativeResponseValue;
3446 // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
3447 export function CResult_RouteParametersDecodeErrorZ_free(_res: number): void {
3448 if(!isWasmInitialized) {
3449 throw new Error("initializeWasm() must be awaited first!");
3451 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_free(_res);
3452 // debug statements here
3454 // uint64_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
3455 export function CResult_RouteParametersDecodeErrorZ_clone_ptr(arg: number): number {
3456 if(!isWasmInitialized) {
3457 throw new Error("initializeWasm() must be awaited first!");
3459 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone_ptr(arg);
3460 return nativeResponseValue;
3462 // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
3463 export function CResult_RouteParametersDecodeErrorZ_clone(orig: number): number {
3464 if(!isWasmInitialized) {
3465 throw new Error("initializeWasm() must be awaited first!");
3467 const nativeResponseValue = wasm.CResult_RouteParametersDecodeErrorZ_clone(orig);
3468 return nativeResponseValue;
3470 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3471 export function CVec_RouteHintZ_free(_res: number[]): void {
3472 if(!isWasmInitialized) {
3473 throw new Error("initializeWasm() must be awaited first!");
3475 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3476 // debug statements here
3478 // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
3479 export function COption_u64Z_some(o: number): number {
3480 if(!isWasmInitialized) {
3481 throw new Error("initializeWasm() must be awaited first!");
3483 const nativeResponseValue = wasm.COption_u64Z_some(o);
3484 return nativeResponseValue;
3486 // struct LDKCOption_u64Z COption_u64Z_none(void);
3487 export function COption_u64Z_none(): number {
3488 if(!isWasmInitialized) {
3489 throw new Error("initializeWasm() must be awaited first!");
3491 const nativeResponseValue = wasm.COption_u64Z_none();
3492 return nativeResponseValue;
3494 // void COption_u64Z_free(struct LDKCOption_u64Z _res);
3495 export function COption_u64Z_free(_res: number): void {
3496 if(!isWasmInitialized) {
3497 throw new Error("initializeWasm() must be awaited first!");
3499 const nativeResponseValue = wasm.COption_u64Z_free(_res);
3500 // debug statements here
3502 // uint64_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
3503 export function COption_u64Z_clone_ptr(arg: number): number {
3504 if(!isWasmInitialized) {
3505 throw new Error("initializeWasm() must be awaited first!");
3507 const nativeResponseValue = wasm.COption_u64Z_clone_ptr(arg);
3508 return nativeResponseValue;
3510 // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
3511 export function COption_u64Z_clone(orig: number): number {
3512 if(!isWasmInitialized) {
3513 throw new Error("initializeWasm() must be awaited first!");
3515 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
3516 return nativeResponseValue;
3518 // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
3519 export function CResult_PayeeDecodeErrorZ_ok(o: number): number {
3520 if(!isWasmInitialized) {
3521 throw new Error("initializeWasm() must be awaited first!");
3523 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_ok(o);
3524 return nativeResponseValue;
3526 // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
3527 export function CResult_PayeeDecodeErrorZ_err(e: number): number {
3528 if(!isWasmInitialized) {
3529 throw new Error("initializeWasm() must be awaited first!");
3531 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_err(e);
3532 return nativeResponseValue;
3534 // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
3535 export function CResult_PayeeDecodeErrorZ_is_ok(o: number): boolean {
3536 if(!isWasmInitialized) {
3537 throw new Error("initializeWasm() must be awaited first!");
3539 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_is_ok(o);
3540 return nativeResponseValue;
3542 // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
3543 export function CResult_PayeeDecodeErrorZ_free(_res: number): void {
3544 if(!isWasmInitialized) {
3545 throw new Error("initializeWasm() must be awaited first!");
3547 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_free(_res);
3548 // debug statements here
3550 // uint64_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
3551 export function CResult_PayeeDecodeErrorZ_clone_ptr(arg: number): number {
3552 if(!isWasmInitialized) {
3553 throw new Error("initializeWasm() must be awaited first!");
3555 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone_ptr(arg);
3556 return nativeResponseValue;
3558 // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
3559 export function CResult_PayeeDecodeErrorZ_clone(orig: number): number {
3560 if(!isWasmInitialized) {
3561 throw new Error("initializeWasm() must be awaited first!");
3563 const nativeResponseValue = wasm.CResult_PayeeDecodeErrorZ_clone(orig);
3564 return nativeResponseValue;
3566 // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
3567 export function CVec_RouteHintHopZ_free(_res: number[]): void {
3568 if(!isWasmInitialized) {
3569 throw new Error("initializeWasm() must be awaited first!");
3571 const nativeResponseValue = wasm.CVec_RouteHintHopZ_free(_res);
3572 // debug statements here
3574 // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
3575 export function CResult_RouteHintDecodeErrorZ_ok(o: number): number {
3576 if(!isWasmInitialized) {
3577 throw new Error("initializeWasm() must be awaited first!");
3579 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_ok(o);
3580 return nativeResponseValue;
3582 // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
3583 export function CResult_RouteHintDecodeErrorZ_err(e: number): number {
3584 if(!isWasmInitialized) {
3585 throw new Error("initializeWasm() must be awaited first!");
3587 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_err(e);
3588 return nativeResponseValue;
3590 // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
3591 export function CResult_RouteHintDecodeErrorZ_is_ok(o: number): boolean {
3592 if(!isWasmInitialized) {
3593 throw new Error("initializeWasm() must be awaited first!");
3595 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_is_ok(o);
3596 return nativeResponseValue;
3598 // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
3599 export function CResult_RouteHintDecodeErrorZ_free(_res: number): void {
3600 if(!isWasmInitialized) {
3601 throw new Error("initializeWasm() must be awaited first!");
3603 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_free(_res);
3604 // debug statements here
3606 // uint64_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
3607 export function CResult_RouteHintDecodeErrorZ_clone_ptr(arg: number): number {
3608 if(!isWasmInitialized) {
3609 throw new Error("initializeWasm() must be awaited first!");
3611 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone_ptr(arg);
3612 return nativeResponseValue;
3614 // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
3615 export function CResult_RouteHintDecodeErrorZ_clone(orig: number): number {
3616 if(!isWasmInitialized) {
3617 throw new Error("initializeWasm() must be awaited first!");
3619 const nativeResponseValue = wasm.CResult_RouteHintDecodeErrorZ_clone(orig);
3620 return nativeResponseValue;
3622 // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
3623 export function CResult_RouteHintHopDecodeErrorZ_ok(o: number): number {
3624 if(!isWasmInitialized) {
3625 throw new Error("initializeWasm() must be awaited first!");
3627 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_ok(o);
3628 return nativeResponseValue;
3630 // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
3631 export function CResult_RouteHintHopDecodeErrorZ_err(e: number): number {
3632 if(!isWasmInitialized) {
3633 throw new Error("initializeWasm() must be awaited first!");
3635 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_err(e);
3636 return nativeResponseValue;
3638 // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
3639 export function CResult_RouteHintHopDecodeErrorZ_is_ok(o: number): boolean {
3640 if(!isWasmInitialized) {
3641 throw new Error("initializeWasm() must be awaited first!");
3643 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_is_ok(o);
3644 return nativeResponseValue;
3646 // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
3647 export function CResult_RouteHintHopDecodeErrorZ_free(_res: number): void {
3648 if(!isWasmInitialized) {
3649 throw new Error("initializeWasm() must be awaited first!");
3651 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_free(_res);
3652 // debug statements here
3654 // uint64_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
3655 export function CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg: number): number {
3656 if(!isWasmInitialized) {
3657 throw new Error("initializeWasm() must be awaited first!");
3659 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_clone_ptr(arg);
3660 return nativeResponseValue;
3662 // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
3663 export function CResult_RouteHintHopDecodeErrorZ_clone(orig: number): number {
3664 if(!isWasmInitialized) {
3665 throw new Error("initializeWasm() must be awaited first!");
3667 const nativeResponseValue = wasm.CResult_RouteHintHopDecodeErrorZ_clone(orig);
3668 return nativeResponseValue;
3670 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3671 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3672 if(!isWasmInitialized) {
3673 throw new Error("initializeWasm() must be awaited first!");
3675 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3676 // debug statements here
3678 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3679 export function CResult_RouteLightningErrorZ_ok(o: number): number {
3680 if(!isWasmInitialized) {
3681 throw new Error("initializeWasm() must be awaited first!");
3683 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3684 return nativeResponseValue;
3686 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3687 export function CResult_RouteLightningErrorZ_err(e: number): number {
3688 if(!isWasmInitialized) {
3689 throw new Error("initializeWasm() must be awaited first!");
3691 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3692 return nativeResponseValue;
3694 // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
3695 export function CResult_RouteLightningErrorZ_is_ok(o: number): boolean {
3696 if(!isWasmInitialized) {
3697 throw new Error("initializeWasm() must be awaited first!");
3699 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_is_ok(o);
3700 return nativeResponseValue;
3702 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3703 export function CResult_RouteLightningErrorZ_free(_res: number): void {
3704 if(!isWasmInitialized) {
3705 throw new Error("initializeWasm() must be awaited first!");
3707 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3708 // debug statements here
3710 // uint64_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
3711 export function CResult_RouteLightningErrorZ_clone_ptr(arg: number): number {
3712 if(!isWasmInitialized) {
3713 throw new Error("initializeWasm() must be awaited first!");
3715 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone_ptr(arg);
3716 return nativeResponseValue;
3718 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3719 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3720 if(!isWasmInitialized) {
3721 throw new Error("initializeWasm() must be awaited first!");
3723 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3724 return nativeResponseValue;
3726 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3727 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3728 if(!isWasmInitialized) {
3729 throw new Error("initializeWasm() must be awaited first!");
3731 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3732 return nativeResponseValue;
3734 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3735 export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
3736 if(!isWasmInitialized) {
3737 throw new Error("initializeWasm() must be awaited first!");
3739 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3740 return nativeResponseValue;
3742 // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
3743 export function CResult_TxOutAccessErrorZ_is_ok(o: number): boolean {
3744 if(!isWasmInitialized) {
3745 throw new Error("initializeWasm() must be awaited first!");
3747 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_is_ok(o);
3748 return nativeResponseValue;
3750 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3751 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3752 if(!isWasmInitialized) {
3753 throw new Error("initializeWasm() must be awaited first!");
3755 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3756 // debug statements here
3758 // uint64_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
3759 export function CResult_TxOutAccessErrorZ_clone_ptr(arg: number): number {
3760 if(!isWasmInitialized) {
3761 throw new Error("initializeWasm() must be awaited first!");
3763 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone_ptr(arg);
3764 return nativeResponseValue;
3766 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3767 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3768 if(!isWasmInitialized) {
3769 throw new Error("initializeWasm() must be awaited first!");
3771 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3772 return nativeResponseValue;
3774 // uint64_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
3775 export function C2Tuple_usizeTransactionZ_clone_ptr(arg: number): number {
3776 if(!isWasmInitialized) {
3777 throw new Error("initializeWasm() must be awaited first!");
3779 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone_ptr(arg);
3780 return nativeResponseValue;
3782 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
3783 export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
3784 if(!isWasmInitialized) {
3785 throw new Error("initializeWasm() must be awaited first!");
3787 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
3788 return nativeResponseValue;
3790 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
3791 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
3792 if(!isWasmInitialized) {
3793 throw new Error("initializeWasm() must be awaited first!");
3795 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
3796 return nativeResponseValue;
3798 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
3799 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
3800 if(!isWasmInitialized) {
3801 throw new Error("initializeWasm() must be awaited first!");
3803 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
3804 // debug statements here
3806 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
3807 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
3808 if(!isWasmInitialized) {
3809 throw new Error("initializeWasm() must be awaited first!");
3811 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
3812 // debug statements here
3814 // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
3815 export function CVec_TxidZ_free(_res: Uint8Array[]): void {
3816 if(!isWasmInitialized) {
3817 throw new Error("initializeWasm() must be awaited first!");
3819 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
3820 // debug statements here
3822 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
3823 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
3824 if(!isWasmInitialized) {
3825 throw new Error("initializeWasm() must be awaited first!");
3827 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
3828 return nativeResponseValue;
3830 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
3831 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
3832 if(!isWasmInitialized) {
3833 throw new Error("initializeWasm() must be awaited first!");
3835 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
3836 return nativeResponseValue;
3838 // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
3839 export function CResult_NoneChannelMonitorUpdateErrZ_is_ok(o: number): boolean {
3840 if(!isWasmInitialized) {
3841 throw new Error("initializeWasm() must be awaited first!");
3843 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_is_ok(o);
3844 return nativeResponseValue;
3846 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
3847 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
3848 if(!isWasmInitialized) {
3849 throw new Error("initializeWasm() must be awaited first!");
3851 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
3852 // debug statements here
3854 // uint64_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
3855 export function CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg: number): number {
3856 if(!isWasmInitialized) {
3857 throw new Error("initializeWasm() must be awaited first!");
3859 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(arg);
3860 return nativeResponseValue;
3862 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
3863 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
3864 if(!isWasmInitialized) {
3865 throw new Error("initializeWasm() must be awaited first!");
3867 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3868 return nativeResponseValue;
3870 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3871 export function CVec_MonitorEventZ_free(_res: number[]): void {
3872 if(!isWasmInitialized) {
3873 throw new Error("initializeWasm() must be awaited first!");
3875 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3876 // debug statements here
3878 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3879 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3880 if(!isWasmInitialized) {
3881 throw new Error("initializeWasm() must be awaited first!");
3883 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3884 return nativeResponseValue;
3886 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3887 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3888 if(!isWasmInitialized) {
3889 throw new Error("initializeWasm() must be awaited first!");
3891 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3892 return nativeResponseValue;
3894 // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3895 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3896 if(!isWasmInitialized) {
3897 throw new Error("initializeWasm() must be awaited first!");
3899 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3900 // debug statements here
3902 // uint64_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
3903 export function COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg: number): number {
3904 if(!isWasmInitialized) {
3905 throw new Error("initializeWasm() must be awaited first!");
3907 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone_ptr(arg);
3908 return nativeResponseValue;
3910 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
3911 export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
3912 if(!isWasmInitialized) {
3913 throw new Error("initializeWasm() must be awaited first!");
3915 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
3916 return nativeResponseValue;
3918 // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
3919 export function COption_ClosureReasonZ_some(o: number): number {
3920 if(!isWasmInitialized) {
3921 throw new Error("initializeWasm() must be awaited first!");
3923 const nativeResponseValue = wasm.COption_ClosureReasonZ_some(o);
3924 return nativeResponseValue;
3926 // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
3927 export function COption_ClosureReasonZ_none(): number {
3928 if(!isWasmInitialized) {
3929 throw new Error("initializeWasm() must be awaited first!");
3931 const nativeResponseValue = wasm.COption_ClosureReasonZ_none();
3932 return nativeResponseValue;
3934 // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
3935 export function COption_ClosureReasonZ_free(_res: number): void {
3936 if(!isWasmInitialized) {
3937 throw new Error("initializeWasm() must be awaited first!");
3939 const nativeResponseValue = wasm.COption_ClosureReasonZ_free(_res);
3940 // debug statements here
3942 // uint64_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
3943 export function COption_ClosureReasonZ_clone_ptr(arg: number): number {
3944 if(!isWasmInitialized) {
3945 throw new Error("initializeWasm() must be awaited first!");
3947 const nativeResponseValue = wasm.COption_ClosureReasonZ_clone_ptr(arg);
3948 return nativeResponseValue;
3950 // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
3951 export function COption_ClosureReasonZ_clone(orig: number): number {
3952 if(!isWasmInitialized) {
3953 throw new Error("initializeWasm() must be awaited first!");
3955 const nativeResponseValue = wasm.COption_ClosureReasonZ_clone(orig);
3956 return nativeResponseValue;
3958 // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
3959 export function CResult_COption_ClosureReasonZDecodeErrorZ_ok(o: number): number {
3960 if(!isWasmInitialized) {
3961 throw new Error("initializeWasm() must be awaited first!");
3963 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_ok(o);
3964 return nativeResponseValue;
3966 // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
3967 export function CResult_COption_ClosureReasonZDecodeErrorZ_err(e: number): number {
3968 if(!isWasmInitialized) {
3969 throw new Error("initializeWasm() must be awaited first!");
3971 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_err(e);
3972 return nativeResponseValue;
3974 // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
3975 export function CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o: number): boolean {
3976 if(!isWasmInitialized) {
3977 throw new Error("initializeWasm() must be awaited first!");
3979 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(o);
3980 return nativeResponseValue;
3982 // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
3983 export function CResult_COption_ClosureReasonZDecodeErrorZ_free(_res: number): void {
3984 if(!isWasmInitialized) {
3985 throw new Error("initializeWasm() must be awaited first!");
3987 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_free(_res);
3988 // debug statements here
3990 // uint64_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
3991 export function CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg: number): number {
3992 if(!isWasmInitialized) {
3993 throw new Error("initializeWasm() must be awaited first!");
3995 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(arg);
3996 return nativeResponseValue;
3998 // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
3999 export function CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig: number): number {
4000 if(!isWasmInitialized) {
4001 throw new Error("initializeWasm() must be awaited first!");
4003 const nativeResponseValue = wasm.CResult_COption_ClosureReasonZDecodeErrorZ_clone(orig);
4004 return nativeResponseValue;
4006 // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
4007 export function COption_NetworkUpdateZ_some(o: number): number {
4008 if(!isWasmInitialized) {
4009 throw new Error("initializeWasm() must be awaited first!");
4011 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
4012 return nativeResponseValue;
4014 // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
4015 export function COption_NetworkUpdateZ_none(): number {
4016 if(!isWasmInitialized) {
4017 throw new Error("initializeWasm() must be awaited first!");
4019 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
4020 return nativeResponseValue;
4022 // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
4023 export function COption_NetworkUpdateZ_free(_res: number): void {
4024 if(!isWasmInitialized) {
4025 throw new Error("initializeWasm() must be awaited first!");
4027 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
4028 // debug statements here
4030 // uint64_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
4031 export function COption_NetworkUpdateZ_clone_ptr(arg: number): number {
4032 if(!isWasmInitialized) {
4033 throw new Error("initializeWasm() must be awaited first!");
4035 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone_ptr(arg);
4036 return nativeResponseValue;
4038 // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
4039 export function COption_NetworkUpdateZ_clone(orig: number): number {
4040 if(!isWasmInitialized) {
4041 throw new Error("initializeWasm() must be awaited first!");
4043 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
4044 return nativeResponseValue;
4046 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
4047 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
4048 if(!isWasmInitialized) {
4049 throw new Error("initializeWasm() must be awaited first!");
4051 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
4052 // debug statements here
4054 // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
4055 export function COption_EventZ_some(o: number): number {
4056 if(!isWasmInitialized) {
4057 throw new Error("initializeWasm() must be awaited first!");
4059 const nativeResponseValue = wasm.COption_EventZ_some(o);
4060 return nativeResponseValue;
4062 // struct LDKCOption_EventZ COption_EventZ_none(void);
4063 export function COption_EventZ_none(): number {
4064 if(!isWasmInitialized) {
4065 throw new Error("initializeWasm() must be awaited first!");
4067 const nativeResponseValue = wasm.COption_EventZ_none();
4068 return nativeResponseValue;
4070 // void COption_EventZ_free(struct LDKCOption_EventZ _res);
4071 export function COption_EventZ_free(_res: number): void {
4072 if(!isWasmInitialized) {
4073 throw new Error("initializeWasm() must be awaited first!");
4075 const nativeResponseValue = wasm.COption_EventZ_free(_res);
4076 // debug statements here
4078 // uint64_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
4079 export function COption_EventZ_clone_ptr(arg: number): number {
4080 if(!isWasmInitialized) {
4081 throw new Error("initializeWasm() must be awaited first!");
4083 const nativeResponseValue = wasm.COption_EventZ_clone_ptr(arg);
4084 return nativeResponseValue;
4086 // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
4087 export function COption_EventZ_clone(orig: number): number {
4088 if(!isWasmInitialized) {
4089 throw new Error("initializeWasm() must be awaited first!");
4091 const nativeResponseValue = wasm.COption_EventZ_clone(orig);
4092 return nativeResponseValue;
4094 // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
4095 export function CResult_COption_EventZDecodeErrorZ_ok(o: number): number {
4096 if(!isWasmInitialized) {
4097 throw new Error("initializeWasm() must be awaited first!");
4099 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_ok(o);
4100 return nativeResponseValue;
4102 // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
4103 export function CResult_COption_EventZDecodeErrorZ_err(e: number): number {
4104 if(!isWasmInitialized) {
4105 throw new Error("initializeWasm() must be awaited first!");
4107 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_err(e);
4108 return nativeResponseValue;
4110 // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
4111 export function CResult_COption_EventZDecodeErrorZ_is_ok(o: number): boolean {
4112 if(!isWasmInitialized) {
4113 throw new Error("initializeWasm() must be awaited first!");
4115 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_is_ok(o);
4116 return nativeResponseValue;
4118 // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
4119 export function CResult_COption_EventZDecodeErrorZ_free(_res: number): void {
4120 if(!isWasmInitialized) {
4121 throw new Error("initializeWasm() must be awaited first!");
4123 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_free(_res);
4124 // debug statements here
4126 // uint64_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
4127 export function CResult_COption_EventZDecodeErrorZ_clone_ptr(arg: number): number {
4128 if(!isWasmInitialized) {
4129 throw new Error("initializeWasm() must be awaited first!");
4131 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_clone_ptr(arg);
4132 return nativeResponseValue;
4134 // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
4135 export function CResult_COption_EventZDecodeErrorZ_clone(orig: number): number {
4136 if(!isWasmInitialized) {
4137 throw new Error("initializeWasm() must be awaited first!");
4139 const nativeResponseValue = wasm.CResult_COption_EventZDecodeErrorZ_clone(orig);
4140 return nativeResponseValue;
4142 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
4143 export function CVec_MessageSendEventZ_free(_res: number[]): void {
4144 if(!isWasmInitialized) {
4145 throw new Error("initializeWasm() must be awaited first!");
4147 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
4148 // debug statements here
4150 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
4151 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
4152 if(!isWasmInitialized) {
4153 throw new Error("initializeWasm() must be awaited first!");
4155 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
4156 return nativeResponseValue;
4158 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4159 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
4160 if(!isWasmInitialized) {
4161 throw new Error("initializeWasm() must be awaited first!");
4163 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
4164 return nativeResponseValue;
4166 // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
4167 export function CResult_InitFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4168 if(!isWasmInitialized) {
4169 throw new Error("initializeWasm() must be awaited first!");
4171 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_is_ok(o);
4172 return nativeResponseValue;
4174 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
4175 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
4176 if(!isWasmInitialized) {
4177 throw new Error("initializeWasm() must be awaited first!");
4179 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
4180 // debug statements here
4182 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
4183 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
4184 if(!isWasmInitialized) {
4185 throw new Error("initializeWasm() must be awaited first!");
4187 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
4188 return nativeResponseValue;
4190 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4191 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
4192 if(!isWasmInitialized) {
4193 throw new Error("initializeWasm() must be awaited first!");
4195 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
4196 return nativeResponseValue;
4198 // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
4199 export function CResult_NodeFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4200 if(!isWasmInitialized) {
4201 throw new Error("initializeWasm() must be awaited first!");
4203 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_is_ok(o);
4204 return nativeResponseValue;
4206 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
4207 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
4208 if(!isWasmInitialized) {
4209 throw new Error("initializeWasm() must be awaited first!");
4211 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
4212 // debug statements here
4214 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
4215 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
4216 if(!isWasmInitialized) {
4217 throw new Error("initializeWasm() must be awaited first!");
4219 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
4220 return nativeResponseValue;
4222 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4223 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
4224 if(!isWasmInitialized) {
4225 throw new Error("initializeWasm() must be awaited first!");
4227 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
4228 return nativeResponseValue;
4230 // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
4231 export function CResult_ChannelFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4232 if(!isWasmInitialized) {
4233 throw new Error("initializeWasm() must be awaited first!");
4235 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_is_ok(o);
4236 return nativeResponseValue;
4238 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
4239 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
4240 if(!isWasmInitialized) {
4241 throw new Error("initializeWasm() must be awaited first!");
4243 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
4244 // debug statements here
4246 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
4247 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
4248 if(!isWasmInitialized) {
4249 throw new Error("initializeWasm() must be awaited first!");
4251 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
4252 return nativeResponseValue;
4254 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
4255 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
4256 if(!isWasmInitialized) {
4257 throw new Error("initializeWasm() must be awaited first!");
4259 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
4260 return nativeResponseValue;
4262 // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
4263 export function CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o: number): boolean {
4264 if(!isWasmInitialized) {
4265 throw new Error("initializeWasm() must be awaited first!");
4267 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_is_ok(o);
4268 return nativeResponseValue;
4270 // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
4271 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
4272 if(!isWasmInitialized) {
4273 throw new Error("initializeWasm() must be awaited first!");
4275 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
4276 // debug statements here
4278 // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
4279 export function CResult_ScoringParametersDecodeErrorZ_ok(o: number): number {
4280 if(!isWasmInitialized) {
4281 throw new Error("initializeWasm() must be awaited first!");
4283 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_ok(o);
4284 return nativeResponseValue;
4286 // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
4287 export function CResult_ScoringParametersDecodeErrorZ_err(e: number): number {
4288 if(!isWasmInitialized) {
4289 throw new Error("initializeWasm() must be awaited first!");
4291 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_err(e);
4292 return nativeResponseValue;
4294 // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
4295 export function CResult_ScoringParametersDecodeErrorZ_is_ok(o: number): boolean {
4296 if(!isWasmInitialized) {
4297 throw new Error("initializeWasm() must be awaited first!");
4299 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_is_ok(o);
4300 return nativeResponseValue;
4302 // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
4303 export function CResult_ScoringParametersDecodeErrorZ_free(_res: number): void {
4304 if(!isWasmInitialized) {
4305 throw new Error("initializeWasm() must be awaited first!");
4307 const nativeResponseValue = wasm.CResult_ScoringParametersDecodeErrorZ_free(_res);
4308 // debug statements here
4310 // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_ok(struct LDKScorer o);
4311 export function CResult_ScorerDecodeErrorZ_ok(o: number): number {
4312 if(!isWasmInitialized) {
4313 throw new Error("initializeWasm() must be awaited first!");
4315 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_ok(o);
4316 return nativeResponseValue;
4318 // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_err(struct LDKDecodeError e);
4319 export function CResult_ScorerDecodeErrorZ_err(e: number): number {
4320 if(!isWasmInitialized) {
4321 throw new Error("initializeWasm() must be awaited first!");
4323 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_err(e);
4324 return nativeResponseValue;
4326 // bool CResult_ScorerDecodeErrorZ_is_ok(const struct LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR o);
4327 export function CResult_ScorerDecodeErrorZ_is_ok(o: number): boolean {
4328 if(!isWasmInitialized) {
4329 throw new Error("initializeWasm() must be awaited first!");
4331 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_is_ok(o);
4332 return nativeResponseValue;
4334 // void CResult_ScorerDecodeErrorZ_free(struct LDKCResult_ScorerDecodeErrorZ _res);
4335 export function CResult_ScorerDecodeErrorZ_free(_res: number): void {
4336 if(!isWasmInitialized) {
4337 throw new Error("initializeWasm() must be awaited first!");
4339 const nativeResponseValue = wasm.CResult_ScorerDecodeErrorZ_free(_res);
4340 // debug statements here
4342 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
4343 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
4344 if(!isWasmInitialized) {
4345 throw new Error("initializeWasm() must be awaited first!");
4347 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
4348 return nativeResponseValue;
4350 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4351 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
4352 if(!isWasmInitialized) {
4353 throw new Error("initializeWasm() must be awaited first!");
4355 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
4356 return nativeResponseValue;
4358 // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
4359 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
4360 if(!isWasmInitialized) {
4361 throw new Error("initializeWasm() must be awaited first!");
4363 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
4364 return nativeResponseValue;
4366 // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
4367 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
4368 if(!isWasmInitialized) {
4369 throw new Error("initializeWasm() must be awaited first!");
4371 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
4372 // debug statements here
4374 // uint64_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
4375 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
4376 if(!isWasmInitialized) {
4377 throw new Error("initializeWasm() must be awaited first!");
4379 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
4380 return nativeResponseValue;
4382 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4383 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4384 if(!isWasmInitialized) {
4385 throw new Error("initializeWasm() must be awaited first!");
4387 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
4388 return nativeResponseValue;
4390 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
4391 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
4392 if(!isWasmInitialized) {
4393 throw new Error("initializeWasm() must be awaited first!");
4395 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
4396 return nativeResponseValue;
4398 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4399 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
4400 if(!isWasmInitialized) {
4401 throw new Error("initializeWasm() must be awaited first!");
4403 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
4404 return nativeResponseValue;
4406 // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
4407 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
4408 if(!isWasmInitialized) {
4409 throw new Error("initializeWasm() must be awaited first!");
4411 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(o);
4412 return nativeResponseValue;
4414 // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
4415 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
4416 if(!isWasmInitialized) {
4417 throw new Error("initializeWasm() must be awaited first!");
4419 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
4420 // debug statements here
4422 // uint64_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
4423 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
4424 if(!isWasmInitialized) {
4425 throw new Error("initializeWasm() must be awaited first!");
4427 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(arg);
4428 return nativeResponseValue;
4430 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4431 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4432 if(!isWasmInitialized) {
4433 throw new Error("initializeWasm() must be awaited first!");
4435 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
4436 return nativeResponseValue;
4438 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
4439 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
4440 if(!isWasmInitialized) {
4441 throw new Error("initializeWasm() must be awaited first!");
4443 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
4444 return nativeResponseValue;
4446 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
4447 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
4448 if(!isWasmInitialized) {
4449 throw new Error("initializeWasm() must be awaited first!");
4451 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
4452 return nativeResponseValue;
4454 // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
4455 export function CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o: number): boolean {
4456 if(!isWasmInitialized) {
4457 throw new Error("initializeWasm() must be awaited first!");
4459 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(o);
4460 return nativeResponseValue;
4462 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
4463 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
4464 if(!isWasmInitialized) {
4465 throw new Error("initializeWasm() must be awaited first!");
4467 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
4468 // debug statements here
4470 // uint64_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
4471 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg: number): number {
4472 if(!isWasmInitialized) {
4473 throw new Error("initializeWasm() must be awaited first!");
4475 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(arg);
4476 return nativeResponseValue;
4478 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
4479 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
4480 if(!isWasmInitialized) {
4481 throw new Error("initializeWasm() must be awaited first!");
4483 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
4484 return nativeResponseValue;
4486 // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
4487 export function CResult_NoneNoneZ_ok(): number {
4488 if(!isWasmInitialized) {
4489 throw new Error("initializeWasm() must be awaited first!");
4491 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
4492 return nativeResponseValue;
4494 // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
4495 export function CResult_NoneNoneZ_err(): number {
4496 if(!isWasmInitialized) {
4497 throw new Error("initializeWasm() must be awaited first!");
4499 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
4500 return nativeResponseValue;
4502 // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
4503 export function CResult_NoneNoneZ_is_ok(o: number): boolean {
4504 if(!isWasmInitialized) {
4505 throw new Error("initializeWasm() must be awaited first!");
4507 const nativeResponseValue = wasm.CResult_NoneNoneZ_is_ok(o);
4508 return nativeResponseValue;
4510 // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
4511 export function CResult_NoneNoneZ_free(_res: number): void {
4512 if(!isWasmInitialized) {
4513 throw new Error("initializeWasm() must be awaited first!");
4515 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
4516 // debug statements here
4518 // uint64_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
4519 export function CResult_NoneNoneZ_clone_ptr(arg: number): number {
4520 if(!isWasmInitialized) {
4521 throw new Error("initializeWasm() must be awaited first!");
4523 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone_ptr(arg);
4524 return nativeResponseValue;
4526 // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
4527 export function CResult_NoneNoneZ_clone(orig: number): number {
4528 if(!isWasmInitialized) {
4529 throw new Error("initializeWasm() must be awaited first!");
4531 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
4532 return nativeResponseValue;
4534 // uint64_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
4535 export function C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg: number): number {
4536 if(!isWasmInitialized) {
4537 throw new Error("initializeWasm() must be awaited first!");
4539 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(arg);
4540 return nativeResponseValue;
4542 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
4543 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
4544 if(!isWasmInitialized) {
4545 throw new Error("initializeWasm() must be awaited first!");
4547 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
4548 return nativeResponseValue;
4550 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
4551 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
4552 if(!isWasmInitialized) {
4553 throw new Error("initializeWasm() must be awaited first!");
4555 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
4556 return nativeResponseValue;
4558 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
4559 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
4560 if(!isWasmInitialized) {
4561 throw new Error("initializeWasm() must be awaited first!");
4563 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
4564 // debug statements here
4566 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
4567 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
4568 if(!isWasmInitialized) {
4569 throw new Error("initializeWasm() must be awaited first!");
4571 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
4572 return nativeResponseValue;
4574 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
4575 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
4576 if(!isWasmInitialized) {
4577 throw new Error("initializeWasm() must be awaited first!");
4579 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
4580 return nativeResponseValue;
4582 // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
4583 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o: number): boolean {
4584 if(!isWasmInitialized) {
4585 throw new Error("initializeWasm() must be awaited first!");
4587 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(o);
4588 return nativeResponseValue;
4590 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
4591 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
4592 if(!isWasmInitialized) {
4593 throw new Error("initializeWasm() must be awaited first!");
4595 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
4596 // debug statements here
4598 // uint64_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
4599 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg: number): number {
4600 if(!isWasmInitialized) {
4601 throw new Error("initializeWasm() must be awaited first!");
4603 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(arg);
4604 return nativeResponseValue;
4606 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
4607 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
4608 if(!isWasmInitialized) {
4609 throw new Error("initializeWasm() must be awaited first!");
4611 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
4612 return nativeResponseValue;
4614 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
4615 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
4616 if(!isWasmInitialized) {
4617 throw new Error("initializeWasm() must be awaited first!");
4619 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
4620 return nativeResponseValue;
4622 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
4623 export function CResult_SignatureNoneZ_err(): number {
4624 if(!isWasmInitialized) {
4625 throw new Error("initializeWasm() must be awaited first!");
4627 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
4628 return nativeResponseValue;
4630 // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
4631 export function CResult_SignatureNoneZ_is_ok(o: number): boolean {
4632 if(!isWasmInitialized) {
4633 throw new Error("initializeWasm() must be awaited first!");
4635 const nativeResponseValue = wasm.CResult_SignatureNoneZ_is_ok(o);
4636 return nativeResponseValue;
4638 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
4639 export function CResult_SignatureNoneZ_free(_res: number): void {
4640 if(!isWasmInitialized) {
4641 throw new Error("initializeWasm() must be awaited first!");
4643 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
4644 // debug statements here
4646 // uint64_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
4647 export function CResult_SignatureNoneZ_clone_ptr(arg: number): number {
4648 if(!isWasmInitialized) {
4649 throw new Error("initializeWasm() must be awaited first!");
4651 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone_ptr(arg);
4652 return nativeResponseValue;
4654 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
4655 export function CResult_SignatureNoneZ_clone(orig: number): number {
4656 if(!isWasmInitialized) {
4657 throw new Error("initializeWasm() must be awaited first!");
4659 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
4660 return nativeResponseValue;
4662 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
4663 export function CResult_SignDecodeErrorZ_ok(o: number): number {
4664 if(!isWasmInitialized) {
4665 throw new Error("initializeWasm() must be awaited first!");
4667 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
4668 return nativeResponseValue;
4670 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
4671 export function CResult_SignDecodeErrorZ_err(e: number): number {
4672 if(!isWasmInitialized) {
4673 throw new Error("initializeWasm() must be awaited first!");
4675 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
4676 return nativeResponseValue;
4678 // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
4679 export function CResult_SignDecodeErrorZ_is_ok(o: number): boolean {
4680 if(!isWasmInitialized) {
4681 throw new Error("initializeWasm() must be awaited first!");
4683 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_is_ok(o);
4684 return nativeResponseValue;
4686 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
4687 export function CResult_SignDecodeErrorZ_free(_res: number): void {
4688 if(!isWasmInitialized) {
4689 throw new Error("initializeWasm() must be awaited first!");
4691 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
4692 // debug statements here
4694 // uint64_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
4695 export function CResult_SignDecodeErrorZ_clone_ptr(arg: number): number {
4696 if(!isWasmInitialized) {
4697 throw new Error("initializeWasm() must be awaited first!");
4699 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone_ptr(arg);
4700 return nativeResponseValue;
4702 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
4703 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
4704 if(!isWasmInitialized) {
4705 throw new Error("initializeWasm() must be awaited first!");
4707 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
4708 return nativeResponseValue;
4710 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
4711 export function CVec_u8Z_free(_res: Uint8Array): void {
4712 if(!isWasmInitialized) {
4713 throw new Error("initializeWasm() must be awaited first!");
4715 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
4716 // debug statements here
4718 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
4719 export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
4720 if(!isWasmInitialized) {
4721 throw new Error("initializeWasm() must be awaited first!");
4723 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
4724 return nativeResponseValue;
4726 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
4727 export function CResult_RecoverableSignatureNoneZ_err(): number {
4728 if(!isWasmInitialized) {
4729 throw new Error("initializeWasm() must be awaited first!");
4731 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
4732 return nativeResponseValue;
4734 // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
4735 export function CResult_RecoverableSignatureNoneZ_is_ok(o: number): boolean {
4736 if(!isWasmInitialized) {
4737 throw new Error("initializeWasm() must be awaited first!");
4739 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_is_ok(o);
4740 return nativeResponseValue;
4742 // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
4743 export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
4744 if(!isWasmInitialized) {
4745 throw new Error("initializeWasm() must be awaited first!");
4747 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
4748 // debug statements here
4750 // uint64_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
4751 export function CResult_RecoverableSignatureNoneZ_clone_ptr(arg: number): number {
4752 if(!isWasmInitialized) {
4753 throw new Error("initializeWasm() must be awaited first!");
4755 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone_ptr(arg);
4756 return nativeResponseValue;
4758 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
4759 export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
4760 if(!isWasmInitialized) {
4761 throw new Error("initializeWasm() must be awaited first!");
4763 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
4764 return nativeResponseValue;
4766 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
4767 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
4768 if(!isWasmInitialized) {
4769 throw new Error("initializeWasm() must be awaited first!");
4771 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
4772 // debug statements here
4774 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
4775 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
4776 if(!isWasmInitialized) {
4777 throw new Error("initializeWasm() must be awaited first!");
4779 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
4780 return nativeResponseValue;
4782 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
4783 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
4784 if(!isWasmInitialized) {
4785 throw new Error("initializeWasm() must be awaited first!");
4787 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
4788 return nativeResponseValue;
4790 // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
4791 export function CResult_CVec_CVec_u8ZZNoneZ_is_ok(o: number): boolean {
4792 if(!isWasmInitialized) {
4793 throw new Error("initializeWasm() must be awaited first!");
4795 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_is_ok(o);
4796 return nativeResponseValue;
4798 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
4799 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
4800 if(!isWasmInitialized) {
4801 throw new Error("initializeWasm() must be awaited first!");
4803 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
4804 // debug statements here
4806 // uint64_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
4807 export function CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg: number): number {
4808 if(!isWasmInitialized) {
4809 throw new Error("initializeWasm() must be awaited first!");
4811 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(arg);
4812 return nativeResponseValue;
4814 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
4815 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
4816 if(!isWasmInitialized) {
4817 throw new Error("initializeWasm() must be awaited first!");
4819 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
4820 return nativeResponseValue;
4822 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
4823 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
4824 if(!isWasmInitialized) {
4825 throw new Error("initializeWasm() must be awaited first!");
4827 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
4828 return nativeResponseValue;
4830 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
4831 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
4832 if(!isWasmInitialized) {
4833 throw new Error("initializeWasm() must be awaited first!");
4835 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
4836 return nativeResponseValue;
4838 // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
4839 export function CResult_InMemorySignerDecodeErrorZ_is_ok(o: number): boolean {
4840 if(!isWasmInitialized) {
4841 throw new Error("initializeWasm() must be awaited first!");
4843 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_is_ok(o);
4844 return nativeResponseValue;
4846 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
4847 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
4848 if(!isWasmInitialized) {
4849 throw new Error("initializeWasm() must be awaited first!");
4851 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
4852 // debug statements here
4854 // uint64_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
4855 export function CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg: number): number {
4856 if(!isWasmInitialized) {
4857 throw new Error("initializeWasm() must be awaited first!");
4859 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone_ptr(arg);
4860 return nativeResponseValue;
4862 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
4863 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
4864 if(!isWasmInitialized) {
4865 throw new Error("initializeWasm() must be awaited first!");
4867 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
4868 return nativeResponseValue;
4870 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
4871 export function CVec_TxOutZ_free(_res: number[]): void {
4872 if(!isWasmInitialized) {
4873 throw new Error("initializeWasm() must be awaited first!");
4875 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
4876 // debug statements here
4878 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
4879 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
4880 if(!isWasmInitialized) {
4881 throw new Error("initializeWasm() must be awaited first!");
4883 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
4884 return nativeResponseValue;
4886 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
4887 export function CResult_TransactionNoneZ_err(): number {
4888 if(!isWasmInitialized) {
4889 throw new Error("initializeWasm() must be awaited first!");
4891 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
4892 return nativeResponseValue;
4894 // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
4895 export function CResult_TransactionNoneZ_is_ok(o: number): boolean {
4896 if(!isWasmInitialized) {
4897 throw new Error("initializeWasm() must be awaited first!");
4899 const nativeResponseValue = wasm.CResult_TransactionNoneZ_is_ok(o);
4900 return nativeResponseValue;
4902 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
4903 export function CResult_TransactionNoneZ_free(_res: number): void {
4904 if(!isWasmInitialized) {
4905 throw new Error("initializeWasm() must be awaited first!");
4907 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
4908 // debug statements here
4910 // uint64_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
4911 export function CResult_TransactionNoneZ_clone_ptr(arg: number): number {
4912 if(!isWasmInitialized) {
4913 throw new Error("initializeWasm() must be awaited first!");
4915 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone_ptr(arg);
4916 return nativeResponseValue;
4918 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
4919 export function CResult_TransactionNoneZ_clone(orig: number): number {
4920 if(!isWasmInitialized) {
4921 throw new Error("initializeWasm() must be awaited first!");
4923 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
4924 return nativeResponseValue;
4926 // uint64_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
4927 export function C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg: number): number {
4928 if(!isWasmInitialized) {
4929 throw new Error("initializeWasm() must be awaited first!");
4931 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone_ptr(arg);
4932 return nativeResponseValue;
4934 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
4935 export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
4936 if(!isWasmInitialized) {
4937 throw new Error("initializeWasm() must be awaited first!");
4939 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
4940 return nativeResponseValue;
4942 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
4943 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
4944 if(!isWasmInitialized) {
4945 throw new Error("initializeWasm() must be awaited first!");
4947 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
4948 return nativeResponseValue;
4950 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
4951 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
4952 if(!isWasmInitialized) {
4953 throw new Error("initializeWasm() must be awaited first!");
4955 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
4956 // debug statements here
4958 // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
4959 export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
4960 if(!isWasmInitialized) {
4961 throw new Error("initializeWasm() must be awaited first!");
4963 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
4964 // debug statements here
4966 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
4967 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
4968 if(!isWasmInitialized) {
4969 throw new Error("initializeWasm() must be awaited first!");
4971 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
4972 return nativeResponseValue;
4974 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
4975 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
4976 if(!isWasmInitialized) {
4977 throw new Error("initializeWasm() must be awaited first!");
4979 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
4980 return nativeResponseValue;
4982 // bool CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR o);
4983 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(o: number): boolean {
4984 if(!isWasmInitialized) {
4985 throw new Error("initializeWasm() must be awaited first!");
4987 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(o);
4988 return nativeResponseValue;
4990 // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
4991 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
4992 if(!isWasmInitialized) {
4993 throw new Error("initializeWasm() must be awaited first!");
4995 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
4996 // debug statements here
4998 // uint64_t CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR arg);
4999 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(arg: number): number {
5000 if(!isWasmInitialized) {
5001 throw new Error("initializeWasm() must be awaited first!");
5003 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(arg);
5004 return nativeResponseValue;
5006 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
5007 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
5008 if(!isWasmInitialized) {
5009 throw new Error("initializeWasm() must be awaited first!");
5011 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
5012 return nativeResponseValue;
5014 // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
5015 export function COption_u16Z_some(o: number): number {
5016 if(!isWasmInitialized) {
5017 throw new Error("initializeWasm() must be awaited first!");
5019 const nativeResponseValue = wasm.COption_u16Z_some(o);
5020 return nativeResponseValue;
5022 // struct LDKCOption_u16Z COption_u16Z_none(void);
5023 export function COption_u16Z_none(): number {
5024 if(!isWasmInitialized) {
5025 throw new Error("initializeWasm() must be awaited first!");
5027 const nativeResponseValue = wasm.COption_u16Z_none();
5028 return nativeResponseValue;
5030 // void COption_u16Z_free(struct LDKCOption_u16Z _res);
5031 export function COption_u16Z_free(_res: number): void {
5032 if(!isWasmInitialized) {
5033 throw new Error("initializeWasm() must be awaited first!");
5035 const nativeResponseValue = wasm.COption_u16Z_free(_res);
5036 // debug statements here
5038 // uint64_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
5039 export function COption_u16Z_clone_ptr(arg: number): number {
5040 if(!isWasmInitialized) {
5041 throw new Error("initializeWasm() must be awaited first!");
5043 const nativeResponseValue = wasm.COption_u16Z_clone_ptr(arg);
5044 return nativeResponseValue;
5046 // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
5047 export function COption_u16Z_clone(orig: number): number {
5048 if(!isWasmInitialized) {
5049 throw new Error("initializeWasm() must be awaited first!");
5051 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
5052 return nativeResponseValue;
5054 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
5055 export function CResult_NoneAPIErrorZ_ok(): number {
5056 if(!isWasmInitialized) {
5057 throw new Error("initializeWasm() must be awaited first!");
5059 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
5060 return nativeResponseValue;
5062 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
5063 export function CResult_NoneAPIErrorZ_err(e: number): number {
5064 if(!isWasmInitialized) {
5065 throw new Error("initializeWasm() must be awaited first!");
5067 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
5068 return nativeResponseValue;
5070 // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
5071 export function CResult_NoneAPIErrorZ_is_ok(o: number): boolean {
5072 if(!isWasmInitialized) {
5073 throw new Error("initializeWasm() must be awaited first!");
5075 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_is_ok(o);
5076 return nativeResponseValue;
5078 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
5079 export function CResult_NoneAPIErrorZ_free(_res: number): void {
5080 if(!isWasmInitialized) {
5081 throw new Error("initializeWasm() must be awaited first!");
5083 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
5084 // debug statements here
5086 // uint64_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
5087 export function CResult_NoneAPIErrorZ_clone_ptr(arg: number): number {
5088 if(!isWasmInitialized) {
5089 throw new Error("initializeWasm() must be awaited first!");
5091 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone_ptr(arg);
5092 return nativeResponseValue;
5094 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
5095 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
5096 if(!isWasmInitialized) {
5097 throw new Error("initializeWasm() must be awaited first!");
5099 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
5100 return nativeResponseValue;
5102 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
5103 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
5104 if(!isWasmInitialized) {
5105 throw new Error("initializeWasm() must be awaited first!");
5107 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
5108 // debug statements here
5110 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
5111 export function CVec_APIErrorZ_free(_res: number[]): void {
5112 if(!isWasmInitialized) {
5113 throw new Error("initializeWasm() must be awaited first!");
5115 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
5116 // debug statements here
5118 // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
5119 export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
5120 if(!isWasmInitialized) {
5121 throw new Error("initializeWasm() must be awaited first!");
5123 const nativeResponseValue = wasm.CResult__u832APIErrorZ_ok(encodeArray(o));
5124 return nativeResponseValue;
5126 // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
5127 export function CResult__u832APIErrorZ_err(e: number): number {
5128 if(!isWasmInitialized) {
5129 throw new Error("initializeWasm() must be awaited first!");
5131 const nativeResponseValue = wasm.CResult__u832APIErrorZ_err(e);
5132 return nativeResponseValue;
5134 // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
5135 export function CResult__u832APIErrorZ_is_ok(o: number): boolean {
5136 if(!isWasmInitialized) {
5137 throw new Error("initializeWasm() must be awaited first!");
5139 const nativeResponseValue = wasm.CResult__u832APIErrorZ_is_ok(o);
5140 return nativeResponseValue;
5142 // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
5143 export function CResult__u832APIErrorZ_free(_res: number): void {
5144 if(!isWasmInitialized) {
5145 throw new Error("initializeWasm() must be awaited first!");
5147 const nativeResponseValue = wasm.CResult__u832APIErrorZ_free(_res);
5148 // debug statements here
5150 // uint64_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
5151 export function CResult__u832APIErrorZ_clone_ptr(arg: number): number {
5152 if(!isWasmInitialized) {
5153 throw new Error("initializeWasm() must be awaited first!");
5155 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone_ptr(arg);
5156 return nativeResponseValue;
5158 // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
5159 export function CResult__u832APIErrorZ_clone(orig: number): number {
5160 if(!isWasmInitialized) {
5161 throw new Error("initializeWasm() must be awaited first!");
5163 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone(orig);
5164 return nativeResponseValue;
5166 // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
5167 export function CResult_PaymentIdPaymentSendFailureZ_ok(o: Uint8Array): number {
5168 if(!isWasmInitialized) {
5169 throw new Error("initializeWasm() must be awaited first!");
5171 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_ok(encodeArray(o));
5172 return nativeResponseValue;
5174 // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
5175 export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
5176 if(!isWasmInitialized) {
5177 throw new Error("initializeWasm() must be awaited first!");
5179 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_err(e);
5180 return nativeResponseValue;
5182 // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
5183 export function CResult_PaymentIdPaymentSendFailureZ_is_ok(o: number): boolean {
5184 if(!isWasmInitialized) {
5185 throw new Error("initializeWasm() must be awaited first!");
5187 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_is_ok(o);
5188 return nativeResponseValue;
5190 // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
5191 export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
5192 if(!isWasmInitialized) {
5193 throw new Error("initializeWasm() must be awaited first!");
5195 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_free(_res);
5196 // debug statements here
5198 // uint64_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
5199 export function CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg: number): number {
5200 if(!isWasmInitialized) {
5201 throw new Error("initializeWasm() must be awaited first!");
5203 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone_ptr(arg);
5204 return nativeResponseValue;
5206 // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
5207 export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
5208 if(!isWasmInitialized) {
5209 throw new Error("initializeWasm() must be awaited first!");
5211 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone(orig);
5212 return nativeResponseValue;
5214 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
5215 export function CResult_NonePaymentSendFailureZ_ok(): number {
5216 if(!isWasmInitialized) {
5217 throw new Error("initializeWasm() must be awaited first!");
5219 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
5220 return nativeResponseValue;
5222 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
5223 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
5224 if(!isWasmInitialized) {
5225 throw new Error("initializeWasm() must be awaited first!");
5227 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
5228 return nativeResponseValue;
5230 // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
5231 export function CResult_NonePaymentSendFailureZ_is_ok(o: number): boolean {
5232 if(!isWasmInitialized) {
5233 throw new Error("initializeWasm() must be awaited first!");
5235 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_is_ok(o);
5236 return nativeResponseValue;
5238 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
5239 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
5240 if(!isWasmInitialized) {
5241 throw new Error("initializeWasm() must be awaited first!");
5243 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
5244 // debug statements here
5246 // uint64_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
5247 export function CResult_NonePaymentSendFailureZ_clone_ptr(arg: number): number {
5248 if(!isWasmInitialized) {
5249 throw new Error("initializeWasm() must be awaited first!");
5251 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone_ptr(arg);
5252 return nativeResponseValue;
5254 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
5255 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
5256 if(!isWasmInitialized) {
5257 throw new Error("initializeWasm() must be awaited first!");
5259 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
5260 return nativeResponseValue;
5262 // uint64_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
5263 export function C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg: number): number {
5264 if(!isWasmInitialized) {
5265 throw new Error("initializeWasm() must be awaited first!");
5267 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone_ptr(arg);
5268 return nativeResponseValue;
5270 // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
5271 export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
5272 if(!isWasmInitialized) {
5273 throw new Error("initializeWasm() must be awaited first!");
5275 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone(orig);
5276 return nativeResponseValue;
5278 // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
5279 export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: Uint8Array): number {
5280 if(!isWasmInitialized) {
5281 throw new Error("initializeWasm() must be awaited first!");
5283 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_new(encodeArray(a), encodeArray(b));
5284 return nativeResponseValue;
5286 // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
5287 export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
5288 if(!isWasmInitialized) {
5289 throw new Error("initializeWasm() must be awaited first!");
5291 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_free(_res);
5292 // debug statements here
5294 // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
5295 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
5296 if(!isWasmInitialized) {
5297 throw new Error("initializeWasm() must be awaited first!");
5299 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
5300 return nativeResponseValue;
5302 // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
5303 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
5304 if(!isWasmInitialized) {
5305 throw new Error("initializeWasm() must be awaited first!");
5307 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
5308 return nativeResponseValue;
5310 // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
5311 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o: number): boolean {
5312 if(!isWasmInitialized) {
5313 throw new Error("initializeWasm() must be awaited first!");
5315 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(o);
5316 return nativeResponseValue;
5318 // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
5319 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
5320 if(!isWasmInitialized) {
5321 throw new Error("initializeWasm() must be awaited first!");
5323 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
5324 // debug statements here
5326 // uint64_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
5327 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg: number): number {
5328 if(!isWasmInitialized) {
5329 throw new Error("initializeWasm() must be awaited first!");
5331 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(arg);
5332 return nativeResponseValue;
5334 // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
5335 export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
5336 if(!isWasmInitialized) {
5337 throw new Error("initializeWasm() must be awaited first!");
5339 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
5340 return nativeResponseValue;
5342 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
5343 export function CVec_NetAddressZ_free(_res: number[]): void {
5344 if(!isWasmInitialized) {
5345 throw new Error("initializeWasm() must be awaited first!");
5347 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
5348 // debug statements here
5350 // uint64_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
5351 export function C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg: number): number {
5352 if(!isWasmInitialized) {
5353 throw new Error("initializeWasm() must be awaited first!");
5355 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(arg);
5356 return nativeResponseValue;
5358 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
5359 export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
5360 if(!isWasmInitialized) {
5361 throw new Error("initializeWasm() must be awaited first!");
5363 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
5364 return nativeResponseValue;
5366 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
5367 export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
5368 if(!isWasmInitialized) {
5369 throw new Error("initializeWasm() must be awaited first!");
5371 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
5372 return nativeResponseValue;
5374 // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
5375 export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
5376 if(!isWasmInitialized) {
5377 throw new Error("initializeWasm() must be awaited first!");
5379 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
5380 // debug statements here
5382 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
5383 export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
5384 if(!isWasmInitialized) {
5385 throw new Error("initializeWasm() must be awaited first!");
5387 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
5388 return nativeResponseValue;
5390 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
5391 export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
5392 if(!isWasmInitialized) {
5393 throw new Error("initializeWasm() must be awaited first!");
5395 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
5396 return nativeResponseValue;
5398 // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
5399 export function CResult_PaymentSecretAPIErrorZ_is_ok(o: number): boolean {
5400 if(!isWasmInitialized) {
5401 throw new Error("initializeWasm() must be awaited first!");
5403 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_is_ok(o);
5404 return nativeResponseValue;
5406 // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
5407 export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
5408 if(!isWasmInitialized) {
5409 throw new Error("initializeWasm() must be awaited first!");
5411 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
5412 // debug statements here
5414 // uint64_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
5415 export function CResult_PaymentSecretAPIErrorZ_clone_ptr(arg: number): number {
5416 if(!isWasmInitialized) {
5417 throw new Error("initializeWasm() must be awaited first!");
5419 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone_ptr(arg);
5420 return nativeResponseValue;
5422 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
5423 export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
5424 if(!isWasmInitialized) {
5425 throw new Error("initializeWasm() must be awaited first!");
5427 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
5428 return nativeResponseValue;
5430 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
5431 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
5432 if(!isWasmInitialized) {
5433 throw new Error("initializeWasm() must be awaited first!");
5435 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
5436 // debug statements here
5438 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
5439 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
5440 if(!isWasmInitialized) {
5441 throw new Error("initializeWasm() must be awaited first!");
5443 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
5444 return nativeResponseValue;
5446 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
5447 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
5448 if(!isWasmInitialized) {
5449 throw new Error("initializeWasm() must be awaited first!");
5451 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
5452 // debug statements here
5454 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
5455 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
5456 if(!isWasmInitialized) {
5457 throw new Error("initializeWasm() must be awaited first!");
5459 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
5460 return nativeResponseValue;
5462 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
5463 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
5464 if(!isWasmInitialized) {
5465 throw new Error("initializeWasm() must be awaited first!");
5467 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
5468 return nativeResponseValue;
5470 // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
5471 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o: number): boolean {
5472 if(!isWasmInitialized) {
5473 throw new Error("initializeWasm() must be awaited first!");
5475 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(o);
5476 return nativeResponseValue;
5478 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
5479 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
5480 if(!isWasmInitialized) {
5481 throw new Error("initializeWasm() must be awaited first!");
5483 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
5484 // debug statements here
5486 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
5487 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
5488 if(!isWasmInitialized) {
5489 throw new Error("initializeWasm() must be awaited first!");
5491 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
5492 return nativeResponseValue;
5494 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
5495 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
5496 if(!isWasmInitialized) {
5497 throw new Error("initializeWasm() must be awaited first!");
5499 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
5500 return nativeResponseValue;
5502 // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
5503 export function CResult_ChannelConfigDecodeErrorZ_is_ok(o: number): boolean {
5504 if(!isWasmInitialized) {
5505 throw new Error("initializeWasm() must be awaited first!");
5507 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_is_ok(o);
5508 return nativeResponseValue;
5510 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
5511 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
5512 if(!isWasmInitialized) {
5513 throw new Error("initializeWasm() must be awaited first!");
5515 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
5516 // debug statements here
5518 // uint64_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
5519 export function CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg: number): number {
5520 if(!isWasmInitialized) {
5521 throw new Error("initializeWasm() must be awaited first!");
5523 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone_ptr(arg);
5524 return nativeResponseValue;
5526 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
5527 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
5528 if(!isWasmInitialized) {
5529 throw new Error("initializeWasm() must be awaited first!");
5531 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
5532 return nativeResponseValue;
5534 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
5535 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
5536 if(!isWasmInitialized) {
5537 throw new Error("initializeWasm() must be awaited first!");
5539 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
5540 return nativeResponseValue;
5542 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
5543 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
5544 if(!isWasmInitialized) {
5545 throw new Error("initializeWasm() must be awaited first!");
5547 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
5548 return nativeResponseValue;
5550 // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
5551 export function CResult_OutPointDecodeErrorZ_is_ok(o: number): boolean {
5552 if(!isWasmInitialized) {
5553 throw new Error("initializeWasm() must be awaited first!");
5555 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_is_ok(o);
5556 return nativeResponseValue;
5558 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
5559 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
5560 if(!isWasmInitialized) {
5561 throw new Error("initializeWasm() must be awaited first!");
5563 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
5564 // debug statements here
5566 // uint64_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
5567 export function CResult_OutPointDecodeErrorZ_clone_ptr(arg: number): number {
5568 if(!isWasmInitialized) {
5569 throw new Error("initializeWasm() must be awaited first!");
5571 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone_ptr(arg);
5572 return nativeResponseValue;
5574 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
5575 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
5576 if(!isWasmInitialized) {
5577 throw new Error("initializeWasm() must be awaited first!");
5579 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
5580 return nativeResponseValue;
5582 // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
5583 export function COption_TypeZ_some(o: number): number {
5584 if(!isWasmInitialized) {
5585 throw new Error("initializeWasm() must be awaited first!");
5587 const nativeResponseValue = wasm.COption_TypeZ_some(o);
5588 return nativeResponseValue;
5590 // struct LDKCOption_TypeZ COption_TypeZ_none(void);
5591 export function COption_TypeZ_none(): number {
5592 if(!isWasmInitialized) {
5593 throw new Error("initializeWasm() must be awaited first!");
5595 const nativeResponseValue = wasm.COption_TypeZ_none();
5596 return nativeResponseValue;
5598 // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
5599 export function COption_TypeZ_free(_res: number): void {
5600 if(!isWasmInitialized) {
5601 throw new Error("initializeWasm() must be awaited first!");
5603 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
5604 // debug statements here
5606 // uint64_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
5607 export function COption_TypeZ_clone_ptr(arg: number): number {
5608 if(!isWasmInitialized) {
5609 throw new Error("initializeWasm() must be awaited first!");
5611 const nativeResponseValue = wasm.COption_TypeZ_clone_ptr(arg);
5612 return nativeResponseValue;
5614 // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
5615 export function COption_TypeZ_clone(orig: number): number {
5616 if(!isWasmInitialized) {
5617 throw new Error("initializeWasm() must be awaited first!");
5619 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
5620 return nativeResponseValue;
5622 // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
5623 export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
5624 if(!isWasmInitialized) {
5625 throw new Error("initializeWasm() must be awaited first!");
5627 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
5628 return nativeResponseValue;
5630 // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
5631 export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
5632 if(!isWasmInitialized) {
5633 throw new Error("initializeWasm() must be awaited first!");
5635 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
5636 return nativeResponseValue;
5638 // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
5639 export function CResult_COption_TypeZDecodeErrorZ_is_ok(o: number): boolean {
5640 if(!isWasmInitialized) {
5641 throw new Error("initializeWasm() must be awaited first!");
5643 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_is_ok(o);
5644 return nativeResponseValue;
5646 // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
5647 export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
5648 if(!isWasmInitialized) {
5649 throw new Error("initializeWasm() must be awaited first!");
5651 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
5652 // debug statements here
5654 // uint64_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
5655 export function CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg: number): number {
5656 if(!isWasmInitialized) {
5657 throw new Error("initializeWasm() must be awaited first!");
5659 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone_ptr(arg);
5660 return nativeResponseValue;
5662 // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
5663 export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
5664 if(!isWasmInitialized) {
5665 throw new Error("initializeWasm() must be awaited first!");
5667 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
5668 return nativeResponseValue;
5670 // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_ok(struct LDKThirtyTwoBytes o);
5671 export function CResult_PaymentIdPaymentErrorZ_ok(o: Uint8Array): number {
5672 if(!isWasmInitialized) {
5673 throw new Error("initializeWasm() must be awaited first!");
5675 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_ok(encodeArray(o));
5676 return nativeResponseValue;
5678 // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_err(struct LDKPaymentError e);
5679 export function CResult_PaymentIdPaymentErrorZ_err(e: number): number {
5680 if(!isWasmInitialized) {
5681 throw new Error("initializeWasm() must be awaited first!");
5683 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_err(e);
5684 return nativeResponseValue;
5686 // bool CResult_PaymentIdPaymentErrorZ_is_ok(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR o);
5687 export function CResult_PaymentIdPaymentErrorZ_is_ok(o: number): boolean {
5688 if(!isWasmInitialized) {
5689 throw new Error("initializeWasm() must be awaited first!");
5691 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_is_ok(o);
5692 return nativeResponseValue;
5694 // void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentErrorZ _res);
5695 export function CResult_PaymentIdPaymentErrorZ_free(_res: number): void {
5696 if(!isWasmInitialized) {
5697 throw new Error("initializeWasm() must be awaited first!");
5699 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_free(_res);
5700 // debug statements here
5702 // uint64_t CResult_PaymentIdPaymentErrorZ_clone_ptr(LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR arg);
5703 export function CResult_PaymentIdPaymentErrorZ_clone_ptr(arg: number): number {
5704 if(!isWasmInitialized) {
5705 throw new Error("initializeWasm() must be awaited first!");
5707 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_clone_ptr(arg);
5708 return nativeResponseValue;
5710 // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
5711 export function CResult_PaymentIdPaymentErrorZ_clone(orig: number): number {
5712 if(!isWasmInitialized) {
5713 throw new Error("initializeWasm() must be awaited first!");
5715 const nativeResponseValue = wasm.CResult_PaymentIdPaymentErrorZ_clone(orig);
5716 return nativeResponseValue;
5718 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
5719 export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
5720 if(!isWasmInitialized) {
5721 throw new Error("initializeWasm() must be awaited first!");
5723 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
5724 return nativeResponseValue;
5726 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
5727 export function CResult_SiPrefixNoneZ_err(): number {
5728 if(!isWasmInitialized) {
5729 throw new Error("initializeWasm() must be awaited first!");
5731 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
5732 return nativeResponseValue;
5734 // bool CResult_SiPrefixNoneZ_is_ok(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR o);
5735 export function CResult_SiPrefixNoneZ_is_ok(o: number): boolean {
5736 if(!isWasmInitialized) {
5737 throw new Error("initializeWasm() must be awaited first!");
5739 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_is_ok(o);
5740 return nativeResponseValue;
5742 // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
5743 export function CResult_SiPrefixNoneZ_free(_res: number): void {
5744 if(!isWasmInitialized) {
5745 throw new Error("initializeWasm() must be awaited first!");
5747 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
5748 // debug statements here
5750 // uint64_t CResult_SiPrefixNoneZ_clone_ptr(LDKCResult_SiPrefixNoneZ *NONNULL_PTR arg);
5751 export function CResult_SiPrefixNoneZ_clone_ptr(arg: number): number {
5752 if(!isWasmInitialized) {
5753 throw new Error("initializeWasm() must be awaited first!");
5755 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone_ptr(arg);
5756 return nativeResponseValue;
5758 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
5759 export function CResult_SiPrefixNoneZ_clone(orig: number): number {
5760 if(!isWasmInitialized) {
5761 throw new Error("initializeWasm() must be awaited first!");
5763 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
5764 return nativeResponseValue;
5766 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
5767 export function CResult_InvoiceNoneZ_ok(o: number): number {
5768 if(!isWasmInitialized) {
5769 throw new Error("initializeWasm() must be awaited first!");
5771 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
5772 return nativeResponseValue;
5774 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
5775 export function CResult_InvoiceNoneZ_err(): number {
5776 if(!isWasmInitialized) {
5777 throw new Error("initializeWasm() must be awaited first!");
5779 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
5780 return nativeResponseValue;
5782 // bool CResult_InvoiceNoneZ_is_ok(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR o);
5783 export function CResult_InvoiceNoneZ_is_ok(o: number): boolean {
5784 if(!isWasmInitialized) {
5785 throw new Error("initializeWasm() must be awaited first!");
5787 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_is_ok(o);
5788 return nativeResponseValue;
5790 // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
5791 export function CResult_InvoiceNoneZ_free(_res: number): void {
5792 if(!isWasmInitialized) {
5793 throw new Error("initializeWasm() must be awaited first!");
5795 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
5796 // debug statements here
5798 // uint64_t CResult_InvoiceNoneZ_clone_ptr(LDKCResult_InvoiceNoneZ *NONNULL_PTR arg);
5799 export function CResult_InvoiceNoneZ_clone_ptr(arg: number): number {
5800 if(!isWasmInitialized) {
5801 throw new Error("initializeWasm() must be awaited first!");
5803 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone_ptr(arg);
5804 return nativeResponseValue;
5806 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
5807 export function CResult_InvoiceNoneZ_clone(orig: number): number {
5808 if(!isWasmInitialized) {
5809 throw new Error("initializeWasm() must be awaited first!");
5811 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
5812 return nativeResponseValue;
5814 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
5815 export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
5816 if(!isWasmInitialized) {
5817 throw new Error("initializeWasm() must be awaited first!");
5819 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
5820 return nativeResponseValue;
5822 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
5823 export function CResult_SignedRawInvoiceNoneZ_err(): number {
5824 if(!isWasmInitialized) {
5825 throw new Error("initializeWasm() must be awaited first!");
5827 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
5828 return nativeResponseValue;
5830 // bool CResult_SignedRawInvoiceNoneZ_is_ok(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR o);
5831 export function CResult_SignedRawInvoiceNoneZ_is_ok(o: number): boolean {
5832 if(!isWasmInitialized) {
5833 throw new Error("initializeWasm() must be awaited first!");
5835 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_is_ok(o);
5836 return nativeResponseValue;
5838 // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
5839 export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
5840 if(!isWasmInitialized) {
5841 throw new Error("initializeWasm() must be awaited first!");
5843 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
5844 // debug statements here
5846 // uint64_t CResult_SignedRawInvoiceNoneZ_clone_ptr(LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR arg);
5847 export function CResult_SignedRawInvoiceNoneZ_clone_ptr(arg: number): number {
5848 if(!isWasmInitialized) {
5849 throw new Error("initializeWasm() must be awaited first!");
5851 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone_ptr(arg);
5852 return nativeResponseValue;
5854 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
5855 export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
5856 if(!isWasmInitialized) {
5857 throw new Error("initializeWasm() must be awaited first!");
5859 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
5860 return nativeResponseValue;
5862 // uint64_t C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR arg);
5863 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(arg: number): number {
5864 if(!isWasmInitialized) {
5865 throw new Error("initializeWasm() must be awaited first!");
5867 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(arg);
5868 return nativeResponseValue;
5870 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
5871 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
5872 if(!isWasmInitialized) {
5873 throw new Error("initializeWasm() must be awaited first!");
5875 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
5876 return nativeResponseValue;
5878 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
5879 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
5880 if(!isWasmInitialized) {
5881 throw new Error("initializeWasm() must be awaited first!");
5883 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
5884 return nativeResponseValue;
5886 // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
5887 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
5888 if(!isWasmInitialized) {
5889 throw new Error("initializeWasm() must be awaited first!");
5891 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
5892 // debug statements here
5894 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
5895 export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
5896 if(!isWasmInitialized) {
5897 throw new Error("initializeWasm() must be awaited first!");
5899 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
5900 return nativeResponseValue;
5902 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
5903 export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
5904 if(!isWasmInitialized) {
5905 throw new Error("initializeWasm() must be awaited first!");
5907 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
5908 return nativeResponseValue;
5910 // bool CResult_PayeePubKeyErrorZ_is_ok(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR o);
5911 export function CResult_PayeePubKeyErrorZ_is_ok(o: number): boolean {
5912 if(!isWasmInitialized) {
5913 throw new Error("initializeWasm() must be awaited first!");
5915 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_is_ok(o);
5916 return nativeResponseValue;
5918 // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
5919 export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
5920 if(!isWasmInitialized) {
5921 throw new Error("initializeWasm() must be awaited first!");
5923 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
5924 // debug statements here
5926 // uint64_t CResult_PayeePubKeyErrorZ_clone_ptr(LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR arg);
5927 export function CResult_PayeePubKeyErrorZ_clone_ptr(arg: number): number {
5928 if(!isWasmInitialized) {
5929 throw new Error("initializeWasm() must be awaited first!");
5931 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone_ptr(arg);
5932 return nativeResponseValue;
5934 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
5935 export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
5936 if(!isWasmInitialized) {
5937 throw new Error("initializeWasm() must be awaited first!");
5939 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
5940 return nativeResponseValue;
5942 // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
5943 export function CVec_PrivateRouteZ_free(_res: number[]): void {
5944 if(!isWasmInitialized) {
5945 throw new Error("initializeWasm() must be awaited first!");
5947 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
5948 // debug statements here
5950 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
5951 export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
5952 if(!isWasmInitialized) {
5953 throw new Error("initializeWasm() must be awaited first!");
5955 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
5956 return nativeResponseValue;
5958 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
5959 export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
5960 if(!isWasmInitialized) {
5961 throw new Error("initializeWasm() must be awaited first!");
5963 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
5964 return nativeResponseValue;
5966 // bool CResult_PositiveTimestampCreationErrorZ_is_ok(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR o);
5967 export function CResult_PositiveTimestampCreationErrorZ_is_ok(o: number): boolean {
5968 if(!isWasmInitialized) {
5969 throw new Error("initializeWasm() must be awaited first!");
5971 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_is_ok(o);
5972 return nativeResponseValue;
5974 // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
5975 export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
5976 if(!isWasmInitialized) {
5977 throw new Error("initializeWasm() must be awaited first!");
5979 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
5980 // debug statements here
5982 // uint64_t CResult_PositiveTimestampCreationErrorZ_clone_ptr(LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR arg);
5983 export function CResult_PositiveTimestampCreationErrorZ_clone_ptr(arg: number): number {
5984 if(!isWasmInitialized) {
5985 throw new Error("initializeWasm() must be awaited first!");
5987 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone_ptr(arg);
5988 return nativeResponseValue;
5990 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
5991 export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
5992 if(!isWasmInitialized) {
5993 throw new Error("initializeWasm() must be awaited first!");
5995 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
5996 return nativeResponseValue;
5998 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
5999 export function CResult_NoneSemanticErrorZ_ok(): number {
6000 if(!isWasmInitialized) {
6001 throw new Error("initializeWasm() must be awaited first!");
6003 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
6004 return nativeResponseValue;
6006 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
6007 export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
6008 if(!isWasmInitialized) {
6009 throw new Error("initializeWasm() must be awaited first!");
6011 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
6012 return nativeResponseValue;
6014 // bool CResult_NoneSemanticErrorZ_is_ok(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR o);
6015 export function CResult_NoneSemanticErrorZ_is_ok(o: number): boolean {
6016 if(!isWasmInitialized) {
6017 throw new Error("initializeWasm() must be awaited first!");
6019 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_is_ok(o);
6020 return nativeResponseValue;
6022 // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
6023 export function CResult_NoneSemanticErrorZ_free(_res: number): void {
6024 if(!isWasmInitialized) {
6025 throw new Error("initializeWasm() must be awaited first!");
6027 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
6028 // debug statements here
6030 // uint64_t CResult_NoneSemanticErrorZ_clone_ptr(LDKCResult_NoneSemanticErrorZ *NONNULL_PTR arg);
6031 export function CResult_NoneSemanticErrorZ_clone_ptr(arg: number): number {
6032 if(!isWasmInitialized) {
6033 throw new Error("initializeWasm() must be awaited first!");
6035 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone_ptr(arg);
6036 return nativeResponseValue;
6038 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
6039 export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
6040 if(!isWasmInitialized) {
6041 throw new Error("initializeWasm() must be awaited first!");
6043 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
6044 return nativeResponseValue;
6046 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
6047 export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
6048 if(!isWasmInitialized) {
6049 throw new Error("initializeWasm() must be awaited first!");
6051 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
6052 return nativeResponseValue;
6054 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
6055 export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
6056 if(!isWasmInitialized) {
6057 throw new Error("initializeWasm() must be awaited first!");
6059 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
6060 return nativeResponseValue;
6062 // bool CResult_InvoiceSemanticErrorZ_is_ok(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR o);
6063 export function CResult_InvoiceSemanticErrorZ_is_ok(o: number): boolean {
6064 if(!isWasmInitialized) {
6065 throw new Error("initializeWasm() must be awaited first!");
6067 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_is_ok(o);
6068 return nativeResponseValue;
6070 // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
6071 export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
6072 if(!isWasmInitialized) {
6073 throw new Error("initializeWasm() must be awaited first!");
6075 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
6076 // debug statements here
6078 // uint64_t CResult_InvoiceSemanticErrorZ_clone_ptr(LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR arg);
6079 export function CResult_InvoiceSemanticErrorZ_clone_ptr(arg: number): number {
6080 if(!isWasmInitialized) {
6081 throw new Error("initializeWasm() must be awaited first!");
6083 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone_ptr(arg);
6084 return nativeResponseValue;
6086 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
6087 export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
6088 if(!isWasmInitialized) {
6089 throw new Error("initializeWasm() must be awaited first!");
6091 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
6092 return nativeResponseValue;
6094 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
6095 export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
6096 if(!isWasmInitialized) {
6097 throw new Error("initializeWasm() must be awaited first!");
6099 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
6100 return nativeResponseValue;
6102 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
6103 export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
6104 if(!isWasmInitialized) {
6105 throw new Error("initializeWasm() must be awaited first!");
6107 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
6108 return nativeResponseValue;
6110 // bool CResult_DescriptionCreationErrorZ_is_ok(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR o);
6111 export function CResult_DescriptionCreationErrorZ_is_ok(o: number): boolean {
6112 if(!isWasmInitialized) {
6113 throw new Error("initializeWasm() must be awaited first!");
6115 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_is_ok(o);
6116 return nativeResponseValue;
6118 // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
6119 export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
6120 if(!isWasmInitialized) {
6121 throw new Error("initializeWasm() must be awaited first!");
6123 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
6124 // debug statements here
6126 // uint64_t CResult_DescriptionCreationErrorZ_clone_ptr(LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR arg);
6127 export function CResult_DescriptionCreationErrorZ_clone_ptr(arg: number): number {
6128 if(!isWasmInitialized) {
6129 throw new Error("initializeWasm() must be awaited first!");
6131 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone_ptr(arg);
6132 return nativeResponseValue;
6134 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
6135 export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
6136 if(!isWasmInitialized) {
6137 throw new Error("initializeWasm() must be awaited first!");
6139 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
6140 return nativeResponseValue;
6142 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
6143 export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
6144 if(!isWasmInitialized) {
6145 throw new Error("initializeWasm() must be awaited first!");
6147 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
6148 return nativeResponseValue;
6150 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
6151 export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
6152 if(!isWasmInitialized) {
6153 throw new Error("initializeWasm() must be awaited first!");
6155 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
6156 return nativeResponseValue;
6158 // bool CResult_ExpiryTimeCreationErrorZ_is_ok(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR o);
6159 export function CResult_ExpiryTimeCreationErrorZ_is_ok(o: number): boolean {
6160 if(!isWasmInitialized) {
6161 throw new Error("initializeWasm() must be awaited first!");
6163 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_is_ok(o);
6164 return nativeResponseValue;
6166 // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
6167 export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
6168 if(!isWasmInitialized) {
6169 throw new Error("initializeWasm() must be awaited first!");
6171 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
6172 // debug statements here
6174 // uint64_t CResult_ExpiryTimeCreationErrorZ_clone_ptr(LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR arg);
6175 export function CResult_ExpiryTimeCreationErrorZ_clone_ptr(arg: number): number {
6176 if(!isWasmInitialized) {
6177 throw new Error("initializeWasm() must be awaited first!");
6179 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone_ptr(arg);
6180 return nativeResponseValue;
6182 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
6183 export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
6184 if(!isWasmInitialized) {
6185 throw new Error("initializeWasm() must be awaited first!");
6187 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
6188 return nativeResponseValue;
6190 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
6191 export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
6192 if(!isWasmInitialized) {
6193 throw new Error("initializeWasm() must be awaited first!");
6195 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
6196 return nativeResponseValue;
6198 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
6199 export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
6200 if(!isWasmInitialized) {
6201 throw new Error("initializeWasm() must be awaited first!");
6203 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
6204 return nativeResponseValue;
6206 // bool CResult_PrivateRouteCreationErrorZ_is_ok(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR o);
6207 export function CResult_PrivateRouteCreationErrorZ_is_ok(o: number): boolean {
6208 if(!isWasmInitialized) {
6209 throw new Error("initializeWasm() must be awaited first!");
6211 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_is_ok(o);
6212 return nativeResponseValue;
6214 // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
6215 export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
6216 if(!isWasmInitialized) {
6217 throw new Error("initializeWasm() must be awaited first!");
6219 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
6220 // debug statements here
6222 // uint64_t CResult_PrivateRouteCreationErrorZ_clone_ptr(LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR arg);
6223 export function CResult_PrivateRouteCreationErrorZ_clone_ptr(arg: number): number {
6224 if(!isWasmInitialized) {
6225 throw new Error("initializeWasm() must be awaited first!");
6227 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone_ptr(arg);
6228 return nativeResponseValue;
6230 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
6231 export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
6232 if(!isWasmInitialized) {
6233 throw new Error("initializeWasm() must be awaited first!");
6235 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
6236 return nativeResponseValue;
6238 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
6239 export function CResult_StringErrorZ_ok(o: String): number {
6240 if(!isWasmInitialized) {
6241 throw new Error("initializeWasm() must be awaited first!");
6243 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
6244 return nativeResponseValue;
6246 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
6247 export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
6248 if(!isWasmInitialized) {
6249 throw new Error("initializeWasm() must be awaited first!");
6251 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
6252 return nativeResponseValue;
6254 // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
6255 export function CResult_StringErrorZ_is_ok(o: number): boolean {
6256 if(!isWasmInitialized) {
6257 throw new Error("initializeWasm() must be awaited first!");
6259 const nativeResponseValue = wasm.CResult_StringErrorZ_is_ok(o);
6260 return nativeResponseValue;
6262 // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
6263 export function CResult_StringErrorZ_free(_res: number): void {
6264 if(!isWasmInitialized) {
6265 throw new Error("initializeWasm() must be awaited first!");
6267 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
6268 // debug statements here
6270 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
6271 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
6272 if(!isWasmInitialized) {
6273 throw new Error("initializeWasm() must be awaited first!");
6275 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
6276 return nativeResponseValue;
6278 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6279 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
6280 if(!isWasmInitialized) {
6281 throw new Error("initializeWasm() must be awaited first!");
6283 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
6284 return nativeResponseValue;
6286 // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
6287 export function CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: number): boolean {
6288 if(!isWasmInitialized) {
6289 throw new Error("initializeWasm() must be awaited first!");
6291 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o);
6292 return nativeResponseValue;
6294 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
6295 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
6296 if(!isWasmInitialized) {
6297 throw new Error("initializeWasm() must be awaited first!");
6299 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
6300 // debug statements here
6302 // uint64_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
6303 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6304 if(!isWasmInitialized) {
6305 throw new Error("initializeWasm() must be awaited first!");
6307 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(arg);
6308 return nativeResponseValue;
6310 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
6311 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
6312 if(!isWasmInitialized) {
6313 throw new Error("initializeWasm() must be awaited first!");
6315 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
6316 return nativeResponseValue;
6318 // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
6319 export function COption_MonitorEventZ_some(o: number): number {
6320 if(!isWasmInitialized) {
6321 throw new Error("initializeWasm() must be awaited first!");
6323 const nativeResponseValue = wasm.COption_MonitorEventZ_some(o);
6324 return nativeResponseValue;
6326 // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
6327 export function COption_MonitorEventZ_none(): number {
6328 if(!isWasmInitialized) {
6329 throw new Error("initializeWasm() must be awaited first!");
6331 const nativeResponseValue = wasm.COption_MonitorEventZ_none();
6332 return nativeResponseValue;
6334 // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
6335 export function COption_MonitorEventZ_free(_res: number): void {
6336 if(!isWasmInitialized) {
6337 throw new Error("initializeWasm() must be awaited first!");
6339 const nativeResponseValue = wasm.COption_MonitorEventZ_free(_res);
6340 // debug statements here
6342 // uint64_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
6343 export function COption_MonitorEventZ_clone_ptr(arg: number): number {
6344 if(!isWasmInitialized) {
6345 throw new Error("initializeWasm() must be awaited first!");
6347 const nativeResponseValue = wasm.COption_MonitorEventZ_clone_ptr(arg);
6348 return nativeResponseValue;
6350 // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
6351 export function COption_MonitorEventZ_clone(orig: number): number {
6352 if(!isWasmInitialized) {
6353 throw new Error("initializeWasm() must be awaited first!");
6355 const nativeResponseValue = wasm.COption_MonitorEventZ_clone(orig);
6356 return nativeResponseValue;
6358 // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
6359 export function CResult_COption_MonitorEventZDecodeErrorZ_ok(o: number): number {
6360 if(!isWasmInitialized) {
6361 throw new Error("initializeWasm() must be awaited first!");
6363 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_ok(o);
6364 return nativeResponseValue;
6366 // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
6367 export function CResult_COption_MonitorEventZDecodeErrorZ_err(e: number): number {
6368 if(!isWasmInitialized) {
6369 throw new Error("initializeWasm() must be awaited first!");
6371 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_err(e);
6372 return nativeResponseValue;
6374 // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
6375 export function CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: number): boolean {
6376 if(!isWasmInitialized) {
6377 throw new Error("initializeWasm() must be awaited first!");
6379 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o);
6380 return nativeResponseValue;
6382 // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
6383 export function CResult_COption_MonitorEventZDecodeErrorZ_free(_res: number): void {
6384 if(!isWasmInitialized) {
6385 throw new Error("initializeWasm() must be awaited first!");
6387 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_free(_res);
6388 // debug statements here
6390 // uint64_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
6391 export function CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg: number): number {
6392 if(!isWasmInitialized) {
6393 throw new Error("initializeWasm() must be awaited first!");
6395 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(arg);
6396 return nativeResponseValue;
6398 // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
6399 export function CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: number): number {
6400 if(!isWasmInitialized) {
6401 throw new Error("initializeWasm() must be awaited first!");
6403 const nativeResponseValue = wasm.CResult_COption_MonitorEventZDecodeErrorZ_clone(orig);
6404 return nativeResponseValue;
6406 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
6407 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
6408 if(!isWasmInitialized) {
6409 throw new Error("initializeWasm() must be awaited first!");
6411 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
6412 return nativeResponseValue;
6414 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6415 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
6416 if(!isWasmInitialized) {
6417 throw new Error("initializeWasm() must be awaited first!");
6419 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
6420 return nativeResponseValue;
6422 // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
6423 export function CResult_HTLCUpdateDecodeErrorZ_is_ok(o: number): boolean {
6424 if(!isWasmInitialized) {
6425 throw new Error("initializeWasm() must be awaited first!");
6427 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_is_ok(o);
6428 return nativeResponseValue;
6430 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
6431 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
6432 if(!isWasmInitialized) {
6433 throw new Error("initializeWasm() must be awaited first!");
6435 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
6436 // debug statements here
6438 // uint64_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
6439 export function CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg: number): number {
6440 if(!isWasmInitialized) {
6441 throw new Error("initializeWasm() must be awaited first!");
6443 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone_ptr(arg);
6444 return nativeResponseValue;
6446 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
6447 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
6448 if(!isWasmInitialized) {
6449 throw new Error("initializeWasm() must be awaited first!");
6451 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
6452 return nativeResponseValue;
6454 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
6455 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
6456 if(!isWasmInitialized) {
6457 throw new Error("initializeWasm() must be awaited first!");
6459 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
6460 return nativeResponseValue;
6462 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
6463 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
6464 if(!isWasmInitialized) {
6465 throw new Error("initializeWasm() must be awaited first!");
6467 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
6468 return nativeResponseValue;
6470 // bool CResult_NoneMonitorUpdateErrorZ_is_ok(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR o);
6471 export function CResult_NoneMonitorUpdateErrorZ_is_ok(o: number): boolean {
6472 if(!isWasmInitialized) {
6473 throw new Error("initializeWasm() must be awaited first!");
6475 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_is_ok(o);
6476 return nativeResponseValue;
6478 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
6479 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
6480 if(!isWasmInitialized) {
6481 throw new Error("initializeWasm() must be awaited first!");
6483 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
6484 // debug statements here
6486 // uint64_t CResult_NoneMonitorUpdateErrorZ_clone_ptr(LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR arg);
6487 export function CResult_NoneMonitorUpdateErrorZ_clone_ptr(arg: number): number {
6488 if(!isWasmInitialized) {
6489 throw new Error("initializeWasm() must be awaited first!");
6491 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone_ptr(arg);
6492 return nativeResponseValue;
6494 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
6495 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
6496 if(!isWasmInitialized) {
6497 throw new Error("initializeWasm() must be awaited first!");
6499 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
6500 return nativeResponseValue;
6502 // uint64_t C2Tuple_OutPointScriptZ_clone_ptr(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR arg);
6503 export function C2Tuple_OutPointScriptZ_clone_ptr(arg: number): number {
6504 if(!isWasmInitialized) {
6505 throw new Error("initializeWasm() must be awaited first!");
6507 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone_ptr(arg);
6508 return nativeResponseValue;
6510 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
6511 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
6512 if(!isWasmInitialized) {
6513 throw new Error("initializeWasm() must be awaited first!");
6515 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
6516 return nativeResponseValue;
6518 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
6519 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
6520 if(!isWasmInitialized) {
6521 throw new Error("initializeWasm() must be awaited first!");
6523 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
6524 return nativeResponseValue;
6526 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
6527 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
6528 if(!isWasmInitialized) {
6529 throw new Error("initializeWasm() must be awaited first!");
6531 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
6532 // debug statements here
6534 // uint64_t C2Tuple_u32ScriptZ_clone_ptr(LDKC2Tuple_u32ScriptZ *NONNULL_PTR arg);
6535 export function C2Tuple_u32ScriptZ_clone_ptr(arg: number): number {
6536 if(!isWasmInitialized) {
6537 throw new Error("initializeWasm() must be awaited first!");
6539 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone_ptr(arg);
6540 return nativeResponseValue;
6542 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
6543 export function C2Tuple_u32ScriptZ_clone(orig: number): number {
6544 if(!isWasmInitialized) {
6545 throw new Error("initializeWasm() must be awaited first!");
6547 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
6548 return nativeResponseValue;
6550 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
6551 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
6552 if(!isWasmInitialized) {
6553 throw new Error("initializeWasm() must be awaited first!");
6555 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
6556 return nativeResponseValue;
6558 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
6559 export function C2Tuple_u32ScriptZ_free(_res: number): void {
6560 if(!isWasmInitialized) {
6561 throw new Error("initializeWasm() must be awaited first!");
6563 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
6564 // debug statements here
6566 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
6567 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
6568 if(!isWasmInitialized) {
6569 throw new Error("initializeWasm() must be awaited first!");
6571 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
6572 // debug statements here
6574 // uint64_t C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR arg);
6575 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(arg: number): number {
6576 if(!isWasmInitialized) {
6577 throw new Error("initializeWasm() must be awaited first!");
6579 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(arg);
6580 return nativeResponseValue;
6582 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
6583 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
6584 if(!isWasmInitialized) {
6585 throw new Error("initializeWasm() must be awaited first!");
6587 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
6588 return nativeResponseValue;
6590 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
6591 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
6592 if(!isWasmInitialized) {
6593 throw new Error("initializeWasm() must be awaited first!");
6595 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
6596 return nativeResponseValue;
6598 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
6599 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
6600 if(!isWasmInitialized) {
6601 throw new Error("initializeWasm() must be awaited first!");
6603 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
6604 // debug statements here
6606 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
6607 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
6608 if(!isWasmInitialized) {
6609 throw new Error("initializeWasm() must be awaited first!");
6611 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
6612 // debug statements here
6614 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
6615 export function CVec_EventZ_free(_res: number[]): void {
6616 if(!isWasmInitialized) {
6617 throw new Error("initializeWasm() must be awaited first!");
6619 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
6620 // debug statements here
6622 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
6623 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
6624 if(!isWasmInitialized) {
6625 throw new Error("initializeWasm() must be awaited first!");
6627 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
6628 // debug statements here
6630 // uint64_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
6631 export function C2Tuple_u32TxOutZ_clone_ptr(arg: number): number {
6632 if(!isWasmInitialized) {
6633 throw new Error("initializeWasm() must be awaited first!");
6635 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone_ptr(arg);
6636 return nativeResponseValue;
6638 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
6639 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
6640 if(!isWasmInitialized) {
6641 throw new Error("initializeWasm() must be awaited first!");
6643 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
6644 return nativeResponseValue;
6646 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
6647 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
6648 if(!isWasmInitialized) {
6649 throw new Error("initializeWasm() must be awaited first!");
6651 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
6652 return nativeResponseValue;
6654 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
6655 export function C2Tuple_u32TxOutZ_free(_res: number): void {
6656 if(!isWasmInitialized) {
6657 throw new Error("initializeWasm() must be awaited first!");
6659 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
6660 // debug statements here
6662 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
6663 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
6664 if(!isWasmInitialized) {
6665 throw new Error("initializeWasm() must be awaited first!");
6667 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
6668 // debug statements here
6670 // uint64_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
6671 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg: number): number {
6672 if(!isWasmInitialized) {
6673 throw new Error("initializeWasm() must be awaited first!");
6675 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(arg);
6676 return nativeResponseValue;
6678 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
6679 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
6680 if(!isWasmInitialized) {
6681 throw new Error("initializeWasm() must be awaited first!");
6683 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
6684 return nativeResponseValue;
6686 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
6687 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
6688 if(!isWasmInitialized) {
6689 throw new Error("initializeWasm() must be awaited first!");
6691 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
6692 return nativeResponseValue;
6694 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
6695 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
6696 if(!isWasmInitialized) {
6697 throw new Error("initializeWasm() must be awaited first!");
6699 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
6700 // debug statements here
6702 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
6703 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
6704 if(!isWasmInitialized) {
6705 throw new Error("initializeWasm() must be awaited first!");
6707 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
6708 // debug statements here
6710 // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
6711 export function CVec_BalanceZ_free(_res: number[]): void {
6712 if(!isWasmInitialized) {
6713 throw new Error("initializeWasm() must be awaited first!");
6715 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
6716 // debug statements here
6718 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
6719 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
6720 if(!isWasmInitialized) {
6721 throw new Error("initializeWasm() must be awaited first!");
6723 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
6724 return nativeResponseValue;
6726 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
6727 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
6728 if(!isWasmInitialized) {
6729 throw new Error("initializeWasm() must be awaited first!");
6731 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
6732 return nativeResponseValue;
6734 // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
6735 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o: number): boolean {
6736 if(!isWasmInitialized) {
6737 throw new Error("initializeWasm() must be awaited first!");
6739 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(o);
6740 return nativeResponseValue;
6742 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
6743 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
6744 if(!isWasmInitialized) {
6745 throw new Error("initializeWasm() must be awaited first!");
6747 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
6748 // debug statements here
6750 // uint64_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
6751 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg: number): number {
6752 if(!isWasmInitialized) {
6753 throw new Error("initializeWasm() must be awaited first!");
6755 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(arg);
6756 return nativeResponseValue;
6758 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
6759 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
6760 if(!isWasmInitialized) {
6761 throw new Error("initializeWasm() must be awaited first!");
6763 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
6764 return nativeResponseValue;
6766 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
6767 export function CResult_NoneLightningErrorZ_ok(): number {
6768 if(!isWasmInitialized) {
6769 throw new Error("initializeWasm() must be awaited first!");
6771 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
6772 return nativeResponseValue;
6774 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
6775 export function CResult_NoneLightningErrorZ_err(e: number): number {
6776 if(!isWasmInitialized) {
6777 throw new Error("initializeWasm() must be awaited first!");
6779 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
6780 return nativeResponseValue;
6782 // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
6783 export function CResult_NoneLightningErrorZ_is_ok(o: number): boolean {
6784 if(!isWasmInitialized) {
6785 throw new Error("initializeWasm() must be awaited first!");
6787 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_is_ok(o);
6788 return nativeResponseValue;
6790 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
6791 export function CResult_NoneLightningErrorZ_free(_res: number): void {
6792 if(!isWasmInitialized) {
6793 throw new Error("initializeWasm() must be awaited first!");
6795 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
6796 // debug statements here
6798 // uint64_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
6799 export function CResult_NoneLightningErrorZ_clone_ptr(arg: number): number {
6800 if(!isWasmInitialized) {
6801 throw new Error("initializeWasm() must be awaited first!");
6803 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone_ptr(arg);
6804 return nativeResponseValue;
6806 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
6807 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
6808 if(!isWasmInitialized) {
6809 throw new Error("initializeWasm() must be awaited first!");
6811 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
6812 return nativeResponseValue;
6814 // uint64_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
6815 export function C2Tuple_PublicKeyTypeZ_clone_ptr(arg: number): number {
6816 if(!isWasmInitialized) {
6817 throw new Error("initializeWasm() must be awaited first!");
6819 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone_ptr(arg);
6820 return nativeResponseValue;
6822 // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
6823 export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
6824 if(!isWasmInitialized) {
6825 throw new Error("initializeWasm() must be awaited first!");
6827 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
6828 return nativeResponseValue;
6830 // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
6831 export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
6832 if(!isWasmInitialized) {
6833 throw new Error("initializeWasm() must be awaited first!");
6835 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
6836 return nativeResponseValue;
6838 // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
6839 export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
6840 if(!isWasmInitialized) {
6841 throw new Error("initializeWasm() must be awaited first!");
6843 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
6844 // debug statements here
6846 // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
6847 export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
6848 if(!isWasmInitialized) {
6849 throw new Error("initializeWasm() must be awaited first!");
6851 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
6852 // debug statements here
6854 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
6855 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
6856 if(!isWasmInitialized) {
6857 throw new Error("initializeWasm() must be awaited first!");
6859 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
6860 return nativeResponseValue;
6862 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
6863 export function CResult_boolLightningErrorZ_err(e: number): number {
6864 if(!isWasmInitialized) {
6865 throw new Error("initializeWasm() must be awaited first!");
6867 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
6868 return nativeResponseValue;
6870 // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
6871 export function CResult_boolLightningErrorZ_is_ok(o: number): boolean {
6872 if(!isWasmInitialized) {
6873 throw new Error("initializeWasm() must be awaited first!");
6875 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_is_ok(o);
6876 return nativeResponseValue;
6878 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
6879 export function CResult_boolLightningErrorZ_free(_res: number): void {
6880 if(!isWasmInitialized) {
6881 throw new Error("initializeWasm() must be awaited first!");
6883 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
6884 // debug statements here
6886 // uint64_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
6887 export function CResult_boolLightningErrorZ_clone_ptr(arg: number): number {
6888 if(!isWasmInitialized) {
6889 throw new Error("initializeWasm() must be awaited first!");
6891 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone_ptr(arg);
6892 return nativeResponseValue;
6894 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
6895 export function CResult_boolLightningErrorZ_clone(orig: number): number {
6896 if(!isWasmInitialized) {
6897 throw new Error("initializeWasm() must be awaited first!");
6899 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
6900 return nativeResponseValue;
6902 // uint64_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
6903 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg: number): number {
6904 if(!isWasmInitialized) {
6905 throw new Error("initializeWasm() must be awaited first!");
6907 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(arg);
6908 return nativeResponseValue;
6910 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
6911 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
6912 if(!isWasmInitialized) {
6913 throw new Error("initializeWasm() must be awaited first!");
6915 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
6916 return nativeResponseValue;
6918 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
6919 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
6920 if(!isWasmInitialized) {
6921 throw new Error("initializeWasm() must be awaited first!");
6923 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
6924 return nativeResponseValue;
6926 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
6927 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
6928 if(!isWasmInitialized) {
6929 throw new Error("initializeWasm() must be awaited first!");
6931 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
6932 // debug statements here
6934 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
6935 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
6936 if(!isWasmInitialized) {
6937 throw new Error("initializeWasm() must be awaited first!");
6939 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
6940 // debug statements here
6942 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
6943 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
6944 if(!isWasmInitialized) {
6945 throw new Error("initializeWasm() must be awaited first!");
6947 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
6948 // debug statements here
6950 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
6951 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
6952 if(!isWasmInitialized) {
6953 throw new Error("initializeWasm() must be awaited first!");
6955 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
6956 // debug statements here
6958 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
6959 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
6960 if(!isWasmInitialized) {
6961 throw new Error("initializeWasm() must be awaited first!");
6963 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
6964 return nativeResponseValue;
6966 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
6967 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
6968 if(!isWasmInitialized) {
6969 throw new Error("initializeWasm() must be awaited first!");
6971 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
6972 return nativeResponseValue;
6974 // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
6975 export function CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: number): boolean {
6976 if(!isWasmInitialized) {
6977 throw new Error("initializeWasm() must be awaited first!");
6979 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o);
6980 return nativeResponseValue;
6982 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
6983 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
6984 if(!isWasmInitialized) {
6985 throw new Error("initializeWasm() must be awaited first!");
6987 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
6988 // debug statements here
6990 // uint64_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
6991 export function CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg: number): number {
6992 if(!isWasmInitialized) {
6993 throw new Error("initializeWasm() must be awaited first!");
6995 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(arg);
6996 return nativeResponseValue;
6998 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
6999 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
7000 if(!isWasmInitialized) {
7001 throw new Error("initializeWasm() must be awaited first!");
7003 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
7004 return nativeResponseValue;
7006 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
7007 export function CResult_NonePeerHandleErrorZ_ok(): number {
7008 if(!isWasmInitialized) {
7009 throw new Error("initializeWasm() must be awaited first!");
7011 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
7012 return nativeResponseValue;
7014 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
7015 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
7016 if(!isWasmInitialized) {
7017 throw new Error("initializeWasm() must be awaited first!");
7019 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
7020 return nativeResponseValue;
7022 // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
7023 export function CResult_NonePeerHandleErrorZ_is_ok(o: number): boolean {
7024 if(!isWasmInitialized) {
7025 throw new Error("initializeWasm() must be awaited first!");
7027 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_is_ok(o);
7028 return nativeResponseValue;
7030 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
7031 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
7032 if(!isWasmInitialized) {
7033 throw new Error("initializeWasm() must be awaited first!");
7035 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
7036 // debug statements here
7038 // uint64_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
7039 export function CResult_NonePeerHandleErrorZ_clone_ptr(arg: number): number {
7040 if(!isWasmInitialized) {
7041 throw new Error("initializeWasm() must be awaited first!");
7043 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone_ptr(arg);
7044 return nativeResponseValue;
7046 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
7047 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
7048 if(!isWasmInitialized) {
7049 throw new Error("initializeWasm() must be awaited first!");
7051 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
7052 return nativeResponseValue;
7054 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
7055 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
7056 if(!isWasmInitialized) {
7057 throw new Error("initializeWasm() must be awaited first!");
7059 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
7060 return nativeResponseValue;
7062 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
7063 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
7064 if(!isWasmInitialized) {
7065 throw new Error("initializeWasm() must be awaited first!");
7067 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
7068 return nativeResponseValue;
7070 // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
7071 export function CResult_boolPeerHandleErrorZ_is_ok(o: number): boolean {
7072 if(!isWasmInitialized) {
7073 throw new Error("initializeWasm() must be awaited first!");
7075 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_is_ok(o);
7076 return nativeResponseValue;
7078 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
7079 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
7080 if(!isWasmInitialized) {
7081 throw new Error("initializeWasm() must be awaited first!");
7083 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
7084 // debug statements here
7086 // uint64_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
7087 export function CResult_boolPeerHandleErrorZ_clone_ptr(arg: number): number {
7088 if(!isWasmInitialized) {
7089 throw new Error("initializeWasm() must be awaited first!");
7091 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone_ptr(arg);
7092 return nativeResponseValue;
7094 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
7095 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
7096 if(!isWasmInitialized) {
7097 throw new Error("initializeWasm() must be awaited first!");
7099 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
7100 return nativeResponseValue;
7102 // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
7103 export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
7104 if(!isWasmInitialized) {
7105 throw new Error("initializeWasm() must be awaited first!");
7107 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_ok(o);
7108 return nativeResponseValue;
7110 // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
7111 export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
7112 if(!isWasmInitialized) {
7113 throw new Error("initializeWasm() must be awaited first!");
7115 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_err(e);
7116 return nativeResponseValue;
7118 // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
7119 export function CResult_NodeIdDecodeErrorZ_is_ok(o: number): boolean {
7120 if(!isWasmInitialized) {
7121 throw new Error("initializeWasm() must be awaited first!");
7123 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_is_ok(o);
7124 return nativeResponseValue;
7126 // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
7127 export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
7128 if(!isWasmInitialized) {
7129 throw new Error("initializeWasm() must be awaited first!");
7131 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_free(_res);
7132 // debug statements here
7134 // uint64_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
7135 export function CResult_NodeIdDecodeErrorZ_clone_ptr(arg: number): number {
7136 if(!isWasmInitialized) {
7137 throw new Error("initializeWasm() must be awaited first!");
7139 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone_ptr(arg);
7140 return nativeResponseValue;
7142 // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
7143 export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
7144 if(!isWasmInitialized) {
7145 throw new Error("initializeWasm() must be awaited first!");
7147 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone(orig);
7148 return nativeResponseValue;
7150 // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
7151 export function CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o: number): number {
7152 if(!isWasmInitialized) {
7153 throw new Error("initializeWasm() must be awaited first!");
7155 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_ok(o);
7156 return nativeResponseValue;
7158 // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
7159 export function CResult_COption_NetworkUpdateZDecodeErrorZ_err(e: number): number {
7160 if(!isWasmInitialized) {
7161 throw new Error("initializeWasm() must be awaited first!");
7163 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_err(e);
7164 return nativeResponseValue;
7166 // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
7167 export function CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o: number): boolean {
7168 if(!isWasmInitialized) {
7169 throw new Error("initializeWasm() must be awaited first!");
7171 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(o);
7172 return nativeResponseValue;
7174 // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
7175 export function CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res: number): void {
7176 if(!isWasmInitialized) {
7177 throw new Error("initializeWasm() must be awaited first!");
7179 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_free(_res);
7180 // debug statements here
7182 // uint64_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
7183 export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg: number): number {
7184 if(!isWasmInitialized) {
7185 throw new Error("initializeWasm() must be awaited first!");
7187 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(arg);
7188 return nativeResponseValue;
7190 // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
7191 export function CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig: number): number {
7192 if(!isWasmInitialized) {
7193 throw new Error("initializeWasm() must be awaited first!");
7195 const nativeResponseValue = wasm.CResult_COption_NetworkUpdateZDecodeErrorZ_clone(orig);
7196 return nativeResponseValue;
7198 // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
7199 export function COption_AccessZ_some(o: number): number {
7200 if(!isWasmInitialized) {
7201 throw new Error("initializeWasm() must be awaited first!");
7203 const nativeResponseValue = wasm.COption_AccessZ_some(o);
7204 return nativeResponseValue;
7206 // struct LDKCOption_AccessZ COption_AccessZ_none(void);
7207 export function COption_AccessZ_none(): number {
7208 if(!isWasmInitialized) {
7209 throw new Error("initializeWasm() must be awaited first!");
7211 const nativeResponseValue = wasm.COption_AccessZ_none();
7212 return nativeResponseValue;
7214 // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
7215 export function COption_AccessZ_free(_res: number): void {
7216 if(!isWasmInitialized) {
7217 throw new Error("initializeWasm() must be awaited first!");
7219 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
7220 // debug statements here
7222 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
7223 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
7224 if(!isWasmInitialized) {
7225 throw new Error("initializeWasm() must be awaited first!");
7227 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
7228 return nativeResponseValue;
7230 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
7231 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
7232 if(!isWasmInitialized) {
7233 throw new Error("initializeWasm() must be awaited first!");
7235 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
7236 return nativeResponseValue;
7238 // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
7239 export function CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
7240 if(!isWasmInitialized) {
7241 throw new Error("initializeWasm() must be awaited first!");
7243 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(o);
7244 return nativeResponseValue;
7246 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
7247 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
7248 if(!isWasmInitialized) {
7249 throw new Error("initializeWasm() must be awaited first!");
7251 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
7252 // debug statements here
7254 // uint64_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
7255 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
7256 if(!isWasmInitialized) {
7257 throw new Error("initializeWasm() must be awaited first!");
7259 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(arg);
7260 return nativeResponseValue;
7262 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
7263 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
7264 if(!isWasmInitialized) {
7265 throw new Error("initializeWasm() must be awaited first!");
7267 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
7268 return nativeResponseValue;
7270 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
7271 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
7272 if(!isWasmInitialized) {
7273 throw new Error("initializeWasm() must be awaited first!");
7275 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
7276 return nativeResponseValue;
7278 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
7279 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
7280 if(!isWasmInitialized) {
7281 throw new Error("initializeWasm() must be awaited first!");
7283 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
7284 return nativeResponseValue;
7286 // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
7287 export function CResult_ChannelInfoDecodeErrorZ_is_ok(o: number): boolean {
7288 if(!isWasmInitialized) {
7289 throw new Error("initializeWasm() must be awaited first!");
7291 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_is_ok(o);
7292 return nativeResponseValue;
7294 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
7295 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
7296 if(!isWasmInitialized) {
7297 throw new Error("initializeWasm() must be awaited first!");
7299 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
7300 // debug statements here
7302 // uint64_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
7303 export function CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg: number): number {
7304 if(!isWasmInitialized) {
7305 throw new Error("initializeWasm() must be awaited first!");
7307 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone_ptr(arg);
7308 return nativeResponseValue;
7310 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
7311 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
7312 if(!isWasmInitialized) {
7313 throw new Error("initializeWasm() must be awaited first!");
7315 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
7316 return nativeResponseValue;
7318 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
7319 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
7320 if(!isWasmInitialized) {
7321 throw new Error("initializeWasm() must be awaited first!");
7323 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
7324 return nativeResponseValue;
7326 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
7327 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
7328 if(!isWasmInitialized) {
7329 throw new Error("initializeWasm() must be awaited first!");
7331 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
7332 return nativeResponseValue;
7334 // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
7335 export function CResult_RoutingFeesDecodeErrorZ_is_ok(o: number): boolean {
7336 if(!isWasmInitialized) {
7337 throw new Error("initializeWasm() must be awaited first!");
7339 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_is_ok(o);
7340 return nativeResponseValue;
7342 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
7343 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
7344 if(!isWasmInitialized) {
7345 throw new Error("initializeWasm() must be awaited first!");
7347 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
7348 // debug statements here
7350 // uint64_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
7351 export function CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg: number): number {
7352 if(!isWasmInitialized) {
7353 throw new Error("initializeWasm() must be awaited first!");
7355 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone_ptr(arg);
7356 return nativeResponseValue;
7358 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
7359 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
7360 if(!isWasmInitialized) {
7361 throw new Error("initializeWasm() must be awaited first!");
7363 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
7364 return nativeResponseValue;
7366 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
7367 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
7368 if(!isWasmInitialized) {
7369 throw new Error("initializeWasm() must be awaited first!");
7371 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
7372 return nativeResponseValue;
7374 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
7375 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
7376 if(!isWasmInitialized) {
7377 throw new Error("initializeWasm() must be awaited first!");
7379 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
7380 return nativeResponseValue;
7382 // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
7383 export function CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o: number): boolean {
7384 if(!isWasmInitialized) {
7385 throw new Error("initializeWasm() must be awaited first!");
7387 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(o);
7388 return nativeResponseValue;
7390 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
7391 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
7392 if(!isWasmInitialized) {
7393 throw new Error("initializeWasm() must be awaited first!");
7395 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
7396 // debug statements here
7398 // uint64_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
7399 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg: number): number {
7400 if(!isWasmInitialized) {
7401 throw new Error("initializeWasm() must be awaited first!");
7403 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(arg);
7404 return nativeResponseValue;
7406 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
7407 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
7408 if(!isWasmInitialized) {
7409 throw new Error("initializeWasm() must be awaited first!");
7411 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
7412 return nativeResponseValue;
7414 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
7415 export function CVec_u64Z_free(_res: number[]): void {
7416 if(!isWasmInitialized) {
7417 throw new Error("initializeWasm() must be awaited first!");
7419 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
7420 // debug statements here
7422 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
7423 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
7424 if(!isWasmInitialized) {
7425 throw new Error("initializeWasm() must be awaited first!");
7427 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
7428 return nativeResponseValue;
7430 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
7431 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
7432 if(!isWasmInitialized) {
7433 throw new Error("initializeWasm() must be awaited first!");
7435 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
7436 return nativeResponseValue;
7438 // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
7439 export function CResult_NodeInfoDecodeErrorZ_is_ok(o: number): boolean {
7440 if(!isWasmInitialized) {
7441 throw new Error("initializeWasm() must be awaited first!");
7443 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_is_ok(o);
7444 return nativeResponseValue;
7446 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
7447 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
7448 if(!isWasmInitialized) {
7449 throw new Error("initializeWasm() must be awaited first!");
7451 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
7452 // debug statements here
7454 // uint64_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
7455 export function CResult_NodeInfoDecodeErrorZ_clone_ptr(arg: number): number {
7456 if(!isWasmInitialized) {
7457 throw new Error("initializeWasm() must be awaited first!");
7459 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone_ptr(arg);
7460 return nativeResponseValue;
7462 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
7463 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
7464 if(!isWasmInitialized) {
7465 throw new Error("initializeWasm() must be awaited first!");
7467 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
7468 return nativeResponseValue;
7470 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
7471 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
7472 if(!isWasmInitialized) {
7473 throw new Error("initializeWasm() must be awaited first!");
7475 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
7476 return nativeResponseValue;
7478 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
7479 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
7480 if(!isWasmInitialized) {
7481 throw new Error("initializeWasm() must be awaited first!");
7483 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
7484 return nativeResponseValue;
7486 // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
7487 export function CResult_NetworkGraphDecodeErrorZ_is_ok(o: number): boolean {
7488 if(!isWasmInitialized) {
7489 throw new Error("initializeWasm() must be awaited first!");
7491 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_is_ok(o);
7492 return nativeResponseValue;
7494 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
7495 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
7496 if(!isWasmInitialized) {
7497 throw new Error("initializeWasm() must be awaited first!");
7499 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
7500 // debug statements here
7502 // uint64_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
7503 export function CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg: number): number {
7504 if(!isWasmInitialized) {
7505 throw new Error("initializeWasm() must be awaited first!");
7507 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone_ptr(arg);
7508 return nativeResponseValue;
7510 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
7511 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
7512 if(!isWasmInitialized) {
7513 throw new Error("initializeWasm() must be awaited first!");
7515 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
7516 return nativeResponseValue;
7518 // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
7519 export function COption_CVec_NetAddressZZ_some(o: number[]): number {
7520 if(!isWasmInitialized) {
7521 throw new Error("initializeWasm() must be awaited first!");
7523 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_some(o);
7524 return nativeResponseValue;
7526 // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
7527 export function COption_CVec_NetAddressZZ_none(): number {
7528 if(!isWasmInitialized) {
7529 throw new Error("initializeWasm() must be awaited first!");
7531 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_none();
7532 return nativeResponseValue;
7534 // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
7535 export function COption_CVec_NetAddressZZ_free(_res: number): void {
7536 if(!isWasmInitialized) {
7537 throw new Error("initializeWasm() must be awaited first!");
7539 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_free(_res);
7540 // debug statements here
7542 // uint64_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
7543 export function COption_CVec_NetAddressZZ_clone_ptr(arg: number): number {
7544 if(!isWasmInitialized) {
7545 throw new Error("initializeWasm() must be awaited first!");
7547 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone_ptr(arg);
7548 return nativeResponseValue;
7550 // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
7551 export function COption_CVec_NetAddressZZ_clone(orig: number): number {
7552 if(!isWasmInitialized) {
7553 throw new Error("initializeWasm() must be awaited first!");
7555 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone(orig);
7556 return nativeResponseValue;
7558 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
7559 export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
7560 if(!isWasmInitialized) {
7561 throw new Error("initializeWasm() must be awaited first!");
7563 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
7564 return nativeResponseValue;
7566 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
7567 export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
7568 if(!isWasmInitialized) {
7569 throw new Error("initializeWasm() must be awaited first!");
7571 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
7572 return nativeResponseValue;
7574 // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
7575 export function CResult_NetAddressDecodeErrorZ_is_ok(o: number): boolean {
7576 if(!isWasmInitialized) {
7577 throw new Error("initializeWasm() must be awaited first!");
7579 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_is_ok(o);
7580 return nativeResponseValue;
7582 // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
7583 export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
7584 if(!isWasmInitialized) {
7585 throw new Error("initializeWasm() must be awaited first!");
7587 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
7588 // debug statements here
7590 // uint64_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
7591 export function CResult_NetAddressDecodeErrorZ_clone_ptr(arg: number): number {
7592 if(!isWasmInitialized) {
7593 throw new Error("initializeWasm() must be awaited first!");
7595 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone_ptr(arg);
7596 return nativeResponseValue;
7598 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
7599 export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
7600 if(!isWasmInitialized) {
7601 throw new Error("initializeWasm() must be awaited first!");
7603 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
7604 return nativeResponseValue;
7606 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
7607 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
7608 if(!isWasmInitialized) {
7609 throw new Error("initializeWasm() must be awaited first!");
7611 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
7612 // debug statements here
7614 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
7615 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
7616 if(!isWasmInitialized) {
7617 throw new Error("initializeWasm() must be awaited first!");
7619 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
7620 // debug statements here
7622 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
7623 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
7624 if(!isWasmInitialized) {
7625 throw new Error("initializeWasm() must be awaited first!");
7627 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
7628 // debug statements here
7630 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
7631 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
7632 if(!isWasmInitialized) {
7633 throw new Error("initializeWasm() must be awaited first!");
7635 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
7636 // debug statements here
7638 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
7639 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
7640 if(!isWasmInitialized) {
7641 throw new Error("initializeWasm() must be awaited first!");
7643 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
7644 return nativeResponseValue;
7646 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
7647 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
7648 if(!isWasmInitialized) {
7649 throw new Error("initializeWasm() must be awaited first!");
7651 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
7652 return nativeResponseValue;
7654 // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
7655 export function CResult_AcceptChannelDecodeErrorZ_is_ok(o: number): boolean {
7656 if(!isWasmInitialized) {
7657 throw new Error("initializeWasm() must be awaited first!");
7659 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_is_ok(o);
7660 return nativeResponseValue;
7662 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
7663 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
7664 if(!isWasmInitialized) {
7665 throw new Error("initializeWasm() must be awaited first!");
7667 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
7668 // debug statements here
7670 // uint64_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
7671 export function CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg: number): number {
7672 if(!isWasmInitialized) {
7673 throw new Error("initializeWasm() must be awaited first!");
7675 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone_ptr(arg);
7676 return nativeResponseValue;
7678 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
7679 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
7680 if(!isWasmInitialized) {
7681 throw new Error("initializeWasm() must be awaited first!");
7683 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
7684 return nativeResponseValue;
7686 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
7687 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
7688 if(!isWasmInitialized) {
7689 throw new Error("initializeWasm() must be awaited first!");
7691 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
7692 return nativeResponseValue;
7694 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
7695 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
7696 if(!isWasmInitialized) {
7697 throw new Error("initializeWasm() must be awaited first!");
7699 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
7700 return nativeResponseValue;
7702 // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
7703 export function CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: number): boolean {
7704 if(!isWasmInitialized) {
7705 throw new Error("initializeWasm() must be awaited first!");
7707 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o);
7708 return nativeResponseValue;
7710 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
7711 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
7712 if(!isWasmInitialized) {
7713 throw new Error("initializeWasm() must be awaited first!");
7715 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
7716 // debug statements here
7718 // uint64_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
7719 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg: number): number {
7720 if(!isWasmInitialized) {
7721 throw new Error("initializeWasm() must be awaited first!");
7723 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(arg);
7724 return nativeResponseValue;
7726 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
7727 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
7728 if(!isWasmInitialized) {
7729 throw new Error("initializeWasm() must be awaited first!");
7731 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
7732 return nativeResponseValue;
7734 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
7735 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
7736 if(!isWasmInitialized) {
7737 throw new Error("initializeWasm() must be awaited first!");
7739 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
7740 return nativeResponseValue;
7742 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
7743 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
7744 if(!isWasmInitialized) {
7745 throw new Error("initializeWasm() must be awaited first!");
7747 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
7748 return nativeResponseValue;
7750 // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
7751 export function CResult_ChannelReestablishDecodeErrorZ_is_ok(o: number): boolean {
7752 if(!isWasmInitialized) {
7753 throw new Error("initializeWasm() must be awaited first!");
7755 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_is_ok(o);
7756 return nativeResponseValue;
7758 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
7759 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
7760 if(!isWasmInitialized) {
7761 throw new Error("initializeWasm() must be awaited first!");
7763 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
7764 // debug statements here
7766 // uint64_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
7767 export function CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg: number): number {
7768 if(!isWasmInitialized) {
7769 throw new Error("initializeWasm() must be awaited first!");
7771 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone_ptr(arg);
7772 return nativeResponseValue;
7774 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
7775 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
7776 if(!isWasmInitialized) {
7777 throw new Error("initializeWasm() must be awaited first!");
7779 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
7780 return nativeResponseValue;
7782 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
7783 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
7784 if(!isWasmInitialized) {
7785 throw new Error("initializeWasm() must be awaited first!");
7787 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
7788 return nativeResponseValue;
7790 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
7791 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
7792 if(!isWasmInitialized) {
7793 throw new Error("initializeWasm() must be awaited first!");
7795 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
7796 return nativeResponseValue;
7798 // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
7799 export function CResult_ClosingSignedDecodeErrorZ_is_ok(o: number): boolean {
7800 if(!isWasmInitialized) {
7801 throw new Error("initializeWasm() must be awaited first!");
7803 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_is_ok(o);
7804 return nativeResponseValue;
7806 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
7807 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
7808 if(!isWasmInitialized) {
7809 throw new Error("initializeWasm() must be awaited first!");
7811 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
7812 // debug statements here
7814 // uint64_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
7815 export function CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg: number): number {
7816 if(!isWasmInitialized) {
7817 throw new Error("initializeWasm() must be awaited first!");
7819 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone_ptr(arg);
7820 return nativeResponseValue;
7822 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
7823 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
7824 if(!isWasmInitialized) {
7825 throw new Error("initializeWasm() must be awaited first!");
7827 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
7828 return nativeResponseValue;
7830 // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
7831 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
7832 if(!isWasmInitialized) {
7833 throw new Error("initializeWasm() must be awaited first!");
7835 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
7836 return nativeResponseValue;
7838 // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
7839 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
7840 if(!isWasmInitialized) {
7841 throw new Error("initializeWasm() must be awaited first!");
7843 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
7844 return nativeResponseValue;
7846 // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
7847 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: number): boolean {
7848 if(!isWasmInitialized) {
7849 throw new Error("initializeWasm() must be awaited first!");
7851 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o);
7852 return nativeResponseValue;
7854 // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
7855 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
7856 if(!isWasmInitialized) {
7857 throw new Error("initializeWasm() must be awaited first!");
7859 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
7860 // debug statements here
7862 // uint64_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
7863 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg: number): number {
7864 if(!isWasmInitialized) {
7865 throw new Error("initializeWasm() must be awaited first!");
7867 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(arg);
7868 return nativeResponseValue;
7870 // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
7871 export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
7872 if(!isWasmInitialized) {
7873 throw new Error("initializeWasm() must be awaited first!");
7875 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
7876 return nativeResponseValue;
7878 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
7879 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
7880 if(!isWasmInitialized) {
7881 throw new Error("initializeWasm() must be awaited first!");
7883 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
7884 return nativeResponseValue;
7886 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
7887 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
7888 if(!isWasmInitialized) {
7889 throw new Error("initializeWasm() must be awaited first!");
7891 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
7892 return nativeResponseValue;
7894 // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
7895 export function CResult_CommitmentSignedDecodeErrorZ_is_ok(o: number): boolean {
7896 if(!isWasmInitialized) {
7897 throw new Error("initializeWasm() must be awaited first!");
7899 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_is_ok(o);
7900 return nativeResponseValue;
7902 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
7903 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
7904 if(!isWasmInitialized) {
7905 throw new Error("initializeWasm() must be awaited first!");
7907 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
7908 // debug statements here
7910 // uint64_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
7911 export function CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg: number): number {
7912 if(!isWasmInitialized) {
7913 throw new Error("initializeWasm() must be awaited first!");
7915 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone_ptr(arg);
7916 return nativeResponseValue;
7918 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
7919 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
7920 if(!isWasmInitialized) {
7921 throw new Error("initializeWasm() must be awaited first!");
7923 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
7924 return nativeResponseValue;
7926 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
7927 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
7928 if(!isWasmInitialized) {
7929 throw new Error("initializeWasm() must be awaited first!");
7931 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
7932 return nativeResponseValue;
7934 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
7935 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
7936 if(!isWasmInitialized) {
7937 throw new Error("initializeWasm() must be awaited first!");
7939 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
7940 return nativeResponseValue;
7942 // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
7943 export function CResult_FundingCreatedDecodeErrorZ_is_ok(o: number): boolean {
7944 if(!isWasmInitialized) {
7945 throw new Error("initializeWasm() must be awaited first!");
7947 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_is_ok(o);
7948 return nativeResponseValue;
7950 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
7951 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
7952 if(!isWasmInitialized) {
7953 throw new Error("initializeWasm() must be awaited first!");
7955 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
7956 // debug statements here
7958 // uint64_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
7959 export function CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg: number): number {
7960 if(!isWasmInitialized) {
7961 throw new Error("initializeWasm() must be awaited first!");
7963 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone_ptr(arg);
7964 return nativeResponseValue;
7966 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
7967 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
7968 if(!isWasmInitialized) {
7969 throw new Error("initializeWasm() must be awaited first!");
7971 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
7972 return nativeResponseValue;
7974 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
7975 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
7976 if(!isWasmInitialized) {
7977 throw new Error("initializeWasm() must be awaited first!");
7979 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
7980 return nativeResponseValue;
7982 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
7983 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
7984 if(!isWasmInitialized) {
7985 throw new Error("initializeWasm() must be awaited first!");
7987 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
7988 return nativeResponseValue;
7990 // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
7991 export function CResult_FundingSignedDecodeErrorZ_is_ok(o: number): boolean {
7992 if(!isWasmInitialized) {
7993 throw new Error("initializeWasm() must be awaited first!");
7995 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_is_ok(o);
7996 return nativeResponseValue;
7998 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
7999 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
8000 if(!isWasmInitialized) {
8001 throw new Error("initializeWasm() must be awaited first!");
8003 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
8004 // debug statements here
8006 // uint64_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
8007 export function CResult_FundingSignedDecodeErrorZ_clone_ptr(arg: number): number {
8008 if(!isWasmInitialized) {
8009 throw new Error("initializeWasm() must be awaited first!");
8011 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone_ptr(arg);
8012 return nativeResponseValue;
8014 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
8015 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
8016 if(!isWasmInitialized) {
8017 throw new Error("initializeWasm() must be awaited first!");
8019 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
8020 return nativeResponseValue;
8022 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
8023 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
8024 if(!isWasmInitialized) {
8025 throw new Error("initializeWasm() must be awaited first!");
8027 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
8028 return nativeResponseValue;
8030 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
8031 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
8032 if(!isWasmInitialized) {
8033 throw new Error("initializeWasm() must be awaited first!");
8035 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
8036 return nativeResponseValue;
8038 // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
8039 export function CResult_FundingLockedDecodeErrorZ_is_ok(o: number): boolean {
8040 if(!isWasmInitialized) {
8041 throw new Error("initializeWasm() must be awaited first!");
8043 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_is_ok(o);
8044 return nativeResponseValue;
8046 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
8047 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
8048 if(!isWasmInitialized) {
8049 throw new Error("initializeWasm() must be awaited first!");
8051 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
8052 // debug statements here
8054 // uint64_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
8055 export function CResult_FundingLockedDecodeErrorZ_clone_ptr(arg: number): number {
8056 if(!isWasmInitialized) {
8057 throw new Error("initializeWasm() must be awaited first!");
8059 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone_ptr(arg);
8060 return nativeResponseValue;
8062 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
8063 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
8064 if(!isWasmInitialized) {
8065 throw new Error("initializeWasm() must be awaited first!");
8067 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
8068 return nativeResponseValue;
8070 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
8071 export function CResult_InitDecodeErrorZ_ok(o: number): number {
8072 if(!isWasmInitialized) {
8073 throw new Error("initializeWasm() must be awaited first!");
8075 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
8076 return nativeResponseValue;
8078 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
8079 export function CResult_InitDecodeErrorZ_err(e: number): number {
8080 if(!isWasmInitialized) {
8081 throw new Error("initializeWasm() must be awaited first!");
8083 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
8084 return nativeResponseValue;
8086 // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
8087 export function CResult_InitDecodeErrorZ_is_ok(o: number): boolean {
8088 if(!isWasmInitialized) {
8089 throw new Error("initializeWasm() must be awaited first!");
8091 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_is_ok(o);
8092 return nativeResponseValue;
8094 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
8095 export function CResult_InitDecodeErrorZ_free(_res: number): void {
8096 if(!isWasmInitialized) {
8097 throw new Error("initializeWasm() must be awaited first!");
8099 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
8100 // debug statements here
8102 // uint64_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
8103 export function CResult_InitDecodeErrorZ_clone_ptr(arg: number): number {
8104 if(!isWasmInitialized) {
8105 throw new Error("initializeWasm() must be awaited first!");
8107 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone_ptr(arg);
8108 return nativeResponseValue;
8110 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
8111 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
8112 if(!isWasmInitialized) {
8113 throw new Error("initializeWasm() must be awaited first!");
8115 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
8116 return nativeResponseValue;
8118 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
8119 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
8120 if(!isWasmInitialized) {
8121 throw new Error("initializeWasm() must be awaited first!");
8123 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
8124 return nativeResponseValue;
8126 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
8127 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
8128 if(!isWasmInitialized) {
8129 throw new Error("initializeWasm() must be awaited first!");
8131 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
8132 return nativeResponseValue;
8134 // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
8135 export function CResult_OpenChannelDecodeErrorZ_is_ok(o: number): boolean {
8136 if(!isWasmInitialized) {
8137 throw new Error("initializeWasm() must be awaited first!");
8139 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_is_ok(o);
8140 return nativeResponseValue;
8142 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
8143 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
8144 if(!isWasmInitialized) {
8145 throw new Error("initializeWasm() must be awaited first!");
8147 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
8148 // debug statements here
8150 // uint64_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
8151 export function CResult_OpenChannelDecodeErrorZ_clone_ptr(arg: number): number {
8152 if(!isWasmInitialized) {
8153 throw new Error("initializeWasm() must be awaited first!");
8155 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone_ptr(arg);
8156 return nativeResponseValue;
8158 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
8159 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
8160 if(!isWasmInitialized) {
8161 throw new Error("initializeWasm() must be awaited first!");
8163 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
8164 return nativeResponseValue;
8166 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
8167 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
8168 if(!isWasmInitialized) {
8169 throw new Error("initializeWasm() must be awaited first!");
8171 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
8172 return nativeResponseValue;
8174 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
8175 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
8176 if(!isWasmInitialized) {
8177 throw new Error("initializeWasm() must be awaited first!");
8179 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
8180 return nativeResponseValue;
8182 // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
8183 export function CResult_RevokeAndACKDecodeErrorZ_is_ok(o: number): boolean {
8184 if(!isWasmInitialized) {
8185 throw new Error("initializeWasm() must be awaited first!");
8187 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_is_ok(o);
8188 return nativeResponseValue;
8190 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
8191 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
8192 if(!isWasmInitialized) {
8193 throw new Error("initializeWasm() must be awaited first!");
8195 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
8196 // debug statements here
8198 // uint64_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
8199 export function CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg: number): number {
8200 if(!isWasmInitialized) {
8201 throw new Error("initializeWasm() must be awaited first!");
8203 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone_ptr(arg);
8204 return nativeResponseValue;
8206 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
8207 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
8208 if(!isWasmInitialized) {
8209 throw new Error("initializeWasm() must be awaited first!");
8211 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
8212 return nativeResponseValue;
8214 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
8215 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
8216 if(!isWasmInitialized) {
8217 throw new Error("initializeWasm() must be awaited first!");
8219 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
8220 return nativeResponseValue;
8222 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
8223 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
8224 if(!isWasmInitialized) {
8225 throw new Error("initializeWasm() must be awaited first!");
8227 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
8228 return nativeResponseValue;
8230 // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
8231 export function CResult_ShutdownDecodeErrorZ_is_ok(o: number): boolean {
8232 if(!isWasmInitialized) {
8233 throw new Error("initializeWasm() must be awaited first!");
8235 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_is_ok(o);
8236 return nativeResponseValue;
8238 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
8239 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
8240 if(!isWasmInitialized) {
8241 throw new Error("initializeWasm() must be awaited first!");
8243 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
8244 // debug statements here
8246 // uint64_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
8247 export function CResult_ShutdownDecodeErrorZ_clone_ptr(arg: number): number {
8248 if(!isWasmInitialized) {
8249 throw new Error("initializeWasm() must be awaited first!");
8251 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone_ptr(arg);
8252 return nativeResponseValue;
8254 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
8255 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
8256 if(!isWasmInitialized) {
8257 throw new Error("initializeWasm() must be awaited first!");
8259 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
8260 return nativeResponseValue;
8262 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
8263 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
8264 if(!isWasmInitialized) {
8265 throw new Error("initializeWasm() must be awaited first!");
8267 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
8268 return nativeResponseValue;
8270 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8271 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
8272 if(!isWasmInitialized) {
8273 throw new Error("initializeWasm() must be awaited first!");
8275 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
8276 return nativeResponseValue;
8278 // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
8279 export function CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: number): boolean {
8280 if(!isWasmInitialized) {
8281 throw new Error("initializeWasm() must be awaited first!");
8283 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o);
8284 return nativeResponseValue;
8286 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
8287 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
8288 if(!isWasmInitialized) {
8289 throw new Error("initializeWasm() must be awaited first!");
8291 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
8292 // debug statements here
8294 // uint64_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
8295 export function CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8296 if(!isWasmInitialized) {
8297 throw new Error("initializeWasm() must be awaited first!");
8299 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(arg);
8300 return nativeResponseValue;
8302 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
8303 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
8304 if(!isWasmInitialized) {
8305 throw new Error("initializeWasm() must be awaited first!");
8307 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
8308 return nativeResponseValue;
8310 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
8311 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
8312 if(!isWasmInitialized) {
8313 throw new Error("initializeWasm() must be awaited first!");
8315 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
8316 return nativeResponseValue;
8318 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8319 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
8320 if(!isWasmInitialized) {
8321 throw new Error("initializeWasm() must be awaited first!");
8323 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
8324 return nativeResponseValue;
8326 // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
8327 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: number): boolean {
8328 if(!isWasmInitialized) {
8329 throw new Error("initializeWasm() must be awaited first!");
8331 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o);
8332 return nativeResponseValue;
8334 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
8335 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
8336 if(!isWasmInitialized) {
8337 throw new Error("initializeWasm() must be awaited first!");
8339 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
8340 // debug statements here
8342 // uint64_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
8343 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8344 if(!isWasmInitialized) {
8345 throw new Error("initializeWasm() must be awaited first!");
8347 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(arg);
8348 return nativeResponseValue;
8350 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
8351 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
8352 if(!isWasmInitialized) {
8353 throw new Error("initializeWasm() must be awaited first!");
8355 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
8356 return nativeResponseValue;
8358 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
8359 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
8360 if(!isWasmInitialized) {
8361 throw new Error("initializeWasm() must be awaited first!");
8363 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
8364 return nativeResponseValue;
8366 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
8367 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
8368 if(!isWasmInitialized) {
8369 throw new Error("initializeWasm() must be awaited first!");
8371 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
8372 return nativeResponseValue;
8374 // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
8375 export function CResult_UpdateFeeDecodeErrorZ_is_ok(o: number): boolean {
8376 if(!isWasmInitialized) {
8377 throw new Error("initializeWasm() must be awaited first!");
8379 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_is_ok(o);
8380 return nativeResponseValue;
8382 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
8383 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
8384 if(!isWasmInitialized) {
8385 throw new Error("initializeWasm() must be awaited first!");
8387 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
8388 // debug statements here
8390 // uint64_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
8391 export function CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg: number): number {
8392 if(!isWasmInitialized) {
8393 throw new Error("initializeWasm() must be awaited first!");
8395 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone_ptr(arg);
8396 return nativeResponseValue;
8398 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
8399 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
8400 if(!isWasmInitialized) {
8401 throw new Error("initializeWasm() must be awaited first!");
8403 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
8404 return nativeResponseValue;
8406 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
8407 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
8408 if(!isWasmInitialized) {
8409 throw new Error("initializeWasm() must be awaited first!");
8411 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
8412 return nativeResponseValue;
8414 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8415 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
8416 if(!isWasmInitialized) {
8417 throw new Error("initializeWasm() must be awaited first!");
8419 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
8420 return nativeResponseValue;
8422 // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
8423 export function CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: number): boolean {
8424 if(!isWasmInitialized) {
8425 throw new Error("initializeWasm() must be awaited first!");
8427 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o);
8428 return nativeResponseValue;
8430 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
8431 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
8432 if(!isWasmInitialized) {
8433 throw new Error("initializeWasm() must be awaited first!");
8435 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
8436 // debug statements here
8438 // uint64_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
8439 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8440 if(!isWasmInitialized) {
8441 throw new Error("initializeWasm() must be awaited first!");
8443 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(arg);
8444 return nativeResponseValue;
8446 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
8447 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
8448 if(!isWasmInitialized) {
8449 throw new Error("initializeWasm() must be awaited first!");
8451 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
8452 return nativeResponseValue;
8454 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
8455 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
8456 if(!isWasmInitialized) {
8457 throw new Error("initializeWasm() must be awaited first!");
8459 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
8460 return nativeResponseValue;
8462 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
8463 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
8464 if(!isWasmInitialized) {
8465 throw new Error("initializeWasm() must be awaited first!");
8467 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
8468 return nativeResponseValue;
8470 // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
8471 export function CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: number): boolean {
8472 if(!isWasmInitialized) {
8473 throw new Error("initializeWasm() must be awaited first!");
8475 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o);
8476 return nativeResponseValue;
8478 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
8479 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
8480 if(!isWasmInitialized) {
8481 throw new Error("initializeWasm() must be awaited first!");
8483 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
8484 // debug statements here
8486 // uint64_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
8487 export function CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg: number): number {
8488 if(!isWasmInitialized) {
8489 throw new Error("initializeWasm() must be awaited first!");
8491 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(arg);
8492 return nativeResponseValue;
8494 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
8495 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
8496 if(!isWasmInitialized) {
8497 throw new Error("initializeWasm() must be awaited first!");
8499 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
8500 return nativeResponseValue;
8502 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
8503 export function CResult_PingDecodeErrorZ_ok(o: number): number {
8504 if(!isWasmInitialized) {
8505 throw new Error("initializeWasm() must be awaited first!");
8507 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
8508 return nativeResponseValue;
8510 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
8511 export function CResult_PingDecodeErrorZ_err(e: number): number {
8512 if(!isWasmInitialized) {
8513 throw new Error("initializeWasm() must be awaited first!");
8515 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
8516 return nativeResponseValue;
8518 // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
8519 export function CResult_PingDecodeErrorZ_is_ok(o: number): boolean {
8520 if(!isWasmInitialized) {
8521 throw new Error("initializeWasm() must be awaited first!");
8523 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_is_ok(o);
8524 return nativeResponseValue;
8526 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
8527 export function CResult_PingDecodeErrorZ_free(_res: number): void {
8528 if(!isWasmInitialized) {
8529 throw new Error("initializeWasm() must be awaited first!");
8531 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
8532 // debug statements here
8534 // uint64_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
8535 export function CResult_PingDecodeErrorZ_clone_ptr(arg: number): number {
8536 if(!isWasmInitialized) {
8537 throw new Error("initializeWasm() must be awaited first!");
8539 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone_ptr(arg);
8540 return nativeResponseValue;
8542 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
8543 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
8544 if(!isWasmInitialized) {
8545 throw new Error("initializeWasm() must be awaited first!");
8547 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
8548 return nativeResponseValue;
8550 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
8551 export function CResult_PongDecodeErrorZ_ok(o: number): number {
8552 if(!isWasmInitialized) {
8553 throw new Error("initializeWasm() must be awaited first!");
8555 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
8556 return nativeResponseValue;
8558 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
8559 export function CResult_PongDecodeErrorZ_err(e: number): number {
8560 if(!isWasmInitialized) {
8561 throw new Error("initializeWasm() must be awaited first!");
8563 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
8564 return nativeResponseValue;
8566 // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
8567 export function CResult_PongDecodeErrorZ_is_ok(o: number): boolean {
8568 if(!isWasmInitialized) {
8569 throw new Error("initializeWasm() must be awaited first!");
8571 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_is_ok(o);
8572 return nativeResponseValue;
8574 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
8575 export function CResult_PongDecodeErrorZ_free(_res: number): void {
8576 if(!isWasmInitialized) {
8577 throw new Error("initializeWasm() must be awaited first!");
8579 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
8580 // debug statements here
8582 // uint64_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
8583 export function CResult_PongDecodeErrorZ_clone_ptr(arg: number): number {
8584 if(!isWasmInitialized) {
8585 throw new Error("initializeWasm() must be awaited first!");
8587 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone_ptr(arg);
8588 return nativeResponseValue;
8590 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
8591 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
8592 if(!isWasmInitialized) {
8593 throw new Error("initializeWasm() must be awaited first!");
8595 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
8596 return nativeResponseValue;
8598 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
8599 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8600 if(!isWasmInitialized) {
8601 throw new Error("initializeWasm() must be awaited first!");
8603 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
8604 return nativeResponseValue;
8606 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8607 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
8608 if(!isWasmInitialized) {
8609 throw new Error("initializeWasm() must be awaited first!");
8611 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
8612 return nativeResponseValue;
8614 // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8615 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8616 if(!isWasmInitialized) {
8617 throw new Error("initializeWasm() must be awaited first!");
8619 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o);
8620 return nativeResponseValue;
8622 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
8623 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8624 if(!isWasmInitialized) {
8625 throw new Error("initializeWasm() must be awaited first!");
8627 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
8628 // debug statements here
8630 // uint64_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8631 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8632 if(!isWasmInitialized) {
8633 throw new Error("initializeWasm() must be awaited first!");
8635 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8636 return nativeResponseValue;
8638 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8639 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8640 if(!isWasmInitialized) {
8641 throw new Error("initializeWasm() must be awaited first!");
8643 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
8644 return nativeResponseValue;
8646 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
8647 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
8648 if(!isWasmInitialized) {
8649 throw new Error("initializeWasm() must be awaited first!");
8651 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
8652 return nativeResponseValue;
8654 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8655 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
8656 if(!isWasmInitialized) {
8657 throw new Error("initializeWasm() must be awaited first!");
8659 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
8660 return nativeResponseValue;
8662 // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
8663 export function CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8664 if(!isWasmInitialized) {
8665 throw new Error("initializeWasm() must be awaited first!");
8667 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o);
8668 return nativeResponseValue;
8670 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
8671 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
8672 if(!isWasmInitialized) {
8673 throw new Error("initializeWasm() must be awaited first!");
8675 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
8676 // debug statements here
8678 // uint64_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8679 export function CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8680 if(!isWasmInitialized) {
8681 throw new Error("initializeWasm() must be awaited first!");
8683 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(arg);
8684 return nativeResponseValue;
8686 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8687 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
8688 if(!isWasmInitialized) {
8689 throw new Error("initializeWasm() must be awaited first!");
8691 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
8692 return nativeResponseValue;
8694 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
8695 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
8696 if(!isWasmInitialized) {
8697 throw new Error("initializeWasm() must be awaited first!");
8699 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
8700 return nativeResponseValue;
8702 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8703 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
8704 if(!isWasmInitialized) {
8705 throw new Error("initializeWasm() must be awaited first!");
8707 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
8708 return nativeResponseValue;
8710 // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8711 export function CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8712 if(!isWasmInitialized) {
8713 throw new Error("initializeWasm() must be awaited first!");
8715 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o);
8716 return nativeResponseValue;
8718 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
8719 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
8720 if(!isWasmInitialized) {
8721 throw new Error("initializeWasm() must be awaited first!");
8723 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
8724 // debug statements here
8726 // uint64_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
8727 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
8728 if(!isWasmInitialized) {
8729 throw new Error("initializeWasm() must be awaited first!");
8731 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(arg);
8732 return nativeResponseValue;
8734 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
8735 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
8736 if(!isWasmInitialized) {
8737 throw new Error("initializeWasm() must be awaited first!");
8739 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
8740 return nativeResponseValue;
8742 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
8743 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
8744 if(!isWasmInitialized) {
8745 throw new Error("initializeWasm() must be awaited first!");
8747 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
8748 return nativeResponseValue;
8750 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
8751 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
8752 if(!isWasmInitialized) {
8753 throw new Error("initializeWasm() must be awaited first!");
8755 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
8756 return nativeResponseValue;
8758 // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
8759 export function CResult_ChannelUpdateDecodeErrorZ_is_ok(o: number): boolean {
8760 if(!isWasmInitialized) {
8761 throw new Error("initializeWasm() must be awaited first!");
8763 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_is_ok(o);
8764 return nativeResponseValue;
8766 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
8767 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
8768 if(!isWasmInitialized) {
8769 throw new Error("initializeWasm() must be awaited first!");
8771 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
8772 // debug statements here
8774 // uint64_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
8775 export function CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg: number): number {
8776 if(!isWasmInitialized) {
8777 throw new Error("initializeWasm() must be awaited first!");
8779 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone_ptr(arg);
8780 return nativeResponseValue;
8782 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
8783 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
8784 if(!isWasmInitialized) {
8785 throw new Error("initializeWasm() must be awaited first!");
8787 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
8788 return nativeResponseValue;
8790 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
8791 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
8792 if(!isWasmInitialized) {
8793 throw new Error("initializeWasm() must be awaited first!");
8795 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
8796 return nativeResponseValue;
8798 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
8799 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
8800 if(!isWasmInitialized) {
8801 throw new Error("initializeWasm() must be awaited first!");
8803 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
8804 return nativeResponseValue;
8806 // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
8807 export function CResult_ErrorMessageDecodeErrorZ_is_ok(o: number): boolean {
8808 if(!isWasmInitialized) {
8809 throw new Error("initializeWasm() must be awaited first!");
8811 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_is_ok(o);
8812 return nativeResponseValue;
8814 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
8815 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
8816 if(!isWasmInitialized) {
8817 throw new Error("initializeWasm() must be awaited first!");
8819 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
8820 // debug statements here
8822 // uint64_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
8823 export function CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg: number): number {
8824 if(!isWasmInitialized) {
8825 throw new Error("initializeWasm() must be awaited first!");
8827 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone_ptr(arg);
8828 return nativeResponseValue;
8830 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
8831 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
8832 if(!isWasmInitialized) {
8833 throw new Error("initializeWasm() must be awaited first!");
8835 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
8836 return nativeResponseValue;
8838 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
8839 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
8840 if(!isWasmInitialized) {
8841 throw new Error("initializeWasm() must be awaited first!");
8843 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
8844 return nativeResponseValue;
8846 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8847 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
8848 if(!isWasmInitialized) {
8849 throw new Error("initializeWasm() must be awaited first!");
8851 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
8852 return nativeResponseValue;
8854 // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
8855 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8856 if(!isWasmInitialized) {
8857 throw new Error("initializeWasm() must be awaited first!");
8859 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o);
8860 return nativeResponseValue;
8862 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
8863 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
8864 if(!isWasmInitialized) {
8865 throw new Error("initializeWasm() must be awaited first!");
8867 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
8868 // debug statements here
8870 // uint64_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8871 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8872 if(!isWasmInitialized) {
8873 throw new Error("initializeWasm() must be awaited first!");
8875 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(arg);
8876 return nativeResponseValue;
8878 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8879 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
8880 if(!isWasmInitialized) {
8881 throw new Error("initializeWasm() must be awaited first!");
8883 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
8884 return nativeResponseValue;
8886 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
8887 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
8888 if(!isWasmInitialized) {
8889 throw new Error("initializeWasm() must be awaited first!");
8891 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
8892 return nativeResponseValue;
8894 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
8895 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
8896 if(!isWasmInitialized) {
8897 throw new Error("initializeWasm() must be awaited first!");
8899 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
8900 return nativeResponseValue;
8902 // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
8903 export function CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: number): boolean {
8904 if(!isWasmInitialized) {
8905 throw new Error("initializeWasm() must be awaited first!");
8907 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_is_ok(o);
8908 return nativeResponseValue;
8910 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
8911 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
8912 if(!isWasmInitialized) {
8913 throw new Error("initializeWasm() must be awaited first!");
8915 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
8916 // debug statements here
8918 // uint64_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
8919 export function CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg: number): number {
8920 if(!isWasmInitialized) {
8921 throw new Error("initializeWasm() must be awaited first!");
8923 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(arg);
8924 return nativeResponseValue;
8926 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
8927 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
8928 if(!isWasmInitialized) {
8929 throw new Error("initializeWasm() must be awaited first!");
8931 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
8932 return nativeResponseValue;
8934 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
8935 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
8936 if(!isWasmInitialized) {
8937 throw new Error("initializeWasm() must be awaited first!");
8939 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
8940 return nativeResponseValue;
8942 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
8943 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
8944 if(!isWasmInitialized) {
8945 throw new Error("initializeWasm() must be awaited first!");
8947 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
8948 return nativeResponseValue;
8950 // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
8951 export function CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: number): boolean {
8952 if(!isWasmInitialized) {
8953 throw new Error("initializeWasm() must be awaited first!");
8955 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o);
8956 return nativeResponseValue;
8958 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
8959 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
8960 if(!isWasmInitialized) {
8961 throw new Error("initializeWasm() must be awaited first!");
8963 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
8964 // debug statements here
8966 // uint64_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
8967 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg: number): number {
8968 if(!isWasmInitialized) {
8969 throw new Error("initializeWasm() must be awaited first!");
8971 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(arg);
8972 return nativeResponseValue;
8974 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
8975 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
8976 if(!isWasmInitialized) {
8977 throw new Error("initializeWasm() must be awaited first!");
8979 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
8980 return nativeResponseValue;
8982 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
8983 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
8984 if(!isWasmInitialized) {
8985 throw new Error("initializeWasm() must be awaited first!");
8987 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
8988 return nativeResponseValue;
8990 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
8991 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
8992 if(!isWasmInitialized) {
8993 throw new Error("initializeWasm() must be awaited first!");
8995 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
8996 return nativeResponseValue;
8998 // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
8999 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: number): boolean {
9000 if(!isWasmInitialized) {
9001 throw new Error("initializeWasm() must be awaited first!");
9003 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o);
9004 return nativeResponseValue;
9006 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
9007 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
9008 if(!isWasmInitialized) {
9009 throw new Error("initializeWasm() must be awaited first!");
9011 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
9012 // debug statements here
9014 // uint64_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
9015 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg: number): number {
9016 if(!isWasmInitialized) {
9017 throw new Error("initializeWasm() must be awaited first!");
9019 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(arg);
9020 return nativeResponseValue;
9022 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
9023 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
9024 if(!isWasmInitialized) {
9025 throw new Error("initializeWasm() must be awaited first!");
9027 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
9028 return nativeResponseValue;
9030 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
9031 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
9032 if(!isWasmInitialized) {
9033 throw new Error("initializeWasm() must be awaited first!");
9035 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
9036 return nativeResponseValue;
9038 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
9039 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
9040 if(!isWasmInitialized) {
9041 throw new Error("initializeWasm() must be awaited first!");
9043 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
9044 return nativeResponseValue;
9046 // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
9047 export function CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
9048 if(!isWasmInitialized) {
9049 throw new Error("initializeWasm() must be awaited first!");
9051 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_is_ok(o);
9052 return nativeResponseValue;
9054 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
9055 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
9056 if(!isWasmInitialized) {
9057 throw new Error("initializeWasm() must be awaited first!");
9059 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
9060 // debug statements here
9062 // uint64_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
9063 export function CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
9064 if(!isWasmInitialized) {
9065 throw new Error("initializeWasm() must be awaited first!");
9067 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(arg);
9068 return nativeResponseValue;
9070 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
9071 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
9072 if(!isWasmInitialized) {
9073 throw new Error("initializeWasm() must be awaited first!");
9075 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
9076 return nativeResponseValue;
9078 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
9079 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
9080 if(!isWasmInitialized) {
9081 throw new Error("initializeWasm() must be awaited first!");
9083 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
9084 return nativeResponseValue;
9086 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
9087 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
9088 if(!isWasmInitialized) {
9089 throw new Error("initializeWasm() must be awaited first!");
9091 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
9092 return nativeResponseValue;
9094 // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
9095 export function CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: number): boolean {
9096 if(!isWasmInitialized) {
9097 throw new Error("initializeWasm() must be awaited first!");
9099 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o);
9100 return nativeResponseValue;
9102 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
9103 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
9104 if(!isWasmInitialized) {
9105 throw new Error("initializeWasm() must be awaited first!");
9107 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
9108 // debug statements here
9110 // uint64_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
9111 export function CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg: number): number {
9112 if(!isWasmInitialized) {
9113 throw new Error("initializeWasm() must be awaited first!");
9115 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(arg);
9116 return nativeResponseValue;
9118 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
9119 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
9120 if(!isWasmInitialized) {
9121 throw new Error("initializeWasm() must be awaited first!");
9123 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
9124 return nativeResponseValue;
9126 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
9127 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
9128 if(!isWasmInitialized) {
9129 throw new Error("initializeWasm() must be awaited first!");
9131 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
9132 return nativeResponseValue;
9134 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
9135 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
9136 if(!isWasmInitialized) {
9137 throw new Error("initializeWasm() must be awaited first!");
9139 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
9140 return nativeResponseValue;
9142 // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
9143 export function CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: number): boolean {
9144 if(!isWasmInitialized) {
9145 throw new Error("initializeWasm() must be awaited first!");
9147 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o);
9148 return nativeResponseValue;
9150 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
9151 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
9152 if(!isWasmInitialized) {
9153 throw new Error("initializeWasm() must be awaited first!");
9155 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
9156 // debug statements here
9158 // uint64_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
9159 export function CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg: number): number {
9160 if(!isWasmInitialized) {
9161 throw new Error("initializeWasm() must be awaited first!");
9163 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(arg);
9164 return nativeResponseValue;
9166 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
9167 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
9168 if(!isWasmInitialized) {
9169 throw new Error("initializeWasm() must be awaited first!");
9171 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
9172 return nativeResponseValue;
9174 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
9175 export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
9176 if(!isWasmInitialized) {
9177 throw new Error("initializeWasm() must be awaited first!");
9179 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
9180 return nativeResponseValue;
9182 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
9183 export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
9184 if(!isWasmInitialized) {
9185 throw new Error("initializeWasm() must be awaited first!");
9187 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
9188 return nativeResponseValue;
9190 // bool CResult_InvoiceSignOrCreationErrorZ_is_ok(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR o);
9191 export function CResult_InvoiceSignOrCreationErrorZ_is_ok(o: number): boolean {
9192 if(!isWasmInitialized) {
9193 throw new Error("initializeWasm() must be awaited first!");
9195 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_is_ok(o);
9196 return nativeResponseValue;
9198 // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
9199 export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
9200 if(!isWasmInitialized) {
9201 throw new Error("initializeWasm() must be awaited first!");
9203 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
9204 // debug statements here
9206 // uint64_t CResult_InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR arg);
9207 export function CResult_InvoiceSignOrCreationErrorZ_clone_ptr(arg: number): number {
9208 if(!isWasmInitialized) {
9209 throw new Error("initializeWasm() must be awaited first!");
9211 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone_ptr(arg);
9212 return nativeResponseValue;
9214 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
9215 export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
9216 if(!isWasmInitialized) {
9217 throw new Error("initializeWasm() must be awaited first!");
9219 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
9220 return nativeResponseValue;
9222 // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
9223 export function COption_FilterZ_some(o: number): number {
9224 if(!isWasmInitialized) {
9225 throw new Error("initializeWasm() must be awaited first!");
9227 const nativeResponseValue = wasm.COption_FilterZ_some(o);
9228 return nativeResponseValue;
9230 // struct LDKCOption_FilterZ COption_FilterZ_none(void);
9231 export function COption_FilterZ_none(): number {
9232 if(!isWasmInitialized) {
9233 throw new Error("initializeWasm() must be awaited first!");
9235 const nativeResponseValue = wasm.COption_FilterZ_none();
9236 return nativeResponseValue;
9238 // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
9239 export function COption_FilterZ_free(_res: number): void {
9240 if(!isWasmInitialized) {
9241 throw new Error("initializeWasm() must be awaited first!");
9243 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
9244 // debug statements here
9246 // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
9247 export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
9248 if(!isWasmInitialized) {
9249 throw new Error("initializeWasm() must be awaited first!");
9251 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_ok(o);
9252 return nativeResponseValue;
9254 // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
9255 export function CResult_LockedChannelMonitorNoneZ_err(): number {
9256 if(!isWasmInitialized) {
9257 throw new Error("initializeWasm() must be awaited first!");
9259 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_err();
9260 return nativeResponseValue;
9262 // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
9263 export function CResult_LockedChannelMonitorNoneZ_is_ok(o: number): boolean {
9264 if(!isWasmInitialized) {
9265 throw new Error("initializeWasm() must be awaited first!");
9267 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_is_ok(o);
9268 return nativeResponseValue;
9270 // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
9271 export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
9272 if(!isWasmInitialized) {
9273 throw new Error("initializeWasm() must be awaited first!");
9275 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_free(_res);
9276 // debug statements here
9278 // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
9279 export function CVec_OutPointZ_free(_res: number[]): void {
9280 if(!isWasmInitialized) {
9281 throw new Error("initializeWasm() must be awaited first!");
9283 const nativeResponseValue = wasm.CVec_OutPointZ_free(_res);
9284 // debug statements here
9286 // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
9287 export function PaymentPurpose_free(this_ptr: number): void {
9288 if(!isWasmInitialized) {
9289 throw new Error("initializeWasm() must be awaited first!");
9291 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
9292 // debug statements here
9294 // uint64_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
9295 export function PaymentPurpose_clone_ptr(arg: number): number {
9296 if(!isWasmInitialized) {
9297 throw new Error("initializeWasm() must be awaited first!");
9299 const nativeResponseValue = wasm.PaymentPurpose_clone_ptr(arg);
9300 return nativeResponseValue;
9302 // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
9303 export function PaymentPurpose_clone(orig: number): number {
9304 if(!isWasmInitialized) {
9305 throw new Error("initializeWasm() must be awaited first!");
9307 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
9308 return nativeResponseValue;
9310 // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
9311 export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
9312 if(!isWasmInitialized) {
9313 throw new Error("initializeWasm() must be awaited first!");
9315 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
9316 return nativeResponseValue;
9318 // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
9319 export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
9320 if(!isWasmInitialized) {
9321 throw new Error("initializeWasm() must be awaited first!");
9323 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
9324 return nativeResponseValue;
9326 // void ClosureReason_free(struct LDKClosureReason this_ptr);
9327 export function ClosureReason_free(this_ptr: number): void {
9328 if(!isWasmInitialized) {
9329 throw new Error("initializeWasm() must be awaited first!");
9331 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
9332 // debug statements here
9334 // uint64_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
9335 export function ClosureReason_clone_ptr(arg: number): number {
9336 if(!isWasmInitialized) {
9337 throw new Error("initializeWasm() must be awaited first!");
9339 const nativeResponseValue = wasm.ClosureReason_clone_ptr(arg);
9340 return nativeResponseValue;
9342 // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
9343 export function ClosureReason_clone(orig: number): number {
9344 if(!isWasmInitialized) {
9345 throw new Error("initializeWasm() must be awaited first!");
9347 const nativeResponseValue = wasm.ClosureReason_clone(orig);
9348 return nativeResponseValue;
9350 // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
9351 export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
9352 if(!isWasmInitialized) {
9353 throw new Error("initializeWasm() must be awaited first!");
9355 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
9356 return nativeResponseValue;
9358 // struct LDKClosureReason ClosureReason_holder_force_closed(void);
9359 export function ClosureReason_holder_force_closed(): number {
9360 if(!isWasmInitialized) {
9361 throw new Error("initializeWasm() must be awaited first!");
9363 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
9364 return nativeResponseValue;
9366 // struct LDKClosureReason ClosureReason_cooperative_closure(void);
9367 export function ClosureReason_cooperative_closure(): number {
9368 if(!isWasmInitialized) {
9369 throw new Error("initializeWasm() must be awaited first!");
9371 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
9372 return nativeResponseValue;
9374 // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
9375 export function ClosureReason_commitment_tx_confirmed(): number {
9376 if(!isWasmInitialized) {
9377 throw new Error("initializeWasm() must be awaited first!");
9379 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
9380 return nativeResponseValue;
9382 // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
9383 export function ClosureReason_processing_error(err: String): number {
9384 if(!isWasmInitialized) {
9385 throw new Error("initializeWasm() must be awaited first!");
9387 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
9388 return nativeResponseValue;
9390 // struct LDKClosureReason ClosureReason_disconnected_peer(void);
9391 export function ClosureReason_disconnected_peer(): number {
9392 if(!isWasmInitialized) {
9393 throw new Error("initializeWasm() must be awaited first!");
9395 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
9396 return nativeResponseValue;
9398 // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
9399 export function ClosureReason_outdated_channel_manager(): number {
9400 if(!isWasmInitialized) {
9401 throw new Error("initializeWasm() must be awaited first!");
9403 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
9404 return nativeResponseValue;
9406 // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
9407 export function ClosureReason_write(obj: number): Uint8Array {
9408 if(!isWasmInitialized) {
9409 throw new Error("initializeWasm() must be awaited first!");
9411 const nativeResponseValue = wasm.ClosureReason_write(obj);
9412 return decodeArray(nativeResponseValue);
9414 // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
9415 export function ClosureReason_read(ser: Uint8Array): number {
9416 if(!isWasmInitialized) {
9417 throw new Error("initializeWasm() must be awaited first!");
9419 const nativeResponseValue = wasm.ClosureReason_read(encodeArray(ser));
9420 return nativeResponseValue;
9422 // void Event_free(struct LDKEvent this_ptr);
9423 export function Event_free(this_ptr: number): void {
9424 if(!isWasmInitialized) {
9425 throw new Error("initializeWasm() must be awaited first!");
9427 const nativeResponseValue = wasm.Event_free(this_ptr);
9428 // debug statements here
9430 // uint64_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
9431 export function Event_clone_ptr(arg: number): number {
9432 if(!isWasmInitialized) {
9433 throw new Error("initializeWasm() must be awaited first!");
9435 const nativeResponseValue = wasm.Event_clone_ptr(arg);
9436 return nativeResponseValue;
9438 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
9439 export function Event_clone(orig: number): number {
9440 if(!isWasmInitialized) {
9441 throw new Error("initializeWasm() must be awaited first!");
9443 const nativeResponseValue = wasm.Event_clone(orig);
9444 return nativeResponseValue;
9446 // 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);
9447 export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
9448 if(!isWasmInitialized) {
9449 throw new Error("initializeWasm() must be awaited first!");
9451 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
9452 return nativeResponseValue;
9454 // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
9455 export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
9456 if(!isWasmInitialized) {
9457 throw new Error("initializeWasm() must be awaited first!");
9459 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
9460 return nativeResponseValue;
9462 // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
9463 export function Event_payment_sent(payment_id: Uint8Array, payment_preimage: Uint8Array, payment_hash: Uint8Array, fee_paid_msat: number): number {
9464 if(!isWasmInitialized) {
9465 throw new Error("initializeWasm() must be awaited first!");
9467 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_id), encodeArray(payment_preimage), encodeArray(payment_hash), fee_paid_msat);
9468 return nativeResponseValue;
9470 // 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);
9471 export function Event_payment_path_failed(payment_id: Uint8Array, payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[], short_channel_id: number, retry: number): number {
9472 if(!isWasmInitialized) {
9473 throw new Error("initializeWasm() must be awaited first!");
9475 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_id), encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path, short_channel_id, retry);
9476 return nativeResponseValue;
9478 // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
9479 export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
9480 if(!isWasmInitialized) {
9481 throw new Error("initializeWasm() must be awaited first!");
9483 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
9484 return nativeResponseValue;
9486 // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
9487 export function Event_spendable_outputs(outputs: number[]): number {
9488 if(!isWasmInitialized) {
9489 throw new Error("initializeWasm() must be awaited first!");
9491 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
9492 return nativeResponseValue;
9494 // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
9495 export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
9496 if(!isWasmInitialized) {
9497 throw new Error("initializeWasm() must be awaited first!");
9499 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
9500 return nativeResponseValue;
9502 // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
9503 export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
9504 if(!isWasmInitialized) {
9505 throw new Error("initializeWasm() must be awaited first!");
9507 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), user_channel_id, reason);
9508 return nativeResponseValue;
9510 // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
9511 export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
9512 if(!isWasmInitialized) {
9513 throw new Error("initializeWasm() must be awaited first!");
9515 const nativeResponseValue = wasm.Event_discard_funding(encodeArray(channel_id), encodeArray(transaction));
9516 return nativeResponseValue;
9518 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
9519 export function Event_write(obj: number): Uint8Array {
9520 if(!isWasmInitialized) {
9521 throw new Error("initializeWasm() must be awaited first!");
9523 const nativeResponseValue = wasm.Event_write(obj);
9524 return decodeArray(nativeResponseValue);
9526 // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
9527 export function Event_read(ser: Uint8Array): number {
9528 if(!isWasmInitialized) {
9529 throw new Error("initializeWasm() must be awaited first!");
9531 const nativeResponseValue = wasm.Event_read(encodeArray(ser));
9532 return nativeResponseValue;
9534 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
9535 export function MessageSendEvent_free(this_ptr: number): void {
9536 if(!isWasmInitialized) {
9537 throw new Error("initializeWasm() must be awaited first!");
9539 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
9540 // debug statements here
9542 // uint64_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
9543 export function MessageSendEvent_clone_ptr(arg: number): number {
9544 if(!isWasmInitialized) {
9545 throw new Error("initializeWasm() must be awaited first!");
9547 const nativeResponseValue = wasm.MessageSendEvent_clone_ptr(arg);
9548 return nativeResponseValue;
9550 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
9551 export function MessageSendEvent_clone(orig: number): number {
9552 if(!isWasmInitialized) {
9553 throw new Error("initializeWasm() must be awaited first!");
9555 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
9556 return nativeResponseValue;
9558 // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
9559 export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
9560 if(!isWasmInitialized) {
9561 throw new Error("initializeWasm() must be awaited first!");
9563 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
9564 return nativeResponseValue;
9566 // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
9567 export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
9568 if(!isWasmInitialized) {
9569 throw new Error("initializeWasm() must be awaited first!");
9571 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
9572 return nativeResponseValue;
9574 // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
9575 export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
9576 if(!isWasmInitialized) {
9577 throw new Error("initializeWasm() must be awaited first!");
9579 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
9580 return nativeResponseValue;
9582 // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
9583 export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
9584 if(!isWasmInitialized) {
9585 throw new Error("initializeWasm() must be awaited first!");
9587 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
9588 return nativeResponseValue;
9590 // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
9591 export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
9592 if(!isWasmInitialized) {
9593 throw new Error("initializeWasm() must be awaited first!");
9595 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
9596 return nativeResponseValue;
9598 // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
9599 export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
9600 if(!isWasmInitialized) {
9601 throw new Error("initializeWasm() must be awaited first!");
9603 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
9604 return nativeResponseValue;
9606 // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
9607 export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
9608 if(!isWasmInitialized) {
9609 throw new Error("initializeWasm() must be awaited first!");
9611 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
9612 return nativeResponseValue;
9614 // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
9615 export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
9616 if(!isWasmInitialized) {
9617 throw new Error("initializeWasm() must be awaited first!");
9619 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
9620 return nativeResponseValue;
9622 // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
9623 export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
9624 if(!isWasmInitialized) {
9625 throw new Error("initializeWasm() must be awaited first!");
9627 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
9628 return nativeResponseValue;
9630 // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
9631 export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
9632 if(!isWasmInitialized) {
9633 throw new Error("initializeWasm() must be awaited first!");
9635 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
9636 return nativeResponseValue;
9638 // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
9639 export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
9640 if(!isWasmInitialized) {
9641 throw new Error("initializeWasm() must be awaited first!");
9643 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
9644 return nativeResponseValue;
9646 // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
9647 export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
9648 if(!isWasmInitialized) {
9649 throw new Error("initializeWasm() must be awaited first!");
9651 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
9652 return nativeResponseValue;
9654 // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
9655 export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
9656 if(!isWasmInitialized) {
9657 throw new Error("initializeWasm() must be awaited first!");
9659 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
9660 return nativeResponseValue;
9662 // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
9663 export function MessageSendEvent_broadcast_channel_update(msg: number): number {
9664 if(!isWasmInitialized) {
9665 throw new Error("initializeWasm() must be awaited first!");
9667 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
9668 return nativeResponseValue;
9670 // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
9671 export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
9672 if(!isWasmInitialized) {
9673 throw new Error("initializeWasm() must be awaited first!");
9675 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
9676 return nativeResponseValue;
9678 // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
9679 export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
9680 if(!isWasmInitialized) {
9681 throw new Error("initializeWasm() must be awaited first!");
9683 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
9684 return nativeResponseValue;
9686 // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
9687 export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
9688 if(!isWasmInitialized) {
9689 throw new Error("initializeWasm() must be awaited first!");
9691 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
9692 return nativeResponseValue;
9694 // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
9695 export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
9696 if(!isWasmInitialized) {
9697 throw new Error("initializeWasm() must be awaited first!");
9699 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
9700 return nativeResponseValue;
9702 // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
9703 export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
9704 if(!isWasmInitialized) {
9705 throw new Error("initializeWasm() must be awaited first!");
9707 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
9708 return nativeResponseValue;
9710 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
9711 export function MessageSendEventsProvider_free(this_ptr: number): void {
9712 if(!isWasmInitialized) {
9713 throw new Error("initializeWasm() must be awaited first!");
9715 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
9716 // debug statements here
9718 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
9719 export function EventsProvider_free(this_ptr: number): void {
9720 if(!isWasmInitialized) {
9721 throw new Error("initializeWasm() must be awaited first!");
9723 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
9724 // debug statements here
9726 // void EventHandler_free(struct LDKEventHandler this_ptr);
9727 export function EventHandler_free(this_ptr: number): void {
9728 if(!isWasmInitialized) {
9729 throw new Error("initializeWasm() must be awaited first!");
9731 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
9732 // debug statements here
9734 // void APIError_free(struct LDKAPIError this_ptr);
9735 export function APIError_free(this_ptr: number): void {
9736 if(!isWasmInitialized) {
9737 throw new Error("initializeWasm() must be awaited first!");
9739 const nativeResponseValue = wasm.APIError_free(this_ptr);
9740 // debug statements here
9742 // uint64_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
9743 export function APIError_clone_ptr(arg: number): number {
9744 if(!isWasmInitialized) {
9745 throw new Error("initializeWasm() must be awaited first!");
9747 const nativeResponseValue = wasm.APIError_clone_ptr(arg);
9748 return nativeResponseValue;
9750 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
9751 export function APIError_clone(orig: number): number {
9752 if(!isWasmInitialized) {
9753 throw new Error("initializeWasm() must be awaited first!");
9755 const nativeResponseValue = wasm.APIError_clone(orig);
9756 return nativeResponseValue;
9758 // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
9759 export function APIError_apimisuse_error(err: String): number {
9760 if(!isWasmInitialized) {
9761 throw new Error("initializeWasm() must be awaited first!");
9763 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
9764 return nativeResponseValue;
9766 // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
9767 export function APIError_fee_rate_too_high(err: String, feerate: number): number {
9768 if(!isWasmInitialized) {
9769 throw new Error("initializeWasm() must be awaited first!");
9771 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
9772 return nativeResponseValue;
9774 // struct LDKAPIError APIError_route_error(struct LDKStr err);
9775 export function APIError_route_error(err: String): number {
9776 if(!isWasmInitialized) {
9777 throw new Error("initializeWasm() must be awaited first!");
9779 const nativeResponseValue = wasm.APIError_route_error(err);
9780 return nativeResponseValue;
9782 // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
9783 export function APIError_channel_unavailable(err: String): number {
9784 if(!isWasmInitialized) {
9785 throw new Error("initializeWasm() must be awaited first!");
9787 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
9788 return nativeResponseValue;
9790 // struct LDKAPIError APIError_monitor_update_failed(void);
9791 export function APIError_monitor_update_failed(): number {
9792 if(!isWasmInitialized) {
9793 throw new Error("initializeWasm() must be awaited first!");
9795 const nativeResponseValue = wasm.APIError_monitor_update_failed();
9796 return nativeResponseValue;
9798 // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
9799 export function APIError_incompatible_shutdown_script(script: number): number {
9800 if(!isWasmInitialized) {
9801 throw new Error("initializeWasm() must be awaited first!");
9803 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
9804 return nativeResponseValue;
9806 // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
9807 export function sign(msg: Uint8Array, sk: Uint8Array): number {
9808 if(!isWasmInitialized) {
9809 throw new Error("initializeWasm() must be awaited first!");
9811 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
9812 return nativeResponseValue;
9814 // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
9815 export function recover_pk(msg: Uint8Array, sig: String): number {
9816 if(!isWasmInitialized) {
9817 throw new Error("initializeWasm() must be awaited first!");
9819 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
9820 return nativeResponseValue;
9822 // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
9823 export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
9824 if(!isWasmInitialized) {
9825 throw new Error("initializeWasm() must be awaited first!");
9827 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
9828 return nativeResponseValue;
9830 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
9831 export function Level_clone(orig: number): Level {
9832 if(!isWasmInitialized) {
9833 throw new Error("initializeWasm() must be awaited first!");
9835 const nativeResponseValue = wasm.Level_clone(orig);
9836 return nativeResponseValue;
9838 // enum LDKLevel Level_trace(void);
9839 export function Level_trace(): Level {
9840 if(!isWasmInitialized) {
9841 throw new Error("initializeWasm() must be awaited first!");
9843 const nativeResponseValue = wasm.Level_trace();
9844 return nativeResponseValue;
9846 // enum LDKLevel Level_debug(void);
9847 export function Level_debug(): Level {
9848 if(!isWasmInitialized) {
9849 throw new Error("initializeWasm() must be awaited first!");
9851 const nativeResponseValue = wasm.Level_debug();
9852 return nativeResponseValue;
9854 // enum LDKLevel Level_info(void);
9855 export function Level_info(): Level {
9856 if(!isWasmInitialized) {
9857 throw new Error("initializeWasm() must be awaited first!");
9859 const nativeResponseValue = wasm.Level_info();
9860 return nativeResponseValue;
9862 // enum LDKLevel Level_warn(void);
9863 export function Level_warn(): Level {
9864 if(!isWasmInitialized) {
9865 throw new Error("initializeWasm() must be awaited first!");
9867 const nativeResponseValue = wasm.Level_warn();
9868 return nativeResponseValue;
9870 // enum LDKLevel Level_error(void);
9871 export function Level_error(): Level {
9872 if(!isWasmInitialized) {
9873 throw new Error("initializeWasm() must be awaited first!");
9875 const nativeResponseValue = wasm.Level_error();
9876 return nativeResponseValue;
9878 // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
9879 export function Level_eq(a: number, b: number): boolean {
9880 if(!isWasmInitialized) {
9881 throw new Error("initializeWasm() must be awaited first!");
9883 const nativeResponseValue = wasm.Level_eq(a, b);
9884 return nativeResponseValue;
9886 // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
9887 export function Level_hash(o: number): number {
9888 if(!isWasmInitialized) {
9889 throw new Error("initializeWasm() must be awaited first!");
9891 const nativeResponseValue = wasm.Level_hash(o);
9892 return nativeResponseValue;
9894 // MUST_USE_RES enum LDKLevel Level_max(void);
9895 export function Level_max(): Level {
9896 if(!isWasmInitialized) {
9897 throw new Error("initializeWasm() must be awaited first!");
9899 const nativeResponseValue = wasm.Level_max();
9900 return nativeResponseValue;
9902 // void Record_free(struct LDKRecord this_obj);
9903 export function Record_free(this_obj: number): void {
9904 if(!isWasmInitialized) {
9905 throw new Error("initializeWasm() must be awaited first!");
9907 const nativeResponseValue = wasm.Record_free(this_obj);
9908 // debug statements here
9910 // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
9911 export function Record_get_level(this_ptr: number): Level {
9912 if(!isWasmInitialized) {
9913 throw new Error("initializeWasm() must be awaited first!");
9915 const nativeResponseValue = wasm.Record_get_level(this_ptr);
9916 return nativeResponseValue;
9918 // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
9919 export function Record_set_level(this_ptr: number, val: Level): void {
9920 if(!isWasmInitialized) {
9921 throw new Error("initializeWasm() must be awaited first!");
9923 const nativeResponseValue = wasm.Record_set_level(this_ptr, val);
9924 // debug statements here
9926 // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
9927 export function Record_get_args(this_ptr: number): String {
9928 if(!isWasmInitialized) {
9929 throw new Error("initializeWasm() must be awaited first!");
9931 const nativeResponseValue = wasm.Record_get_args(this_ptr);
9932 return nativeResponseValue;
9934 // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
9935 export function Record_set_args(this_ptr: number, val: String): void {
9936 if(!isWasmInitialized) {
9937 throw new Error("initializeWasm() must be awaited first!");
9939 const nativeResponseValue = wasm.Record_set_args(this_ptr, val);
9940 // debug statements here
9942 // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
9943 export function Record_get_module_path(this_ptr: number): String {
9944 if(!isWasmInitialized) {
9945 throw new Error("initializeWasm() must be awaited first!");
9947 const nativeResponseValue = wasm.Record_get_module_path(this_ptr);
9948 return nativeResponseValue;
9950 // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
9951 export function Record_set_module_path(this_ptr: number, val: String): void {
9952 if(!isWasmInitialized) {
9953 throw new Error("initializeWasm() must be awaited first!");
9955 const nativeResponseValue = wasm.Record_set_module_path(this_ptr, val);
9956 // debug statements here
9958 // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
9959 export function Record_get_file(this_ptr: number): String {
9960 if(!isWasmInitialized) {
9961 throw new Error("initializeWasm() must be awaited first!");
9963 const nativeResponseValue = wasm.Record_get_file(this_ptr);
9964 return nativeResponseValue;
9966 // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
9967 export function Record_set_file(this_ptr: number, val: String): void {
9968 if(!isWasmInitialized) {
9969 throw new Error("initializeWasm() must be awaited first!");
9971 const nativeResponseValue = wasm.Record_set_file(this_ptr, val);
9972 // debug statements here
9974 // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
9975 export function Record_get_line(this_ptr: number): number {
9976 if(!isWasmInitialized) {
9977 throw new Error("initializeWasm() must be awaited first!");
9979 const nativeResponseValue = wasm.Record_get_line(this_ptr);
9980 return nativeResponseValue;
9982 // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
9983 export function Record_set_line(this_ptr: number, val: number): void {
9984 if(!isWasmInitialized) {
9985 throw new Error("initializeWasm() must be awaited first!");
9987 const nativeResponseValue = wasm.Record_set_line(this_ptr, val);
9988 // debug statements here
9990 // uint64_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
9991 export function Record_clone_ptr(arg: number): number {
9992 if(!isWasmInitialized) {
9993 throw new Error("initializeWasm() must be awaited first!");
9995 const nativeResponseValue = wasm.Record_clone_ptr(arg);
9996 return nativeResponseValue;
9998 // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
9999 export function Record_clone(orig: number): number {
10000 if(!isWasmInitialized) {
10001 throw new Error("initializeWasm() must be awaited first!");
10003 const nativeResponseValue = wasm.Record_clone(orig);
10004 return nativeResponseValue;
10006 // void Logger_free(struct LDKLogger this_ptr);
10007 export function Logger_free(this_ptr: number): void {
10008 if(!isWasmInitialized) {
10009 throw new Error("initializeWasm() must be awaited first!");
10011 const nativeResponseValue = wasm.Logger_free(this_ptr);
10012 // debug statements here
10014 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
10015 export function ChannelHandshakeConfig_free(this_obj: number): void {
10016 if(!isWasmInitialized) {
10017 throw new Error("initializeWasm() must be awaited first!");
10019 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
10020 // debug statements here
10022 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
10023 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
10024 if(!isWasmInitialized) {
10025 throw new Error("initializeWasm() must be awaited first!");
10027 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
10028 return nativeResponseValue;
10030 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
10031 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
10032 if(!isWasmInitialized) {
10033 throw new Error("initializeWasm() must be awaited first!");
10035 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
10036 // debug statements here
10038 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
10039 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
10040 if(!isWasmInitialized) {
10041 throw new Error("initializeWasm() must be awaited first!");
10043 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
10044 return nativeResponseValue;
10046 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
10047 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
10048 if(!isWasmInitialized) {
10049 throw new Error("initializeWasm() must be awaited first!");
10051 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
10052 // debug statements here
10054 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
10055 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
10056 if(!isWasmInitialized) {
10057 throw new Error("initializeWasm() must be awaited first!");
10059 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
10060 return nativeResponseValue;
10062 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
10063 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
10064 if(!isWasmInitialized) {
10065 throw new Error("initializeWasm() must be awaited first!");
10067 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
10068 // debug statements here
10070 // 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);
10071 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
10072 if(!isWasmInitialized) {
10073 throw new Error("initializeWasm() must be awaited first!");
10075 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
10076 return nativeResponseValue;
10078 // uint64_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
10079 export function ChannelHandshakeConfig_clone_ptr(arg: number): number {
10080 if(!isWasmInitialized) {
10081 throw new Error("initializeWasm() must be awaited first!");
10083 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone_ptr(arg);
10084 return nativeResponseValue;
10086 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
10087 export function ChannelHandshakeConfig_clone(orig: number): number {
10088 if(!isWasmInitialized) {
10089 throw new Error("initializeWasm() must be awaited first!");
10091 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
10092 return nativeResponseValue;
10094 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
10095 export function ChannelHandshakeConfig_default(): number {
10096 if(!isWasmInitialized) {
10097 throw new Error("initializeWasm() must be awaited first!");
10099 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
10100 return nativeResponseValue;
10102 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
10103 export function ChannelHandshakeLimits_free(this_obj: number): void {
10104 if(!isWasmInitialized) {
10105 throw new Error("initializeWasm() must be awaited first!");
10107 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
10108 // debug statements here
10110 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10111 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
10112 if(!isWasmInitialized) {
10113 throw new Error("initializeWasm() must be awaited first!");
10115 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
10116 return nativeResponseValue;
10118 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10119 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
10120 if(!isWasmInitialized) {
10121 throw new Error("initializeWasm() must be awaited first!");
10123 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
10124 // debug statements here
10126 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10127 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
10128 if(!isWasmInitialized) {
10129 throw new Error("initializeWasm() must be awaited first!");
10131 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
10132 return nativeResponseValue;
10134 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10135 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
10136 if(!isWasmInitialized) {
10137 throw new Error("initializeWasm() must be awaited first!");
10139 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
10140 // debug statements here
10142 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10143 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
10144 if(!isWasmInitialized) {
10145 throw new Error("initializeWasm() must be awaited first!");
10147 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
10148 return nativeResponseValue;
10150 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10151 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10152 if(!isWasmInitialized) {
10153 throw new Error("initializeWasm() must be awaited first!");
10155 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
10156 // debug statements here
10158 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10159 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
10160 if(!isWasmInitialized) {
10161 throw new Error("initializeWasm() must be awaited first!");
10163 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
10164 return nativeResponseValue;
10166 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
10167 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
10168 if(!isWasmInitialized) {
10169 throw new Error("initializeWasm() must be awaited first!");
10171 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
10172 // debug statements here
10174 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10175 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
10176 if(!isWasmInitialized) {
10177 throw new Error("initializeWasm() must be awaited first!");
10179 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
10180 return nativeResponseValue;
10182 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
10183 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
10184 if(!isWasmInitialized) {
10185 throw new Error("initializeWasm() must be awaited first!");
10187 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
10188 // debug statements here
10190 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10191 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
10192 if(!isWasmInitialized) {
10193 throw new Error("initializeWasm() must be awaited first!");
10195 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
10196 return nativeResponseValue;
10198 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
10199 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
10200 if(!isWasmInitialized) {
10201 throw new Error("initializeWasm() must be awaited first!");
10203 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
10204 // debug statements here
10206 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10207 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
10208 if(!isWasmInitialized) {
10209 throw new Error("initializeWasm() must be awaited first!");
10211 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
10212 return nativeResponseValue;
10214 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
10215 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
10216 if(!isWasmInitialized) {
10217 throw new Error("initializeWasm() must be awaited first!");
10219 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
10220 // debug statements here
10222 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
10223 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
10224 if(!isWasmInitialized) {
10225 throw new Error("initializeWasm() must be awaited first!");
10227 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
10228 return nativeResponseValue;
10230 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
10231 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
10232 if(!isWasmInitialized) {
10233 throw new Error("initializeWasm() must be awaited first!");
10235 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
10236 // debug statements here
10238 // 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);
10239 export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
10240 if(!isWasmInitialized) {
10241 throw new Error("initializeWasm() must be awaited first!");
10243 const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
10244 return nativeResponseValue;
10246 // uint64_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
10247 export function ChannelHandshakeLimits_clone_ptr(arg: number): number {
10248 if(!isWasmInitialized) {
10249 throw new Error("initializeWasm() must be awaited first!");
10251 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone_ptr(arg);
10252 return nativeResponseValue;
10254 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
10255 export function ChannelHandshakeLimits_clone(orig: number): number {
10256 if(!isWasmInitialized) {
10257 throw new Error("initializeWasm() must be awaited first!");
10259 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
10260 return nativeResponseValue;
10262 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
10263 export function ChannelHandshakeLimits_default(): number {
10264 if(!isWasmInitialized) {
10265 throw new Error("initializeWasm() must be awaited first!");
10267 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
10268 return nativeResponseValue;
10270 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
10271 export function ChannelConfig_free(this_obj: number): void {
10272 if(!isWasmInitialized) {
10273 throw new Error("initializeWasm() must be awaited first!");
10275 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
10276 // debug statements here
10278 // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10279 export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
10280 if(!isWasmInitialized) {
10281 throw new Error("initializeWasm() must be awaited first!");
10283 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
10284 return nativeResponseValue;
10286 // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
10287 export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
10288 if(!isWasmInitialized) {
10289 throw new Error("initializeWasm() must be awaited first!");
10291 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
10292 // debug statements here
10294 // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10295 export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
10296 if(!isWasmInitialized) {
10297 throw new Error("initializeWasm() must be awaited first!");
10299 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
10300 return nativeResponseValue;
10302 // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
10303 export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
10304 if(!isWasmInitialized) {
10305 throw new Error("initializeWasm() must be awaited first!");
10307 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
10308 // debug statements here
10310 // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10311 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
10312 if(!isWasmInitialized) {
10313 throw new Error("initializeWasm() must be awaited first!");
10315 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
10316 return nativeResponseValue;
10318 // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
10319 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10320 if(!isWasmInitialized) {
10321 throw new Error("initializeWasm() must be awaited first!");
10323 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
10324 // debug statements here
10326 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10327 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
10328 if(!isWasmInitialized) {
10329 throw new Error("initializeWasm() must be awaited first!");
10331 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
10332 return nativeResponseValue;
10334 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
10335 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
10336 if(!isWasmInitialized) {
10337 throw new Error("initializeWasm() must be awaited first!");
10339 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
10340 // debug statements here
10342 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10343 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
10344 if(!isWasmInitialized) {
10345 throw new Error("initializeWasm() must be awaited first!");
10347 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
10348 return nativeResponseValue;
10350 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
10351 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
10352 if(!isWasmInitialized) {
10353 throw new Error("initializeWasm() must be awaited first!");
10355 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
10356 // debug statements here
10358 // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10359 export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
10360 if(!isWasmInitialized) {
10361 throw new Error("initializeWasm() must be awaited first!");
10363 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
10364 return nativeResponseValue;
10366 // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
10367 export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
10368 if(!isWasmInitialized) {
10369 throw new Error("initializeWasm() must be awaited first!");
10371 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
10372 // debug statements here
10374 // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
10375 export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
10376 if(!isWasmInitialized) {
10377 throw new Error("initializeWasm() must be awaited first!");
10379 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
10380 return nativeResponseValue;
10382 // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
10383 export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
10384 if(!isWasmInitialized) {
10385 throw new Error("initializeWasm() must be awaited first!");
10387 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
10388 // debug statements here
10390 // 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);
10391 export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean, max_dust_htlc_exposure_msat_arg: number, force_close_avoidance_max_fee_satoshis_arg: number): number {
10392 if(!isWasmInitialized) {
10393 throw new Error("initializeWasm() must be awaited first!");
10395 const nativeResponseValue = wasm.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);
10396 return nativeResponseValue;
10398 // uint64_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
10399 export function ChannelConfig_clone_ptr(arg: number): number {
10400 if(!isWasmInitialized) {
10401 throw new Error("initializeWasm() must be awaited first!");
10403 const nativeResponseValue = wasm.ChannelConfig_clone_ptr(arg);
10404 return nativeResponseValue;
10406 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
10407 export function ChannelConfig_clone(orig: number): number {
10408 if(!isWasmInitialized) {
10409 throw new Error("initializeWasm() must be awaited first!");
10411 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
10412 return nativeResponseValue;
10414 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
10415 export function ChannelConfig_default(): number {
10416 if(!isWasmInitialized) {
10417 throw new Error("initializeWasm() must be awaited first!");
10419 const nativeResponseValue = wasm.ChannelConfig_default();
10420 return nativeResponseValue;
10422 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
10423 export function ChannelConfig_write(obj: number): Uint8Array {
10424 if(!isWasmInitialized) {
10425 throw new Error("initializeWasm() must be awaited first!");
10427 const nativeResponseValue = wasm.ChannelConfig_write(obj);
10428 return decodeArray(nativeResponseValue);
10430 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
10431 export function ChannelConfig_read(ser: Uint8Array): number {
10432 if(!isWasmInitialized) {
10433 throw new Error("initializeWasm() must be awaited first!");
10435 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
10436 return nativeResponseValue;
10438 // void UserConfig_free(struct LDKUserConfig this_obj);
10439 export function UserConfig_free(this_obj: number): void {
10440 if(!isWasmInitialized) {
10441 throw new Error("initializeWasm() must be awaited first!");
10443 const nativeResponseValue = wasm.UserConfig_free(this_obj);
10444 // debug statements here
10446 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10447 export function UserConfig_get_own_channel_config(this_ptr: number): number {
10448 if(!isWasmInitialized) {
10449 throw new Error("initializeWasm() must be awaited first!");
10451 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
10452 return nativeResponseValue;
10454 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
10455 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
10456 if(!isWasmInitialized) {
10457 throw new Error("initializeWasm() must be awaited first!");
10459 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
10460 // debug statements here
10462 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10463 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
10464 if(!isWasmInitialized) {
10465 throw new Error("initializeWasm() must be awaited first!");
10467 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
10468 return nativeResponseValue;
10470 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
10471 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
10472 if(!isWasmInitialized) {
10473 throw new Error("initializeWasm() must be awaited first!");
10475 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
10476 // debug statements here
10478 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10479 export function UserConfig_get_channel_options(this_ptr: number): number {
10480 if(!isWasmInitialized) {
10481 throw new Error("initializeWasm() must be awaited first!");
10483 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
10484 return nativeResponseValue;
10486 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
10487 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
10488 if(!isWasmInitialized) {
10489 throw new Error("initializeWasm() must be awaited first!");
10491 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
10492 // debug statements here
10494 // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
10495 export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
10496 if(!isWasmInitialized) {
10497 throw new Error("initializeWasm() must be awaited first!");
10499 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
10500 return nativeResponseValue;
10502 // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
10503 export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
10504 if(!isWasmInitialized) {
10505 throw new Error("initializeWasm() must be awaited first!");
10507 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
10508 // debug statements here
10510 // 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);
10511 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): number {
10512 if(!isWasmInitialized) {
10513 throw new Error("initializeWasm() must be awaited first!");
10515 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
10516 return nativeResponseValue;
10518 // uint64_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
10519 export function UserConfig_clone_ptr(arg: number): number {
10520 if(!isWasmInitialized) {
10521 throw new Error("initializeWasm() must be awaited first!");
10523 const nativeResponseValue = wasm.UserConfig_clone_ptr(arg);
10524 return nativeResponseValue;
10526 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
10527 export function UserConfig_clone(orig: number): number {
10528 if(!isWasmInitialized) {
10529 throw new Error("initializeWasm() must be awaited first!");
10531 const nativeResponseValue = wasm.UserConfig_clone(orig);
10532 return nativeResponseValue;
10534 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
10535 export function UserConfig_default(): number {
10536 if(!isWasmInitialized) {
10537 throw new Error("initializeWasm() must be awaited first!");
10539 const nativeResponseValue = wasm.UserConfig_default();
10540 return nativeResponseValue;
10542 // void BestBlock_free(struct LDKBestBlock this_obj);
10543 export function BestBlock_free(this_obj: number): void {
10544 if(!isWasmInitialized) {
10545 throw new Error("initializeWasm() must be awaited first!");
10547 const nativeResponseValue = wasm.BestBlock_free(this_obj);
10548 // debug statements here
10550 // uint64_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
10551 export function BestBlock_clone_ptr(arg: number): number {
10552 if(!isWasmInitialized) {
10553 throw new Error("initializeWasm() must be awaited first!");
10555 const nativeResponseValue = wasm.BestBlock_clone_ptr(arg);
10556 return nativeResponseValue;
10558 // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
10559 export function BestBlock_clone(orig: number): number {
10560 if(!isWasmInitialized) {
10561 throw new Error("initializeWasm() must be awaited first!");
10563 const nativeResponseValue = wasm.BestBlock_clone(orig);
10564 return nativeResponseValue;
10566 // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
10567 export function BestBlock_from_genesis(network: Network): number {
10568 if(!isWasmInitialized) {
10569 throw new Error("initializeWasm() must be awaited first!");
10571 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
10572 return nativeResponseValue;
10574 // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
10575 export function BestBlock_new(block_hash: Uint8Array, height: number): number {
10576 if(!isWasmInitialized) {
10577 throw new Error("initializeWasm() must be awaited first!");
10579 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
10580 return nativeResponseValue;
10582 // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
10583 export function BestBlock_block_hash(this_arg: number): Uint8Array {
10584 if(!isWasmInitialized) {
10585 throw new Error("initializeWasm() must be awaited first!");
10587 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
10588 return decodeArray(nativeResponseValue);
10590 // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
10591 export function BestBlock_height(this_arg: number): number {
10592 if(!isWasmInitialized) {
10593 throw new Error("initializeWasm() must be awaited first!");
10595 const nativeResponseValue = wasm.BestBlock_height(this_arg);
10596 return nativeResponseValue;
10598 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
10599 export function AccessError_clone(orig: number): AccessError {
10600 if(!isWasmInitialized) {
10601 throw new Error("initializeWasm() must be awaited first!");
10603 const nativeResponseValue = wasm.AccessError_clone(orig);
10604 return nativeResponseValue;
10606 // enum LDKAccessError AccessError_unknown_chain(void);
10607 export function AccessError_unknown_chain(): AccessError {
10608 if(!isWasmInitialized) {
10609 throw new Error("initializeWasm() must be awaited first!");
10611 const nativeResponseValue = wasm.AccessError_unknown_chain();
10612 return nativeResponseValue;
10614 // enum LDKAccessError AccessError_unknown_tx(void);
10615 export function AccessError_unknown_tx(): AccessError {
10616 if(!isWasmInitialized) {
10617 throw new Error("initializeWasm() must be awaited first!");
10619 const nativeResponseValue = wasm.AccessError_unknown_tx();
10620 return nativeResponseValue;
10622 // void Access_free(struct LDKAccess this_ptr);
10623 export function Access_free(this_ptr: number): void {
10624 if(!isWasmInitialized) {
10625 throw new Error("initializeWasm() must be awaited first!");
10627 const nativeResponseValue = wasm.Access_free(this_ptr);
10628 // debug statements here
10630 // void Listen_free(struct LDKListen this_ptr);
10631 export function Listen_free(this_ptr: number): void {
10632 if(!isWasmInitialized) {
10633 throw new Error("initializeWasm() must be awaited first!");
10635 const nativeResponseValue = wasm.Listen_free(this_ptr);
10636 // debug statements here
10638 // void Confirm_free(struct LDKConfirm this_ptr);
10639 export function Confirm_free(this_ptr: number): void {
10640 if(!isWasmInitialized) {
10641 throw new Error("initializeWasm() must be awaited first!");
10643 const nativeResponseValue = wasm.Confirm_free(this_ptr);
10644 // debug statements here
10646 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
10647 export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
10648 if(!isWasmInitialized) {
10649 throw new Error("initializeWasm() must be awaited first!");
10651 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
10652 return nativeResponseValue;
10654 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
10655 export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
10656 if(!isWasmInitialized) {
10657 throw new Error("initializeWasm() must be awaited first!");
10659 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
10660 return nativeResponseValue;
10662 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
10663 export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
10664 if(!isWasmInitialized) {
10665 throw new Error("initializeWasm() must be awaited first!");
10667 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
10668 return nativeResponseValue;
10670 // void Watch_free(struct LDKWatch this_ptr);
10671 export function Watch_free(this_ptr: number): void {
10672 if(!isWasmInitialized) {
10673 throw new Error("initializeWasm() must be awaited first!");
10675 const nativeResponseValue = wasm.Watch_free(this_ptr);
10676 // debug statements here
10678 // void Filter_free(struct LDKFilter this_ptr);
10679 export function Filter_free(this_ptr: number): void {
10680 if(!isWasmInitialized) {
10681 throw new Error("initializeWasm() must be awaited first!");
10683 const nativeResponseValue = wasm.Filter_free(this_ptr);
10684 // debug statements here
10686 // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
10687 export function WatchedOutput_free(this_obj: number): void {
10688 if(!isWasmInitialized) {
10689 throw new Error("initializeWasm() must be awaited first!");
10691 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
10692 // debug statements here
10694 // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
10695 export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
10696 if(!isWasmInitialized) {
10697 throw new Error("initializeWasm() must be awaited first!");
10699 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
10700 return decodeArray(nativeResponseValue);
10702 // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10703 export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
10704 if(!isWasmInitialized) {
10705 throw new Error("initializeWasm() must be awaited first!");
10707 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
10708 // debug statements here
10710 // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
10711 export function WatchedOutput_get_outpoint(this_ptr: number): number {
10712 if(!isWasmInitialized) {
10713 throw new Error("initializeWasm() must be awaited first!");
10715 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
10716 return nativeResponseValue;
10718 // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10719 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
10720 if(!isWasmInitialized) {
10721 throw new Error("initializeWasm() must be awaited first!");
10723 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
10724 // debug statements here
10726 // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
10727 export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
10728 if(!isWasmInitialized) {
10729 throw new Error("initializeWasm() must be awaited first!");
10731 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
10732 return decodeArray(nativeResponseValue);
10734 // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
10735 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
10736 if(!isWasmInitialized) {
10737 throw new Error("initializeWasm() must be awaited first!");
10739 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
10740 // debug statements here
10742 // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
10743 export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
10744 if(!isWasmInitialized) {
10745 throw new Error("initializeWasm() must be awaited first!");
10747 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
10748 return nativeResponseValue;
10750 // uint64_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
10751 export function WatchedOutput_clone_ptr(arg: number): number {
10752 if(!isWasmInitialized) {
10753 throw new Error("initializeWasm() must be awaited first!");
10755 const nativeResponseValue = wasm.WatchedOutput_clone_ptr(arg);
10756 return nativeResponseValue;
10758 // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
10759 export function WatchedOutput_clone(orig: number): number {
10760 if(!isWasmInitialized) {
10761 throw new Error("initializeWasm() must be awaited first!");
10763 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
10764 return nativeResponseValue;
10766 // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
10767 export function WatchedOutput_hash(o: number): number {
10768 if(!isWasmInitialized) {
10769 throw new Error("initializeWasm() must be awaited first!");
10771 const nativeResponseValue = wasm.WatchedOutput_hash(o);
10772 return nativeResponseValue;
10774 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
10775 export function BroadcasterInterface_free(this_ptr: number): void {
10776 if(!isWasmInitialized) {
10777 throw new Error("initializeWasm() must be awaited first!");
10779 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
10780 // debug statements here
10782 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
10783 export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
10784 if(!isWasmInitialized) {
10785 throw new Error("initializeWasm() must be awaited first!");
10787 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
10788 return nativeResponseValue;
10790 // enum LDKConfirmationTarget ConfirmationTarget_background(void);
10791 export function ConfirmationTarget_background(): ConfirmationTarget {
10792 if(!isWasmInitialized) {
10793 throw new Error("initializeWasm() must be awaited first!");
10795 const nativeResponseValue = wasm.ConfirmationTarget_background();
10796 return nativeResponseValue;
10798 // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
10799 export function ConfirmationTarget_normal(): ConfirmationTarget {
10800 if(!isWasmInitialized) {
10801 throw new Error("initializeWasm() must be awaited first!");
10803 const nativeResponseValue = wasm.ConfirmationTarget_normal();
10804 return nativeResponseValue;
10806 // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
10807 export function ConfirmationTarget_high_priority(): ConfirmationTarget {
10808 if(!isWasmInitialized) {
10809 throw new Error("initializeWasm() must be awaited first!");
10811 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
10812 return nativeResponseValue;
10814 // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
10815 export function ConfirmationTarget_eq(a: number, b: number): boolean {
10816 if(!isWasmInitialized) {
10817 throw new Error("initializeWasm() must be awaited first!");
10819 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
10820 return nativeResponseValue;
10822 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
10823 export function FeeEstimator_free(this_ptr: number): void {
10824 if(!isWasmInitialized) {
10825 throw new Error("initializeWasm() must be awaited first!");
10827 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
10828 // debug statements here
10830 // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
10831 export function MonitorUpdateId_free(this_obj: number): void {
10832 if(!isWasmInitialized) {
10833 throw new Error("initializeWasm() must be awaited first!");
10835 const nativeResponseValue = wasm.MonitorUpdateId_free(this_obj);
10836 // debug statements here
10838 // uint64_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
10839 export function MonitorUpdateId_clone_ptr(arg: number): number {
10840 if(!isWasmInitialized) {
10841 throw new Error("initializeWasm() must be awaited first!");
10843 const nativeResponseValue = wasm.MonitorUpdateId_clone_ptr(arg);
10844 return nativeResponseValue;
10846 // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
10847 export function MonitorUpdateId_clone(orig: number): number {
10848 if(!isWasmInitialized) {
10849 throw new Error("initializeWasm() must be awaited first!");
10851 const nativeResponseValue = wasm.MonitorUpdateId_clone(orig);
10852 return nativeResponseValue;
10854 // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
10855 export function MonitorUpdateId_hash(o: number): number {
10856 if(!isWasmInitialized) {
10857 throw new Error("initializeWasm() must be awaited first!");
10859 const nativeResponseValue = wasm.MonitorUpdateId_hash(o);
10860 return nativeResponseValue;
10862 // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
10863 export function MonitorUpdateId_eq(a: number, b: number): boolean {
10864 if(!isWasmInitialized) {
10865 throw new Error("initializeWasm() must be awaited first!");
10867 const nativeResponseValue = wasm.MonitorUpdateId_eq(a, b);
10868 return nativeResponseValue;
10870 // void Persist_free(struct LDKPersist this_ptr);
10871 export function Persist_free(this_ptr: number): void {
10872 if(!isWasmInitialized) {
10873 throw new Error("initializeWasm() must be awaited first!");
10875 const nativeResponseValue = wasm.Persist_free(this_ptr);
10876 // debug statements here
10878 // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
10879 export function LockedChannelMonitor_free(this_obj: number): void {
10880 if(!isWasmInitialized) {
10881 throw new Error("initializeWasm() must be awaited first!");
10883 const nativeResponseValue = wasm.LockedChannelMonitor_free(this_obj);
10884 // debug statements here
10886 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
10887 export function ChainMonitor_free(this_obj: number): void {
10888 if(!isWasmInitialized) {
10889 throw new Error("initializeWasm() must be awaited first!");
10891 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
10892 // debug statements here
10894 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
10895 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
10896 if(!isWasmInitialized) {
10897 throw new Error("initializeWasm() must be awaited first!");
10899 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
10900 return nativeResponseValue;
10902 // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
10903 export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
10904 if(!isWasmInitialized) {
10905 throw new Error("initializeWasm() must be awaited first!");
10907 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
10908 return nativeResponseValue;
10910 // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
10911 export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
10912 if(!isWasmInitialized) {
10913 throw new Error("initializeWasm() must be awaited first!");
10915 const nativeResponseValue = wasm.ChainMonitor_get_monitor(this_arg, funding_txo);
10916 return nativeResponseValue;
10918 // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
10919 export function ChainMonitor_list_monitors(this_arg: number): number[] {
10920 if(!isWasmInitialized) {
10921 throw new Error("initializeWasm() must be awaited first!");
10923 const nativeResponseValue = wasm.ChainMonitor_list_monitors(this_arg);
10924 return nativeResponseValue;
10926 // 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);
10927 export function ChainMonitor_channel_monitor_updated(this_arg: number, funding_txo: number, completed_update_id: number): number {
10928 if(!isWasmInitialized) {
10929 throw new Error("initializeWasm() must be awaited first!");
10931 const nativeResponseValue = wasm.ChainMonitor_channel_monitor_updated(this_arg, funding_txo, completed_update_id);
10932 return nativeResponseValue;
10934 // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
10935 export function ChainMonitor_as_Listen(this_arg: number): number {
10936 if(!isWasmInitialized) {
10937 throw new Error("initializeWasm() must be awaited first!");
10939 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
10940 return nativeResponseValue;
10942 // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
10943 export function ChainMonitor_as_Confirm(this_arg: number): number {
10944 if(!isWasmInitialized) {
10945 throw new Error("initializeWasm() must be awaited first!");
10947 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
10948 return nativeResponseValue;
10950 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
10951 export function ChainMonitor_as_Watch(this_arg: number): number {
10952 if(!isWasmInitialized) {
10953 throw new Error("initializeWasm() must be awaited first!");
10955 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
10956 return nativeResponseValue;
10958 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
10959 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
10960 if(!isWasmInitialized) {
10961 throw new Error("initializeWasm() must be awaited first!");
10963 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
10964 return nativeResponseValue;
10966 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
10967 export function ChannelMonitorUpdate_free(this_obj: number): void {
10968 if(!isWasmInitialized) {
10969 throw new Error("initializeWasm() must be awaited first!");
10971 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
10972 // debug statements here
10974 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
10975 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
10976 if(!isWasmInitialized) {
10977 throw new Error("initializeWasm() must be awaited first!");
10979 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
10980 return nativeResponseValue;
10982 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
10983 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
10984 if(!isWasmInitialized) {
10985 throw new Error("initializeWasm() must be awaited first!");
10987 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
10988 // debug statements here
10990 // uint64_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
10991 export function ChannelMonitorUpdate_clone_ptr(arg: number): number {
10992 if(!isWasmInitialized) {
10993 throw new Error("initializeWasm() must be awaited first!");
10995 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone_ptr(arg);
10996 return nativeResponseValue;
10998 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
10999 export function ChannelMonitorUpdate_clone(orig: number): number {
11000 if(!isWasmInitialized) {
11001 throw new Error("initializeWasm() must be awaited first!");
11003 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
11004 return nativeResponseValue;
11006 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
11007 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
11008 if(!isWasmInitialized) {
11009 throw new Error("initializeWasm() must be awaited first!");
11011 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
11012 return decodeArray(nativeResponseValue);
11014 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
11015 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
11016 if(!isWasmInitialized) {
11017 throw new Error("initializeWasm() must be awaited first!");
11019 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
11020 return nativeResponseValue;
11022 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
11023 export function MonitorUpdateError_free(this_obj: number): void {
11024 if(!isWasmInitialized) {
11025 throw new Error("initializeWasm() must be awaited first!");
11027 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
11028 // debug statements here
11030 // struct LDKStr MonitorUpdateError_get_a(const struct LDKMonitorUpdateError *NONNULL_PTR this_ptr);
11031 export function MonitorUpdateError_get_a(this_ptr: number): String {
11032 if(!isWasmInitialized) {
11033 throw new Error("initializeWasm() must be awaited first!");
11035 const nativeResponseValue = wasm.MonitorUpdateError_get_a(this_ptr);
11036 return nativeResponseValue;
11038 // void MonitorUpdateError_set_a(struct LDKMonitorUpdateError *NONNULL_PTR this_ptr, struct LDKStr val);
11039 export function MonitorUpdateError_set_a(this_ptr: number, val: String): void {
11040 if(!isWasmInitialized) {
11041 throw new Error("initializeWasm() must be awaited first!");
11043 const nativeResponseValue = wasm.MonitorUpdateError_set_a(this_ptr, val);
11044 // debug statements here
11046 // MUST_USE_RES struct LDKMonitorUpdateError MonitorUpdateError_new(struct LDKStr a_arg);
11047 export function MonitorUpdateError_new(a_arg: String): number {
11048 if(!isWasmInitialized) {
11049 throw new Error("initializeWasm() must be awaited first!");
11051 const nativeResponseValue = wasm.MonitorUpdateError_new(a_arg);
11052 return nativeResponseValue;
11054 // uint64_t MonitorUpdateError_clone_ptr(LDKMonitorUpdateError *NONNULL_PTR arg);
11055 export function MonitorUpdateError_clone_ptr(arg: number): number {
11056 if(!isWasmInitialized) {
11057 throw new Error("initializeWasm() must be awaited first!");
11059 const nativeResponseValue = wasm.MonitorUpdateError_clone_ptr(arg);
11060 return nativeResponseValue;
11062 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
11063 export function MonitorUpdateError_clone(orig: number): number {
11064 if(!isWasmInitialized) {
11065 throw new Error("initializeWasm() must be awaited first!");
11067 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
11068 return nativeResponseValue;
11070 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
11071 export function MonitorEvent_free(this_ptr: number): void {
11072 if(!isWasmInitialized) {
11073 throw new Error("initializeWasm() must be awaited first!");
11075 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
11076 // debug statements here
11078 // uint64_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
11079 export function MonitorEvent_clone_ptr(arg: number): number {
11080 if(!isWasmInitialized) {
11081 throw new Error("initializeWasm() must be awaited first!");
11083 const nativeResponseValue = wasm.MonitorEvent_clone_ptr(arg);
11084 return nativeResponseValue;
11086 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
11087 export function MonitorEvent_clone(orig: number): number {
11088 if(!isWasmInitialized) {
11089 throw new Error("initializeWasm() must be awaited first!");
11091 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
11092 return nativeResponseValue;
11094 // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
11095 export function MonitorEvent_htlcevent(a: number): number {
11096 if(!isWasmInitialized) {
11097 throw new Error("initializeWasm() must be awaited first!");
11099 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
11100 return nativeResponseValue;
11102 // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
11103 export function MonitorEvent_commitment_tx_confirmed(a: number): number {
11104 if(!isWasmInitialized) {
11105 throw new Error("initializeWasm() must be awaited first!");
11107 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
11108 return nativeResponseValue;
11110 // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
11111 export function MonitorEvent_update_completed(funding_txo: number, monitor_update_id: number): number {
11112 if(!isWasmInitialized) {
11113 throw new Error("initializeWasm() must be awaited first!");
11115 const nativeResponseValue = wasm.MonitorEvent_update_completed(funding_txo, monitor_update_id);
11116 return nativeResponseValue;
11118 // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
11119 export function MonitorEvent_update_failed(a: number): number {
11120 if(!isWasmInitialized) {
11121 throw new Error("initializeWasm() must be awaited first!");
11123 const nativeResponseValue = wasm.MonitorEvent_update_failed(a);
11124 return nativeResponseValue;
11126 // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
11127 export function MonitorEvent_write(obj: number): Uint8Array {
11128 if(!isWasmInitialized) {
11129 throw new Error("initializeWasm() must be awaited first!");
11131 const nativeResponseValue = wasm.MonitorEvent_write(obj);
11132 return decodeArray(nativeResponseValue);
11134 // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
11135 export function MonitorEvent_read(ser: Uint8Array): number {
11136 if(!isWasmInitialized) {
11137 throw new Error("initializeWasm() must be awaited first!");
11139 const nativeResponseValue = wasm.MonitorEvent_read(encodeArray(ser));
11140 return nativeResponseValue;
11142 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
11143 export function HTLCUpdate_free(this_obj: number): void {
11144 if(!isWasmInitialized) {
11145 throw new Error("initializeWasm() must be awaited first!");
11147 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
11148 // debug statements here
11150 // uint64_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
11151 export function HTLCUpdate_clone_ptr(arg: number): number {
11152 if(!isWasmInitialized) {
11153 throw new Error("initializeWasm() must be awaited first!");
11155 const nativeResponseValue = wasm.HTLCUpdate_clone_ptr(arg);
11156 return nativeResponseValue;
11158 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
11159 export function HTLCUpdate_clone(orig: number): number {
11160 if(!isWasmInitialized) {
11161 throw new Error("initializeWasm() must be awaited first!");
11163 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
11164 return nativeResponseValue;
11166 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
11167 export function HTLCUpdate_write(obj: number): Uint8Array {
11168 if(!isWasmInitialized) {
11169 throw new Error("initializeWasm() must be awaited first!");
11171 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
11172 return decodeArray(nativeResponseValue);
11174 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
11175 export function HTLCUpdate_read(ser: Uint8Array): number {
11176 if(!isWasmInitialized) {
11177 throw new Error("initializeWasm() must be awaited first!");
11179 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
11180 return nativeResponseValue;
11182 // void Balance_free(struct LDKBalance this_ptr);
11183 export function Balance_free(this_ptr: number): void {
11184 if(!isWasmInitialized) {
11185 throw new Error("initializeWasm() must be awaited first!");
11187 const nativeResponseValue = wasm.Balance_free(this_ptr);
11188 // debug statements here
11190 // uint64_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
11191 export function Balance_clone_ptr(arg: number): number {
11192 if(!isWasmInitialized) {
11193 throw new Error("initializeWasm() must be awaited first!");
11195 const nativeResponseValue = wasm.Balance_clone_ptr(arg);
11196 return nativeResponseValue;
11198 // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
11199 export function Balance_clone(orig: number): number {
11200 if(!isWasmInitialized) {
11201 throw new Error("initializeWasm() must be awaited first!");
11203 const nativeResponseValue = wasm.Balance_clone(orig);
11204 return nativeResponseValue;
11206 // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
11207 export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
11208 if(!isWasmInitialized) {
11209 throw new Error("initializeWasm() must be awaited first!");
11211 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
11212 return nativeResponseValue;
11214 // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
11215 export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
11216 if(!isWasmInitialized) {
11217 throw new Error("initializeWasm() must be awaited first!");
11219 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
11220 return nativeResponseValue;
11222 // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
11223 export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
11224 if(!isWasmInitialized) {
11225 throw new Error("initializeWasm() must be awaited first!");
11227 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
11228 return nativeResponseValue;
11230 // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
11231 export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
11232 if(!isWasmInitialized) {
11233 throw new Error("initializeWasm() must be awaited first!");
11235 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
11236 return nativeResponseValue;
11238 // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
11239 export function Balance_eq(a: number, b: number): boolean {
11240 if(!isWasmInitialized) {
11241 throw new Error("initializeWasm() must be awaited first!");
11243 const nativeResponseValue = wasm.Balance_eq(a, b);
11244 return nativeResponseValue;
11246 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
11247 export function ChannelMonitor_free(this_obj: number): void {
11248 if(!isWasmInitialized) {
11249 throw new Error("initializeWasm() must be awaited first!");
11251 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
11252 // debug statements here
11254 // uint64_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
11255 export function ChannelMonitor_clone_ptr(arg: number): number {
11256 if(!isWasmInitialized) {
11257 throw new Error("initializeWasm() must be awaited first!");
11259 const nativeResponseValue = wasm.ChannelMonitor_clone_ptr(arg);
11260 return nativeResponseValue;
11262 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
11263 export function ChannelMonitor_clone(orig: number): number {
11264 if(!isWasmInitialized) {
11265 throw new Error("initializeWasm() must be awaited first!");
11267 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
11268 return nativeResponseValue;
11270 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
11271 export function ChannelMonitor_write(obj: number): Uint8Array {
11272 if(!isWasmInitialized) {
11273 throw new Error("initializeWasm() must be awaited first!");
11275 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
11276 return decodeArray(nativeResponseValue);
11278 // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
11279 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
11280 if(!isWasmInitialized) {
11281 throw new Error("initializeWasm() must be awaited first!");
11283 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
11284 return nativeResponseValue;
11286 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11287 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
11288 if(!isWasmInitialized) {
11289 throw new Error("initializeWasm() must be awaited first!");
11291 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
11292 return nativeResponseValue;
11294 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11295 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
11296 if(!isWasmInitialized) {
11297 throw new Error("initializeWasm() must be awaited first!");
11299 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
11300 return nativeResponseValue;
11302 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11303 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
11304 if(!isWasmInitialized) {
11305 throw new Error("initializeWasm() must be awaited first!");
11307 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
11308 return nativeResponseValue;
11310 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
11311 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
11312 if(!isWasmInitialized) {
11313 throw new Error("initializeWasm() must be awaited first!");
11315 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
11316 // debug statements here
11318 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11319 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
11320 if(!isWasmInitialized) {
11321 throw new Error("initializeWasm() must be awaited first!");
11323 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
11324 return nativeResponseValue;
11326 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11327 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
11328 if(!isWasmInitialized) {
11329 throw new Error("initializeWasm() must be awaited first!");
11331 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
11332 return nativeResponseValue;
11334 // 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);
11335 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
11336 if(!isWasmInitialized) {
11337 throw new Error("initializeWasm() must be awaited first!");
11339 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
11340 return nativeResponseValue;
11342 // 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);
11343 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
11344 if(!isWasmInitialized) {
11345 throw new Error("initializeWasm() must be awaited first!");
11347 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
11348 return nativeResponseValue;
11350 // 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);
11351 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
11352 if(!isWasmInitialized) {
11353 throw new Error("initializeWasm() must be awaited first!");
11355 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
11356 // debug statements here
11358 // 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);
11359 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
11360 if(!isWasmInitialized) {
11361 throw new Error("initializeWasm() must be awaited first!");
11363 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
11364 return nativeResponseValue;
11366 // 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);
11367 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
11368 if(!isWasmInitialized) {
11369 throw new Error("initializeWasm() must be awaited first!");
11371 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
11372 // debug statements here
11374 // 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);
11375 export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
11376 if(!isWasmInitialized) {
11377 throw new Error("initializeWasm() must be awaited first!");
11379 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
11380 return nativeResponseValue;
11382 // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11383 export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
11384 if(!isWasmInitialized) {
11385 throw new Error("initializeWasm() must be awaited first!");
11387 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
11388 return nativeResponseValue;
11390 // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11391 export function ChannelMonitor_current_best_block(this_arg: number): number {
11392 if(!isWasmInitialized) {
11393 throw new Error("initializeWasm() must be awaited first!");
11395 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
11396 return nativeResponseValue;
11398 // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
11399 export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
11400 if(!isWasmInitialized) {
11401 throw new Error("initializeWasm() must be awaited first!");
11403 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
11404 return nativeResponseValue;
11406 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
11407 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
11408 if(!isWasmInitialized) {
11409 throw new Error("initializeWasm() must be awaited first!");
11411 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
11412 return nativeResponseValue;
11414 // void OutPoint_free(struct LDKOutPoint this_obj);
11415 export function OutPoint_free(this_obj: number): void {
11416 if(!isWasmInitialized) {
11417 throw new Error("initializeWasm() must be awaited first!");
11419 const nativeResponseValue = wasm.OutPoint_free(this_obj);
11420 // debug statements here
11422 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
11423 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
11424 if(!isWasmInitialized) {
11425 throw new Error("initializeWasm() must be awaited first!");
11427 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
11428 return decodeArray(nativeResponseValue);
11430 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11431 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
11432 if(!isWasmInitialized) {
11433 throw new Error("initializeWasm() must be awaited first!");
11435 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
11436 // debug statements here
11438 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
11439 export function OutPoint_get_index(this_ptr: number): number {
11440 if(!isWasmInitialized) {
11441 throw new Error("initializeWasm() must be awaited first!");
11443 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
11444 return nativeResponseValue;
11446 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
11447 export function OutPoint_set_index(this_ptr: number, val: number): void {
11448 if(!isWasmInitialized) {
11449 throw new Error("initializeWasm() must be awaited first!");
11451 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
11452 // debug statements here
11454 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
11455 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
11456 if(!isWasmInitialized) {
11457 throw new Error("initializeWasm() must be awaited first!");
11459 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
11460 return nativeResponseValue;
11462 // uint64_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
11463 export function OutPoint_clone_ptr(arg: number): number {
11464 if(!isWasmInitialized) {
11465 throw new Error("initializeWasm() must be awaited first!");
11467 const nativeResponseValue = wasm.OutPoint_clone_ptr(arg);
11468 return nativeResponseValue;
11470 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
11471 export function OutPoint_clone(orig: number): number {
11472 if(!isWasmInitialized) {
11473 throw new Error("initializeWasm() must be awaited first!");
11475 const nativeResponseValue = wasm.OutPoint_clone(orig);
11476 return nativeResponseValue;
11478 // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
11479 export function OutPoint_eq(a: number, b: number): boolean {
11480 if(!isWasmInitialized) {
11481 throw new Error("initializeWasm() must be awaited first!");
11483 const nativeResponseValue = wasm.OutPoint_eq(a, b);
11484 return nativeResponseValue;
11486 // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
11487 export function OutPoint_hash(o: number): number {
11488 if(!isWasmInitialized) {
11489 throw new Error("initializeWasm() must be awaited first!");
11491 const nativeResponseValue = wasm.OutPoint_hash(o);
11492 return nativeResponseValue;
11494 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
11495 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
11496 if(!isWasmInitialized) {
11497 throw new Error("initializeWasm() must be awaited first!");
11499 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
11500 return decodeArray(nativeResponseValue);
11502 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
11503 export function OutPoint_write(obj: number): Uint8Array {
11504 if(!isWasmInitialized) {
11505 throw new Error("initializeWasm() must be awaited first!");
11507 const nativeResponseValue = wasm.OutPoint_write(obj);
11508 return decodeArray(nativeResponseValue);
11510 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
11511 export function OutPoint_read(ser: Uint8Array): number {
11512 if(!isWasmInitialized) {
11513 throw new Error("initializeWasm() must be awaited first!");
11515 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
11516 return nativeResponseValue;
11518 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
11519 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
11520 if(!isWasmInitialized) {
11521 throw new Error("initializeWasm() must be awaited first!");
11523 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
11524 // debug statements here
11526 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11527 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
11528 if(!isWasmInitialized) {
11529 throw new Error("initializeWasm() must be awaited first!");
11531 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
11532 return nativeResponseValue;
11534 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11535 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
11536 if(!isWasmInitialized) {
11537 throw new Error("initializeWasm() must be awaited first!");
11539 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
11540 // debug statements here
11542 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11543 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
11544 if(!isWasmInitialized) {
11545 throw new Error("initializeWasm() must be awaited first!");
11547 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
11548 return decodeArray(nativeResponseValue);
11550 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11551 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11552 if(!isWasmInitialized) {
11553 throw new Error("initializeWasm() must be awaited first!");
11555 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
11556 // debug statements here
11558 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11559 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
11560 if(!isWasmInitialized) {
11561 throw new Error("initializeWasm() must be awaited first!");
11563 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
11564 return nativeResponseValue;
11566 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
11567 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
11568 if(!isWasmInitialized) {
11569 throw new Error("initializeWasm() must be awaited first!");
11571 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
11572 // debug statements here
11574 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
11575 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
11576 if(!isWasmInitialized) {
11577 throw new Error("initializeWasm() must be awaited first!");
11579 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
11580 // debug statements here
11582 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11583 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
11584 if(!isWasmInitialized) {
11585 throw new Error("initializeWasm() must be awaited first!");
11587 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
11588 return decodeArray(nativeResponseValue);
11590 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11591 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
11592 if(!isWasmInitialized) {
11593 throw new Error("initializeWasm() must be awaited first!");
11595 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
11596 // debug statements here
11598 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
11599 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
11600 if(!isWasmInitialized) {
11601 throw new Error("initializeWasm() must be awaited first!");
11603 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
11604 return decodeArray(nativeResponseValue);
11606 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11607 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
11608 if(!isWasmInitialized) {
11609 throw new Error("initializeWasm() must be awaited first!");
11611 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
11612 // debug statements here
11614 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11615 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
11616 if(!isWasmInitialized) {
11617 throw new Error("initializeWasm() must be awaited first!");
11619 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
11620 return nativeResponseValue;
11622 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
11623 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
11624 if(!isWasmInitialized) {
11625 throw new Error("initializeWasm() must be awaited first!");
11627 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
11628 // debug statements here
11630 // 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);
11631 export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
11632 if(!isWasmInitialized) {
11633 throw new Error("initializeWasm() must be awaited first!");
11635 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeArray(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeArray(revocation_pubkey_arg), encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
11636 return nativeResponseValue;
11638 // uint64_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
11639 export function DelayedPaymentOutputDescriptor_clone_ptr(arg: number): number {
11640 if(!isWasmInitialized) {
11641 throw new Error("initializeWasm() must be awaited first!");
11643 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone_ptr(arg);
11644 return nativeResponseValue;
11646 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
11647 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
11648 if(!isWasmInitialized) {
11649 throw new Error("initializeWasm() must be awaited first!");
11651 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
11652 return nativeResponseValue;
11654 // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
11655 export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
11656 if(!isWasmInitialized) {
11657 throw new Error("initializeWasm() must be awaited first!");
11659 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
11660 return decodeArray(nativeResponseValue);
11662 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
11663 export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
11664 if(!isWasmInitialized) {
11665 throw new Error("initializeWasm() must be awaited first!");
11667 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
11668 return nativeResponseValue;
11670 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
11671 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
11672 if(!isWasmInitialized) {
11673 throw new Error("initializeWasm() must be awaited first!");
11675 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
11676 // debug statements here
11678 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11679 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
11680 if(!isWasmInitialized) {
11681 throw new Error("initializeWasm() must be awaited first!");
11683 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
11684 return nativeResponseValue;
11686 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
11687 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
11688 if(!isWasmInitialized) {
11689 throw new Error("initializeWasm() must be awaited first!");
11691 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
11692 // debug statements here
11694 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
11695 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
11696 if(!isWasmInitialized) {
11697 throw new Error("initializeWasm() must be awaited first!");
11699 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
11700 // debug statements here
11702 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
11703 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
11704 if(!isWasmInitialized) {
11705 throw new Error("initializeWasm() must be awaited first!");
11707 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
11708 return decodeArray(nativeResponseValue);
11710 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11711 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
11712 if(!isWasmInitialized) {
11713 throw new Error("initializeWasm() must be awaited first!");
11715 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
11716 // debug statements here
11718 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
11719 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
11720 if(!isWasmInitialized) {
11721 throw new Error("initializeWasm() must be awaited first!");
11723 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
11724 return nativeResponseValue;
11726 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
11727 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
11728 if(!isWasmInitialized) {
11729 throw new Error("initializeWasm() must be awaited first!");
11731 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
11732 // debug statements here
11734 // 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);
11735 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
11736 if(!isWasmInitialized) {
11737 throw new Error("initializeWasm() must be awaited first!");
11739 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
11740 return nativeResponseValue;
11742 // uint64_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
11743 export function StaticPaymentOutputDescriptor_clone_ptr(arg: number): number {
11744 if(!isWasmInitialized) {
11745 throw new Error("initializeWasm() must be awaited first!");
11747 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone_ptr(arg);
11748 return nativeResponseValue;
11750 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
11751 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
11752 if(!isWasmInitialized) {
11753 throw new Error("initializeWasm() must be awaited first!");
11755 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
11756 return nativeResponseValue;
11758 // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
11759 export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
11760 if(!isWasmInitialized) {
11761 throw new Error("initializeWasm() must be awaited first!");
11763 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
11764 return decodeArray(nativeResponseValue);
11766 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
11767 export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
11768 if(!isWasmInitialized) {
11769 throw new Error("initializeWasm() must be awaited first!");
11771 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
11772 return nativeResponseValue;
11774 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
11775 export function SpendableOutputDescriptor_free(this_ptr: number): void {
11776 if(!isWasmInitialized) {
11777 throw new Error("initializeWasm() must be awaited first!");
11779 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
11780 // debug statements here
11782 // uint64_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
11783 export function SpendableOutputDescriptor_clone_ptr(arg: number): number {
11784 if(!isWasmInitialized) {
11785 throw new Error("initializeWasm() must be awaited first!");
11787 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone_ptr(arg);
11788 return nativeResponseValue;
11790 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
11791 export function SpendableOutputDescriptor_clone(orig: number): number {
11792 if(!isWasmInitialized) {
11793 throw new Error("initializeWasm() must be awaited first!");
11795 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
11796 return nativeResponseValue;
11798 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
11799 export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
11800 if(!isWasmInitialized) {
11801 throw new Error("initializeWasm() must be awaited first!");
11803 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
11804 return nativeResponseValue;
11806 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
11807 export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
11808 if(!isWasmInitialized) {
11809 throw new Error("initializeWasm() must be awaited first!");
11811 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
11812 return nativeResponseValue;
11814 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
11815 export function SpendableOutputDescriptor_static_payment_output(a: number): number {
11816 if(!isWasmInitialized) {
11817 throw new Error("initializeWasm() must be awaited first!");
11819 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
11820 return nativeResponseValue;
11822 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
11823 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
11824 if(!isWasmInitialized) {
11825 throw new Error("initializeWasm() must be awaited first!");
11827 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
11828 return decodeArray(nativeResponseValue);
11830 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
11831 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
11832 if(!isWasmInitialized) {
11833 throw new Error("initializeWasm() must be awaited first!");
11835 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
11836 return nativeResponseValue;
11838 // void BaseSign_free(struct LDKBaseSign this_ptr);
11839 export function BaseSign_free(this_ptr: number): void {
11840 if(!isWasmInitialized) {
11841 throw new Error("initializeWasm() must be awaited first!");
11843 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
11844 // debug statements here
11846 // uint64_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
11847 export function Sign_clone_ptr(arg: number): number {
11848 if(!isWasmInitialized) {
11849 throw new Error("initializeWasm() must be awaited first!");
11851 const nativeResponseValue = wasm.Sign_clone_ptr(arg);
11852 return nativeResponseValue;
11854 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
11855 export function Sign_clone(orig: number): number {
11856 if(!isWasmInitialized) {
11857 throw new Error("initializeWasm() must be awaited first!");
11859 const nativeResponseValue = wasm.Sign_clone(orig);
11860 return nativeResponseValue;
11862 // void Sign_free(struct LDKSign this_ptr);
11863 export function Sign_free(this_ptr: number): void {
11864 if(!isWasmInitialized) {
11865 throw new Error("initializeWasm() must be awaited first!");
11867 const nativeResponseValue = wasm.Sign_free(this_ptr);
11868 // debug statements here
11870 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
11871 export function KeysInterface_free(this_ptr: number): void {
11872 if(!isWasmInitialized) {
11873 throw new Error("initializeWasm() must be awaited first!");
11875 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
11876 // debug statements here
11878 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
11879 export function InMemorySigner_free(this_obj: number): void {
11880 if(!isWasmInitialized) {
11881 throw new Error("initializeWasm() must be awaited first!");
11883 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
11884 // debug statements here
11886 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
11887 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
11888 if(!isWasmInitialized) {
11889 throw new Error("initializeWasm() must be awaited first!");
11891 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
11892 return decodeArray(nativeResponseValue);
11894 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
11895 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
11896 if(!isWasmInitialized) {
11897 throw new Error("initializeWasm() must be awaited first!");
11899 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
11900 // debug statements here
11902 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
11903 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
11904 if(!isWasmInitialized) {
11905 throw new Error("initializeWasm() must be awaited first!");
11907 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
11908 return decodeArray(nativeResponseValue);
11910 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
11911 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
11912 if(!isWasmInitialized) {
11913 throw new Error("initializeWasm() must be awaited first!");
11915 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
11916 // debug statements here
11918 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
11919 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
11920 if(!isWasmInitialized) {
11921 throw new Error("initializeWasm() must be awaited first!");
11923 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
11924 return decodeArray(nativeResponseValue);
11926 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
11927 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
11928 if(!isWasmInitialized) {
11929 throw new Error("initializeWasm() must be awaited first!");
11931 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
11932 // debug statements here
11934 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
11935 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
11936 if(!isWasmInitialized) {
11937 throw new Error("initializeWasm() must be awaited first!");
11939 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
11940 return decodeArray(nativeResponseValue);
11942 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
11943 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
11944 if(!isWasmInitialized) {
11945 throw new Error("initializeWasm() must be awaited first!");
11947 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
11948 // debug statements here
11950 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
11951 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
11952 if(!isWasmInitialized) {
11953 throw new Error("initializeWasm() must be awaited first!");
11955 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
11956 return decodeArray(nativeResponseValue);
11958 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
11959 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
11960 if(!isWasmInitialized) {
11961 throw new Error("initializeWasm() must be awaited first!");
11963 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
11964 // debug statements here
11966 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
11967 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
11968 if(!isWasmInitialized) {
11969 throw new Error("initializeWasm() must be awaited first!");
11971 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
11972 return decodeArray(nativeResponseValue);
11974 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11975 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
11976 if(!isWasmInitialized) {
11977 throw new Error("initializeWasm() must be awaited first!");
11979 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
11980 // debug statements here
11982 // uint64_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
11983 export function InMemorySigner_clone_ptr(arg: number): number {
11984 if(!isWasmInitialized) {
11985 throw new Error("initializeWasm() must be awaited first!");
11987 const nativeResponseValue = wasm.InMemorySigner_clone_ptr(arg);
11988 return nativeResponseValue;
11990 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
11991 export function InMemorySigner_clone(orig: number): number {
11992 if(!isWasmInitialized) {
11993 throw new Error("initializeWasm() must be awaited first!");
11995 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
11996 return nativeResponseValue;
11998 // 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);
11999 export function InMemorySigner_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, channel_keys_id: Uint8Array): number {
12000 if(!isWasmInitialized) {
12001 throw new Error("initializeWasm() must be awaited first!");
12003 const nativeResponseValue = wasm.InMemorySigner_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, encodeArray(channel_keys_id));
12004 return nativeResponseValue;
12006 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12007 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
12008 if(!isWasmInitialized) {
12009 throw new Error("initializeWasm() must be awaited first!");
12011 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
12012 return nativeResponseValue;
12014 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12015 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
12016 if(!isWasmInitialized) {
12017 throw new Error("initializeWasm() must be awaited first!");
12019 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
12020 return nativeResponseValue;
12022 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12023 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
12024 if(!isWasmInitialized) {
12025 throw new Error("initializeWasm() must be awaited first!");
12027 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
12028 return nativeResponseValue;
12030 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12031 export function InMemorySigner_is_outbound(this_arg: number): boolean {
12032 if(!isWasmInitialized) {
12033 throw new Error("initializeWasm() must be awaited first!");
12035 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
12036 return nativeResponseValue;
12038 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12039 export function InMemorySigner_funding_outpoint(this_arg: number): number {
12040 if(!isWasmInitialized) {
12041 throw new Error("initializeWasm() must be awaited first!");
12043 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
12044 return nativeResponseValue;
12046 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12047 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
12048 if(!isWasmInitialized) {
12049 throw new Error("initializeWasm() must be awaited first!");
12051 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
12052 return nativeResponseValue;
12054 // 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);
12055 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
12056 if(!isWasmInitialized) {
12057 throw new Error("initializeWasm() must be awaited first!");
12059 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
12060 return nativeResponseValue;
12062 // 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);
12063 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
12064 if(!isWasmInitialized) {
12065 throw new Error("initializeWasm() must be awaited first!");
12067 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
12068 return nativeResponseValue;
12070 // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12071 export function InMemorySigner_as_BaseSign(this_arg: number): number {
12072 if(!isWasmInitialized) {
12073 throw new Error("initializeWasm() must be awaited first!");
12075 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
12076 return nativeResponseValue;
12078 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
12079 export function InMemorySigner_as_Sign(this_arg: number): number {
12080 if(!isWasmInitialized) {
12081 throw new Error("initializeWasm() must be awaited first!");
12083 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
12084 return nativeResponseValue;
12086 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
12087 export function InMemorySigner_write(obj: number): Uint8Array {
12088 if(!isWasmInitialized) {
12089 throw new Error("initializeWasm() must be awaited first!");
12091 const nativeResponseValue = wasm.InMemorySigner_write(obj);
12092 return decodeArray(nativeResponseValue);
12094 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
12095 export function InMemorySigner_read(ser: Uint8Array): number {
12096 if(!isWasmInitialized) {
12097 throw new Error("initializeWasm() must be awaited first!");
12099 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
12100 return nativeResponseValue;
12102 // void KeysManager_free(struct LDKKeysManager this_obj);
12103 export function KeysManager_free(this_obj: number): void {
12104 if(!isWasmInitialized) {
12105 throw new Error("initializeWasm() must be awaited first!");
12107 const nativeResponseValue = wasm.KeysManager_free(this_obj);
12108 // debug statements here
12110 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
12111 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
12112 if(!isWasmInitialized) {
12113 throw new Error("initializeWasm() must be awaited first!");
12115 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
12116 return nativeResponseValue;
12118 // 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]);
12119 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
12120 if(!isWasmInitialized) {
12121 throw new Error("initializeWasm() must be awaited first!");
12123 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
12124 return nativeResponseValue;
12126 // 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);
12127 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
12128 if(!isWasmInitialized) {
12129 throw new Error("initializeWasm() must be awaited first!");
12131 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
12132 return nativeResponseValue;
12134 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
12135 export function KeysManager_as_KeysInterface(this_arg: number): number {
12136 if(!isWasmInitialized) {
12137 throw new Error("initializeWasm() must be awaited first!");
12139 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
12140 return nativeResponseValue;
12142 // void ChannelManager_free(struct LDKChannelManager this_obj);
12143 export function ChannelManager_free(this_obj: number): void {
12144 if(!isWasmInitialized) {
12145 throw new Error("initializeWasm() must be awaited first!");
12147 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
12148 // debug statements here
12150 // void ChainParameters_free(struct LDKChainParameters this_obj);
12151 export function ChainParameters_free(this_obj: number): void {
12152 if(!isWasmInitialized) {
12153 throw new Error("initializeWasm() must be awaited first!");
12155 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
12156 // debug statements here
12158 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
12159 export function ChainParameters_get_network(this_ptr: number): Network {
12160 if(!isWasmInitialized) {
12161 throw new Error("initializeWasm() must be awaited first!");
12163 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
12164 return nativeResponseValue;
12166 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
12167 export function ChainParameters_set_network(this_ptr: number, val: Network): void {
12168 if(!isWasmInitialized) {
12169 throw new Error("initializeWasm() must be awaited first!");
12171 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
12172 // debug statements here
12174 // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
12175 export function ChainParameters_get_best_block(this_ptr: number): number {
12176 if(!isWasmInitialized) {
12177 throw new Error("initializeWasm() must be awaited first!");
12179 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
12180 return nativeResponseValue;
12182 // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
12183 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
12184 if(!isWasmInitialized) {
12185 throw new Error("initializeWasm() must be awaited first!");
12187 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
12188 // debug statements here
12190 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
12191 export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
12192 if(!isWasmInitialized) {
12193 throw new Error("initializeWasm() must be awaited first!");
12195 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
12196 return nativeResponseValue;
12198 // uint64_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
12199 export function ChainParameters_clone_ptr(arg: number): number {
12200 if(!isWasmInitialized) {
12201 throw new Error("initializeWasm() must be awaited first!");
12203 const nativeResponseValue = wasm.ChainParameters_clone_ptr(arg);
12204 return nativeResponseValue;
12206 // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
12207 export function ChainParameters_clone(orig: number): number {
12208 if(!isWasmInitialized) {
12209 throw new Error("initializeWasm() must be awaited first!");
12211 const nativeResponseValue = wasm.ChainParameters_clone(orig);
12212 return nativeResponseValue;
12214 // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
12215 export function CounterpartyForwardingInfo_free(this_obj: number): void {
12216 if(!isWasmInitialized) {
12217 throw new Error("initializeWasm() must be awaited first!");
12219 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
12220 // debug statements here
12222 // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
12223 export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
12224 if(!isWasmInitialized) {
12225 throw new Error("initializeWasm() must be awaited first!");
12227 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
12228 return nativeResponseValue;
12230 // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
12231 export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
12232 if(!isWasmInitialized) {
12233 throw new Error("initializeWasm() must be awaited first!");
12235 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
12236 // debug statements here
12238 // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
12239 export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
12240 if(!isWasmInitialized) {
12241 throw new Error("initializeWasm() must be awaited first!");
12243 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
12244 return nativeResponseValue;
12246 // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
12247 export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12248 if(!isWasmInitialized) {
12249 throw new Error("initializeWasm() must be awaited first!");
12251 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
12252 // debug statements here
12254 // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
12255 export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
12256 if(!isWasmInitialized) {
12257 throw new Error("initializeWasm() must be awaited first!");
12259 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
12260 return nativeResponseValue;
12262 // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
12263 export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12264 if(!isWasmInitialized) {
12265 throw new Error("initializeWasm() must be awaited first!");
12267 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
12268 // debug statements here
12270 // 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);
12271 export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
12272 if(!isWasmInitialized) {
12273 throw new Error("initializeWasm() must be awaited first!");
12275 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
12276 return nativeResponseValue;
12278 // uint64_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
12279 export function CounterpartyForwardingInfo_clone_ptr(arg: number): number {
12280 if(!isWasmInitialized) {
12281 throw new Error("initializeWasm() must be awaited first!");
12283 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone_ptr(arg);
12284 return nativeResponseValue;
12286 // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
12287 export function CounterpartyForwardingInfo_clone(orig: number): number {
12288 if(!isWasmInitialized) {
12289 throw new Error("initializeWasm() must be awaited first!");
12291 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
12292 return nativeResponseValue;
12294 // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
12295 export function ChannelCounterparty_free(this_obj: number): void {
12296 if(!isWasmInitialized) {
12297 throw new Error("initializeWasm() must be awaited first!");
12299 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
12300 // debug statements here
12302 // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12303 export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
12304 if(!isWasmInitialized) {
12305 throw new Error("initializeWasm() must be awaited first!");
12307 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
12308 return decodeArray(nativeResponseValue);
12310 // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12311 export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
12312 if(!isWasmInitialized) {
12313 throw new Error("initializeWasm() must be awaited first!");
12315 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
12316 // debug statements here
12318 // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12319 export function ChannelCounterparty_get_features(this_ptr: number): number {
12320 if(!isWasmInitialized) {
12321 throw new Error("initializeWasm() must be awaited first!");
12323 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
12324 return nativeResponseValue;
12326 // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
12327 export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
12328 if(!isWasmInitialized) {
12329 throw new Error("initializeWasm() must be awaited first!");
12331 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
12332 // debug statements here
12334 // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12335 export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
12336 if(!isWasmInitialized) {
12337 throw new Error("initializeWasm() must be awaited first!");
12339 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
12340 return nativeResponseValue;
12342 // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
12343 export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
12344 if(!isWasmInitialized) {
12345 throw new Error("initializeWasm() must be awaited first!");
12347 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
12348 // debug statements here
12350 // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
12351 export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
12352 if(!isWasmInitialized) {
12353 throw new Error("initializeWasm() must be awaited first!");
12355 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
12356 return nativeResponseValue;
12358 // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
12359 export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
12360 if(!isWasmInitialized) {
12361 throw new Error("initializeWasm() must be awaited first!");
12363 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
12364 // debug statements here
12366 // 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);
12367 export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
12368 if(!isWasmInitialized) {
12369 throw new Error("initializeWasm() must be awaited first!");
12371 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
12372 return nativeResponseValue;
12374 // uint64_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
12375 export function ChannelCounterparty_clone_ptr(arg: number): number {
12376 if(!isWasmInitialized) {
12377 throw new Error("initializeWasm() must be awaited first!");
12379 const nativeResponseValue = wasm.ChannelCounterparty_clone_ptr(arg);
12380 return nativeResponseValue;
12382 // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
12383 export function ChannelCounterparty_clone(orig: number): number {
12384 if(!isWasmInitialized) {
12385 throw new Error("initializeWasm() must be awaited first!");
12387 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
12388 return nativeResponseValue;
12390 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
12391 export function ChannelDetails_free(this_obj: number): void {
12392 if(!isWasmInitialized) {
12393 throw new Error("initializeWasm() must be awaited first!");
12395 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
12396 // debug statements here
12398 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
12399 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
12400 if(!isWasmInitialized) {
12401 throw new Error("initializeWasm() must be awaited first!");
12403 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
12404 return decodeArray(nativeResponseValue);
12406 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12407 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
12408 if(!isWasmInitialized) {
12409 throw new Error("initializeWasm() must be awaited first!");
12411 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
12412 // debug statements here
12414 // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12415 export function ChannelDetails_get_counterparty(this_ptr: number): number {
12416 if(!isWasmInitialized) {
12417 throw new Error("initializeWasm() must be awaited first!");
12419 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
12420 return nativeResponseValue;
12422 // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
12423 export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
12424 if(!isWasmInitialized) {
12425 throw new Error("initializeWasm() must be awaited first!");
12427 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
12428 // debug statements here
12430 // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12431 export function ChannelDetails_get_funding_txo(this_ptr: number): number {
12432 if(!isWasmInitialized) {
12433 throw new Error("initializeWasm() must be awaited first!");
12435 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
12436 return nativeResponseValue;
12438 // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12439 export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
12440 if(!isWasmInitialized) {
12441 throw new Error("initializeWasm() must be awaited first!");
12443 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
12444 // debug statements here
12446 // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12447 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
12448 if(!isWasmInitialized) {
12449 throw new Error("initializeWasm() must be awaited first!");
12451 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
12452 return nativeResponseValue;
12454 // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12455 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
12456 if(!isWasmInitialized) {
12457 throw new Error("initializeWasm() must be awaited first!");
12459 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
12460 // debug statements here
12462 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12463 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
12464 if(!isWasmInitialized) {
12465 throw new Error("initializeWasm() must be awaited first!");
12467 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
12468 return nativeResponseValue;
12470 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12471 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
12472 if(!isWasmInitialized) {
12473 throw new Error("initializeWasm() must be awaited first!");
12475 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
12476 // debug statements here
12478 // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12479 export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
12480 if(!isWasmInitialized) {
12481 throw new Error("initializeWasm() must be awaited first!");
12483 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
12484 return nativeResponseValue;
12486 // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12487 export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
12488 if(!isWasmInitialized) {
12489 throw new Error("initializeWasm() must be awaited first!");
12491 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
12492 // debug statements here
12494 // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12495 export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
12496 if(!isWasmInitialized) {
12497 throw new Error("initializeWasm() must be awaited first!");
12499 const nativeResponseValue = wasm.ChannelDetails_get_user_channel_id(this_ptr);
12500 return nativeResponseValue;
12502 // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12503 export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
12504 if(!isWasmInitialized) {
12505 throw new Error("initializeWasm() must be awaited first!");
12507 const nativeResponseValue = wasm.ChannelDetails_set_user_channel_id(this_ptr, val);
12508 // debug statements here
12510 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12511 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
12512 if(!isWasmInitialized) {
12513 throw new Error("initializeWasm() must be awaited first!");
12515 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
12516 return nativeResponseValue;
12518 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12519 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
12520 if(!isWasmInitialized) {
12521 throw new Error("initializeWasm() must be awaited first!");
12523 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
12524 // debug statements here
12526 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12527 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
12528 if(!isWasmInitialized) {
12529 throw new Error("initializeWasm() must be awaited first!");
12531 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
12532 return nativeResponseValue;
12534 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
12535 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
12536 if(!isWasmInitialized) {
12537 throw new Error("initializeWasm() must be awaited first!");
12539 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
12540 // debug statements here
12542 // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12543 export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
12544 if(!isWasmInitialized) {
12545 throw new Error("initializeWasm() must be awaited first!");
12547 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
12548 return nativeResponseValue;
12550 // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
12551 export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
12552 if(!isWasmInitialized) {
12553 throw new Error("initializeWasm() must be awaited first!");
12555 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
12556 // debug statements here
12558 // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12559 export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
12560 if(!isWasmInitialized) {
12561 throw new Error("initializeWasm() must be awaited first!");
12563 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
12564 return nativeResponseValue;
12566 // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
12567 export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
12568 if(!isWasmInitialized) {
12569 throw new Error("initializeWasm() must be awaited first!");
12571 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
12572 // debug statements here
12574 // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12575 export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
12576 if(!isWasmInitialized) {
12577 throw new Error("initializeWasm() must be awaited first!");
12579 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
12580 return nativeResponseValue;
12582 // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12583 export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
12584 if(!isWasmInitialized) {
12585 throw new Error("initializeWasm() must be awaited first!");
12587 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
12588 // debug statements here
12590 // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12591 export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
12592 if(!isWasmInitialized) {
12593 throw new Error("initializeWasm() must be awaited first!");
12595 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
12596 return nativeResponseValue;
12598 // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12599 export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
12600 if(!isWasmInitialized) {
12601 throw new Error("initializeWasm() must be awaited first!");
12603 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
12604 // debug statements here
12606 // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12607 export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
12608 if(!isWasmInitialized) {
12609 throw new Error("initializeWasm() must be awaited first!");
12611 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
12612 return nativeResponseValue;
12614 // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12615 export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
12616 if(!isWasmInitialized) {
12617 throw new Error("initializeWasm() must be awaited first!");
12619 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
12620 // debug statements here
12622 // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
12623 export function ChannelDetails_get_is_public(this_ptr: number): boolean {
12624 if(!isWasmInitialized) {
12625 throw new Error("initializeWasm() must be awaited first!");
12627 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
12628 return nativeResponseValue;
12630 // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
12631 export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
12632 if(!isWasmInitialized) {
12633 throw new Error("initializeWasm() must be awaited first!");
12635 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
12636 // debug statements here
12638 // 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 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);
12639 export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_channel_id_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
12640 if(!isWasmInitialized) {
12641 throw new Error("initializeWasm() must be awaited first!");
12643 const nativeResponseValue = wasm.ChannelDetails_new(encodeArray(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_channel_id_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);
12644 return nativeResponseValue;
12646 // uint64_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
12647 export function ChannelDetails_clone_ptr(arg: number): number {
12648 if(!isWasmInitialized) {
12649 throw new Error("initializeWasm() must be awaited first!");
12651 const nativeResponseValue = wasm.ChannelDetails_clone_ptr(arg);
12652 return nativeResponseValue;
12654 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
12655 export function ChannelDetails_clone(orig: number): number {
12656 if(!isWasmInitialized) {
12657 throw new Error("initializeWasm() must be awaited first!");
12659 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
12660 return nativeResponseValue;
12662 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
12663 export function PaymentSendFailure_free(this_ptr: number): void {
12664 if(!isWasmInitialized) {
12665 throw new Error("initializeWasm() must be awaited first!");
12667 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
12668 // debug statements here
12670 // uint64_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
12671 export function PaymentSendFailure_clone_ptr(arg: number): number {
12672 if(!isWasmInitialized) {
12673 throw new Error("initializeWasm() must be awaited first!");
12675 const nativeResponseValue = wasm.PaymentSendFailure_clone_ptr(arg);
12676 return nativeResponseValue;
12678 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
12679 export function PaymentSendFailure_clone(orig: number): number {
12680 if(!isWasmInitialized) {
12681 throw new Error("initializeWasm() must be awaited first!");
12683 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
12684 return nativeResponseValue;
12686 // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
12687 export function PaymentSendFailure_parameter_error(a: number): number {
12688 if(!isWasmInitialized) {
12689 throw new Error("initializeWasm() must be awaited first!");
12691 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
12692 return nativeResponseValue;
12694 // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
12695 export function PaymentSendFailure_path_parameter_error(a: number[]): number {
12696 if(!isWasmInitialized) {
12697 throw new Error("initializeWasm() must be awaited first!");
12699 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
12700 return nativeResponseValue;
12702 // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
12703 export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
12704 if(!isWasmInitialized) {
12705 throw new Error("initializeWasm() must be awaited first!");
12707 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
12708 return nativeResponseValue;
12710 // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
12711 export function PaymentSendFailure_partial_failure(results: number[], failed_paths_retry: number, payment_id: Uint8Array): number {
12712 if(!isWasmInitialized) {
12713 throw new Error("initializeWasm() must be awaited first!");
12715 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(results, failed_paths_retry, encodeArray(payment_id));
12716 return nativeResponseValue;
12718 // 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);
12719 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
12720 if(!isWasmInitialized) {
12721 throw new Error("initializeWasm() must be awaited first!");
12723 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
12724 return nativeResponseValue;
12726 // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
12727 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
12728 if(!isWasmInitialized) {
12729 throw new Error("initializeWasm() must be awaited first!");
12731 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
12732 return nativeResponseValue;
12734 // 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);
12735 export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_channel_id: number, override_config: number): number {
12736 if(!isWasmInitialized) {
12737 throw new Error("initializeWasm() must be awaited first!");
12739 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
12740 return nativeResponseValue;
12742 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
12743 export function ChannelManager_list_channels(this_arg: number): number[] {
12744 if(!isWasmInitialized) {
12745 throw new Error("initializeWasm() must be awaited first!");
12747 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
12748 return nativeResponseValue;
12750 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
12751 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
12752 if(!isWasmInitialized) {
12753 throw new Error("initializeWasm() must be awaited first!");
12755 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
12756 return nativeResponseValue;
12758 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
12759 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
12760 if(!isWasmInitialized) {
12761 throw new Error("initializeWasm() must be awaited first!");
12763 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
12764 return nativeResponseValue;
12766 // 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);
12767 export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
12768 if(!isWasmInitialized) {
12769 throw new Error("initializeWasm() must be awaited first!");
12771 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
12772 return nativeResponseValue;
12774 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
12775 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
12776 if(!isWasmInitialized) {
12777 throw new Error("initializeWasm() must be awaited first!");
12779 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
12780 return nativeResponseValue;
12782 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
12783 export function ChannelManager_force_close_all_channels(this_arg: number): void {
12784 if(!isWasmInitialized) {
12785 throw new Error("initializeWasm() must be awaited first!");
12787 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
12788 // debug statements here
12790 // 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);
12791 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
12792 if(!isWasmInitialized) {
12793 throw new Error("initializeWasm() must be awaited first!");
12795 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
12796 return nativeResponseValue;
12798 // 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);
12799 export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: Uint8Array): number {
12800 if(!isWasmInitialized) {
12801 throw new Error("initializeWasm() must be awaited first!");
12803 const nativeResponseValue = wasm.ChannelManager_retry_payment(this_arg, route, encodeArray(payment_id));
12804 return nativeResponseValue;
12806 // 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);
12807 export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
12808 if(!isWasmInitialized) {
12809 throw new Error("initializeWasm() must be awaited first!");
12811 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
12812 return nativeResponseValue;
12814 // 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);
12815 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
12816 if(!isWasmInitialized) {
12817 throw new Error("initializeWasm() must be awaited first!");
12819 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
12820 return nativeResponseValue;
12822 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
12823 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
12824 if(!isWasmInitialized) {
12825 throw new Error("initializeWasm() must be awaited first!");
12827 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
12828 // debug statements here
12830 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
12831 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
12832 if(!isWasmInitialized) {
12833 throw new Error("initializeWasm() must be awaited first!");
12835 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
12836 // debug statements here
12838 // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
12839 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
12840 if(!isWasmInitialized) {
12841 throw new Error("initializeWasm() must be awaited first!");
12843 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
12844 // debug statements here
12846 // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
12847 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
12848 if(!isWasmInitialized) {
12849 throw new Error("initializeWasm() must be awaited first!");
12851 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
12852 return nativeResponseValue;
12854 // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
12855 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
12856 if(!isWasmInitialized) {
12857 throw new Error("initializeWasm() must be awaited first!");
12859 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
12860 return nativeResponseValue;
12862 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
12863 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
12864 if(!isWasmInitialized) {
12865 throw new Error("initializeWasm() must be awaited first!");
12867 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
12868 return decodeArray(nativeResponseValue);
12870 // MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
12871 export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
12872 if(!isWasmInitialized) {
12873 throw new Error("initializeWasm() must be awaited first!");
12875 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
12876 return nativeResponseValue;
12878 // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ 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, uint64_t user_payment_id);
12879 export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
12880 if(!isWasmInitialized) {
12881 throw new Error("initializeWasm() must be awaited first!");
12883 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
12884 return nativeResponseValue;
12886 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
12887 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
12888 if(!isWasmInitialized) {
12889 throw new Error("initializeWasm() must be awaited first!");
12891 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
12892 return nativeResponseValue;
12894 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
12895 export function ChannelManager_as_EventsProvider(this_arg: number): number {
12896 if(!isWasmInitialized) {
12897 throw new Error("initializeWasm() must be awaited first!");
12899 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
12900 return nativeResponseValue;
12902 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
12903 export function ChannelManager_as_Listen(this_arg: number): number {
12904 if(!isWasmInitialized) {
12905 throw new Error("initializeWasm() must be awaited first!");
12907 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
12908 return nativeResponseValue;
12910 // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
12911 export function ChannelManager_as_Confirm(this_arg: number): number {
12912 if(!isWasmInitialized) {
12913 throw new Error("initializeWasm() must be awaited first!");
12915 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
12916 return nativeResponseValue;
12918 // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
12919 export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
12920 if(!isWasmInitialized) {
12921 throw new Error("initializeWasm() must be awaited first!");
12923 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
12924 return nativeResponseValue;
12926 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
12927 export function ChannelManager_await_persistable_update(this_arg: number): void {
12928 if(!isWasmInitialized) {
12929 throw new Error("initializeWasm() must be awaited first!");
12931 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
12932 // debug statements here
12934 // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
12935 export function ChannelManager_current_best_block(this_arg: number): number {
12936 if(!isWasmInitialized) {
12937 throw new Error("initializeWasm() must be awaited first!");
12939 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
12940 return nativeResponseValue;
12942 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
12943 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
12944 if(!isWasmInitialized) {
12945 throw new Error("initializeWasm() must be awaited first!");
12947 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
12948 return nativeResponseValue;
12950 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
12951 export function ChannelManager_write(obj: number): Uint8Array {
12952 if(!isWasmInitialized) {
12953 throw new Error("initializeWasm() must be awaited first!");
12955 const nativeResponseValue = wasm.ChannelManager_write(obj);
12956 return decodeArray(nativeResponseValue);
12958 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
12959 export function ChannelManagerReadArgs_free(this_obj: number): void {
12960 if(!isWasmInitialized) {
12961 throw new Error("initializeWasm() must be awaited first!");
12963 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
12964 // debug statements here
12966 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
12967 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
12968 if(!isWasmInitialized) {
12969 throw new Error("initializeWasm() must be awaited first!");
12971 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
12972 return nativeResponseValue;
12974 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
12975 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
12976 if(!isWasmInitialized) {
12977 throw new Error("initializeWasm() must be awaited first!");
12979 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
12980 // debug statements here
12982 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
12983 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
12984 if(!isWasmInitialized) {
12985 throw new Error("initializeWasm() must be awaited first!");
12987 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
12988 return nativeResponseValue;
12990 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
12991 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
12992 if(!isWasmInitialized) {
12993 throw new Error("initializeWasm() must be awaited first!");
12995 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
12996 // debug statements here
12998 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
12999 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
13000 if(!isWasmInitialized) {
13001 throw new Error("initializeWasm() must be awaited first!");
13003 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
13004 return nativeResponseValue;
13006 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
13007 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
13008 if(!isWasmInitialized) {
13009 throw new Error("initializeWasm() must be awaited first!");
13011 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
13012 // debug statements here
13014 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13015 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
13016 if(!isWasmInitialized) {
13017 throw new Error("initializeWasm() must be awaited first!");
13019 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
13020 return nativeResponseValue;
13022 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
13023 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
13024 if(!isWasmInitialized) {
13025 throw new Error("initializeWasm() must be awaited first!");
13027 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
13028 // debug statements here
13030 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13031 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
13032 if(!isWasmInitialized) {
13033 throw new Error("initializeWasm() must be awaited first!");
13035 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
13036 return nativeResponseValue;
13038 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
13039 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
13040 if(!isWasmInitialized) {
13041 throw new Error("initializeWasm() must be awaited first!");
13043 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
13044 // debug statements here
13046 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
13047 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
13048 if(!isWasmInitialized) {
13049 throw new Error("initializeWasm() must be awaited first!");
13051 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
13052 return nativeResponseValue;
13054 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
13055 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
13056 if(!isWasmInitialized) {
13057 throw new Error("initializeWasm() must be awaited first!");
13059 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
13060 // debug statements here
13062 // 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);
13063 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 {
13064 if(!isWasmInitialized) {
13065 throw new Error("initializeWasm() must be awaited first!");
13067 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
13068 return nativeResponseValue;
13070 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
13071 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
13072 if(!isWasmInitialized) {
13073 throw new Error("initializeWasm() must be awaited first!");
13075 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
13076 return nativeResponseValue;
13078 // void DecodeError_free(struct LDKDecodeError this_obj);
13079 export function DecodeError_free(this_obj: number): void {
13080 if(!isWasmInitialized) {
13081 throw new Error("initializeWasm() must be awaited first!");
13083 const nativeResponseValue = wasm.DecodeError_free(this_obj);
13084 // debug statements here
13086 // uint64_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
13087 export function DecodeError_clone_ptr(arg: number): number {
13088 if(!isWasmInitialized) {
13089 throw new Error("initializeWasm() must be awaited first!");
13091 const nativeResponseValue = wasm.DecodeError_clone_ptr(arg);
13092 return nativeResponseValue;
13094 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
13095 export function DecodeError_clone(orig: number): number {
13096 if(!isWasmInitialized) {
13097 throw new Error("initializeWasm() must be awaited first!");
13099 const nativeResponseValue = wasm.DecodeError_clone(orig);
13100 return nativeResponseValue;
13102 // void Init_free(struct LDKInit this_obj);
13103 export function Init_free(this_obj: number): void {
13104 if(!isWasmInitialized) {
13105 throw new Error("initializeWasm() must be awaited first!");
13107 const nativeResponseValue = wasm.Init_free(this_obj);
13108 // debug statements here
13110 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
13111 export function Init_get_features(this_ptr: number): number {
13112 if(!isWasmInitialized) {
13113 throw new Error("initializeWasm() must be awaited first!");
13115 const nativeResponseValue = wasm.Init_get_features(this_ptr);
13116 return nativeResponseValue;
13118 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
13119 export function Init_set_features(this_ptr: number, val: number): void {
13120 if(!isWasmInitialized) {
13121 throw new Error("initializeWasm() must be awaited first!");
13123 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
13124 // debug statements here
13126 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
13127 export function Init_new(features_arg: number): number {
13128 if(!isWasmInitialized) {
13129 throw new Error("initializeWasm() must be awaited first!");
13131 const nativeResponseValue = wasm.Init_new(features_arg);
13132 return nativeResponseValue;
13134 // uint64_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
13135 export function Init_clone_ptr(arg: number): number {
13136 if(!isWasmInitialized) {
13137 throw new Error("initializeWasm() must be awaited first!");
13139 const nativeResponseValue = wasm.Init_clone_ptr(arg);
13140 return nativeResponseValue;
13142 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
13143 export function Init_clone(orig: number): number {
13144 if(!isWasmInitialized) {
13145 throw new Error("initializeWasm() must be awaited first!");
13147 const nativeResponseValue = wasm.Init_clone(orig);
13148 return nativeResponseValue;
13150 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
13151 export function ErrorMessage_free(this_obj: number): void {
13152 if(!isWasmInitialized) {
13153 throw new Error("initializeWasm() must be awaited first!");
13155 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
13156 // debug statements here
13158 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
13159 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
13160 if(!isWasmInitialized) {
13161 throw new Error("initializeWasm() must be awaited first!");
13163 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
13164 return decodeArray(nativeResponseValue);
13166 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13167 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
13168 if(!isWasmInitialized) {
13169 throw new Error("initializeWasm() must be awaited first!");
13171 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
13172 // debug statements here
13174 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
13175 export function ErrorMessage_get_data(this_ptr: number): String {
13176 if(!isWasmInitialized) {
13177 throw new Error("initializeWasm() must be awaited first!");
13179 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
13180 return nativeResponseValue;
13182 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
13183 export function ErrorMessage_set_data(this_ptr: number, val: String): void {
13184 if(!isWasmInitialized) {
13185 throw new Error("initializeWasm() must be awaited first!");
13187 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
13188 // debug statements here
13190 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
13191 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
13192 if(!isWasmInitialized) {
13193 throw new Error("initializeWasm() must be awaited first!");
13195 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
13196 return nativeResponseValue;
13198 // uint64_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
13199 export function ErrorMessage_clone_ptr(arg: number): number {
13200 if(!isWasmInitialized) {
13201 throw new Error("initializeWasm() must be awaited first!");
13203 const nativeResponseValue = wasm.ErrorMessage_clone_ptr(arg);
13204 return nativeResponseValue;
13206 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
13207 export function ErrorMessage_clone(orig: number): number {
13208 if(!isWasmInitialized) {
13209 throw new Error("initializeWasm() must be awaited first!");
13211 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
13212 return nativeResponseValue;
13214 // void Ping_free(struct LDKPing this_obj);
13215 export function Ping_free(this_obj: number): void {
13216 if(!isWasmInitialized) {
13217 throw new Error("initializeWasm() must be awaited first!");
13219 const nativeResponseValue = wasm.Ping_free(this_obj);
13220 // debug statements here
13222 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
13223 export function Ping_get_ponglen(this_ptr: number): number {
13224 if(!isWasmInitialized) {
13225 throw new Error("initializeWasm() must be awaited first!");
13227 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
13228 return nativeResponseValue;
13230 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
13231 export function Ping_set_ponglen(this_ptr: number, val: number): void {
13232 if(!isWasmInitialized) {
13233 throw new Error("initializeWasm() must be awaited first!");
13235 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
13236 // debug statements here
13238 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
13239 export function Ping_get_byteslen(this_ptr: number): number {
13240 if(!isWasmInitialized) {
13241 throw new Error("initializeWasm() must be awaited first!");
13243 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
13244 return nativeResponseValue;
13246 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
13247 export function Ping_set_byteslen(this_ptr: number, val: number): void {
13248 if(!isWasmInitialized) {
13249 throw new Error("initializeWasm() must be awaited first!");
13251 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
13252 // debug statements here
13254 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
13255 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
13256 if(!isWasmInitialized) {
13257 throw new Error("initializeWasm() must be awaited first!");
13259 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
13260 return nativeResponseValue;
13262 // uint64_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
13263 export function Ping_clone_ptr(arg: number): number {
13264 if(!isWasmInitialized) {
13265 throw new Error("initializeWasm() must be awaited first!");
13267 const nativeResponseValue = wasm.Ping_clone_ptr(arg);
13268 return nativeResponseValue;
13270 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
13271 export function Ping_clone(orig: number): number {
13272 if(!isWasmInitialized) {
13273 throw new Error("initializeWasm() must be awaited first!");
13275 const nativeResponseValue = wasm.Ping_clone(orig);
13276 return nativeResponseValue;
13278 // void Pong_free(struct LDKPong this_obj);
13279 export function Pong_free(this_obj: number): void {
13280 if(!isWasmInitialized) {
13281 throw new Error("initializeWasm() must be awaited first!");
13283 const nativeResponseValue = wasm.Pong_free(this_obj);
13284 // debug statements here
13286 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
13287 export function Pong_get_byteslen(this_ptr: number): number {
13288 if(!isWasmInitialized) {
13289 throw new Error("initializeWasm() must be awaited first!");
13291 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
13292 return nativeResponseValue;
13294 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
13295 export function Pong_set_byteslen(this_ptr: number, val: number): void {
13296 if(!isWasmInitialized) {
13297 throw new Error("initializeWasm() must be awaited first!");
13299 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
13300 // debug statements here
13302 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
13303 export function Pong_new(byteslen_arg: number): number {
13304 if(!isWasmInitialized) {
13305 throw new Error("initializeWasm() must be awaited first!");
13307 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
13308 return nativeResponseValue;
13310 // uint64_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
13311 export function Pong_clone_ptr(arg: number): number {
13312 if(!isWasmInitialized) {
13313 throw new Error("initializeWasm() must be awaited first!");
13315 const nativeResponseValue = wasm.Pong_clone_ptr(arg);
13316 return nativeResponseValue;
13318 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
13319 export function Pong_clone(orig: number): number {
13320 if(!isWasmInitialized) {
13321 throw new Error("initializeWasm() must be awaited first!");
13323 const nativeResponseValue = wasm.Pong_clone(orig);
13324 return nativeResponseValue;
13326 // void OpenChannel_free(struct LDKOpenChannel this_obj);
13327 export function OpenChannel_free(this_obj: number): void {
13328 if(!isWasmInitialized) {
13329 throw new Error("initializeWasm() must be awaited first!");
13331 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
13332 // debug statements here
13334 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
13335 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
13336 if(!isWasmInitialized) {
13337 throw new Error("initializeWasm() must be awaited first!");
13339 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
13340 return decodeArray(nativeResponseValue);
13342 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13343 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13344 if(!isWasmInitialized) {
13345 throw new Error("initializeWasm() must be awaited first!");
13347 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
13348 // debug statements here
13350 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
13351 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
13352 if(!isWasmInitialized) {
13353 throw new Error("initializeWasm() must be awaited first!");
13355 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
13356 return decodeArray(nativeResponseValue);
13358 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13359 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
13360 if(!isWasmInitialized) {
13361 throw new Error("initializeWasm() must be awaited first!");
13363 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
13364 // debug statements here
13366 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13367 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
13368 if(!isWasmInitialized) {
13369 throw new Error("initializeWasm() must be awaited first!");
13371 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
13372 return nativeResponseValue;
13374 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13375 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
13376 if(!isWasmInitialized) {
13377 throw new Error("initializeWasm() must be awaited first!");
13379 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
13380 // debug statements here
13382 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13383 export function OpenChannel_get_push_msat(this_ptr: number): number {
13384 if(!isWasmInitialized) {
13385 throw new Error("initializeWasm() must be awaited first!");
13387 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
13388 return nativeResponseValue;
13390 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13391 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
13392 if(!isWasmInitialized) {
13393 throw new Error("initializeWasm() must be awaited first!");
13395 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
13396 // debug statements here
13398 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13399 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
13400 if(!isWasmInitialized) {
13401 throw new Error("initializeWasm() must be awaited first!");
13403 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
13404 return nativeResponseValue;
13406 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13407 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
13408 if(!isWasmInitialized) {
13409 throw new Error("initializeWasm() must be awaited first!");
13411 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
13412 // debug statements here
13414 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13415 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
13416 if(!isWasmInitialized) {
13417 throw new Error("initializeWasm() must be awaited first!");
13419 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
13420 return nativeResponseValue;
13422 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13423 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
13424 if(!isWasmInitialized) {
13425 throw new Error("initializeWasm() must be awaited first!");
13427 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
13428 // debug statements here
13430 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13431 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
13432 if(!isWasmInitialized) {
13433 throw new Error("initializeWasm() must be awaited first!");
13435 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
13436 return nativeResponseValue;
13438 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13439 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
13440 if(!isWasmInitialized) {
13441 throw new Error("initializeWasm() must be awaited first!");
13443 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
13444 // debug statements here
13446 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13447 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
13448 if(!isWasmInitialized) {
13449 throw new Error("initializeWasm() must be awaited first!");
13451 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
13452 return nativeResponseValue;
13454 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
13455 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13456 if(!isWasmInitialized) {
13457 throw new Error("initializeWasm() must be awaited first!");
13459 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
13460 // debug statements here
13462 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13463 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
13464 if(!isWasmInitialized) {
13465 throw new Error("initializeWasm() must be awaited first!");
13467 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
13468 return nativeResponseValue;
13470 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
13471 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
13472 if(!isWasmInitialized) {
13473 throw new Error("initializeWasm() must be awaited first!");
13475 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
13476 // debug statements here
13478 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13479 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
13480 if(!isWasmInitialized) {
13481 throw new Error("initializeWasm() must be awaited first!");
13483 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
13484 return nativeResponseValue;
13486 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
13487 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
13488 if(!isWasmInitialized) {
13489 throw new Error("initializeWasm() must be awaited first!");
13491 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
13492 // debug statements here
13494 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13495 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
13496 if(!isWasmInitialized) {
13497 throw new Error("initializeWasm() must be awaited first!");
13499 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
13500 return nativeResponseValue;
13502 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
13503 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
13504 if(!isWasmInitialized) {
13505 throw new Error("initializeWasm() must be awaited first!");
13507 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
13508 // debug statements here
13510 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13511 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
13512 if(!isWasmInitialized) {
13513 throw new Error("initializeWasm() must be awaited first!");
13515 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
13516 return decodeArray(nativeResponseValue);
13518 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13519 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
13520 if(!isWasmInitialized) {
13521 throw new Error("initializeWasm() must be awaited first!");
13523 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
13524 // debug statements here
13526 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13527 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
13528 if(!isWasmInitialized) {
13529 throw new Error("initializeWasm() must be awaited first!");
13531 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
13532 return decodeArray(nativeResponseValue);
13534 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13535 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
13536 if(!isWasmInitialized) {
13537 throw new Error("initializeWasm() must be awaited first!");
13539 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
13540 // debug statements here
13542 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13543 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
13544 if(!isWasmInitialized) {
13545 throw new Error("initializeWasm() must be awaited first!");
13547 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
13548 return decodeArray(nativeResponseValue);
13550 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13551 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
13552 if(!isWasmInitialized) {
13553 throw new Error("initializeWasm() must be awaited first!");
13555 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
13556 // debug statements here
13558 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13559 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
13560 if(!isWasmInitialized) {
13561 throw new Error("initializeWasm() must be awaited first!");
13563 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
13564 return decodeArray(nativeResponseValue);
13566 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13567 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
13568 if(!isWasmInitialized) {
13569 throw new Error("initializeWasm() must be awaited first!");
13571 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
13572 // debug statements here
13574 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13575 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
13576 if(!isWasmInitialized) {
13577 throw new Error("initializeWasm() must be awaited first!");
13579 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
13580 return decodeArray(nativeResponseValue);
13582 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13583 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
13584 if(!isWasmInitialized) {
13585 throw new Error("initializeWasm() must be awaited first!");
13587 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
13588 // debug statements here
13590 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13591 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
13592 if(!isWasmInitialized) {
13593 throw new Error("initializeWasm() must be awaited first!");
13595 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
13596 return decodeArray(nativeResponseValue);
13598 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13599 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
13600 if(!isWasmInitialized) {
13601 throw new Error("initializeWasm() must be awaited first!");
13603 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
13604 // debug statements here
13606 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
13607 export function OpenChannel_get_channel_flags(this_ptr: number): number {
13608 if(!isWasmInitialized) {
13609 throw new Error("initializeWasm() must be awaited first!");
13611 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
13612 return nativeResponseValue;
13614 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
13615 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
13616 if(!isWasmInitialized) {
13617 throw new Error("initializeWasm() must be awaited first!");
13619 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
13620 // debug statements here
13622 // uint64_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
13623 export function OpenChannel_clone_ptr(arg: number): number {
13624 if(!isWasmInitialized) {
13625 throw new Error("initializeWasm() must be awaited first!");
13627 const nativeResponseValue = wasm.OpenChannel_clone_ptr(arg);
13628 return nativeResponseValue;
13630 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
13631 export function OpenChannel_clone(orig: number): number {
13632 if(!isWasmInitialized) {
13633 throw new Error("initializeWasm() must be awaited first!");
13635 const nativeResponseValue = wasm.OpenChannel_clone(orig);
13636 return nativeResponseValue;
13638 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
13639 export function AcceptChannel_free(this_obj: number): void {
13640 if(!isWasmInitialized) {
13641 throw new Error("initializeWasm() must be awaited first!");
13643 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
13644 // debug statements here
13646 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
13647 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
13648 if(!isWasmInitialized) {
13649 throw new Error("initializeWasm() must be awaited first!");
13651 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
13652 return decodeArray(nativeResponseValue);
13654 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13655 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
13656 if(!isWasmInitialized) {
13657 throw new Error("initializeWasm() must be awaited first!");
13659 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
13660 // debug statements here
13662 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13663 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
13664 if(!isWasmInitialized) {
13665 throw new Error("initializeWasm() must be awaited first!");
13667 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
13668 return nativeResponseValue;
13670 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
13671 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
13672 if(!isWasmInitialized) {
13673 throw new Error("initializeWasm() must be awaited first!");
13675 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
13676 // debug statements here
13678 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13679 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
13680 if(!isWasmInitialized) {
13681 throw new Error("initializeWasm() must be awaited first!");
13683 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
13684 return nativeResponseValue;
13686 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
13687 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
13688 if(!isWasmInitialized) {
13689 throw new Error("initializeWasm() must be awaited first!");
13691 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
13692 // debug statements here
13694 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13695 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
13696 if(!isWasmInitialized) {
13697 throw new Error("initializeWasm() must be awaited first!");
13699 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
13700 return nativeResponseValue;
13702 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
13703 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
13704 if(!isWasmInitialized) {
13705 throw new Error("initializeWasm() must be awaited first!");
13707 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
13708 // debug statements here
13710 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13711 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
13712 if(!isWasmInitialized) {
13713 throw new Error("initializeWasm() must be awaited first!");
13715 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
13716 return nativeResponseValue;
13718 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
13719 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13720 if(!isWasmInitialized) {
13721 throw new Error("initializeWasm() must be awaited first!");
13723 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
13724 // debug statements here
13726 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13727 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
13728 if(!isWasmInitialized) {
13729 throw new Error("initializeWasm() must be awaited first!");
13731 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
13732 return nativeResponseValue;
13734 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
13735 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
13736 if(!isWasmInitialized) {
13737 throw new Error("initializeWasm() must be awaited first!");
13739 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
13740 // debug statements here
13742 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13743 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
13744 if(!isWasmInitialized) {
13745 throw new Error("initializeWasm() must be awaited first!");
13747 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
13748 return nativeResponseValue;
13750 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
13751 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
13752 if(!isWasmInitialized) {
13753 throw new Error("initializeWasm() must be awaited first!");
13755 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
13756 // debug statements here
13758 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13759 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
13760 if(!isWasmInitialized) {
13761 throw new Error("initializeWasm() must be awaited first!");
13763 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
13764 return nativeResponseValue;
13766 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
13767 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
13768 if(!isWasmInitialized) {
13769 throw new Error("initializeWasm() must be awaited first!");
13771 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
13772 // debug statements here
13774 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13775 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
13776 if(!isWasmInitialized) {
13777 throw new Error("initializeWasm() must be awaited first!");
13779 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
13780 return decodeArray(nativeResponseValue);
13782 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13783 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
13784 if(!isWasmInitialized) {
13785 throw new Error("initializeWasm() must be awaited first!");
13787 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
13788 // debug statements here
13790 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13791 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
13792 if(!isWasmInitialized) {
13793 throw new Error("initializeWasm() must be awaited first!");
13795 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
13796 return decodeArray(nativeResponseValue);
13798 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13799 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
13800 if(!isWasmInitialized) {
13801 throw new Error("initializeWasm() must be awaited first!");
13803 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
13804 // debug statements here
13806 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13807 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
13808 if(!isWasmInitialized) {
13809 throw new Error("initializeWasm() must be awaited first!");
13811 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
13812 return decodeArray(nativeResponseValue);
13814 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13815 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
13816 if(!isWasmInitialized) {
13817 throw new Error("initializeWasm() must be awaited first!");
13819 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
13820 // debug statements here
13822 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13823 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
13824 if(!isWasmInitialized) {
13825 throw new Error("initializeWasm() must be awaited first!");
13827 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
13828 return decodeArray(nativeResponseValue);
13830 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13831 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
13832 if(!isWasmInitialized) {
13833 throw new Error("initializeWasm() must be awaited first!");
13835 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
13836 // debug statements here
13838 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13839 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
13840 if(!isWasmInitialized) {
13841 throw new Error("initializeWasm() must be awaited first!");
13843 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
13844 return decodeArray(nativeResponseValue);
13846 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13847 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
13848 if(!isWasmInitialized) {
13849 throw new Error("initializeWasm() must be awaited first!");
13851 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
13852 // debug statements here
13854 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
13855 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
13856 if(!isWasmInitialized) {
13857 throw new Error("initializeWasm() must be awaited first!");
13859 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
13860 return decodeArray(nativeResponseValue);
13862 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13863 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
13864 if(!isWasmInitialized) {
13865 throw new Error("initializeWasm() must be awaited first!");
13867 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
13868 // debug statements here
13870 // uint64_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
13871 export function AcceptChannel_clone_ptr(arg: number): number {
13872 if(!isWasmInitialized) {
13873 throw new Error("initializeWasm() must be awaited first!");
13875 const nativeResponseValue = wasm.AcceptChannel_clone_ptr(arg);
13876 return nativeResponseValue;
13878 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
13879 export function AcceptChannel_clone(orig: number): number {
13880 if(!isWasmInitialized) {
13881 throw new Error("initializeWasm() must be awaited first!");
13883 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
13884 return nativeResponseValue;
13886 // void FundingCreated_free(struct LDKFundingCreated this_obj);
13887 export function FundingCreated_free(this_obj: number): void {
13888 if(!isWasmInitialized) {
13889 throw new Error("initializeWasm() must be awaited first!");
13891 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
13892 // debug statements here
13894 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
13895 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
13896 if(!isWasmInitialized) {
13897 throw new Error("initializeWasm() must be awaited first!");
13899 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
13900 return decodeArray(nativeResponseValue);
13902 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13903 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
13904 if(!isWasmInitialized) {
13905 throw new Error("initializeWasm() must be awaited first!");
13907 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
13908 // debug statements here
13910 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
13911 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
13912 if(!isWasmInitialized) {
13913 throw new Error("initializeWasm() must be awaited first!");
13915 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
13916 return decodeArray(nativeResponseValue);
13918 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13919 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
13920 if(!isWasmInitialized) {
13921 throw new Error("initializeWasm() must be awaited first!");
13923 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
13924 // debug statements here
13926 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
13927 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
13928 if(!isWasmInitialized) {
13929 throw new Error("initializeWasm() must be awaited first!");
13931 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
13932 return nativeResponseValue;
13934 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
13935 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
13936 if(!isWasmInitialized) {
13937 throw new Error("initializeWasm() must be awaited first!");
13939 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
13940 // debug statements here
13942 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
13943 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
13944 if(!isWasmInitialized) {
13945 throw new Error("initializeWasm() must be awaited first!");
13947 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
13948 return decodeArray(nativeResponseValue);
13950 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
13951 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
13952 if(!isWasmInitialized) {
13953 throw new Error("initializeWasm() must be awaited first!");
13955 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
13956 // debug statements here
13958 // 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);
13959 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
13960 if(!isWasmInitialized) {
13961 throw new Error("initializeWasm() must be awaited first!");
13963 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
13964 return nativeResponseValue;
13966 // uint64_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
13967 export function FundingCreated_clone_ptr(arg: number): number {
13968 if(!isWasmInitialized) {
13969 throw new Error("initializeWasm() must be awaited first!");
13971 const nativeResponseValue = wasm.FundingCreated_clone_ptr(arg);
13972 return nativeResponseValue;
13974 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
13975 export function FundingCreated_clone(orig: number): number {
13976 if(!isWasmInitialized) {
13977 throw new Error("initializeWasm() must be awaited first!");
13979 const nativeResponseValue = wasm.FundingCreated_clone(orig);
13980 return nativeResponseValue;
13982 // void FundingSigned_free(struct LDKFundingSigned this_obj);
13983 export function FundingSigned_free(this_obj: number): void {
13984 if(!isWasmInitialized) {
13985 throw new Error("initializeWasm() must be awaited first!");
13987 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
13988 // debug statements here
13990 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
13991 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
13992 if(!isWasmInitialized) {
13993 throw new Error("initializeWasm() must be awaited first!");
13995 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
13996 return decodeArray(nativeResponseValue);
13998 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13999 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
14000 if(!isWasmInitialized) {
14001 throw new Error("initializeWasm() must be awaited first!");
14003 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
14004 // debug statements here
14006 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
14007 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
14008 if(!isWasmInitialized) {
14009 throw new Error("initializeWasm() must be awaited first!");
14011 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
14012 return decodeArray(nativeResponseValue);
14014 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
14015 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
14016 if(!isWasmInitialized) {
14017 throw new Error("initializeWasm() must be awaited first!");
14019 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
14020 // debug statements here
14022 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
14023 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
14024 if(!isWasmInitialized) {
14025 throw new Error("initializeWasm() must be awaited first!");
14027 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
14028 return nativeResponseValue;
14030 // uint64_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
14031 export function FundingSigned_clone_ptr(arg: number): number {
14032 if(!isWasmInitialized) {
14033 throw new Error("initializeWasm() must be awaited first!");
14035 const nativeResponseValue = wasm.FundingSigned_clone_ptr(arg);
14036 return nativeResponseValue;
14038 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
14039 export function FundingSigned_clone(orig: number): number {
14040 if(!isWasmInitialized) {
14041 throw new Error("initializeWasm() must be awaited first!");
14043 const nativeResponseValue = wasm.FundingSigned_clone(orig);
14044 return nativeResponseValue;
14046 // void FundingLocked_free(struct LDKFundingLocked this_obj);
14047 export function FundingLocked_free(this_obj: number): void {
14048 if(!isWasmInitialized) {
14049 throw new Error("initializeWasm() must be awaited first!");
14051 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
14052 // debug statements here
14054 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
14055 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
14056 if(!isWasmInitialized) {
14057 throw new Error("initializeWasm() must be awaited first!");
14059 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
14060 return decodeArray(nativeResponseValue);
14062 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14063 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
14064 if(!isWasmInitialized) {
14065 throw new Error("initializeWasm() must be awaited first!");
14067 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
14068 // debug statements here
14070 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
14071 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
14072 if(!isWasmInitialized) {
14073 throw new Error("initializeWasm() must be awaited first!");
14075 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
14076 return decodeArray(nativeResponseValue);
14078 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14079 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14080 if(!isWasmInitialized) {
14081 throw new Error("initializeWasm() must be awaited first!");
14083 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
14084 // debug statements here
14086 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
14087 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
14088 if(!isWasmInitialized) {
14089 throw new Error("initializeWasm() must be awaited first!");
14091 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
14092 return nativeResponseValue;
14094 // uint64_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
14095 export function FundingLocked_clone_ptr(arg: number): number {
14096 if(!isWasmInitialized) {
14097 throw new Error("initializeWasm() must be awaited first!");
14099 const nativeResponseValue = wasm.FundingLocked_clone_ptr(arg);
14100 return nativeResponseValue;
14102 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
14103 export function FundingLocked_clone(orig: number): number {
14104 if(!isWasmInitialized) {
14105 throw new Error("initializeWasm() must be awaited first!");
14107 const nativeResponseValue = wasm.FundingLocked_clone(orig);
14108 return nativeResponseValue;
14110 // void Shutdown_free(struct LDKShutdown this_obj);
14111 export function Shutdown_free(this_obj: number): void {
14112 if(!isWasmInitialized) {
14113 throw new Error("initializeWasm() must be awaited first!");
14115 const nativeResponseValue = wasm.Shutdown_free(this_obj);
14116 // debug statements here
14118 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
14119 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
14120 if(!isWasmInitialized) {
14121 throw new Error("initializeWasm() must be awaited first!");
14123 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
14124 return decodeArray(nativeResponseValue);
14126 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14127 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
14128 if(!isWasmInitialized) {
14129 throw new Error("initializeWasm() must be awaited first!");
14131 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
14132 // debug statements here
14134 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
14135 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
14136 if(!isWasmInitialized) {
14137 throw new Error("initializeWasm() must be awaited first!");
14139 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
14140 return decodeArray(nativeResponseValue);
14142 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
14143 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
14144 if(!isWasmInitialized) {
14145 throw new Error("initializeWasm() must be awaited first!");
14147 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
14148 // debug statements here
14150 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
14151 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
14152 if(!isWasmInitialized) {
14153 throw new Error("initializeWasm() must be awaited first!");
14155 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
14156 return nativeResponseValue;
14158 // uint64_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
14159 export function Shutdown_clone_ptr(arg: number): number {
14160 if(!isWasmInitialized) {
14161 throw new Error("initializeWasm() must be awaited first!");
14163 const nativeResponseValue = wasm.Shutdown_clone_ptr(arg);
14164 return nativeResponseValue;
14166 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
14167 export function Shutdown_clone(orig: number): number {
14168 if(!isWasmInitialized) {
14169 throw new Error("initializeWasm() must be awaited first!");
14171 const nativeResponseValue = wasm.Shutdown_clone(orig);
14172 return nativeResponseValue;
14174 // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
14175 export function ClosingSignedFeeRange_free(this_obj: number): void {
14176 if(!isWasmInitialized) {
14177 throw new Error("initializeWasm() must be awaited first!");
14179 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
14180 // debug statements here
14182 // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
14183 export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
14184 if(!isWasmInitialized) {
14185 throw new Error("initializeWasm() must be awaited first!");
14187 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
14188 return nativeResponseValue;
14190 // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
14191 export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
14192 if(!isWasmInitialized) {
14193 throw new Error("initializeWasm() must be awaited first!");
14195 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
14196 // debug statements here
14198 // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
14199 export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
14200 if(!isWasmInitialized) {
14201 throw new Error("initializeWasm() must be awaited first!");
14203 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
14204 return nativeResponseValue;
14206 // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
14207 export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
14208 if(!isWasmInitialized) {
14209 throw new Error("initializeWasm() must be awaited first!");
14211 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
14212 // debug statements here
14214 // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
14215 export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
14216 if(!isWasmInitialized) {
14217 throw new Error("initializeWasm() must be awaited first!");
14219 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
14220 return nativeResponseValue;
14222 // uint64_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
14223 export function ClosingSignedFeeRange_clone_ptr(arg: number): number {
14224 if(!isWasmInitialized) {
14225 throw new Error("initializeWasm() must be awaited first!");
14227 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone_ptr(arg);
14228 return nativeResponseValue;
14230 // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
14231 export function ClosingSignedFeeRange_clone(orig: number): number {
14232 if(!isWasmInitialized) {
14233 throw new Error("initializeWasm() must be awaited first!");
14235 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
14236 return nativeResponseValue;
14238 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
14239 export function ClosingSigned_free(this_obj: number): void {
14240 if(!isWasmInitialized) {
14241 throw new Error("initializeWasm() must be awaited first!");
14243 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
14244 // debug statements here
14246 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
14247 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
14248 if(!isWasmInitialized) {
14249 throw new Error("initializeWasm() must be awaited first!");
14251 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
14252 return decodeArray(nativeResponseValue);
14254 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14255 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
14256 if(!isWasmInitialized) {
14257 throw new Error("initializeWasm() must be awaited first!");
14259 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
14260 // debug statements here
14262 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
14263 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
14264 if(!isWasmInitialized) {
14265 throw new Error("initializeWasm() must be awaited first!");
14267 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
14268 return nativeResponseValue;
14270 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
14271 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
14272 if(!isWasmInitialized) {
14273 throw new Error("initializeWasm() must be awaited first!");
14275 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
14276 // debug statements here
14278 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
14279 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
14280 if(!isWasmInitialized) {
14281 throw new Error("initializeWasm() must be awaited first!");
14283 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
14284 return decodeArray(nativeResponseValue);
14286 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
14287 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
14288 if(!isWasmInitialized) {
14289 throw new Error("initializeWasm() must be awaited first!");
14291 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
14292 // debug statements here
14294 // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
14295 export function ClosingSigned_get_fee_range(this_ptr: number): number {
14296 if(!isWasmInitialized) {
14297 throw new Error("initializeWasm() must be awaited first!");
14299 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
14300 return nativeResponseValue;
14302 // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
14303 export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
14304 if(!isWasmInitialized) {
14305 throw new Error("initializeWasm() must be awaited first!");
14307 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
14308 // debug statements here
14310 // 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);
14311 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
14312 if(!isWasmInitialized) {
14313 throw new Error("initializeWasm() must be awaited first!");
14315 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
14316 return nativeResponseValue;
14318 // uint64_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
14319 export function ClosingSigned_clone_ptr(arg: number): number {
14320 if(!isWasmInitialized) {
14321 throw new Error("initializeWasm() must be awaited first!");
14323 const nativeResponseValue = wasm.ClosingSigned_clone_ptr(arg);
14324 return nativeResponseValue;
14326 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
14327 export function ClosingSigned_clone(orig: number): number {
14328 if(!isWasmInitialized) {
14329 throw new Error("initializeWasm() must be awaited first!");
14331 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
14332 return nativeResponseValue;
14334 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
14335 export function UpdateAddHTLC_free(this_obj: number): void {
14336 if(!isWasmInitialized) {
14337 throw new Error("initializeWasm() must be awaited first!");
14339 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
14340 // debug statements here
14342 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
14343 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
14344 if(!isWasmInitialized) {
14345 throw new Error("initializeWasm() must be awaited first!");
14347 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
14348 return decodeArray(nativeResponseValue);
14350 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14351 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14352 if(!isWasmInitialized) {
14353 throw new Error("initializeWasm() must be awaited first!");
14355 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
14356 // debug statements here
14358 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
14359 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
14360 if(!isWasmInitialized) {
14361 throw new Error("initializeWasm() must be awaited first!");
14363 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
14364 return nativeResponseValue;
14366 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
14367 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
14368 if(!isWasmInitialized) {
14369 throw new Error("initializeWasm() must be awaited first!");
14371 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
14372 // debug statements here
14374 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
14375 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
14376 if(!isWasmInitialized) {
14377 throw new Error("initializeWasm() must be awaited first!");
14379 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
14380 return nativeResponseValue;
14382 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
14383 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
14384 if(!isWasmInitialized) {
14385 throw new Error("initializeWasm() must be awaited first!");
14387 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
14388 // debug statements here
14390 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
14391 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
14392 if(!isWasmInitialized) {
14393 throw new Error("initializeWasm() must be awaited first!");
14395 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
14396 return decodeArray(nativeResponseValue);
14398 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14399 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
14400 if(!isWasmInitialized) {
14401 throw new Error("initializeWasm() must be awaited first!");
14403 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
14404 // debug statements here
14406 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
14407 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
14408 if(!isWasmInitialized) {
14409 throw new Error("initializeWasm() must be awaited first!");
14411 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
14412 return nativeResponseValue;
14414 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
14415 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
14416 if(!isWasmInitialized) {
14417 throw new Error("initializeWasm() must be awaited first!");
14419 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
14420 // debug statements here
14422 // uint64_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
14423 export function UpdateAddHTLC_clone_ptr(arg: number): number {
14424 if(!isWasmInitialized) {
14425 throw new Error("initializeWasm() must be awaited first!");
14427 const nativeResponseValue = wasm.UpdateAddHTLC_clone_ptr(arg);
14428 return nativeResponseValue;
14430 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
14431 export function UpdateAddHTLC_clone(orig: number): number {
14432 if(!isWasmInitialized) {
14433 throw new Error("initializeWasm() must be awaited first!");
14435 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
14436 return nativeResponseValue;
14438 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
14439 export function UpdateFulfillHTLC_free(this_obj: number): void {
14440 if(!isWasmInitialized) {
14441 throw new Error("initializeWasm() must be awaited first!");
14443 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
14444 // debug statements here
14446 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
14447 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
14448 if(!isWasmInitialized) {
14449 throw new Error("initializeWasm() must be awaited first!");
14451 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
14452 return decodeArray(nativeResponseValue);
14454 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14455 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14456 if(!isWasmInitialized) {
14457 throw new Error("initializeWasm() must be awaited first!");
14459 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
14460 // debug statements here
14462 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
14463 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
14464 if(!isWasmInitialized) {
14465 throw new Error("initializeWasm() must be awaited first!");
14467 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
14468 return nativeResponseValue;
14470 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
14471 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
14472 if(!isWasmInitialized) {
14473 throw new Error("initializeWasm() must be awaited first!");
14475 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
14476 // debug statements here
14478 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
14479 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
14480 if(!isWasmInitialized) {
14481 throw new Error("initializeWasm() must be awaited first!");
14483 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
14484 return decodeArray(nativeResponseValue);
14486 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14487 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
14488 if(!isWasmInitialized) {
14489 throw new Error("initializeWasm() must be awaited first!");
14491 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
14492 // debug statements here
14494 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
14495 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
14496 if(!isWasmInitialized) {
14497 throw new Error("initializeWasm() must be awaited first!");
14499 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
14500 return nativeResponseValue;
14502 // uint64_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
14503 export function UpdateFulfillHTLC_clone_ptr(arg: number): number {
14504 if(!isWasmInitialized) {
14505 throw new Error("initializeWasm() must be awaited first!");
14507 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone_ptr(arg);
14508 return nativeResponseValue;
14510 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
14511 export function UpdateFulfillHTLC_clone(orig: number): number {
14512 if(!isWasmInitialized) {
14513 throw new Error("initializeWasm() must be awaited first!");
14515 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
14516 return nativeResponseValue;
14518 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
14519 export function UpdateFailHTLC_free(this_obj: number): void {
14520 if(!isWasmInitialized) {
14521 throw new Error("initializeWasm() must be awaited first!");
14523 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
14524 // debug statements here
14526 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
14527 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
14528 if(!isWasmInitialized) {
14529 throw new Error("initializeWasm() must be awaited first!");
14531 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
14532 return decodeArray(nativeResponseValue);
14534 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14535 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14536 if(!isWasmInitialized) {
14537 throw new Error("initializeWasm() must be awaited first!");
14539 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
14540 // debug statements here
14542 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
14543 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
14544 if(!isWasmInitialized) {
14545 throw new Error("initializeWasm() must be awaited first!");
14547 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
14548 return nativeResponseValue;
14550 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
14551 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
14552 if(!isWasmInitialized) {
14553 throw new Error("initializeWasm() must be awaited first!");
14555 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
14556 // debug statements here
14558 // uint64_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
14559 export function UpdateFailHTLC_clone_ptr(arg: number): number {
14560 if(!isWasmInitialized) {
14561 throw new Error("initializeWasm() must be awaited first!");
14563 const nativeResponseValue = wasm.UpdateFailHTLC_clone_ptr(arg);
14564 return nativeResponseValue;
14566 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
14567 export function UpdateFailHTLC_clone(orig: number): number {
14568 if(!isWasmInitialized) {
14569 throw new Error("initializeWasm() must be awaited first!");
14571 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
14572 return nativeResponseValue;
14574 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
14575 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
14576 if(!isWasmInitialized) {
14577 throw new Error("initializeWasm() must be awaited first!");
14579 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
14580 // debug statements here
14582 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
14583 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
14584 if(!isWasmInitialized) {
14585 throw new Error("initializeWasm() must be awaited first!");
14587 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
14588 return decodeArray(nativeResponseValue);
14590 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14591 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
14592 if(!isWasmInitialized) {
14593 throw new Error("initializeWasm() must be awaited first!");
14595 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
14596 // debug statements here
14598 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
14599 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
14600 if(!isWasmInitialized) {
14601 throw new Error("initializeWasm() must be awaited first!");
14603 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
14604 return nativeResponseValue;
14606 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
14607 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
14608 if(!isWasmInitialized) {
14609 throw new Error("initializeWasm() must be awaited first!");
14611 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
14612 // debug statements here
14614 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
14615 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
14616 if(!isWasmInitialized) {
14617 throw new Error("initializeWasm() must be awaited first!");
14619 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
14620 return nativeResponseValue;
14622 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
14623 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
14624 if(!isWasmInitialized) {
14625 throw new Error("initializeWasm() must be awaited first!");
14627 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
14628 // debug statements here
14630 // uint64_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
14631 export function UpdateFailMalformedHTLC_clone_ptr(arg: number): number {
14632 if(!isWasmInitialized) {
14633 throw new Error("initializeWasm() must be awaited first!");
14635 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone_ptr(arg);
14636 return nativeResponseValue;
14638 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
14639 export function UpdateFailMalformedHTLC_clone(orig: number): number {
14640 if(!isWasmInitialized) {
14641 throw new Error("initializeWasm() must be awaited first!");
14643 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
14644 return nativeResponseValue;
14646 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
14647 export function CommitmentSigned_free(this_obj: number): void {
14648 if(!isWasmInitialized) {
14649 throw new Error("initializeWasm() must be awaited first!");
14651 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
14652 // debug statements here
14654 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
14655 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
14656 if(!isWasmInitialized) {
14657 throw new Error("initializeWasm() must be awaited first!");
14659 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
14660 return decodeArray(nativeResponseValue);
14662 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14663 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
14664 if(!isWasmInitialized) {
14665 throw new Error("initializeWasm() must be awaited first!");
14667 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
14668 // debug statements here
14670 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
14671 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
14672 if(!isWasmInitialized) {
14673 throw new Error("initializeWasm() must be awaited first!");
14675 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
14676 return decodeArray(nativeResponseValue);
14678 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
14679 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
14680 if(!isWasmInitialized) {
14681 throw new Error("initializeWasm() must be awaited first!");
14683 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
14684 // debug statements here
14686 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
14687 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
14688 if(!isWasmInitialized) {
14689 throw new Error("initializeWasm() must be awaited first!");
14691 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
14692 // debug statements here
14694 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
14695 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
14696 if(!isWasmInitialized) {
14697 throw new Error("initializeWasm() must be awaited first!");
14699 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
14700 return nativeResponseValue;
14702 // uint64_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
14703 export function CommitmentSigned_clone_ptr(arg: number): number {
14704 if(!isWasmInitialized) {
14705 throw new Error("initializeWasm() must be awaited first!");
14707 const nativeResponseValue = wasm.CommitmentSigned_clone_ptr(arg);
14708 return nativeResponseValue;
14710 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
14711 export function CommitmentSigned_clone(orig: number): number {
14712 if(!isWasmInitialized) {
14713 throw new Error("initializeWasm() must be awaited first!");
14715 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
14716 return nativeResponseValue;
14718 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
14719 export function RevokeAndACK_free(this_obj: number): void {
14720 if(!isWasmInitialized) {
14721 throw new Error("initializeWasm() must be awaited first!");
14723 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
14724 // debug statements here
14726 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
14727 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
14728 if(!isWasmInitialized) {
14729 throw new Error("initializeWasm() must be awaited first!");
14731 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
14732 return decodeArray(nativeResponseValue);
14734 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14735 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
14736 if(!isWasmInitialized) {
14737 throw new Error("initializeWasm() must be awaited first!");
14739 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
14740 // debug statements here
14742 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
14743 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
14744 if(!isWasmInitialized) {
14745 throw new Error("initializeWasm() must be awaited first!");
14747 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
14748 return decodeArray(nativeResponseValue);
14750 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14751 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
14752 if(!isWasmInitialized) {
14753 throw new Error("initializeWasm() must be awaited first!");
14755 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
14756 // debug statements here
14758 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
14759 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
14760 if(!isWasmInitialized) {
14761 throw new Error("initializeWasm() must be awaited first!");
14763 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
14764 return decodeArray(nativeResponseValue);
14766 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14767 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14768 if(!isWasmInitialized) {
14769 throw new Error("initializeWasm() must be awaited first!");
14771 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
14772 // debug statements here
14774 // 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);
14775 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
14776 if(!isWasmInitialized) {
14777 throw new Error("initializeWasm() must be awaited first!");
14779 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
14780 return nativeResponseValue;
14782 // uint64_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
14783 export function RevokeAndACK_clone_ptr(arg: number): number {
14784 if(!isWasmInitialized) {
14785 throw new Error("initializeWasm() must be awaited first!");
14787 const nativeResponseValue = wasm.RevokeAndACK_clone_ptr(arg);
14788 return nativeResponseValue;
14790 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
14791 export function RevokeAndACK_clone(orig: number): number {
14792 if(!isWasmInitialized) {
14793 throw new Error("initializeWasm() must be awaited first!");
14795 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
14796 return nativeResponseValue;
14798 // void UpdateFee_free(struct LDKUpdateFee this_obj);
14799 export function UpdateFee_free(this_obj: number): void {
14800 if(!isWasmInitialized) {
14801 throw new Error("initializeWasm() must be awaited first!");
14803 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
14804 // debug statements here
14806 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
14807 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
14808 if(!isWasmInitialized) {
14809 throw new Error("initializeWasm() must be awaited first!");
14811 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
14812 return decodeArray(nativeResponseValue);
14814 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14815 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
14816 if(!isWasmInitialized) {
14817 throw new Error("initializeWasm() must be awaited first!");
14819 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
14820 // debug statements here
14822 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
14823 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
14824 if(!isWasmInitialized) {
14825 throw new Error("initializeWasm() must be awaited first!");
14827 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
14828 return nativeResponseValue;
14830 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
14831 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
14832 if(!isWasmInitialized) {
14833 throw new Error("initializeWasm() must be awaited first!");
14835 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
14836 // debug statements here
14838 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
14839 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
14840 if(!isWasmInitialized) {
14841 throw new Error("initializeWasm() must be awaited first!");
14843 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
14844 return nativeResponseValue;
14846 // uint64_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
14847 export function UpdateFee_clone_ptr(arg: number): number {
14848 if(!isWasmInitialized) {
14849 throw new Error("initializeWasm() must be awaited first!");
14851 const nativeResponseValue = wasm.UpdateFee_clone_ptr(arg);
14852 return nativeResponseValue;
14854 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
14855 export function UpdateFee_clone(orig: number): number {
14856 if(!isWasmInitialized) {
14857 throw new Error("initializeWasm() must be awaited first!");
14859 const nativeResponseValue = wasm.UpdateFee_clone(orig);
14860 return nativeResponseValue;
14862 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
14863 export function DataLossProtect_free(this_obj: number): void {
14864 if(!isWasmInitialized) {
14865 throw new Error("initializeWasm() must be awaited first!");
14867 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
14868 // debug statements here
14870 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
14871 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
14872 if(!isWasmInitialized) {
14873 throw new Error("initializeWasm() must be awaited first!");
14875 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
14876 return decodeArray(nativeResponseValue);
14878 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14879 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
14880 if(!isWasmInitialized) {
14881 throw new Error("initializeWasm() must be awaited first!");
14883 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
14884 // debug statements here
14886 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
14887 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
14888 if(!isWasmInitialized) {
14889 throw new Error("initializeWasm() must be awaited first!");
14891 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
14892 return decodeArray(nativeResponseValue);
14894 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14895 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14896 if(!isWasmInitialized) {
14897 throw new Error("initializeWasm() must be awaited first!");
14899 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
14900 // debug statements here
14902 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
14903 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
14904 if(!isWasmInitialized) {
14905 throw new Error("initializeWasm() must be awaited first!");
14907 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
14908 return nativeResponseValue;
14910 // uint64_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
14911 export function DataLossProtect_clone_ptr(arg: number): number {
14912 if(!isWasmInitialized) {
14913 throw new Error("initializeWasm() must be awaited first!");
14915 const nativeResponseValue = wasm.DataLossProtect_clone_ptr(arg);
14916 return nativeResponseValue;
14918 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
14919 export function DataLossProtect_clone(orig: number): number {
14920 if(!isWasmInitialized) {
14921 throw new Error("initializeWasm() must be awaited first!");
14923 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
14924 return nativeResponseValue;
14926 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
14927 export function ChannelReestablish_free(this_obj: number): void {
14928 if(!isWasmInitialized) {
14929 throw new Error("initializeWasm() must be awaited first!");
14931 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
14932 // debug statements here
14934 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
14935 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
14936 if(!isWasmInitialized) {
14937 throw new Error("initializeWasm() must be awaited first!");
14939 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
14940 return decodeArray(nativeResponseValue);
14942 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14943 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
14944 if(!isWasmInitialized) {
14945 throw new Error("initializeWasm() must be awaited first!");
14947 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
14948 // debug statements here
14950 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
14951 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
14952 if(!isWasmInitialized) {
14953 throw new Error("initializeWasm() must be awaited first!");
14955 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
14956 return nativeResponseValue;
14958 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
14959 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
14960 if(!isWasmInitialized) {
14961 throw new Error("initializeWasm() must be awaited first!");
14963 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
14964 // debug statements here
14966 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
14967 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
14968 if(!isWasmInitialized) {
14969 throw new Error("initializeWasm() must be awaited first!");
14971 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
14972 return nativeResponseValue;
14974 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
14975 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
14976 if(!isWasmInitialized) {
14977 throw new Error("initializeWasm() must be awaited first!");
14979 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
14980 // debug statements here
14982 // uint64_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
14983 export function ChannelReestablish_clone_ptr(arg: number): number {
14984 if(!isWasmInitialized) {
14985 throw new Error("initializeWasm() must be awaited first!");
14987 const nativeResponseValue = wasm.ChannelReestablish_clone_ptr(arg);
14988 return nativeResponseValue;
14990 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
14991 export function ChannelReestablish_clone(orig: number): number {
14992 if(!isWasmInitialized) {
14993 throw new Error("initializeWasm() must be awaited first!");
14995 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
14996 return nativeResponseValue;
14998 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
14999 export function AnnouncementSignatures_free(this_obj: number): void {
15000 if(!isWasmInitialized) {
15001 throw new Error("initializeWasm() must be awaited first!");
15003 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
15004 // debug statements here
15006 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
15007 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
15008 if(!isWasmInitialized) {
15009 throw new Error("initializeWasm() must be awaited first!");
15011 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
15012 return decodeArray(nativeResponseValue);
15014 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15015 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
15016 if(!isWasmInitialized) {
15017 throw new Error("initializeWasm() must be awaited first!");
15019 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
15020 // debug statements here
15022 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
15023 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
15024 if(!isWasmInitialized) {
15025 throw new Error("initializeWasm() must be awaited first!");
15027 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
15028 return nativeResponseValue;
15030 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
15031 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
15032 if(!isWasmInitialized) {
15033 throw new Error("initializeWasm() must be awaited first!");
15035 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
15036 // debug statements here
15038 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
15039 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
15040 if(!isWasmInitialized) {
15041 throw new Error("initializeWasm() must be awaited first!");
15043 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
15044 return decodeArray(nativeResponseValue);
15046 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
15047 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
15048 if(!isWasmInitialized) {
15049 throw new Error("initializeWasm() must be awaited first!");
15051 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
15052 // debug statements here
15054 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
15055 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
15056 if(!isWasmInitialized) {
15057 throw new Error("initializeWasm() must be awaited first!");
15059 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
15060 return decodeArray(nativeResponseValue);
15062 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
15063 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
15064 if(!isWasmInitialized) {
15065 throw new Error("initializeWasm() must be awaited first!");
15067 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
15068 // debug statements here
15070 // 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);
15071 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
15072 if(!isWasmInitialized) {
15073 throw new Error("initializeWasm() must be awaited first!");
15075 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
15076 return nativeResponseValue;
15078 // uint64_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
15079 export function AnnouncementSignatures_clone_ptr(arg: number): number {
15080 if(!isWasmInitialized) {
15081 throw new Error("initializeWasm() must be awaited first!");
15083 const nativeResponseValue = wasm.AnnouncementSignatures_clone_ptr(arg);
15084 return nativeResponseValue;
15086 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
15087 export function AnnouncementSignatures_clone(orig: number): number {
15088 if(!isWasmInitialized) {
15089 throw new Error("initializeWasm() must be awaited first!");
15091 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
15092 return nativeResponseValue;
15094 // void NetAddress_free(struct LDKNetAddress this_ptr);
15095 export function NetAddress_free(this_ptr: number): void {
15096 if(!isWasmInitialized) {
15097 throw new Error("initializeWasm() must be awaited first!");
15099 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
15100 // debug statements here
15102 // uint64_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
15103 export function NetAddress_clone_ptr(arg: number): number {
15104 if(!isWasmInitialized) {
15105 throw new Error("initializeWasm() must be awaited first!");
15107 const nativeResponseValue = wasm.NetAddress_clone_ptr(arg);
15108 return nativeResponseValue;
15110 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
15111 export function NetAddress_clone(orig: number): number {
15112 if(!isWasmInitialized) {
15113 throw new Error("initializeWasm() must be awaited first!");
15115 const nativeResponseValue = wasm.NetAddress_clone(orig);
15116 return nativeResponseValue;
15118 // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
15119 export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
15120 if(!isWasmInitialized) {
15121 throw new Error("initializeWasm() must be awaited first!");
15123 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
15124 return nativeResponseValue;
15126 // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
15127 export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
15128 if(!isWasmInitialized) {
15129 throw new Error("initializeWasm() must be awaited first!");
15131 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
15132 return nativeResponseValue;
15134 // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
15135 export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
15136 if(!isWasmInitialized) {
15137 throw new Error("initializeWasm() must be awaited first!");
15139 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
15140 return nativeResponseValue;
15142 // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
15143 export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
15144 if(!isWasmInitialized) {
15145 throw new Error("initializeWasm() must be awaited first!");
15147 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
15148 return nativeResponseValue;
15150 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
15151 export function NetAddress_write(obj: number): Uint8Array {
15152 if(!isWasmInitialized) {
15153 throw new Error("initializeWasm() must be awaited first!");
15155 const nativeResponseValue = wasm.NetAddress_write(obj);
15156 return decodeArray(nativeResponseValue);
15158 // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
15159 export function NetAddress_read(ser: Uint8Array): number {
15160 if(!isWasmInitialized) {
15161 throw new Error("initializeWasm() must be awaited first!");
15163 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
15164 return nativeResponseValue;
15166 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
15167 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
15168 if(!isWasmInitialized) {
15169 throw new Error("initializeWasm() must be awaited first!");
15171 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
15172 // debug statements here
15174 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
15175 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
15176 if(!isWasmInitialized) {
15177 throw new Error("initializeWasm() must be awaited first!");
15179 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
15180 return nativeResponseValue;
15182 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
15183 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
15184 if(!isWasmInitialized) {
15185 throw new Error("initializeWasm() must be awaited first!");
15187 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
15188 // debug statements here
15190 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
15191 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
15192 if(!isWasmInitialized) {
15193 throw new Error("initializeWasm() must be awaited first!");
15195 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
15196 return nativeResponseValue;
15198 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
15199 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
15200 if(!isWasmInitialized) {
15201 throw new Error("initializeWasm() must be awaited first!");
15203 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
15204 // debug statements here
15206 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
15207 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
15208 if(!isWasmInitialized) {
15209 throw new Error("initializeWasm() must be awaited first!");
15211 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
15212 return decodeArray(nativeResponseValue);
15214 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15215 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
15216 if(!isWasmInitialized) {
15217 throw new Error("initializeWasm() must be awaited first!");
15219 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
15220 // debug statements here
15222 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
15223 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
15224 if(!isWasmInitialized) {
15225 throw new Error("initializeWasm() must be awaited first!");
15227 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
15228 return decodeArray(nativeResponseValue);
15230 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
15231 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
15232 if(!isWasmInitialized) {
15233 throw new Error("initializeWasm() must be awaited first!");
15235 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
15236 // debug statements here
15238 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
15239 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
15240 if(!isWasmInitialized) {
15241 throw new Error("initializeWasm() must be awaited first!");
15243 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
15244 return decodeArray(nativeResponseValue);
15246 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15247 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
15248 if(!isWasmInitialized) {
15249 throw new Error("initializeWasm() must be awaited first!");
15251 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
15252 // debug statements here
15254 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
15255 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
15256 if(!isWasmInitialized) {
15257 throw new Error("initializeWasm() must be awaited first!");
15259 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
15260 // debug statements here
15262 // uint64_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
15263 export function UnsignedNodeAnnouncement_clone_ptr(arg: number): number {
15264 if(!isWasmInitialized) {
15265 throw new Error("initializeWasm() must be awaited first!");
15267 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone_ptr(arg);
15268 return nativeResponseValue;
15270 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
15271 export function UnsignedNodeAnnouncement_clone(orig: number): number {
15272 if(!isWasmInitialized) {
15273 throw new Error("initializeWasm() must be awaited first!");
15275 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
15276 return nativeResponseValue;
15278 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
15279 export function NodeAnnouncement_free(this_obj: number): void {
15280 if(!isWasmInitialized) {
15281 throw new Error("initializeWasm() must be awaited first!");
15283 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
15284 // debug statements here
15286 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
15287 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
15288 if(!isWasmInitialized) {
15289 throw new Error("initializeWasm() must be awaited first!");
15291 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
15292 return decodeArray(nativeResponseValue);
15294 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15295 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
15296 if(!isWasmInitialized) {
15297 throw new Error("initializeWasm() must be awaited first!");
15299 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
15300 // debug statements here
15302 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
15303 export function NodeAnnouncement_get_contents(this_ptr: number): number {
15304 if(!isWasmInitialized) {
15305 throw new Error("initializeWasm() must be awaited first!");
15307 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
15308 return nativeResponseValue;
15310 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
15311 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
15312 if(!isWasmInitialized) {
15313 throw new Error("initializeWasm() must be awaited first!");
15315 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
15316 // debug statements here
15318 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
15319 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
15320 if(!isWasmInitialized) {
15321 throw new Error("initializeWasm() must be awaited first!");
15323 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
15324 return nativeResponseValue;
15326 // uint64_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
15327 export function NodeAnnouncement_clone_ptr(arg: number): number {
15328 if(!isWasmInitialized) {
15329 throw new Error("initializeWasm() must be awaited first!");
15331 const nativeResponseValue = wasm.NodeAnnouncement_clone_ptr(arg);
15332 return nativeResponseValue;
15334 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
15335 export function NodeAnnouncement_clone(orig: number): number {
15336 if(!isWasmInitialized) {
15337 throw new Error("initializeWasm() must be awaited first!");
15339 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
15340 return nativeResponseValue;
15342 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
15343 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
15344 if(!isWasmInitialized) {
15345 throw new Error("initializeWasm() must be awaited first!");
15347 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
15348 // debug statements here
15350 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15351 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
15352 if(!isWasmInitialized) {
15353 throw new Error("initializeWasm() must be awaited first!");
15355 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
15356 return nativeResponseValue;
15358 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
15359 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
15360 if(!isWasmInitialized) {
15361 throw new Error("initializeWasm() must be awaited first!");
15363 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
15364 // debug statements here
15366 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
15367 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
15368 if(!isWasmInitialized) {
15369 throw new Error("initializeWasm() must be awaited first!");
15371 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
15372 return decodeArray(nativeResponseValue);
15374 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15375 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
15376 if(!isWasmInitialized) {
15377 throw new Error("initializeWasm() must be awaited first!");
15379 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
15380 // debug statements here
15382 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15383 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
15384 if(!isWasmInitialized) {
15385 throw new Error("initializeWasm() must be awaited first!");
15387 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
15388 return nativeResponseValue;
15390 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
15391 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
15392 if(!isWasmInitialized) {
15393 throw new Error("initializeWasm() must be awaited first!");
15395 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
15396 // debug statements here
15398 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15399 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
15400 if(!isWasmInitialized) {
15401 throw new Error("initializeWasm() must be awaited first!");
15403 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
15404 return decodeArray(nativeResponseValue);
15406 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15407 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
15408 if(!isWasmInitialized) {
15409 throw new Error("initializeWasm() must be awaited first!");
15411 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
15412 // debug statements here
15414 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15415 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
15416 if(!isWasmInitialized) {
15417 throw new Error("initializeWasm() must be awaited first!");
15419 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
15420 return decodeArray(nativeResponseValue);
15422 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15423 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
15424 if(!isWasmInitialized) {
15425 throw new Error("initializeWasm() must be awaited first!");
15427 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
15428 // debug statements here
15430 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15431 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
15432 if(!isWasmInitialized) {
15433 throw new Error("initializeWasm() must be awaited first!");
15435 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
15436 return decodeArray(nativeResponseValue);
15438 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15439 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
15440 if(!isWasmInitialized) {
15441 throw new Error("initializeWasm() must be awaited first!");
15443 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
15444 // debug statements here
15446 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
15447 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
15448 if(!isWasmInitialized) {
15449 throw new Error("initializeWasm() must be awaited first!");
15451 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
15452 return decodeArray(nativeResponseValue);
15454 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15455 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
15456 if(!isWasmInitialized) {
15457 throw new Error("initializeWasm() must be awaited first!");
15459 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
15460 // debug statements here
15462 // uint64_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
15463 export function UnsignedChannelAnnouncement_clone_ptr(arg: number): number {
15464 if(!isWasmInitialized) {
15465 throw new Error("initializeWasm() must be awaited first!");
15467 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone_ptr(arg);
15468 return nativeResponseValue;
15470 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
15471 export function UnsignedChannelAnnouncement_clone(orig: number): number {
15472 if(!isWasmInitialized) {
15473 throw new Error("initializeWasm() must be awaited first!");
15475 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
15476 return nativeResponseValue;
15478 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
15479 export function ChannelAnnouncement_free(this_obj: number): void {
15480 if(!isWasmInitialized) {
15481 throw new Error("initializeWasm() must be awaited first!");
15483 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
15484 // debug statements here
15486 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15487 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
15488 if(!isWasmInitialized) {
15489 throw new Error("initializeWasm() must be awaited first!");
15491 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
15492 return decodeArray(nativeResponseValue);
15494 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15495 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
15496 if(!isWasmInitialized) {
15497 throw new Error("initializeWasm() must be awaited first!");
15499 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
15500 // debug statements here
15502 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15503 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
15504 if(!isWasmInitialized) {
15505 throw new Error("initializeWasm() must be awaited first!");
15507 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
15508 return decodeArray(nativeResponseValue);
15510 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15511 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
15512 if(!isWasmInitialized) {
15513 throw new Error("initializeWasm() must be awaited first!");
15515 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
15516 // debug statements here
15518 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15519 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
15520 if(!isWasmInitialized) {
15521 throw new Error("initializeWasm() must be awaited first!");
15523 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
15524 return decodeArray(nativeResponseValue);
15526 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15527 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
15528 if(!isWasmInitialized) {
15529 throw new Error("initializeWasm() must be awaited first!");
15531 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
15532 // debug statements here
15534 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15535 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
15536 if(!isWasmInitialized) {
15537 throw new Error("initializeWasm() must be awaited first!");
15539 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
15540 return decodeArray(nativeResponseValue);
15542 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
15543 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
15544 if(!isWasmInitialized) {
15545 throw new Error("initializeWasm() must be awaited first!");
15547 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
15548 // debug statements here
15550 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
15551 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
15552 if(!isWasmInitialized) {
15553 throw new Error("initializeWasm() must be awaited first!");
15555 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
15556 return nativeResponseValue;
15558 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
15559 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
15560 if(!isWasmInitialized) {
15561 throw new Error("initializeWasm() must be awaited first!");
15563 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
15564 // debug statements here
15566 // 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);
15567 export function ChannelAnnouncement_new(node_signature_1_arg: Uint8Array, node_signature_2_arg: Uint8Array, bitcoin_signature_1_arg: Uint8Array, bitcoin_signature_2_arg: Uint8Array, contents_arg: number): number {
15568 if(!isWasmInitialized) {
15569 throw new Error("initializeWasm() must be awaited first!");
15571 const nativeResponseValue = wasm.ChannelAnnouncement_new(encodeArray(node_signature_1_arg), encodeArray(node_signature_2_arg), encodeArray(bitcoin_signature_1_arg), encodeArray(bitcoin_signature_2_arg), contents_arg);
15572 return nativeResponseValue;
15574 // uint64_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
15575 export function ChannelAnnouncement_clone_ptr(arg: number): number {
15576 if(!isWasmInitialized) {
15577 throw new Error("initializeWasm() must be awaited first!");
15579 const nativeResponseValue = wasm.ChannelAnnouncement_clone_ptr(arg);
15580 return nativeResponseValue;
15582 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
15583 export function ChannelAnnouncement_clone(orig: number): number {
15584 if(!isWasmInitialized) {
15585 throw new Error("initializeWasm() must be awaited first!");
15587 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
15588 return nativeResponseValue;
15590 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
15591 export function UnsignedChannelUpdate_free(this_obj: number): void {
15592 if(!isWasmInitialized) {
15593 throw new Error("initializeWasm() must be awaited first!");
15595 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
15596 // debug statements here
15598 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
15599 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
15600 if(!isWasmInitialized) {
15601 throw new Error("initializeWasm() must be awaited first!");
15603 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
15604 return decodeArray(nativeResponseValue);
15606 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15607 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
15608 if(!isWasmInitialized) {
15609 throw new Error("initializeWasm() must be awaited first!");
15611 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
15612 // debug statements here
15614 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15615 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
15616 if(!isWasmInitialized) {
15617 throw new Error("initializeWasm() must be awaited first!");
15619 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
15620 return nativeResponseValue;
15622 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
15623 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
15624 if(!isWasmInitialized) {
15625 throw new Error("initializeWasm() must be awaited first!");
15627 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
15628 // debug statements here
15630 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15631 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
15632 if(!isWasmInitialized) {
15633 throw new Error("initializeWasm() must be awaited first!");
15635 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
15636 return nativeResponseValue;
15638 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
15639 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
15640 if(!isWasmInitialized) {
15641 throw new Error("initializeWasm() must be awaited first!");
15643 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
15644 // debug statements here
15646 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15647 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
15648 if(!isWasmInitialized) {
15649 throw new Error("initializeWasm() must be awaited first!");
15651 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
15652 return nativeResponseValue;
15654 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
15655 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
15656 if(!isWasmInitialized) {
15657 throw new Error("initializeWasm() must be awaited first!");
15659 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
15660 // debug statements here
15662 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15663 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
15664 if(!isWasmInitialized) {
15665 throw new Error("initializeWasm() must be awaited first!");
15667 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
15668 return nativeResponseValue;
15670 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
15671 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15672 if(!isWasmInitialized) {
15673 throw new Error("initializeWasm() must be awaited first!");
15675 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
15676 // debug statements here
15678 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15679 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
15680 if(!isWasmInitialized) {
15681 throw new Error("initializeWasm() must be awaited first!");
15683 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
15684 return nativeResponseValue;
15686 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
15687 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15688 if(!isWasmInitialized) {
15689 throw new Error("initializeWasm() must be awaited first!");
15691 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
15692 // debug statements here
15694 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15695 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
15696 if(!isWasmInitialized) {
15697 throw new Error("initializeWasm() must be awaited first!");
15699 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
15700 return nativeResponseValue;
15702 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
15703 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
15704 if(!isWasmInitialized) {
15705 throw new Error("initializeWasm() must be awaited first!");
15707 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
15708 // debug statements here
15710 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
15711 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
15712 if(!isWasmInitialized) {
15713 throw new Error("initializeWasm() must be awaited first!");
15715 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
15716 return nativeResponseValue;
15718 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
15719 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
15720 if(!isWasmInitialized) {
15721 throw new Error("initializeWasm() must be awaited first!");
15723 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
15724 // debug statements here
15726 // uint64_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
15727 export function UnsignedChannelUpdate_clone_ptr(arg: number): number {
15728 if(!isWasmInitialized) {
15729 throw new Error("initializeWasm() must be awaited first!");
15731 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone_ptr(arg);
15732 return nativeResponseValue;
15734 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
15735 export function UnsignedChannelUpdate_clone(orig: number): number {
15736 if(!isWasmInitialized) {
15737 throw new Error("initializeWasm() must be awaited first!");
15739 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
15740 return nativeResponseValue;
15742 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
15743 export function ChannelUpdate_free(this_obj: number): void {
15744 if(!isWasmInitialized) {
15745 throw new Error("initializeWasm() must be awaited first!");
15747 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
15748 // debug statements here
15750 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
15751 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
15752 if(!isWasmInitialized) {
15753 throw new Error("initializeWasm() must be awaited first!");
15755 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
15756 return decodeArray(nativeResponseValue);
15758 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
15759 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
15760 if(!isWasmInitialized) {
15761 throw new Error("initializeWasm() must be awaited first!");
15763 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
15764 // debug statements here
15766 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
15767 export function ChannelUpdate_get_contents(this_ptr: number): number {
15768 if(!isWasmInitialized) {
15769 throw new Error("initializeWasm() must be awaited first!");
15771 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
15772 return nativeResponseValue;
15774 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
15775 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
15776 if(!isWasmInitialized) {
15777 throw new Error("initializeWasm() must be awaited first!");
15779 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
15780 // debug statements here
15782 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
15783 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
15784 if(!isWasmInitialized) {
15785 throw new Error("initializeWasm() must be awaited first!");
15787 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
15788 return nativeResponseValue;
15790 // uint64_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
15791 export function ChannelUpdate_clone_ptr(arg: number): number {
15792 if(!isWasmInitialized) {
15793 throw new Error("initializeWasm() must be awaited first!");
15795 const nativeResponseValue = wasm.ChannelUpdate_clone_ptr(arg);
15796 return nativeResponseValue;
15798 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
15799 export function ChannelUpdate_clone(orig: number): number {
15800 if(!isWasmInitialized) {
15801 throw new Error("initializeWasm() must be awaited first!");
15803 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
15804 return nativeResponseValue;
15806 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
15807 export function QueryChannelRange_free(this_obj: number): void {
15808 if(!isWasmInitialized) {
15809 throw new Error("initializeWasm() must be awaited first!");
15811 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
15812 // debug statements here
15814 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
15815 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
15816 if(!isWasmInitialized) {
15817 throw new Error("initializeWasm() must be awaited first!");
15819 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
15820 return decodeArray(nativeResponseValue);
15822 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15823 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
15824 if(!isWasmInitialized) {
15825 throw new Error("initializeWasm() must be awaited first!");
15827 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
15828 // debug statements here
15830 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
15831 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
15832 if(!isWasmInitialized) {
15833 throw new Error("initializeWasm() must be awaited first!");
15835 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
15836 return nativeResponseValue;
15838 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
15839 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
15840 if(!isWasmInitialized) {
15841 throw new Error("initializeWasm() must be awaited first!");
15843 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
15844 // debug statements here
15846 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
15847 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
15848 if(!isWasmInitialized) {
15849 throw new Error("initializeWasm() must be awaited first!");
15851 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
15852 return nativeResponseValue;
15854 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
15855 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
15856 if(!isWasmInitialized) {
15857 throw new Error("initializeWasm() must be awaited first!");
15859 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
15860 // debug statements here
15862 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
15863 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
15864 if(!isWasmInitialized) {
15865 throw new Error("initializeWasm() must be awaited first!");
15867 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
15868 return nativeResponseValue;
15870 // uint64_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
15871 export function QueryChannelRange_clone_ptr(arg: number): number {
15872 if(!isWasmInitialized) {
15873 throw new Error("initializeWasm() must be awaited first!");
15875 const nativeResponseValue = wasm.QueryChannelRange_clone_ptr(arg);
15876 return nativeResponseValue;
15878 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
15879 export function QueryChannelRange_clone(orig: number): number {
15880 if(!isWasmInitialized) {
15881 throw new Error("initializeWasm() must be awaited first!");
15883 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
15884 return nativeResponseValue;
15886 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
15887 export function ReplyChannelRange_free(this_obj: number): void {
15888 if(!isWasmInitialized) {
15889 throw new Error("initializeWasm() must be awaited first!");
15891 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
15892 // debug statements here
15894 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
15895 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
15896 if(!isWasmInitialized) {
15897 throw new Error("initializeWasm() must be awaited first!");
15899 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
15900 return decodeArray(nativeResponseValue);
15902 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
15903 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
15904 if(!isWasmInitialized) {
15905 throw new Error("initializeWasm() must be awaited first!");
15907 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
15908 // debug statements here
15910 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
15911 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
15912 if(!isWasmInitialized) {
15913 throw new Error("initializeWasm() must be awaited first!");
15915 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
15916 return nativeResponseValue;
15918 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
15919 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
15920 if(!isWasmInitialized) {
15921 throw new Error("initializeWasm() must be awaited first!");
15923 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
15924 // debug statements here
15926 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
15927 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
15928 if(!isWasmInitialized) {
15929 throw new Error("initializeWasm() must be awaited first!");
15931 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
15932 return nativeResponseValue;
15934 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
15935 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
15936 if(!isWasmInitialized) {
15937 throw new Error("initializeWasm() must be awaited first!");
15939 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
15940 // debug statements here
15942 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
15943 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
15944 if(!isWasmInitialized) {
15945 throw new Error("initializeWasm() must be awaited first!");
15947 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
15948 return nativeResponseValue;
15950 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
15951 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
15952 if(!isWasmInitialized) {
15953 throw new Error("initializeWasm() must be awaited first!");
15955 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
15956 // debug statements here
15958 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
15959 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
15960 if(!isWasmInitialized) {
15961 throw new Error("initializeWasm() must be awaited first!");
15963 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
15964 // debug statements here
15966 // 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);
15967 export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number[]): number {
15968 if(!isWasmInitialized) {
15969 throw new Error("initializeWasm() must be awaited first!");
15971 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
15972 return nativeResponseValue;
15974 // uint64_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
15975 export function ReplyChannelRange_clone_ptr(arg: number): number {
15976 if(!isWasmInitialized) {
15977 throw new Error("initializeWasm() must be awaited first!");
15979 const nativeResponseValue = wasm.ReplyChannelRange_clone_ptr(arg);
15980 return nativeResponseValue;
15982 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
15983 export function ReplyChannelRange_clone(orig: number): number {
15984 if(!isWasmInitialized) {
15985 throw new Error("initializeWasm() must be awaited first!");
15987 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
15988 return nativeResponseValue;
15990 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
15991 export function QueryShortChannelIds_free(this_obj: number): void {
15992 if(!isWasmInitialized) {
15993 throw new Error("initializeWasm() must be awaited first!");
15995 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
15996 // debug statements here
15998 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
15999 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
16000 if(!isWasmInitialized) {
16001 throw new Error("initializeWasm() must be awaited first!");
16003 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
16004 return decodeArray(nativeResponseValue);
16006 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16007 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16008 if(!isWasmInitialized) {
16009 throw new Error("initializeWasm() must be awaited first!");
16011 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
16012 // debug statements here
16014 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16015 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
16016 if(!isWasmInitialized) {
16017 throw new Error("initializeWasm() must be awaited first!");
16019 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
16020 // debug statements here
16022 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
16023 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
16024 if(!isWasmInitialized) {
16025 throw new Error("initializeWasm() must be awaited first!");
16027 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
16028 return nativeResponseValue;
16030 // uint64_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
16031 export function QueryShortChannelIds_clone_ptr(arg: number): number {
16032 if(!isWasmInitialized) {
16033 throw new Error("initializeWasm() must be awaited first!");
16035 const nativeResponseValue = wasm.QueryShortChannelIds_clone_ptr(arg);
16036 return nativeResponseValue;
16038 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
16039 export function QueryShortChannelIds_clone(orig: number): number {
16040 if(!isWasmInitialized) {
16041 throw new Error("initializeWasm() must be awaited first!");
16043 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
16044 return nativeResponseValue;
16046 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
16047 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
16048 if(!isWasmInitialized) {
16049 throw new Error("initializeWasm() must be awaited first!");
16051 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
16052 // debug statements here
16054 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
16055 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
16056 if(!isWasmInitialized) {
16057 throw new Error("initializeWasm() must be awaited first!");
16059 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
16060 return decodeArray(nativeResponseValue);
16062 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16063 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16064 if(!isWasmInitialized) {
16065 throw new Error("initializeWasm() must be awaited first!");
16067 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
16068 // debug statements here
16070 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
16071 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
16072 if(!isWasmInitialized) {
16073 throw new Error("initializeWasm() must be awaited first!");
16075 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
16076 return nativeResponseValue;
16078 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
16079 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
16080 if(!isWasmInitialized) {
16081 throw new Error("initializeWasm() must be awaited first!");
16083 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
16084 // debug statements here
16086 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
16087 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
16088 if(!isWasmInitialized) {
16089 throw new Error("initializeWasm() must be awaited first!");
16091 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
16092 return nativeResponseValue;
16094 // uint64_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
16095 export function ReplyShortChannelIdsEnd_clone_ptr(arg: number): number {
16096 if(!isWasmInitialized) {
16097 throw new Error("initializeWasm() must be awaited first!");
16099 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone_ptr(arg);
16100 return nativeResponseValue;
16102 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
16103 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
16104 if(!isWasmInitialized) {
16105 throw new Error("initializeWasm() must be awaited first!");
16107 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
16108 return nativeResponseValue;
16110 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
16111 export function GossipTimestampFilter_free(this_obj: number): void {
16112 if(!isWasmInitialized) {
16113 throw new Error("initializeWasm() must be awaited first!");
16115 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
16116 // debug statements here
16118 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
16119 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
16120 if(!isWasmInitialized) {
16121 throw new Error("initializeWasm() must be awaited first!");
16123 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
16124 return decodeArray(nativeResponseValue);
16126 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16127 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
16128 if(!isWasmInitialized) {
16129 throw new Error("initializeWasm() must be awaited first!");
16131 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
16132 // debug statements here
16134 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
16135 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
16136 if(!isWasmInitialized) {
16137 throw new Error("initializeWasm() must be awaited first!");
16139 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
16140 return nativeResponseValue;
16142 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
16143 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
16144 if(!isWasmInitialized) {
16145 throw new Error("initializeWasm() must be awaited first!");
16147 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
16148 // debug statements here
16150 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
16151 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
16152 if(!isWasmInitialized) {
16153 throw new Error("initializeWasm() must be awaited first!");
16155 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
16156 return nativeResponseValue;
16158 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
16159 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
16160 if(!isWasmInitialized) {
16161 throw new Error("initializeWasm() must be awaited first!");
16163 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
16164 // debug statements here
16166 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
16167 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
16168 if(!isWasmInitialized) {
16169 throw new Error("initializeWasm() must be awaited first!");
16171 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
16172 return nativeResponseValue;
16174 // uint64_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
16175 export function GossipTimestampFilter_clone_ptr(arg: number): number {
16176 if(!isWasmInitialized) {
16177 throw new Error("initializeWasm() must be awaited first!");
16179 const nativeResponseValue = wasm.GossipTimestampFilter_clone_ptr(arg);
16180 return nativeResponseValue;
16182 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
16183 export function GossipTimestampFilter_clone(orig: number): number {
16184 if(!isWasmInitialized) {
16185 throw new Error("initializeWasm() must be awaited first!");
16187 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
16188 return nativeResponseValue;
16190 // void ErrorAction_free(struct LDKErrorAction this_ptr);
16191 export function ErrorAction_free(this_ptr: number): void {
16192 if(!isWasmInitialized) {
16193 throw new Error("initializeWasm() must be awaited first!");
16195 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
16196 // debug statements here
16198 // uint64_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
16199 export function ErrorAction_clone_ptr(arg: number): number {
16200 if(!isWasmInitialized) {
16201 throw new Error("initializeWasm() must be awaited first!");
16203 const nativeResponseValue = wasm.ErrorAction_clone_ptr(arg);
16204 return nativeResponseValue;
16206 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
16207 export function ErrorAction_clone(orig: number): number {
16208 if(!isWasmInitialized) {
16209 throw new Error("initializeWasm() must be awaited first!");
16211 const nativeResponseValue = wasm.ErrorAction_clone(orig);
16212 return nativeResponseValue;
16214 // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
16215 export function ErrorAction_disconnect_peer(msg: number): number {
16216 if(!isWasmInitialized) {
16217 throw new Error("initializeWasm() must be awaited first!");
16219 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
16220 return nativeResponseValue;
16222 // struct LDKErrorAction ErrorAction_ignore_error(void);
16223 export function ErrorAction_ignore_error(): number {
16224 if(!isWasmInitialized) {
16225 throw new Error("initializeWasm() must be awaited first!");
16227 const nativeResponseValue = wasm.ErrorAction_ignore_error();
16228 return nativeResponseValue;
16230 // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
16231 export function ErrorAction_ignore_and_log(a: Level): number {
16232 if(!isWasmInitialized) {
16233 throw new Error("initializeWasm() must be awaited first!");
16235 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
16236 return nativeResponseValue;
16238 // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
16239 export function ErrorAction_send_error_message(msg: number): number {
16240 if(!isWasmInitialized) {
16241 throw new Error("initializeWasm() must be awaited first!");
16243 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
16244 return nativeResponseValue;
16246 // void LightningError_free(struct LDKLightningError this_obj);
16247 export function LightningError_free(this_obj: number): void {
16248 if(!isWasmInitialized) {
16249 throw new Error("initializeWasm() must be awaited first!");
16251 const nativeResponseValue = wasm.LightningError_free(this_obj);
16252 // debug statements here
16254 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
16255 export function LightningError_get_err(this_ptr: number): String {
16256 if(!isWasmInitialized) {
16257 throw new Error("initializeWasm() must be awaited first!");
16259 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
16260 return nativeResponseValue;
16262 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
16263 export function LightningError_set_err(this_ptr: number, val: String): void {
16264 if(!isWasmInitialized) {
16265 throw new Error("initializeWasm() must be awaited first!");
16267 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
16268 // debug statements here
16270 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
16271 export function LightningError_get_action(this_ptr: number): number {
16272 if(!isWasmInitialized) {
16273 throw new Error("initializeWasm() must be awaited first!");
16275 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
16276 return nativeResponseValue;
16278 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
16279 export function LightningError_set_action(this_ptr: number, val: number): void {
16280 if(!isWasmInitialized) {
16281 throw new Error("initializeWasm() must be awaited first!");
16283 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
16284 // debug statements here
16286 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
16287 export function LightningError_new(err_arg: String, action_arg: number): number {
16288 if(!isWasmInitialized) {
16289 throw new Error("initializeWasm() must be awaited first!");
16291 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
16292 return nativeResponseValue;
16294 // uint64_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
16295 export function LightningError_clone_ptr(arg: number): number {
16296 if(!isWasmInitialized) {
16297 throw new Error("initializeWasm() must be awaited first!");
16299 const nativeResponseValue = wasm.LightningError_clone_ptr(arg);
16300 return nativeResponseValue;
16302 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
16303 export function LightningError_clone(orig: number): number {
16304 if(!isWasmInitialized) {
16305 throw new Error("initializeWasm() must be awaited first!");
16307 const nativeResponseValue = wasm.LightningError_clone(orig);
16308 return nativeResponseValue;
16310 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
16311 export function CommitmentUpdate_free(this_obj: number): void {
16312 if(!isWasmInitialized) {
16313 throw new Error("initializeWasm() must be awaited first!");
16315 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
16316 // debug statements here
16318 // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16319 export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
16320 if(!isWasmInitialized) {
16321 throw new Error("initializeWasm() must be awaited first!");
16323 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
16324 return nativeResponseValue;
16326 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
16327 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
16328 if(!isWasmInitialized) {
16329 throw new Error("initializeWasm() must be awaited first!");
16331 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
16332 // debug statements here
16334 // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16335 export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
16336 if(!isWasmInitialized) {
16337 throw new Error("initializeWasm() must be awaited first!");
16339 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
16340 return nativeResponseValue;
16342 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
16343 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
16344 if(!isWasmInitialized) {
16345 throw new Error("initializeWasm() must be awaited first!");
16347 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
16348 // debug statements here
16350 // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16351 export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
16352 if(!isWasmInitialized) {
16353 throw new Error("initializeWasm() must be awaited first!");
16355 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
16356 return nativeResponseValue;
16358 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
16359 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
16360 if(!isWasmInitialized) {
16361 throw new Error("initializeWasm() must be awaited first!");
16363 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
16364 // debug statements here
16366 // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16367 export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
16368 if(!isWasmInitialized) {
16369 throw new Error("initializeWasm() must be awaited first!");
16371 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
16372 return nativeResponseValue;
16374 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
16375 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
16376 if(!isWasmInitialized) {
16377 throw new Error("initializeWasm() must be awaited first!");
16379 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
16380 // debug statements here
16382 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16383 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
16384 if(!isWasmInitialized) {
16385 throw new Error("initializeWasm() must be awaited first!");
16387 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
16388 return nativeResponseValue;
16390 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
16391 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
16392 if(!isWasmInitialized) {
16393 throw new Error("initializeWasm() must be awaited first!");
16395 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
16396 // debug statements here
16398 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
16399 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
16400 if(!isWasmInitialized) {
16401 throw new Error("initializeWasm() must be awaited first!");
16403 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
16404 return nativeResponseValue;
16406 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
16407 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
16408 if(!isWasmInitialized) {
16409 throw new Error("initializeWasm() must be awaited first!");
16411 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
16412 // debug statements here
16414 // 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);
16415 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 {
16416 if(!isWasmInitialized) {
16417 throw new Error("initializeWasm() must be awaited first!");
16419 const nativeResponseValue = wasm.CommitmentUpdate_new(update_add_htlcs_arg, update_fulfill_htlcs_arg, update_fail_htlcs_arg, update_fail_malformed_htlcs_arg, update_fee_arg, commitment_signed_arg);
16420 return nativeResponseValue;
16422 // uint64_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
16423 export function CommitmentUpdate_clone_ptr(arg: number): number {
16424 if(!isWasmInitialized) {
16425 throw new Error("initializeWasm() must be awaited first!");
16427 const nativeResponseValue = wasm.CommitmentUpdate_clone_ptr(arg);
16428 return nativeResponseValue;
16430 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
16431 export function CommitmentUpdate_clone(orig: number): number {
16432 if(!isWasmInitialized) {
16433 throw new Error("initializeWasm() must be awaited first!");
16435 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
16436 return nativeResponseValue;
16438 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
16439 export function ChannelMessageHandler_free(this_ptr: number): void {
16440 if(!isWasmInitialized) {
16441 throw new Error("initializeWasm() must be awaited first!");
16443 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
16444 // debug statements here
16446 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
16447 export function RoutingMessageHandler_free(this_ptr: number): void {
16448 if(!isWasmInitialized) {
16449 throw new Error("initializeWasm() must be awaited first!");
16451 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
16452 // debug statements here
16454 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
16455 export function AcceptChannel_write(obj: number): Uint8Array {
16456 if(!isWasmInitialized) {
16457 throw new Error("initializeWasm() must be awaited first!");
16459 const nativeResponseValue = wasm.AcceptChannel_write(obj);
16460 return decodeArray(nativeResponseValue);
16462 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
16463 export function AcceptChannel_read(ser: Uint8Array): number {
16464 if(!isWasmInitialized) {
16465 throw new Error("initializeWasm() must be awaited first!");
16467 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
16468 return nativeResponseValue;
16470 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
16471 export function AnnouncementSignatures_write(obj: number): Uint8Array {
16472 if(!isWasmInitialized) {
16473 throw new Error("initializeWasm() must be awaited first!");
16475 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
16476 return decodeArray(nativeResponseValue);
16478 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
16479 export function AnnouncementSignatures_read(ser: Uint8Array): number {
16480 if(!isWasmInitialized) {
16481 throw new Error("initializeWasm() must be awaited first!");
16483 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
16484 return nativeResponseValue;
16486 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
16487 export function ChannelReestablish_write(obj: number): Uint8Array {
16488 if(!isWasmInitialized) {
16489 throw new Error("initializeWasm() must be awaited first!");
16491 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
16492 return decodeArray(nativeResponseValue);
16494 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
16495 export function ChannelReestablish_read(ser: Uint8Array): number {
16496 if(!isWasmInitialized) {
16497 throw new Error("initializeWasm() must be awaited first!");
16499 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
16500 return nativeResponseValue;
16502 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
16503 export function ClosingSigned_write(obj: number): Uint8Array {
16504 if(!isWasmInitialized) {
16505 throw new Error("initializeWasm() must be awaited first!");
16507 const nativeResponseValue = wasm.ClosingSigned_write(obj);
16508 return decodeArray(nativeResponseValue);
16510 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
16511 export function ClosingSigned_read(ser: Uint8Array): number {
16512 if(!isWasmInitialized) {
16513 throw new Error("initializeWasm() must be awaited first!");
16515 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
16516 return nativeResponseValue;
16518 // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
16519 export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
16520 if(!isWasmInitialized) {
16521 throw new Error("initializeWasm() must be awaited first!");
16523 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
16524 return decodeArray(nativeResponseValue);
16526 // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
16527 export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
16528 if(!isWasmInitialized) {
16529 throw new Error("initializeWasm() must be awaited first!");
16531 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
16532 return nativeResponseValue;
16534 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
16535 export function CommitmentSigned_write(obj: number): Uint8Array {
16536 if(!isWasmInitialized) {
16537 throw new Error("initializeWasm() must be awaited first!");
16539 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
16540 return decodeArray(nativeResponseValue);
16542 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
16543 export function CommitmentSigned_read(ser: Uint8Array): number {
16544 if(!isWasmInitialized) {
16545 throw new Error("initializeWasm() must be awaited first!");
16547 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
16548 return nativeResponseValue;
16550 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
16551 export function FundingCreated_write(obj: number): Uint8Array {
16552 if(!isWasmInitialized) {
16553 throw new Error("initializeWasm() must be awaited first!");
16555 const nativeResponseValue = wasm.FundingCreated_write(obj);
16556 return decodeArray(nativeResponseValue);
16558 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
16559 export function FundingCreated_read(ser: Uint8Array): number {
16560 if(!isWasmInitialized) {
16561 throw new Error("initializeWasm() must be awaited first!");
16563 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
16564 return nativeResponseValue;
16566 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
16567 export function FundingSigned_write(obj: number): Uint8Array {
16568 if(!isWasmInitialized) {
16569 throw new Error("initializeWasm() must be awaited first!");
16571 const nativeResponseValue = wasm.FundingSigned_write(obj);
16572 return decodeArray(nativeResponseValue);
16574 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
16575 export function FundingSigned_read(ser: Uint8Array): number {
16576 if(!isWasmInitialized) {
16577 throw new Error("initializeWasm() must be awaited first!");
16579 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
16580 return nativeResponseValue;
16582 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
16583 export function FundingLocked_write(obj: number): Uint8Array {
16584 if(!isWasmInitialized) {
16585 throw new Error("initializeWasm() must be awaited first!");
16587 const nativeResponseValue = wasm.FundingLocked_write(obj);
16588 return decodeArray(nativeResponseValue);
16590 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
16591 export function FundingLocked_read(ser: Uint8Array): number {
16592 if(!isWasmInitialized) {
16593 throw new Error("initializeWasm() must be awaited first!");
16595 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
16596 return nativeResponseValue;
16598 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
16599 export function Init_write(obj: number): Uint8Array {
16600 if(!isWasmInitialized) {
16601 throw new Error("initializeWasm() must be awaited first!");
16603 const nativeResponseValue = wasm.Init_write(obj);
16604 return decodeArray(nativeResponseValue);
16606 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
16607 export function Init_read(ser: Uint8Array): number {
16608 if(!isWasmInitialized) {
16609 throw new Error("initializeWasm() must be awaited first!");
16611 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
16612 return nativeResponseValue;
16614 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
16615 export function OpenChannel_write(obj: number): Uint8Array {
16616 if(!isWasmInitialized) {
16617 throw new Error("initializeWasm() must be awaited first!");
16619 const nativeResponseValue = wasm.OpenChannel_write(obj);
16620 return decodeArray(nativeResponseValue);
16622 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
16623 export function OpenChannel_read(ser: Uint8Array): number {
16624 if(!isWasmInitialized) {
16625 throw new Error("initializeWasm() must be awaited first!");
16627 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
16628 return nativeResponseValue;
16630 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
16631 export function RevokeAndACK_write(obj: number): Uint8Array {
16632 if(!isWasmInitialized) {
16633 throw new Error("initializeWasm() must be awaited first!");
16635 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
16636 return decodeArray(nativeResponseValue);
16638 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
16639 export function RevokeAndACK_read(ser: Uint8Array): number {
16640 if(!isWasmInitialized) {
16641 throw new Error("initializeWasm() must be awaited first!");
16643 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
16644 return nativeResponseValue;
16646 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
16647 export function Shutdown_write(obj: number): Uint8Array {
16648 if(!isWasmInitialized) {
16649 throw new Error("initializeWasm() must be awaited first!");
16651 const nativeResponseValue = wasm.Shutdown_write(obj);
16652 return decodeArray(nativeResponseValue);
16654 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
16655 export function Shutdown_read(ser: Uint8Array): number {
16656 if(!isWasmInitialized) {
16657 throw new Error("initializeWasm() must be awaited first!");
16659 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
16660 return nativeResponseValue;
16662 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
16663 export function UpdateFailHTLC_write(obj: number): Uint8Array {
16664 if(!isWasmInitialized) {
16665 throw new Error("initializeWasm() must be awaited first!");
16667 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
16668 return decodeArray(nativeResponseValue);
16670 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
16671 export function UpdateFailHTLC_read(ser: Uint8Array): number {
16672 if(!isWasmInitialized) {
16673 throw new Error("initializeWasm() must be awaited first!");
16675 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
16676 return nativeResponseValue;
16678 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
16679 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
16680 if(!isWasmInitialized) {
16681 throw new Error("initializeWasm() must be awaited first!");
16683 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
16684 return decodeArray(nativeResponseValue);
16686 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
16687 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
16688 if(!isWasmInitialized) {
16689 throw new Error("initializeWasm() must be awaited first!");
16691 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
16692 return nativeResponseValue;
16694 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
16695 export function UpdateFee_write(obj: number): Uint8Array {
16696 if(!isWasmInitialized) {
16697 throw new Error("initializeWasm() must be awaited first!");
16699 const nativeResponseValue = wasm.UpdateFee_write(obj);
16700 return decodeArray(nativeResponseValue);
16702 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
16703 export function UpdateFee_read(ser: Uint8Array): number {
16704 if(!isWasmInitialized) {
16705 throw new Error("initializeWasm() must be awaited first!");
16707 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
16708 return nativeResponseValue;
16710 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
16711 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
16712 if(!isWasmInitialized) {
16713 throw new Error("initializeWasm() must be awaited first!");
16715 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
16716 return decodeArray(nativeResponseValue);
16718 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
16719 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
16720 if(!isWasmInitialized) {
16721 throw new Error("initializeWasm() must be awaited first!");
16723 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
16724 return nativeResponseValue;
16726 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
16727 export function UpdateAddHTLC_write(obj: number): Uint8Array {
16728 if(!isWasmInitialized) {
16729 throw new Error("initializeWasm() must be awaited first!");
16731 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
16732 return decodeArray(nativeResponseValue);
16734 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
16735 export function UpdateAddHTLC_read(ser: Uint8Array): number {
16736 if(!isWasmInitialized) {
16737 throw new Error("initializeWasm() must be awaited first!");
16739 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
16740 return nativeResponseValue;
16742 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
16743 export function Ping_write(obj: number): Uint8Array {
16744 if(!isWasmInitialized) {
16745 throw new Error("initializeWasm() must be awaited first!");
16747 const nativeResponseValue = wasm.Ping_write(obj);
16748 return decodeArray(nativeResponseValue);
16750 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
16751 export function Ping_read(ser: Uint8Array): number {
16752 if(!isWasmInitialized) {
16753 throw new Error("initializeWasm() must be awaited first!");
16755 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
16756 return nativeResponseValue;
16758 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
16759 export function Pong_write(obj: number): Uint8Array {
16760 if(!isWasmInitialized) {
16761 throw new Error("initializeWasm() must be awaited first!");
16763 const nativeResponseValue = wasm.Pong_write(obj);
16764 return decodeArray(nativeResponseValue);
16766 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
16767 export function Pong_read(ser: Uint8Array): number {
16768 if(!isWasmInitialized) {
16769 throw new Error("initializeWasm() must be awaited first!");
16771 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
16772 return nativeResponseValue;
16774 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
16775 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
16776 if(!isWasmInitialized) {
16777 throw new Error("initializeWasm() must be awaited first!");
16779 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
16780 return decodeArray(nativeResponseValue);
16782 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
16783 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
16784 if(!isWasmInitialized) {
16785 throw new Error("initializeWasm() must be awaited first!");
16787 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
16788 return nativeResponseValue;
16790 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
16791 export function ChannelAnnouncement_write(obj: number): Uint8Array {
16792 if(!isWasmInitialized) {
16793 throw new Error("initializeWasm() must be awaited first!");
16795 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
16796 return decodeArray(nativeResponseValue);
16798 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
16799 export function ChannelAnnouncement_read(ser: Uint8Array): number {
16800 if(!isWasmInitialized) {
16801 throw new Error("initializeWasm() must be awaited first!");
16803 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
16804 return nativeResponseValue;
16806 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
16807 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
16808 if(!isWasmInitialized) {
16809 throw new Error("initializeWasm() must be awaited first!");
16811 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
16812 return decodeArray(nativeResponseValue);
16814 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
16815 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
16816 if(!isWasmInitialized) {
16817 throw new Error("initializeWasm() must be awaited first!");
16819 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
16820 return nativeResponseValue;
16822 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
16823 export function ChannelUpdate_write(obj: number): Uint8Array {
16824 if(!isWasmInitialized) {
16825 throw new Error("initializeWasm() must be awaited first!");
16827 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
16828 return decodeArray(nativeResponseValue);
16830 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
16831 export function ChannelUpdate_read(ser: Uint8Array): number {
16832 if(!isWasmInitialized) {
16833 throw new Error("initializeWasm() must be awaited first!");
16835 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
16836 return nativeResponseValue;
16838 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
16839 export function ErrorMessage_write(obj: number): Uint8Array {
16840 if(!isWasmInitialized) {
16841 throw new Error("initializeWasm() must be awaited first!");
16843 const nativeResponseValue = wasm.ErrorMessage_write(obj);
16844 return decodeArray(nativeResponseValue);
16846 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
16847 export function ErrorMessage_read(ser: Uint8Array): number {
16848 if(!isWasmInitialized) {
16849 throw new Error("initializeWasm() must be awaited first!");
16851 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
16852 return nativeResponseValue;
16854 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
16855 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
16856 if(!isWasmInitialized) {
16857 throw new Error("initializeWasm() must be awaited first!");
16859 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
16860 return decodeArray(nativeResponseValue);
16862 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
16863 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
16864 if(!isWasmInitialized) {
16865 throw new Error("initializeWasm() must be awaited first!");
16867 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
16868 return nativeResponseValue;
16870 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
16871 export function NodeAnnouncement_write(obj: number): Uint8Array {
16872 if(!isWasmInitialized) {
16873 throw new Error("initializeWasm() must be awaited first!");
16875 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
16876 return decodeArray(nativeResponseValue);
16878 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
16879 export function NodeAnnouncement_read(ser: Uint8Array): number {
16880 if(!isWasmInitialized) {
16881 throw new Error("initializeWasm() must be awaited first!");
16883 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
16884 return nativeResponseValue;
16886 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
16887 export function QueryShortChannelIds_read(ser: Uint8Array): number {
16888 if(!isWasmInitialized) {
16889 throw new Error("initializeWasm() must be awaited first!");
16891 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
16892 return nativeResponseValue;
16894 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
16895 export function QueryShortChannelIds_write(obj: number): Uint8Array {
16896 if(!isWasmInitialized) {
16897 throw new Error("initializeWasm() must be awaited first!");
16899 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
16900 return decodeArray(nativeResponseValue);
16902 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
16903 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
16904 if(!isWasmInitialized) {
16905 throw new Error("initializeWasm() must be awaited first!");
16907 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
16908 return decodeArray(nativeResponseValue);
16910 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
16911 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
16912 if(!isWasmInitialized) {
16913 throw new Error("initializeWasm() must be awaited first!");
16915 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
16916 return nativeResponseValue;
16918 // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
16919 export function QueryChannelRange_end_blocknum(this_arg: number): number {
16920 if(!isWasmInitialized) {
16921 throw new Error("initializeWasm() must be awaited first!");
16923 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
16924 return nativeResponseValue;
16926 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
16927 export function QueryChannelRange_write(obj: number): Uint8Array {
16928 if(!isWasmInitialized) {
16929 throw new Error("initializeWasm() must be awaited first!");
16931 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
16932 return decodeArray(nativeResponseValue);
16934 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
16935 export function QueryChannelRange_read(ser: Uint8Array): number {
16936 if(!isWasmInitialized) {
16937 throw new Error("initializeWasm() must be awaited first!");
16939 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
16940 return nativeResponseValue;
16942 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
16943 export function ReplyChannelRange_read(ser: Uint8Array): number {
16944 if(!isWasmInitialized) {
16945 throw new Error("initializeWasm() must be awaited first!");
16947 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
16948 return nativeResponseValue;
16950 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
16951 export function ReplyChannelRange_write(obj: number): Uint8Array {
16952 if(!isWasmInitialized) {
16953 throw new Error("initializeWasm() must be awaited first!");
16955 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
16956 return decodeArray(nativeResponseValue);
16958 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
16959 export function GossipTimestampFilter_write(obj: number): Uint8Array {
16960 if(!isWasmInitialized) {
16961 throw new Error("initializeWasm() must be awaited first!");
16963 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
16964 return decodeArray(nativeResponseValue);
16966 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
16967 export function GossipTimestampFilter_read(ser: Uint8Array): number {
16968 if(!isWasmInitialized) {
16969 throw new Error("initializeWasm() must be awaited first!");
16971 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
16972 return nativeResponseValue;
16974 // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
16975 export function CustomMessageHandler_free(this_ptr: number): void {
16976 if(!isWasmInitialized) {
16977 throw new Error("initializeWasm() must be awaited first!");
16979 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
16980 // debug statements here
16982 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
16983 export function IgnoringMessageHandler_free(this_obj: number): void {
16984 if(!isWasmInitialized) {
16985 throw new Error("initializeWasm() must be awaited first!");
16987 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
16988 // debug statements here
16990 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
16991 export function IgnoringMessageHandler_new(): number {
16992 if(!isWasmInitialized) {
16993 throw new Error("initializeWasm() must be awaited first!");
16995 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
16996 return nativeResponseValue;
16998 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
16999 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
17000 if(!isWasmInitialized) {
17001 throw new Error("initializeWasm() must be awaited first!");
17003 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
17004 return nativeResponseValue;
17006 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17007 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
17008 if(!isWasmInitialized) {
17009 throw new Error("initializeWasm() must be awaited first!");
17011 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
17012 return nativeResponseValue;
17014 // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17015 export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
17016 if(!isWasmInitialized) {
17017 throw new Error("initializeWasm() must be awaited first!");
17019 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
17020 return nativeResponseValue;
17022 // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
17023 export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
17024 if(!isWasmInitialized) {
17025 throw new Error("initializeWasm() must be awaited first!");
17027 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
17028 return nativeResponseValue;
17030 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
17031 export function ErroringMessageHandler_free(this_obj: number): void {
17032 if(!isWasmInitialized) {
17033 throw new Error("initializeWasm() must be awaited first!");
17035 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
17036 // debug statements here
17038 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
17039 export function ErroringMessageHandler_new(): number {
17040 if(!isWasmInitialized) {
17041 throw new Error("initializeWasm() must be awaited first!");
17043 const nativeResponseValue = wasm.ErroringMessageHandler_new();
17044 return nativeResponseValue;
17046 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
17047 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
17048 if(!isWasmInitialized) {
17049 throw new Error("initializeWasm() must be awaited first!");
17051 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
17052 return nativeResponseValue;
17054 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
17055 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
17056 if(!isWasmInitialized) {
17057 throw new Error("initializeWasm() must be awaited first!");
17059 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
17060 return nativeResponseValue;
17062 // void MessageHandler_free(struct LDKMessageHandler this_obj);
17063 export function MessageHandler_free(this_obj: number): void {
17064 if(!isWasmInitialized) {
17065 throw new Error("initializeWasm() must be awaited first!");
17067 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
17068 // debug statements here
17070 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
17071 export function MessageHandler_get_chan_handler(this_ptr: number): number {
17072 if(!isWasmInitialized) {
17073 throw new Error("initializeWasm() must be awaited first!");
17075 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
17076 return nativeResponseValue;
17078 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
17079 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
17080 if(!isWasmInitialized) {
17081 throw new Error("initializeWasm() must be awaited first!");
17083 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
17084 // debug statements here
17086 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
17087 export function MessageHandler_get_route_handler(this_ptr: number): number {
17088 if(!isWasmInitialized) {
17089 throw new Error("initializeWasm() must be awaited first!");
17091 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
17092 return nativeResponseValue;
17094 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
17095 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
17096 if(!isWasmInitialized) {
17097 throw new Error("initializeWasm() must be awaited first!");
17099 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
17100 // debug statements here
17102 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
17103 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
17104 if(!isWasmInitialized) {
17105 throw new Error("initializeWasm() must be awaited first!");
17107 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
17108 return nativeResponseValue;
17110 // uint64_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
17111 export function SocketDescriptor_clone_ptr(arg: number): number {
17112 if(!isWasmInitialized) {
17113 throw new Error("initializeWasm() must be awaited first!");
17115 const nativeResponseValue = wasm.SocketDescriptor_clone_ptr(arg);
17116 return nativeResponseValue;
17118 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
17119 export function SocketDescriptor_clone(orig: number): number {
17120 if(!isWasmInitialized) {
17121 throw new Error("initializeWasm() must be awaited first!");
17123 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
17124 return nativeResponseValue;
17126 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
17127 export function SocketDescriptor_free(this_ptr: number): void {
17128 if(!isWasmInitialized) {
17129 throw new Error("initializeWasm() must be awaited first!");
17131 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
17132 // debug statements here
17134 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
17135 export function PeerHandleError_free(this_obj: number): void {
17136 if(!isWasmInitialized) {
17137 throw new Error("initializeWasm() must be awaited first!");
17139 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
17140 // debug statements here
17142 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
17143 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
17144 if(!isWasmInitialized) {
17145 throw new Error("initializeWasm() must be awaited first!");
17147 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
17148 return nativeResponseValue;
17150 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
17151 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
17152 if(!isWasmInitialized) {
17153 throw new Error("initializeWasm() must be awaited first!");
17155 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
17156 // debug statements here
17158 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
17159 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
17160 if(!isWasmInitialized) {
17161 throw new Error("initializeWasm() must be awaited first!");
17163 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
17164 return nativeResponseValue;
17166 // uint64_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
17167 export function PeerHandleError_clone_ptr(arg: number): number {
17168 if(!isWasmInitialized) {
17169 throw new Error("initializeWasm() must be awaited first!");
17171 const nativeResponseValue = wasm.PeerHandleError_clone_ptr(arg);
17172 return nativeResponseValue;
17174 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
17175 export function PeerHandleError_clone(orig: number): number {
17176 if(!isWasmInitialized) {
17177 throw new Error("initializeWasm() must be awaited first!");
17179 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
17180 return nativeResponseValue;
17182 // void PeerManager_free(struct LDKPeerManager this_obj);
17183 export function PeerManager_free(this_obj: number): void {
17184 if(!isWasmInitialized) {
17185 throw new Error("initializeWasm() must be awaited first!");
17187 const nativeResponseValue = wasm.PeerManager_free(this_obj);
17188 // debug statements here
17190 // 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);
17191 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
17192 if(!isWasmInitialized) {
17193 throw new Error("initializeWasm() must be awaited first!");
17195 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
17196 return nativeResponseValue;
17198 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
17199 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
17200 if(!isWasmInitialized) {
17201 throw new Error("initializeWasm() must be awaited first!");
17203 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
17204 return nativeResponseValue;
17206 // 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);
17207 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
17208 if(!isWasmInitialized) {
17209 throw new Error("initializeWasm() must be awaited first!");
17211 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
17212 return nativeResponseValue;
17214 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
17215 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
17216 if(!isWasmInitialized) {
17217 throw new Error("initializeWasm() must be awaited first!");
17219 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
17220 return nativeResponseValue;
17222 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
17223 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
17224 if(!isWasmInitialized) {
17225 throw new Error("initializeWasm() must be awaited first!");
17227 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
17228 return nativeResponseValue;
17230 // 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);
17231 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
17232 if(!isWasmInitialized) {
17233 throw new Error("initializeWasm() must be awaited first!");
17235 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
17236 return nativeResponseValue;
17238 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
17239 export function PeerManager_process_events(this_arg: number): void {
17240 if(!isWasmInitialized) {
17241 throw new Error("initializeWasm() must be awaited first!");
17243 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
17244 // debug statements here
17246 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
17247 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
17248 if(!isWasmInitialized) {
17249 throw new Error("initializeWasm() must be awaited first!");
17251 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
17252 // debug statements here
17254 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
17255 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
17256 if(!isWasmInitialized) {
17257 throw new Error("initializeWasm() must be awaited first!");
17259 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
17260 // debug statements here
17262 // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
17263 export function PeerManager_disconnect_all_peers(this_arg: number): void {
17264 if(!isWasmInitialized) {
17265 throw new Error("initializeWasm() must be awaited first!");
17267 const nativeResponseValue = wasm.PeerManager_disconnect_all_peers(this_arg);
17268 // debug statements here
17270 // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
17271 export function PeerManager_timer_tick_occurred(this_arg: number): void {
17272 if(!isWasmInitialized) {
17273 throw new Error("initializeWasm() must be awaited first!");
17275 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
17276 // debug statements here
17278 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
17279 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
17280 if(!isWasmInitialized) {
17281 throw new Error("initializeWasm() must be awaited first!");
17283 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
17284 return decodeArray(nativeResponseValue);
17286 // 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);
17287 export function build_closing_transaction(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): Uint8Array {
17288 if(!isWasmInitialized) {
17289 throw new Error("initializeWasm() must be awaited first!");
17291 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
17292 return decodeArray(nativeResponseValue);
17294 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
17295 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
17296 if(!isWasmInitialized) {
17297 throw new Error("initializeWasm() must be awaited first!");
17299 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
17300 return nativeResponseValue;
17302 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
17303 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
17304 if(!isWasmInitialized) {
17305 throw new Error("initializeWasm() must be awaited first!");
17307 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
17308 return nativeResponseValue;
17310 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
17311 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
17312 if(!isWasmInitialized) {
17313 throw new Error("initializeWasm() must be awaited first!");
17315 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
17316 return nativeResponseValue;
17318 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
17319 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
17320 if(!isWasmInitialized) {
17321 throw new Error("initializeWasm() must be awaited first!");
17323 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
17324 return nativeResponseValue;
17326 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
17327 export function TxCreationKeys_free(this_obj: number): void {
17328 if(!isWasmInitialized) {
17329 throw new Error("initializeWasm() must be awaited first!");
17331 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
17332 // debug statements here
17334 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17335 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
17336 if(!isWasmInitialized) {
17337 throw new Error("initializeWasm() must be awaited first!");
17339 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
17340 return decodeArray(nativeResponseValue);
17342 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17343 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
17344 if(!isWasmInitialized) {
17345 throw new Error("initializeWasm() must be awaited first!");
17347 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
17348 // debug statements here
17350 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17351 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
17352 if(!isWasmInitialized) {
17353 throw new Error("initializeWasm() must be awaited first!");
17355 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
17356 return decodeArray(nativeResponseValue);
17358 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17359 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
17360 if(!isWasmInitialized) {
17361 throw new Error("initializeWasm() must be awaited first!");
17363 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
17364 // debug statements here
17366 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17367 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
17368 if(!isWasmInitialized) {
17369 throw new Error("initializeWasm() must be awaited first!");
17371 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
17372 return decodeArray(nativeResponseValue);
17374 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17375 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
17376 if(!isWasmInitialized) {
17377 throw new Error("initializeWasm() must be awaited first!");
17379 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
17380 // debug statements here
17382 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17383 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
17384 if(!isWasmInitialized) {
17385 throw new Error("initializeWasm() must be awaited first!");
17387 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
17388 return decodeArray(nativeResponseValue);
17390 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17391 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
17392 if(!isWasmInitialized) {
17393 throw new Error("initializeWasm() must be awaited first!");
17395 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
17396 // debug statements here
17398 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
17399 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
17400 if(!isWasmInitialized) {
17401 throw new Error("initializeWasm() must be awaited first!");
17403 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
17404 return decodeArray(nativeResponseValue);
17406 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17407 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
17408 if(!isWasmInitialized) {
17409 throw new Error("initializeWasm() must be awaited first!");
17411 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
17412 // debug statements here
17414 // 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);
17415 export function TxCreationKeys_new(per_commitment_point_arg: Uint8Array, revocation_key_arg: Uint8Array, broadcaster_htlc_key_arg: Uint8Array, countersignatory_htlc_key_arg: Uint8Array, broadcaster_delayed_payment_key_arg: Uint8Array): number {
17416 if(!isWasmInitialized) {
17417 throw new Error("initializeWasm() must be awaited first!");
17419 const nativeResponseValue = wasm.TxCreationKeys_new(encodeArray(per_commitment_point_arg), encodeArray(revocation_key_arg), encodeArray(broadcaster_htlc_key_arg), encodeArray(countersignatory_htlc_key_arg), encodeArray(broadcaster_delayed_payment_key_arg));
17420 return nativeResponseValue;
17422 // uint64_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
17423 export function TxCreationKeys_clone_ptr(arg: number): number {
17424 if(!isWasmInitialized) {
17425 throw new Error("initializeWasm() must be awaited first!");
17427 const nativeResponseValue = wasm.TxCreationKeys_clone_ptr(arg);
17428 return nativeResponseValue;
17430 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
17431 export function TxCreationKeys_clone(orig: number): number {
17432 if(!isWasmInitialized) {
17433 throw new Error("initializeWasm() must be awaited first!");
17435 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
17436 return nativeResponseValue;
17438 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
17439 export function TxCreationKeys_write(obj: number): Uint8Array {
17440 if(!isWasmInitialized) {
17441 throw new Error("initializeWasm() must be awaited first!");
17443 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
17444 return decodeArray(nativeResponseValue);
17446 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
17447 export function TxCreationKeys_read(ser: Uint8Array): number {
17448 if(!isWasmInitialized) {
17449 throw new Error("initializeWasm() must be awaited first!");
17451 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
17452 return nativeResponseValue;
17454 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
17455 export function ChannelPublicKeys_free(this_obj: number): void {
17456 if(!isWasmInitialized) {
17457 throw new Error("initializeWasm() must be awaited first!");
17459 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
17460 // debug statements here
17462 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17463 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
17464 if(!isWasmInitialized) {
17465 throw new Error("initializeWasm() must be awaited first!");
17467 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
17468 return decodeArray(nativeResponseValue);
17470 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17471 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
17472 if(!isWasmInitialized) {
17473 throw new Error("initializeWasm() must be awaited first!");
17475 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
17476 // debug statements here
17478 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17479 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
17480 if(!isWasmInitialized) {
17481 throw new Error("initializeWasm() must be awaited first!");
17483 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
17484 return decodeArray(nativeResponseValue);
17486 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17487 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
17488 if(!isWasmInitialized) {
17489 throw new Error("initializeWasm() must be awaited first!");
17491 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
17492 // debug statements here
17494 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17495 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
17496 if(!isWasmInitialized) {
17497 throw new Error("initializeWasm() must be awaited first!");
17499 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
17500 return decodeArray(nativeResponseValue);
17502 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17503 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
17504 if(!isWasmInitialized) {
17505 throw new Error("initializeWasm() must be awaited first!");
17507 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
17508 // debug statements here
17510 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17511 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
17512 if(!isWasmInitialized) {
17513 throw new Error("initializeWasm() must be awaited first!");
17515 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
17516 return decodeArray(nativeResponseValue);
17518 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17519 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
17520 if(!isWasmInitialized) {
17521 throw new Error("initializeWasm() must be awaited first!");
17523 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
17524 // debug statements here
17526 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
17527 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
17528 if(!isWasmInitialized) {
17529 throw new Error("initializeWasm() must be awaited first!");
17531 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
17532 return decodeArray(nativeResponseValue);
17534 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
17535 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
17536 if(!isWasmInitialized) {
17537 throw new Error("initializeWasm() must be awaited first!");
17539 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
17540 // debug statements here
17542 // 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);
17543 export function ChannelPublicKeys_new(funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_point_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array): number {
17544 if(!isWasmInitialized) {
17545 throw new Error("initializeWasm() must be awaited first!");
17547 const nativeResponseValue = wasm.ChannelPublicKeys_new(encodeArray(funding_pubkey_arg), encodeArray(revocation_basepoint_arg), encodeArray(payment_point_arg), encodeArray(delayed_payment_basepoint_arg), encodeArray(htlc_basepoint_arg));
17548 return nativeResponseValue;
17550 // uint64_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
17551 export function ChannelPublicKeys_clone_ptr(arg: number): number {
17552 if(!isWasmInitialized) {
17553 throw new Error("initializeWasm() must be awaited first!");
17555 const nativeResponseValue = wasm.ChannelPublicKeys_clone_ptr(arg);
17556 return nativeResponseValue;
17558 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
17559 export function ChannelPublicKeys_clone(orig: number): number {
17560 if(!isWasmInitialized) {
17561 throw new Error("initializeWasm() must be awaited first!");
17563 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
17564 return nativeResponseValue;
17566 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
17567 export function ChannelPublicKeys_write(obj: number): Uint8Array {
17568 if(!isWasmInitialized) {
17569 throw new Error("initializeWasm() must be awaited first!");
17571 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
17572 return decodeArray(nativeResponseValue);
17574 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
17575 export function ChannelPublicKeys_read(ser: Uint8Array): number {
17576 if(!isWasmInitialized) {
17577 throw new Error("initializeWasm() must be awaited first!");
17579 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
17580 return nativeResponseValue;
17582 // 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);
17583 export function TxCreationKeys_derive_new(per_commitment_point: Uint8Array, broadcaster_delayed_payment_base: Uint8Array, broadcaster_htlc_base: Uint8Array, countersignatory_revocation_base: Uint8Array, countersignatory_htlc_base: Uint8Array): number {
17584 if(!isWasmInitialized) {
17585 throw new Error("initializeWasm() must be awaited first!");
17587 const nativeResponseValue = wasm.TxCreationKeys_derive_new(encodeArray(per_commitment_point), encodeArray(broadcaster_delayed_payment_base), encodeArray(broadcaster_htlc_base), encodeArray(countersignatory_revocation_base), encodeArray(countersignatory_htlc_base));
17588 return nativeResponseValue;
17590 // 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);
17591 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
17592 if(!isWasmInitialized) {
17593 throw new Error("initializeWasm() must be awaited first!");
17595 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
17596 return nativeResponseValue;
17598 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
17599 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
17600 if(!isWasmInitialized) {
17601 throw new Error("initializeWasm() must be awaited first!");
17603 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
17604 return decodeArray(nativeResponseValue);
17606 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
17607 export function HTLCOutputInCommitment_free(this_obj: number): void {
17608 if(!isWasmInitialized) {
17609 throw new Error("initializeWasm() must be awaited first!");
17611 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
17612 // debug statements here
17614 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
17615 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
17616 if(!isWasmInitialized) {
17617 throw new Error("initializeWasm() must be awaited first!");
17619 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
17620 return nativeResponseValue;
17622 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
17623 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
17624 if(!isWasmInitialized) {
17625 throw new Error("initializeWasm() must be awaited first!");
17627 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
17628 // debug statements here
17630 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
17631 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
17632 if(!isWasmInitialized) {
17633 throw new Error("initializeWasm() must be awaited first!");
17635 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
17636 return nativeResponseValue;
17638 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
17639 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
17640 if(!isWasmInitialized) {
17641 throw new Error("initializeWasm() must be awaited first!");
17643 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
17644 // debug statements here
17646 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
17647 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
17648 if(!isWasmInitialized) {
17649 throw new Error("initializeWasm() must be awaited first!");
17651 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
17652 return nativeResponseValue;
17654 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
17655 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
17656 if(!isWasmInitialized) {
17657 throw new Error("initializeWasm() must be awaited first!");
17659 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
17660 // debug statements here
17662 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
17663 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
17664 if(!isWasmInitialized) {
17665 throw new Error("initializeWasm() must be awaited first!");
17667 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
17668 return decodeArray(nativeResponseValue);
17670 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
17671 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
17672 if(!isWasmInitialized) {
17673 throw new Error("initializeWasm() must be awaited first!");
17675 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
17676 // debug statements here
17678 // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
17679 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
17680 if(!isWasmInitialized) {
17681 throw new Error("initializeWasm() must be awaited first!");
17683 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
17684 return nativeResponseValue;
17686 // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
17687 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
17688 if(!isWasmInitialized) {
17689 throw new Error("initializeWasm() must be awaited first!");
17691 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
17692 // debug statements here
17694 // 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);
17695 export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
17696 if(!isWasmInitialized) {
17697 throw new Error("initializeWasm() must be awaited first!");
17699 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
17700 return nativeResponseValue;
17702 // uint64_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
17703 export function HTLCOutputInCommitment_clone_ptr(arg: number): number {
17704 if(!isWasmInitialized) {
17705 throw new Error("initializeWasm() must be awaited first!");
17707 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone_ptr(arg);
17708 return nativeResponseValue;
17710 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
17711 export function HTLCOutputInCommitment_clone(orig: number): number {
17712 if(!isWasmInitialized) {
17713 throw new Error("initializeWasm() must be awaited first!");
17715 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
17716 return nativeResponseValue;
17718 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
17719 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
17720 if(!isWasmInitialized) {
17721 throw new Error("initializeWasm() must be awaited first!");
17723 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
17724 return decodeArray(nativeResponseValue);
17726 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
17727 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
17728 if(!isWasmInitialized) {
17729 throw new Error("initializeWasm() must be awaited first!");
17731 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
17732 return nativeResponseValue;
17734 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
17735 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
17736 if(!isWasmInitialized) {
17737 throw new Error("initializeWasm() must be awaited first!");
17739 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
17740 return decodeArray(nativeResponseValue);
17742 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
17743 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
17744 if(!isWasmInitialized) {
17745 throw new Error("initializeWasm() must be awaited first!");
17747 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
17748 return decodeArray(nativeResponseValue);
17750 // 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, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
17751 export function build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
17752 if(!isWasmInitialized) {
17753 throw new Error("initializeWasm() must be awaited first!");
17755 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
17756 return decodeArray(nativeResponseValue);
17758 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
17759 export function ChannelTransactionParameters_free(this_obj: number): void {
17760 if(!isWasmInitialized) {
17761 throw new Error("initializeWasm() must be awaited first!");
17763 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
17764 // debug statements here
17766 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
17767 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
17768 if(!isWasmInitialized) {
17769 throw new Error("initializeWasm() must be awaited first!");
17771 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
17772 return nativeResponseValue;
17774 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
17775 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
17776 if(!isWasmInitialized) {
17777 throw new Error("initializeWasm() must be awaited first!");
17779 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
17780 // debug statements here
17782 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
17783 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
17784 if(!isWasmInitialized) {
17785 throw new Error("initializeWasm() must be awaited first!");
17787 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
17788 return nativeResponseValue;
17790 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
17791 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
17792 if(!isWasmInitialized) {
17793 throw new Error("initializeWasm() must be awaited first!");
17795 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
17796 // debug statements here
17798 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
17799 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
17800 if(!isWasmInitialized) {
17801 throw new Error("initializeWasm() must be awaited first!");
17803 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
17804 return nativeResponseValue;
17806 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
17807 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
17808 if(!isWasmInitialized) {
17809 throw new Error("initializeWasm() must be awaited first!");
17811 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
17812 // debug statements here
17814 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
17815 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
17816 if(!isWasmInitialized) {
17817 throw new Error("initializeWasm() must be awaited first!");
17819 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
17820 return nativeResponseValue;
17822 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
17823 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
17824 if(!isWasmInitialized) {
17825 throw new Error("initializeWasm() must be awaited first!");
17827 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
17828 // debug statements here
17830 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
17831 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
17832 if(!isWasmInitialized) {
17833 throw new Error("initializeWasm() must be awaited first!");
17835 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
17836 return nativeResponseValue;
17838 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
17839 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
17840 if(!isWasmInitialized) {
17841 throw new Error("initializeWasm() must be awaited first!");
17843 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
17844 // debug statements here
17846 // 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);
17847 export function ChannelTransactionParameters_new(holder_pubkeys_arg: number, holder_selected_contest_delay_arg: number, is_outbound_from_holder_arg: boolean, counterparty_parameters_arg: number, funding_outpoint_arg: number): number {
17848 if(!isWasmInitialized) {
17849 throw new Error("initializeWasm() must be awaited first!");
17851 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
17852 return nativeResponseValue;
17854 // uint64_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
17855 export function ChannelTransactionParameters_clone_ptr(arg: number): number {
17856 if(!isWasmInitialized) {
17857 throw new Error("initializeWasm() must be awaited first!");
17859 const nativeResponseValue = wasm.ChannelTransactionParameters_clone_ptr(arg);
17860 return nativeResponseValue;
17862 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
17863 export function ChannelTransactionParameters_clone(orig: number): number {
17864 if(!isWasmInitialized) {
17865 throw new Error("initializeWasm() must be awaited first!");
17867 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
17868 return nativeResponseValue;
17870 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
17871 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
17872 if(!isWasmInitialized) {
17873 throw new Error("initializeWasm() must be awaited first!");
17875 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
17876 // debug statements here
17878 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
17879 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
17880 if(!isWasmInitialized) {
17881 throw new Error("initializeWasm() must be awaited first!");
17883 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
17884 return nativeResponseValue;
17886 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
17887 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
17888 if(!isWasmInitialized) {
17889 throw new Error("initializeWasm() must be awaited first!");
17891 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
17892 // debug statements here
17894 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
17895 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
17896 if(!isWasmInitialized) {
17897 throw new Error("initializeWasm() must be awaited first!");
17899 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
17900 return nativeResponseValue;
17902 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
17903 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
17904 if(!isWasmInitialized) {
17905 throw new Error("initializeWasm() must be awaited first!");
17907 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
17908 // debug statements here
17910 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
17911 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
17912 if(!isWasmInitialized) {
17913 throw new Error("initializeWasm() must be awaited first!");
17915 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
17916 return nativeResponseValue;
17918 // uint64_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
17919 export function CounterpartyChannelTransactionParameters_clone_ptr(arg: number): number {
17920 if(!isWasmInitialized) {
17921 throw new Error("initializeWasm() must be awaited first!");
17923 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone_ptr(arg);
17924 return nativeResponseValue;
17926 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
17927 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
17928 if(!isWasmInitialized) {
17929 throw new Error("initializeWasm() must be awaited first!");
17931 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
17932 return nativeResponseValue;
17934 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
17935 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
17936 if(!isWasmInitialized) {
17937 throw new Error("initializeWasm() must be awaited first!");
17939 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
17940 return nativeResponseValue;
17942 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
17943 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
17944 if(!isWasmInitialized) {
17945 throw new Error("initializeWasm() must be awaited first!");
17947 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
17948 return nativeResponseValue;
17950 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
17951 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
17952 if(!isWasmInitialized) {
17953 throw new Error("initializeWasm() must be awaited first!");
17955 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
17956 return nativeResponseValue;
17958 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
17959 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
17960 if(!isWasmInitialized) {
17961 throw new Error("initializeWasm() must be awaited first!");
17963 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
17964 return decodeArray(nativeResponseValue);
17966 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
17967 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
17968 if(!isWasmInitialized) {
17969 throw new Error("initializeWasm() must be awaited first!");
17971 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
17972 return nativeResponseValue;
17974 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
17975 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
17976 if(!isWasmInitialized) {
17977 throw new Error("initializeWasm() must be awaited first!");
17979 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
17980 return decodeArray(nativeResponseValue);
17982 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
17983 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
17984 if(!isWasmInitialized) {
17985 throw new Error("initializeWasm() must be awaited first!");
17987 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
17988 return nativeResponseValue;
17990 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
17991 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
17992 if(!isWasmInitialized) {
17993 throw new Error("initializeWasm() must be awaited first!");
17995 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
17996 // debug statements here
17998 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
17999 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
18000 if(!isWasmInitialized) {
18001 throw new Error("initializeWasm() must be awaited first!");
18003 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
18004 return nativeResponseValue;
18006 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18007 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
18008 if(!isWasmInitialized) {
18009 throw new Error("initializeWasm() must be awaited first!");
18011 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
18012 return nativeResponseValue;
18014 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18015 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
18016 if(!isWasmInitialized) {
18017 throw new Error("initializeWasm() must be awaited first!");
18019 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
18020 return nativeResponseValue;
18022 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18023 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
18024 if(!isWasmInitialized) {
18025 throw new Error("initializeWasm() must be awaited first!");
18027 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
18028 return nativeResponseValue;
18030 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
18031 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
18032 if(!isWasmInitialized) {
18033 throw new Error("initializeWasm() must be awaited first!");
18035 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
18036 return nativeResponseValue;
18038 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
18039 export function HolderCommitmentTransaction_free(this_obj: number): void {
18040 if(!isWasmInitialized) {
18041 throw new Error("initializeWasm() must be awaited first!");
18043 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
18044 // debug statements here
18046 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
18047 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
18048 if(!isWasmInitialized) {
18049 throw new Error("initializeWasm() must be awaited first!");
18051 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
18052 return decodeArray(nativeResponseValue);
18054 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
18055 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
18056 if(!isWasmInitialized) {
18057 throw new Error("initializeWasm() must be awaited first!");
18059 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
18060 // debug statements here
18062 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
18063 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
18064 if(!isWasmInitialized) {
18065 throw new Error("initializeWasm() must be awaited first!");
18067 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
18068 // debug statements here
18070 // uint64_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
18071 export function HolderCommitmentTransaction_clone_ptr(arg: number): number {
18072 if(!isWasmInitialized) {
18073 throw new Error("initializeWasm() must be awaited first!");
18075 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone_ptr(arg);
18076 return nativeResponseValue;
18078 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
18079 export function HolderCommitmentTransaction_clone(orig: number): number {
18080 if(!isWasmInitialized) {
18081 throw new Error("initializeWasm() must be awaited first!");
18083 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
18084 return nativeResponseValue;
18086 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
18087 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
18088 if(!isWasmInitialized) {
18089 throw new Error("initializeWasm() must be awaited first!");
18091 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
18092 return decodeArray(nativeResponseValue);
18094 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
18095 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
18096 if(!isWasmInitialized) {
18097 throw new Error("initializeWasm() must be awaited first!");
18099 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
18100 return nativeResponseValue;
18102 // 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);
18103 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
18104 if(!isWasmInitialized) {
18105 throw new Error("initializeWasm() must be awaited first!");
18107 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
18108 return nativeResponseValue;
18110 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
18111 export function BuiltCommitmentTransaction_free(this_obj: number): void {
18112 if(!isWasmInitialized) {
18113 throw new Error("initializeWasm() must be awaited first!");
18115 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
18116 // debug statements here
18118 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
18119 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
18120 if(!isWasmInitialized) {
18121 throw new Error("initializeWasm() must be awaited first!");
18123 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
18124 return decodeArray(nativeResponseValue);
18126 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
18127 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
18128 if(!isWasmInitialized) {
18129 throw new Error("initializeWasm() must be awaited first!");
18131 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
18132 // debug statements here
18134 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
18135 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
18136 if(!isWasmInitialized) {
18137 throw new Error("initializeWasm() must be awaited first!");
18139 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
18140 return decodeArray(nativeResponseValue);
18142 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
18143 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
18144 if(!isWasmInitialized) {
18145 throw new Error("initializeWasm() must be awaited first!");
18147 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
18148 // debug statements here
18150 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
18151 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
18152 if(!isWasmInitialized) {
18153 throw new Error("initializeWasm() must be awaited first!");
18155 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
18156 return nativeResponseValue;
18158 // uint64_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
18159 export function BuiltCommitmentTransaction_clone_ptr(arg: number): number {
18160 if(!isWasmInitialized) {
18161 throw new Error("initializeWasm() must be awaited first!");
18163 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone_ptr(arg);
18164 return nativeResponseValue;
18166 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
18167 export function BuiltCommitmentTransaction_clone(orig: number): number {
18168 if(!isWasmInitialized) {
18169 throw new Error("initializeWasm() must be awaited first!");
18171 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
18172 return nativeResponseValue;
18174 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
18175 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
18176 if(!isWasmInitialized) {
18177 throw new Error("initializeWasm() must be awaited first!");
18179 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
18180 return decodeArray(nativeResponseValue);
18182 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
18183 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
18184 if(!isWasmInitialized) {
18185 throw new Error("initializeWasm() must be awaited first!");
18187 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
18188 return nativeResponseValue;
18190 // 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);
18191 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18192 if(!isWasmInitialized) {
18193 throw new Error("initializeWasm() must be awaited first!");
18195 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
18196 return decodeArray(nativeResponseValue);
18198 // 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);
18199 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18200 if(!isWasmInitialized) {
18201 throw new Error("initializeWasm() must be awaited first!");
18203 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
18204 return decodeArray(nativeResponseValue);
18206 // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
18207 export function ClosingTransaction_free(this_obj: number): void {
18208 if(!isWasmInitialized) {
18209 throw new Error("initializeWasm() must be awaited first!");
18211 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
18212 // debug statements here
18214 // uint64_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
18215 export function ClosingTransaction_clone_ptr(arg: number): number {
18216 if(!isWasmInitialized) {
18217 throw new Error("initializeWasm() must be awaited first!");
18219 const nativeResponseValue = wasm.ClosingTransaction_clone_ptr(arg);
18220 return nativeResponseValue;
18222 // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
18223 export function ClosingTransaction_clone(orig: number): number {
18224 if(!isWasmInitialized) {
18225 throw new Error("initializeWasm() must be awaited first!");
18227 const nativeResponseValue = wasm.ClosingTransaction_clone(orig);
18228 return nativeResponseValue;
18230 // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
18231 export function ClosingTransaction_hash(o: number): number {
18232 if(!isWasmInitialized) {
18233 throw new Error("initializeWasm() must be awaited first!");
18235 const nativeResponseValue = wasm.ClosingTransaction_hash(o);
18236 return nativeResponseValue;
18238 // 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);
18239 export function ClosingTransaction_new(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): number {
18240 if(!isWasmInitialized) {
18241 throw new Error("initializeWasm() must be awaited first!");
18243 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
18244 return nativeResponseValue;
18246 // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18247 export function ClosingTransaction_trust(this_arg: number): number {
18248 if(!isWasmInitialized) {
18249 throw new Error("initializeWasm() must be awaited first!");
18251 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
18252 return nativeResponseValue;
18254 // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
18255 export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
18256 if(!isWasmInitialized) {
18257 throw new Error("initializeWasm() must be awaited first!");
18259 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
18260 return nativeResponseValue;
18262 // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18263 export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
18264 if(!isWasmInitialized) {
18265 throw new Error("initializeWasm() must be awaited first!");
18267 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
18268 return nativeResponseValue;
18270 // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18271 export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
18272 if(!isWasmInitialized) {
18273 throw new Error("initializeWasm() must be awaited first!");
18275 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
18276 return nativeResponseValue;
18278 // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18279 export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
18280 if(!isWasmInitialized) {
18281 throw new Error("initializeWasm() must be awaited first!");
18283 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
18284 return decodeArray(nativeResponseValue);
18286 // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
18287 export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
18288 if(!isWasmInitialized) {
18289 throw new Error("initializeWasm() must be awaited first!");
18291 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
18292 return decodeArray(nativeResponseValue);
18294 // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
18295 export function TrustedClosingTransaction_free(this_obj: number): void {
18296 if(!isWasmInitialized) {
18297 throw new Error("initializeWasm() must be awaited first!");
18299 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
18300 // debug statements here
18302 // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
18303 export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
18304 if(!isWasmInitialized) {
18305 throw new Error("initializeWasm() must be awaited first!");
18307 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
18308 return decodeArray(nativeResponseValue);
18310 // 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);
18311 export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18312 if(!isWasmInitialized) {
18313 throw new Error("initializeWasm() must be awaited first!");
18315 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
18316 return decodeArray(nativeResponseValue);
18318 // 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);
18319 export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
18320 if(!isWasmInitialized) {
18321 throw new Error("initializeWasm() must be awaited first!");
18323 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
18324 return decodeArray(nativeResponseValue);
18326 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
18327 export function CommitmentTransaction_free(this_obj: number): void {
18328 if(!isWasmInitialized) {
18329 throw new Error("initializeWasm() must be awaited first!");
18331 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
18332 // debug statements here
18334 // uint64_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
18335 export function CommitmentTransaction_clone_ptr(arg: number): number {
18336 if(!isWasmInitialized) {
18337 throw new Error("initializeWasm() must be awaited first!");
18339 const nativeResponseValue = wasm.CommitmentTransaction_clone_ptr(arg);
18340 return nativeResponseValue;
18342 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
18343 export function CommitmentTransaction_clone(orig: number): number {
18344 if(!isWasmInitialized) {
18345 throw new Error("initializeWasm() must be awaited first!");
18347 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
18348 return nativeResponseValue;
18350 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
18351 export function CommitmentTransaction_write(obj: number): Uint8Array {
18352 if(!isWasmInitialized) {
18353 throw new Error("initializeWasm() must be awaited first!");
18355 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
18356 return decodeArray(nativeResponseValue);
18358 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
18359 export function CommitmentTransaction_read(ser: Uint8Array): number {
18360 if(!isWasmInitialized) {
18361 throw new Error("initializeWasm() must be awaited first!");
18363 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
18364 return nativeResponseValue;
18366 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18367 export function CommitmentTransaction_commitment_number(this_arg: number): number {
18368 if(!isWasmInitialized) {
18369 throw new Error("initializeWasm() must be awaited first!");
18371 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
18372 return nativeResponseValue;
18374 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18375 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
18376 if(!isWasmInitialized) {
18377 throw new Error("initializeWasm() must be awaited first!");
18379 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
18380 return nativeResponseValue;
18382 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18383 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
18384 if(!isWasmInitialized) {
18385 throw new Error("initializeWasm() must be awaited first!");
18387 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
18388 return nativeResponseValue;
18390 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18391 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
18392 if(!isWasmInitialized) {
18393 throw new Error("initializeWasm() must be awaited first!");
18395 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
18396 return nativeResponseValue;
18398 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
18399 export function CommitmentTransaction_trust(this_arg: number): number {
18400 if(!isWasmInitialized) {
18401 throw new Error("initializeWasm() must be awaited first!");
18403 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
18404 return nativeResponseValue;
18406 // 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);
18407 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
18408 if(!isWasmInitialized) {
18409 throw new Error("initializeWasm() must be awaited first!");
18411 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
18412 return nativeResponseValue;
18414 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
18415 export function TrustedCommitmentTransaction_free(this_obj: number): void {
18416 if(!isWasmInitialized) {
18417 throw new Error("initializeWasm() must be awaited first!");
18419 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
18420 // debug statements here
18422 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18423 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
18424 if(!isWasmInitialized) {
18425 throw new Error("initializeWasm() must be awaited first!");
18427 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
18428 return decodeArray(nativeResponseValue);
18430 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18431 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
18432 if(!isWasmInitialized) {
18433 throw new Error("initializeWasm() must be awaited first!");
18435 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
18436 return nativeResponseValue;
18438 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
18439 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
18440 if(!isWasmInitialized) {
18441 throw new Error("initializeWasm() must be awaited first!");
18443 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
18444 return nativeResponseValue;
18446 // 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);
18447 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
18448 if(!isWasmInitialized) {
18449 throw new Error("initializeWasm() must be awaited first!");
18451 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
18452 return nativeResponseValue;
18454 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
18455 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
18456 if(!isWasmInitialized) {
18457 throw new Error("initializeWasm() must be awaited first!");
18459 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
18460 return nativeResponseValue;
18462 // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
18463 export function InitFeatures_eq(a: number, b: number): boolean {
18464 if(!isWasmInitialized) {
18465 throw new Error("initializeWasm() must be awaited first!");
18467 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
18468 return nativeResponseValue;
18470 // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
18471 export function NodeFeatures_eq(a: number, b: number): boolean {
18472 if(!isWasmInitialized) {
18473 throw new Error("initializeWasm() must be awaited first!");
18475 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
18476 return nativeResponseValue;
18478 // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
18479 export function ChannelFeatures_eq(a: number, b: number): boolean {
18480 if(!isWasmInitialized) {
18481 throw new Error("initializeWasm() must be awaited first!");
18483 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
18484 return nativeResponseValue;
18486 // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
18487 export function InvoiceFeatures_eq(a: number, b: number): boolean {
18488 if(!isWasmInitialized) {
18489 throw new Error("initializeWasm() must be awaited first!");
18491 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
18492 return nativeResponseValue;
18494 // uint64_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
18495 export function InitFeatures_clone_ptr(arg: number): number {
18496 if(!isWasmInitialized) {
18497 throw new Error("initializeWasm() must be awaited first!");
18499 const nativeResponseValue = wasm.InitFeatures_clone_ptr(arg);
18500 return nativeResponseValue;
18502 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
18503 export function InitFeatures_clone(orig: number): number {
18504 if(!isWasmInitialized) {
18505 throw new Error("initializeWasm() must be awaited first!");
18507 const nativeResponseValue = wasm.InitFeatures_clone(orig);
18508 return nativeResponseValue;
18510 // uint64_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
18511 export function NodeFeatures_clone_ptr(arg: number): number {
18512 if(!isWasmInitialized) {
18513 throw new Error("initializeWasm() must be awaited first!");
18515 const nativeResponseValue = wasm.NodeFeatures_clone_ptr(arg);
18516 return nativeResponseValue;
18518 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
18519 export function NodeFeatures_clone(orig: number): number {
18520 if(!isWasmInitialized) {
18521 throw new Error("initializeWasm() must be awaited first!");
18523 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
18524 return nativeResponseValue;
18526 // uint64_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
18527 export function ChannelFeatures_clone_ptr(arg: number): number {
18528 if(!isWasmInitialized) {
18529 throw new Error("initializeWasm() must be awaited first!");
18531 const nativeResponseValue = wasm.ChannelFeatures_clone_ptr(arg);
18532 return nativeResponseValue;
18534 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
18535 export function ChannelFeatures_clone(orig: number): number {
18536 if(!isWasmInitialized) {
18537 throw new Error("initializeWasm() must be awaited first!");
18539 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
18540 return nativeResponseValue;
18542 // uint64_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
18543 export function InvoiceFeatures_clone_ptr(arg: number): number {
18544 if(!isWasmInitialized) {
18545 throw new Error("initializeWasm() must be awaited first!");
18547 const nativeResponseValue = wasm.InvoiceFeatures_clone_ptr(arg);
18548 return nativeResponseValue;
18550 // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
18551 export function InvoiceFeatures_clone(orig: number): number {
18552 if(!isWasmInitialized) {
18553 throw new Error("initializeWasm() must be awaited first!");
18555 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
18556 return nativeResponseValue;
18558 // void InitFeatures_free(struct LDKInitFeatures this_obj);
18559 export function InitFeatures_free(this_obj: number): void {
18560 if(!isWasmInitialized) {
18561 throw new Error("initializeWasm() must be awaited first!");
18563 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
18564 // debug statements here
18566 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
18567 export function NodeFeatures_free(this_obj: number): void {
18568 if(!isWasmInitialized) {
18569 throw new Error("initializeWasm() must be awaited first!");
18571 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
18572 // debug statements here
18574 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
18575 export function ChannelFeatures_free(this_obj: number): void {
18576 if(!isWasmInitialized) {
18577 throw new Error("initializeWasm() must be awaited first!");
18579 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
18580 // debug statements here
18582 // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
18583 export function InvoiceFeatures_free(this_obj: number): void {
18584 if(!isWasmInitialized) {
18585 throw new Error("initializeWasm() must be awaited first!");
18587 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
18588 // debug statements here
18590 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
18591 export function InitFeatures_empty(): number {
18592 if(!isWasmInitialized) {
18593 throw new Error("initializeWasm() must be awaited first!");
18595 const nativeResponseValue = wasm.InitFeatures_empty();
18596 return nativeResponseValue;
18598 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
18599 export function InitFeatures_known(): number {
18600 if(!isWasmInitialized) {
18601 throw new Error("initializeWasm() must be awaited first!");
18603 const nativeResponseValue = wasm.InitFeatures_known();
18604 return nativeResponseValue;
18606 // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
18607 export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
18608 if(!isWasmInitialized) {
18609 throw new Error("initializeWasm() must be awaited first!");
18611 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
18612 return nativeResponseValue;
18614 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
18615 export function NodeFeatures_empty(): number {
18616 if(!isWasmInitialized) {
18617 throw new Error("initializeWasm() must be awaited first!");
18619 const nativeResponseValue = wasm.NodeFeatures_empty();
18620 return nativeResponseValue;
18622 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
18623 export function NodeFeatures_known(): number {
18624 if(!isWasmInitialized) {
18625 throw new Error("initializeWasm() must be awaited first!");
18627 const nativeResponseValue = wasm.NodeFeatures_known();
18628 return nativeResponseValue;
18630 // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
18631 export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
18632 if(!isWasmInitialized) {
18633 throw new Error("initializeWasm() must be awaited first!");
18635 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
18636 return nativeResponseValue;
18638 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
18639 export function ChannelFeatures_empty(): number {
18640 if(!isWasmInitialized) {
18641 throw new Error("initializeWasm() must be awaited first!");
18643 const nativeResponseValue = wasm.ChannelFeatures_empty();
18644 return nativeResponseValue;
18646 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
18647 export function ChannelFeatures_known(): number {
18648 if(!isWasmInitialized) {
18649 throw new Error("initializeWasm() must be awaited first!");
18651 const nativeResponseValue = wasm.ChannelFeatures_known();
18652 return nativeResponseValue;
18654 // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
18655 export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
18656 if(!isWasmInitialized) {
18657 throw new Error("initializeWasm() must be awaited first!");
18659 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
18660 return nativeResponseValue;
18662 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
18663 export function InvoiceFeatures_empty(): number {
18664 if(!isWasmInitialized) {
18665 throw new Error("initializeWasm() must be awaited first!");
18667 const nativeResponseValue = wasm.InvoiceFeatures_empty();
18668 return nativeResponseValue;
18670 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
18671 export function InvoiceFeatures_known(): number {
18672 if(!isWasmInitialized) {
18673 throw new Error("initializeWasm() must be awaited first!");
18675 const nativeResponseValue = wasm.InvoiceFeatures_known();
18676 return nativeResponseValue;
18678 // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
18679 export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
18680 if(!isWasmInitialized) {
18681 throw new Error("initializeWasm() must be awaited first!");
18683 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
18684 return nativeResponseValue;
18686 // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
18687 export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
18688 if(!isWasmInitialized) {
18689 throw new Error("initializeWasm() must be awaited first!");
18691 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
18692 return nativeResponseValue;
18694 // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
18695 export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
18696 if(!isWasmInitialized) {
18697 throw new Error("initializeWasm() must be awaited first!");
18699 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
18700 return nativeResponseValue;
18702 // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
18703 export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
18704 if(!isWasmInitialized) {
18705 throw new Error("initializeWasm() must be awaited first!");
18707 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
18708 return nativeResponseValue;
18710 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
18711 export function InitFeatures_write(obj: number): Uint8Array {
18712 if(!isWasmInitialized) {
18713 throw new Error("initializeWasm() must be awaited first!");
18715 const nativeResponseValue = wasm.InitFeatures_write(obj);
18716 return decodeArray(nativeResponseValue);
18718 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
18719 export function NodeFeatures_write(obj: number): Uint8Array {
18720 if(!isWasmInitialized) {
18721 throw new Error("initializeWasm() must be awaited first!");
18723 const nativeResponseValue = wasm.NodeFeatures_write(obj);
18724 return decodeArray(nativeResponseValue);
18726 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
18727 export function ChannelFeatures_write(obj: number): Uint8Array {
18728 if(!isWasmInitialized) {
18729 throw new Error("initializeWasm() must be awaited first!");
18731 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
18732 return decodeArray(nativeResponseValue);
18734 // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
18735 export function InvoiceFeatures_write(obj: number): Uint8Array {
18736 if(!isWasmInitialized) {
18737 throw new Error("initializeWasm() must be awaited first!");
18739 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
18740 return decodeArray(nativeResponseValue);
18742 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
18743 export function InitFeatures_read(ser: Uint8Array): number {
18744 if(!isWasmInitialized) {
18745 throw new Error("initializeWasm() must be awaited first!");
18747 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
18748 return nativeResponseValue;
18750 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
18751 export function NodeFeatures_read(ser: Uint8Array): number {
18752 if(!isWasmInitialized) {
18753 throw new Error("initializeWasm() must be awaited first!");
18755 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
18756 return nativeResponseValue;
18758 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
18759 export function ChannelFeatures_read(ser: Uint8Array): number {
18760 if(!isWasmInitialized) {
18761 throw new Error("initializeWasm() must be awaited first!");
18763 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
18764 return nativeResponseValue;
18766 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
18767 export function InvoiceFeatures_read(ser: Uint8Array): number {
18768 if(!isWasmInitialized) {
18769 throw new Error("initializeWasm() must be awaited first!");
18771 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
18772 return nativeResponseValue;
18774 // void ShutdownScript_free(struct LDKShutdownScript this_obj);
18775 export function ShutdownScript_free(this_obj: number): void {
18776 if(!isWasmInitialized) {
18777 throw new Error("initializeWasm() must be awaited first!");
18779 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
18780 // debug statements here
18782 // uint64_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
18783 export function ShutdownScript_clone_ptr(arg: number): number {
18784 if(!isWasmInitialized) {
18785 throw new Error("initializeWasm() must be awaited first!");
18787 const nativeResponseValue = wasm.ShutdownScript_clone_ptr(arg);
18788 return nativeResponseValue;
18790 // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
18791 export function ShutdownScript_clone(orig: number): number {
18792 if(!isWasmInitialized) {
18793 throw new Error("initializeWasm() must be awaited first!");
18795 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
18796 return nativeResponseValue;
18798 // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
18799 export function InvalidShutdownScript_free(this_obj: number): void {
18800 if(!isWasmInitialized) {
18801 throw new Error("initializeWasm() must be awaited first!");
18803 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
18804 // debug statements here
18806 // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
18807 export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
18808 if(!isWasmInitialized) {
18809 throw new Error("initializeWasm() must be awaited first!");
18811 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
18812 return decodeArray(nativeResponseValue);
18814 // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
18815 export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
18816 if(!isWasmInitialized) {
18817 throw new Error("initializeWasm() must be awaited first!");
18819 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
18820 // debug statements here
18822 // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
18823 export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
18824 if(!isWasmInitialized) {
18825 throw new Error("initializeWasm() must be awaited first!");
18827 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
18828 return nativeResponseValue;
18830 // uint64_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
18831 export function InvalidShutdownScript_clone_ptr(arg: number): number {
18832 if(!isWasmInitialized) {
18833 throw new Error("initializeWasm() must be awaited first!");
18835 const nativeResponseValue = wasm.InvalidShutdownScript_clone_ptr(arg);
18836 return nativeResponseValue;
18838 // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
18839 export function InvalidShutdownScript_clone(orig: number): number {
18840 if(!isWasmInitialized) {
18841 throw new Error("initializeWasm() must be awaited first!");
18843 const nativeResponseValue = wasm.InvalidShutdownScript_clone(orig);
18844 return nativeResponseValue;
18846 // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
18847 export function ShutdownScript_write(obj: number): Uint8Array {
18848 if(!isWasmInitialized) {
18849 throw new Error("initializeWasm() must be awaited first!");
18851 const nativeResponseValue = wasm.ShutdownScript_write(obj);
18852 return decodeArray(nativeResponseValue);
18854 // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
18855 export function ShutdownScript_read(ser: Uint8Array): number {
18856 if(!isWasmInitialized) {
18857 throw new Error("initializeWasm() must be awaited first!");
18859 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
18860 return nativeResponseValue;
18862 // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
18863 export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
18864 if(!isWasmInitialized) {
18865 throw new Error("initializeWasm() must be awaited first!");
18867 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
18868 return nativeResponseValue;
18870 // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
18871 export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
18872 if(!isWasmInitialized) {
18873 throw new Error("initializeWasm() must be awaited first!");
18875 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
18876 return nativeResponseValue;
18878 // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
18879 export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
18880 if(!isWasmInitialized) {
18881 throw new Error("initializeWasm() must be awaited first!");
18883 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
18884 return nativeResponseValue;
18886 // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
18887 export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
18888 if(!isWasmInitialized) {
18889 throw new Error("initializeWasm() must be awaited first!");
18891 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
18892 return decodeArray(nativeResponseValue);
18894 // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
18895 export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
18896 if(!isWasmInitialized) {
18897 throw new Error("initializeWasm() must be awaited first!");
18899 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
18900 return decodeArray(nativeResponseValue);
18902 // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
18903 export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
18904 if(!isWasmInitialized) {
18905 throw new Error("initializeWasm() must be awaited first!");
18907 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
18908 return nativeResponseValue;
18910 // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
18911 export function CustomMessageReader_free(this_ptr: number): void {
18912 if(!isWasmInitialized) {
18913 throw new Error("initializeWasm() must be awaited first!");
18915 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
18916 // debug statements here
18918 // uint64_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
18919 export function Type_clone_ptr(arg: number): number {
18920 if(!isWasmInitialized) {
18921 throw new Error("initializeWasm() must be awaited first!");
18923 const nativeResponseValue = wasm.Type_clone_ptr(arg);
18924 return nativeResponseValue;
18926 // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
18927 export function Type_clone(orig: number): number {
18928 if(!isWasmInitialized) {
18929 throw new Error("initializeWasm() must be awaited first!");
18931 const nativeResponseValue = wasm.Type_clone(orig);
18932 return nativeResponseValue;
18934 // void Type_free(struct LDKType this_ptr);
18935 export function Type_free(this_ptr: number): void {
18936 if(!isWasmInitialized) {
18937 throw new Error("initializeWasm() must be awaited first!");
18939 const nativeResponseValue = wasm.Type_free(this_ptr);
18940 // debug statements here
18942 // void Score_free(struct LDKScore this_ptr);
18943 export function Score_free(this_ptr: number): void {
18944 if(!isWasmInitialized) {
18945 throw new Error("initializeWasm() must be awaited first!");
18947 const nativeResponseValue = wasm.Score_free(this_ptr);
18948 // debug statements here
18950 // void LockableScore_free(struct LDKLockableScore this_obj);
18951 export function LockableScore_free(this_obj: number): void {
18952 if(!isWasmInitialized) {
18953 throw new Error("initializeWasm() must be awaited first!");
18955 const nativeResponseValue = wasm.LockableScore_free(this_obj);
18956 // debug statements here
18958 // MUST_USE_RES struct LDKLockableScore LockableScore_new(struct LDKScore score);
18959 export function LockableScore_new(score: number): number {
18960 if(!isWasmInitialized) {
18961 throw new Error("initializeWasm() must be awaited first!");
18963 const nativeResponseValue = wasm.LockableScore_new(score);
18964 return nativeResponseValue;
18966 // struct LDKCVec_u8Z LockableScore_write(const struct LDKLockableScore *NONNULL_PTR obj);
18967 export function LockableScore_write(obj: number): Uint8Array {
18968 if(!isWasmInitialized) {
18969 throw new Error("initializeWasm() must be awaited first!");
18971 const nativeResponseValue = wasm.LockableScore_write(obj);
18972 return decodeArray(nativeResponseValue);
18974 // void NodeId_free(struct LDKNodeId this_obj);
18975 export function NodeId_free(this_obj: number): void {
18976 if(!isWasmInitialized) {
18977 throw new Error("initializeWasm() must be awaited first!");
18979 const nativeResponseValue = wasm.NodeId_free(this_obj);
18980 // debug statements here
18982 // uint64_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
18983 export function NodeId_clone_ptr(arg: number): number {
18984 if(!isWasmInitialized) {
18985 throw new Error("initializeWasm() must be awaited first!");
18987 const nativeResponseValue = wasm.NodeId_clone_ptr(arg);
18988 return nativeResponseValue;
18990 // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
18991 export function NodeId_clone(orig: number): number {
18992 if(!isWasmInitialized) {
18993 throw new Error("initializeWasm() must be awaited first!");
18995 const nativeResponseValue = wasm.NodeId_clone(orig);
18996 return nativeResponseValue;
18998 // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
18999 export function NodeId_from_pubkey(pubkey: Uint8Array): number {
19000 if(!isWasmInitialized) {
19001 throw new Error("initializeWasm() must be awaited first!");
19003 const nativeResponseValue = wasm.NodeId_from_pubkey(encodeArray(pubkey));
19004 return nativeResponseValue;
19006 // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
19007 export function NodeId_as_slice(this_arg: number): Uint8Array {
19008 if(!isWasmInitialized) {
19009 throw new Error("initializeWasm() must be awaited first!");
19011 const nativeResponseValue = wasm.NodeId_as_slice(this_arg);
19012 return decodeArray(nativeResponseValue);
19014 // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
19015 export function NodeId_hash(o: number): number {
19016 if(!isWasmInitialized) {
19017 throw new Error("initializeWasm() must be awaited first!");
19019 const nativeResponseValue = wasm.NodeId_hash(o);
19020 return nativeResponseValue;
19022 // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
19023 export function NodeId_write(obj: number): Uint8Array {
19024 if(!isWasmInitialized) {
19025 throw new Error("initializeWasm() must be awaited first!");
19027 const nativeResponseValue = wasm.NodeId_write(obj);
19028 return decodeArray(nativeResponseValue);
19030 // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
19031 export function NodeId_read(ser: Uint8Array): number {
19032 if(!isWasmInitialized) {
19033 throw new Error("initializeWasm() must be awaited first!");
19035 const nativeResponseValue = wasm.NodeId_read(encodeArray(ser));
19036 return nativeResponseValue;
19038 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
19039 export function NetworkGraph_free(this_obj: number): void {
19040 if(!isWasmInitialized) {
19041 throw new Error("initializeWasm() must be awaited first!");
19043 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
19044 // debug statements here
19046 // uint64_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
19047 export function NetworkGraph_clone_ptr(arg: number): number {
19048 if(!isWasmInitialized) {
19049 throw new Error("initializeWasm() must be awaited first!");
19051 const nativeResponseValue = wasm.NetworkGraph_clone_ptr(arg);
19052 return nativeResponseValue;
19054 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
19055 export function NetworkGraph_clone(orig: number): number {
19056 if(!isWasmInitialized) {
19057 throw new Error("initializeWasm() must be awaited first!");
19059 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
19060 return nativeResponseValue;
19062 // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
19063 export function ReadOnlyNetworkGraph_free(this_obj: number): void {
19064 if(!isWasmInitialized) {
19065 throw new Error("initializeWasm() must be awaited first!");
19067 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
19068 // debug statements here
19070 // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
19071 export function NetworkUpdate_free(this_ptr: number): void {
19072 if(!isWasmInitialized) {
19073 throw new Error("initializeWasm() must be awaited first!");
19075 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
19076 // debug statements here
19078 // uint64_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
19079 export function NetworkUpdate_clone_ptr(arg: number): number {
19080 if(!isWasmInitialized) {
19081 throw new Error("initializeWasm() must be awaited first!");
19083 const nativeResponseValue = wasm.NetworkUpdate_clone_ptr(arg);
19084 return nativeResponseValue;
19086 // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
19087 export function NetworkUpdate_clone(orig: number): number {
19088 if(!isWasmInitialized) {
19089 throw new Error("initializeWasm() must be awaited first!");
19091 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
19092 return nativeResponseValue;
19094 // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
19095 export function NetworkUpdate_channel_update_message(msg: number): number {
19096 if(!isWasmInitialized) {
19097 throw new Error("initializeWasm() must be awaited first!");
19099 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
19100 return nativeResponseValue;
19102 // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
19103 export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
19104 if(!isWasmInitialized) {
19105 throw new Error("initializeWasm() must be awaited first!");
19107 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
19108 return nativeResponseValue;
19110 // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
19111 export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
19112 if(!isWasmInitialized) {
19113 throw new Error("initializeWasm() must be awaited first!");
19115 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
19116 return nativeResponseValue;
19118 // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
19119 export function NetworkUpdate_write(obj: number): Uint8Array {
19120 if(!isWasmInitialized) {
19121 throw new Error("initializeWasm() must be awaited first!");
19123 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
19124 return decodeArray(nativeResponseValue);
19126 // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
19127 export function NetworkUpdate_read(ser: Uint8Array): number {
19128 if(!isWasmInitialized) {
19129 throw new Error("initializeWasm() must be awaited first!");
19131 const nativeResponseValue = wasm.NetworkUpdate_read(encodeArray(ser));
19132 return nativeResponseValue;
19134 // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
19135 export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
19136 if(!isWasmInitialized) {
19137 throw new Error("initializeWasm() must be awaited first!");
19139 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
19140 return nativeResponseValue;
19142 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
19143 export function NetGraphMsgHandler_free(this_obj: number): void {
19144 if(!isWasmInitialized) {
19145 throw new Error("initializeWasm() must be awaited first!");
19147 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
19148 // debug statements here
19150 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
19151 export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
19152 if(!isWasmInitialized) {
19153 throw new Error("initializeWasm() must be awaited first!");
19155 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
19156 return nativeResponseValue;
19158 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
19159 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
19160 if(!isWasmInitialized) {
19161 throw new Error("initializeWasm() must be awaited first!");
19163 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
19164 // debug statements here
19166 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
19167 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
19168 if(!isWasmInitialized) {
19169 throw new Error("initializeWasm() must be awaited first!");
19171 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
19172 return nativeResponseValue;
19174 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
19175 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
19176 if(!isWasmInitialized) {
19177 throw new Error("initializeWasm() must be awaited first!");
19179 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
19180 return nativeResponseValue;
19182 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
19183 export function DirectionalChannelInfo_free(this_obj: number): void {
19184 if(!isWasmInitialized) {
19185 throw new Error("initializeWasm() must be awaited first!");
19187 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
19188 // debug statements here
19190 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19191 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
19192 if(!isWasmInitialized) {
19193 throw new Error("initializeWasm() must be awaited first!");
19195 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
19196 return nativeResponseValue;
19198 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
19199 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
19200 if(!isWasmInitialized) {
19201 throw new Error("initializeWasm() must be awaited first!");
19203 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
19204 // debug statements here
19206 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19207 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
19208 if(!isWasmInitialized) {
19209 throw new Error("initializeWasm() must be awaited first!");
19211 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
19212 return nativeResponseValue;
19214 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
19215 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
19216 if(!isWasmInitialized) {
19217 throw new Error("initializeWasm() must be awaited first!");
19219 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
19220 // debug statements here
19222 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19223 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
19224 if(!isWasmInitialized) {
19225 throw new Error("initializeWasm() must be awaited first!");
19227 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
19228 return nativeResponseValue;
19230 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
19231 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
19232 if(!isWasmInitialized) {
19233 throw new Error("initializeWasm() must be awaited first!");
19235 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
19236 // debug statements here
19238 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19239 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
19240 if(!isWasmInitialized) {
19241 throw new Error("initializeWasm() must be awaited first!");
19243 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
19244 return nativeResponseValue;
19246 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
19247 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
19248 if(!isWasmInitialized) {
19249 throw new Error("initializeWasm() must be awaited first!");
19251 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
19252 // debug statements here
19254 // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19255 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
19256 if(!isWasmInitialized) {
19257 throw new Error("initializeWasm() must be awaited first!");
19259 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
19260 return nativeResponseValue;
19262 // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
19263 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
19264 if(!isWasmInitialized) {
19265 throw new Error("initializeWasm() must be awaited first!");
19267 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
19268 // debug statements here
19270 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19271 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
19272 if(!isWasmInitialized) {
19273 throw new Error("initializeWasm() must be awaited first!");
19275 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
19276 return nativeResponseValue;
19278 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
19279 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
19280 if(!isWasmInitialized) {
19281 throw new Error("initializeWasm() must be awaited first!");
19283 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
19284 // debug statements here
19286 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
19287 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
19288 if(!isWasmInitialized) {
19289 throw new Error("initializeWasm() must be awaited first!");
19291 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
19292 return nativeResponseValue;
19294 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
19295 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
19296 if(!isWasmInitialized) {
19297 throw new Error("initializeWasm() must be awaited first!");
19299 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
19300 // debug statements here
19302 // 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);
19303 export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
19304 if(!isWasmInitialized) {
19305 throw new Error("initializeWasm() must be awaited first!");
19307 const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
19308 return nativeResponseValue;
19310 // uint64_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
19311 export function DirectionalChannelInfo_clone_ptr(arg: number): number {
19312 if(!isWasmInitialized) {
19313 throw new Error("initializeWasm() must be awaited first!");
19315 const nativeResponseValue = wasm.DirectionalChannelInfo_clone_ptr(arg);
19316 return nativeResponseValue;
19318 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
19319 export function DirectionalChannelInfo_clone(orig: number): number {
19320 if(!isWasmInitialized) {
19321 throw new Error("initializeWasm() must be awaited first!");
19323 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
19324 return nativeResponseValue;
19326 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
19327 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
19328 if(!isWasmInitialized) {
19329 throw new Error("initializeWasm() must be awaited first!");
19331 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
19332 return decodeArray(nativeResponseValue);
19334 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
19335 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
19336 if(!isWasmInitialized) {
19337 throw new Error("initializeWasm() must be awaited first!");
19339 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
19340 return nativeResponseValue;
19342 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
19343 export function ChannelInfo_free(this_obj: number): void {
19344 if(!isWasmInitialized) {
19345 throw new Error("initializeWasm() must be awaited first!");
19347 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
19348 // debug statements here
19350 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19351 export function ChannelInfo_get_features(this_ptr: number): number {
19352 if(!isWasmInitialized) {
19353 throw new Error("initializeWasm() must be awaited first!");
19355 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
19356 return nativeResponseValue;
19358 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
19359 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
19360 if(!isWasmInitialized) {
19361 throw new Error("initializeWasm() must be awaited first!");
19363 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
19364 // debug statements here
19366 // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19367 export function ChannelInfo_get_node_one(this_ptr: number): number {
19368 if(!isWasmInitialized) {
19369 throw new Error("initializeWasm() must be awaited first!");
19371 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
19372 return nativeResponseValue;
19374 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
19375 export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
19376 if(!isWasmInitialized) {
19377 throw new Error("initializeWasm() must be awaited first!");
19379 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, val);
19380 // debug statements here
19382 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19383 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
19384 if(!isWasmInitialized) {
19385 throw new Error("initializeWasm() must be awaited first!");
19387 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
19388 return nativeResponseValue;
19390 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
19391 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
19392 if(!isWasmInitialized) {
19393 throw new Error("initializeWasm() must be awaited first!");
19395 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
19396 // debug statements here
19398 // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19399 export function ChannelInfo_get_node_two(this_ptr: number): number {
19400 if(!isWasmInitialized) {
19401 throw new Error("initializeWasm() must be awaited first!");
19403 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
19404 return nativeResponseValue;
19406 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
19407 export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
19408 if(!isWasmInitialized) {
19409 throw new Error("initializeWasm() must be awaited first!");
19411 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, val);
19412 // debug statements here
19414 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19415 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
19416 if(!isWasmInitialized) {
19417 throw new Error("initializeWasm() must be awaited first!");
19419 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
19420 return nativeResponseValue;
19422 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
19423 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
19424 if(!isWasmInitialized) {
19425 throw new Error("initializeWasm() must be awaited first!");
19427 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
19428 // debug statements here
19430 // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19431 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
19432 if(!isWasmInitialized) {
19433 throw new Error("initializeWasm() must be awaited first!");
19435 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
19436 return nativeResponseValue;
19438 // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
19439 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
19440 if(!isWasmInitialized) {
19441 throw new Error("initializeWasm() must be awaited first!");
19443 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
19444 // debug statements here
19446 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
19447 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
19448 if(!isWasmInitialized) {
19449 throw new Error("initializeWasm() must be awaited first!");
19451 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
19452 return nativeResponseValue;
19454 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
19455 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
19456 if(!isWasmInitialized) {
19457 throw new Error("initializeWasm() must be awaited first!");
19459 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
19460 // debug statements here
19462 // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKNodeId node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKNodeId node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
19463 export function ChannelInfo_new(features_arg: number, node_one_arg: number, one_to_two_arg: number, node_two_arg: number, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
19464 if(!isWasmInitialized) {
19465 throw new Error("initializeWasm() must be awaited first!");
19467 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, node_one_arg, one_to_two_arg, node_two_arg, two_to_one_arg, capacity_sats_arg, announcement_message_arg);
19468 return nativeResponseValue;
19470 // uint64_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
19471 export function ChannelInfo_clone_ptr(arg: number): number {
19472 if(!isWasmInitialized) {
19473 throw new Error("initializeWasm() must be awaited first!");
19475 const nativeResponseValue = wasm.ChannelInfo_clone_ptr(arg);
19476 return nativeResponseValue;
19478 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
19479 export function ChannelInfo_clone(orig: number): number {
19480 if(!isWasmInitialized) {
19481 throw new Error("initializeWasm() must be awaited first!");
19483 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
19484 return nativeResponseValue;
19486 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
19487 export function ChannelInfo_write(obj: number): Uint8Array {
19488 if(!isWasmInitialized) {
19489 throw new Error("initializeWasm() must be awaited first!");
19491 const nativeResponseValue = wasm.ChannelInfo_write(obj);
19492 return decodeArray(nativeResponseValue);
19494 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
19495 export function ChannelInfo_read(ser: Uint8Array): number {
19496 if(!isWasmInitialized) {
19497 throw new Error("initializeWasm() must be awaited first!");
19499 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
19500 return nativeResponseValue;
19502 // void RoutingFees_free(struct LDKRoutingFees this_obj);
19503 export function RoutingFees_free(this_obj: number): void {
19504 if(!isWasmInitialized) {
19505 throw new Error("initializeWasm() must be awaited first!");
19507 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
19508 // debug statements here
19510 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
19511 export function RoutingFees_get_base_msat(this_ptr: number): number {
19512 if(!isWasmInitialized) {
19513 throw new Error("initializeWasm() must be awaited first!");
19515 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
19516 return nativeResponseValue;
19518 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
19519 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
19520 if(!isWasmInitialized) {
19521 throw new Error("initializeWasm() must be awaited first!");
19523 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
19524 // debug statements here
19526 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
19527 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
19528 if(!isWasmInitialized) {
19529 throw new Error("initializeWasm() must be awaited first!");
19531 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
19532 return nativeResponseValue;
19534 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
19535 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
19536 if(!isWasmInitialized) {
19537 throw new Error("initializeWasm() must be awaited first!");
19539 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
19540 // debug statements here
19542 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
19543 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
19544 if(!isWasmInitialized) {
19545 throw new Error("initializeWasm() must be awaited first!");
19547 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
19548 return nativeResponseValue;
19550 // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
19551 export function RoutingFees_eq(a: number, b: number): boolean {
19552 if(!isWasmInitialized) {
19553 throw new Error("initializeWasm() must be awaited first!");
19555 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
19556 return nativeResponseValue;
19558 // uint64_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
19559 export function RoutingFees_clone_ptr(arg: number): number {
19560 if(!isWasmInitialized) {
19561 throw new Error("initializeWasm() must be awaited first!");
19563 const nativeResponseValue = wasm.RoutingFees_clone_ptr(arg);
19564 return nativeResponseValue;
19566 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
19567 export function RoutingFees_clone(orig: number): number {
19568 if(!isWasmInitialized) {
19569 throw new Error("initializeWasm() must be awaited first!");
19571 const nativeResponseValue = wasm.RoutingFees_clone(orig);
19572 return nativeResponseValue;
19574 // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
19575 export function RoutingFees_hash(o: number): number {
19576 if(!isWasmInitialized) {
19577 throw new Error("initializeWasm() must be awaited first!");
19579 const nativeResponseValue = wasm.RoutingFees_hash(o);
19580 return nativeResponseValue;
19582 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
19583 export function RoutingFees_write(obj: number): Uint8Array {
19584 if(!isWasmInitialized) {
19585 throw new Error("initializeWasm() must be awaited first!");
19587 const nativeResponseValue = wasm.RoutingFees_write(obj);
19588 return decodeArray(nativeResponseValue);
19590 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
19591 export function RoutingFees_read(ser: Uint8Array): number {
19592 if(!isWasmInitialized) {
19593 throw new Error("initializeWasm() must be awaited first!");
19595 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
19596 return nativeResponseValue;
19598 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
19599 export function NodeAnnouncementInfo_free(this_obj: number): void {
19600 if(!isWasmInitialized) {
19601 throw new Error("initializeWasm() must be awaited first!");
19603 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
19604 // debug statements here
19606 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
19607 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
19608 if(!isWasmInitialized) {
19609 throw new Error("initializeWasm() must be awaited first!");
19611 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
19612 return nativeResponseValue;
19614 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
19615 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
19616 if(!isWasmInitialized) {
19617 throw new Error("initializeWasm() must be awaited first!");
19619 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
19620 // debug statements here
19622 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
19623 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
19624 if(!isWasmInitialized) {
19625 throw new Error("initializeWasm() must be awaited first!");
19627 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
19628 return nativeResponseValue;
19630 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
19631 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
19632 if(!isWasmInitialized) {
19633 throw new Error("initializeWasm() must be awaited first!");
19635 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
19636 // debug statements here
19638 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
19639 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
19640 if(!isWasmInitialized) {
19641 throw new Error("initializeWasm() must be awaited first!");
19643 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
19644 return decodeArray(nativeResponseValue);
19646 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
19647 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
19648 if(!isWasmInitialized) {
19649 throw new Error("initializeWasm() must be awaited first!");
19651 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
19652 // debug statements here
19654 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
19655 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
19656 if(!isWasmInitialized) {
19657 throw new Error("initializeWasm() must be awaited first!");
19659 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
19660 return decodeArray(nativeResponseValue);
19662 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
19663 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
19664 if(!isWasmInitialized) {
19665 throw new Error("initializeWasm() must be awaited first!");
19667 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
19668 // debug statements here
19670 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
19671 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
19672 if(!isWasmInitialized) {
19673 throw new Error("initializeWasm() must be awaited first!");
19675 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
19676 // debug statements here
19678 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
19679 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
19680 if(!isWasmInitialized) {
19681 throw new Error("initializeWasm() must be awaited first!");
19683 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
19684 return nativeResponseValue;
19686 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
19687 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
19688 if(!isWasmInitialized) {
19689 throw new Error("initializeWasm() must be awaited first!");
19691 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
19692 // debug statements here
19694 // 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);
19695 export function NodeAnnouncementInfo_new(features_arg: number, last_update_arg: number, rgb_arg: Uint8Array, alias_arg: Uint8Array, addresses_arg: number[], announcement_message_arg: number): number {
19696 if(!isWasmInitialized) {
19697 throw new Error("initializeWasm() must be awaited first!");
19699 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
19700 return nativeResponseValue;
19702 // uint64_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
19703 export function NodeAnnouncementInfo_clone_ptr(arg: number): number {
19704 if(!isWasmInitialized) {
19705 throw new Error("initializeWasm() must be awaited first!");
19707 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone_ptr(arg);
19708 return nativeResponseValue;
19710 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
19711 export function NodeAnnouncementInfo_clone(orig: number): number {
19712 if(!isWasmInitialized) {
19713 throw new Error("initializeWasm() must be awaited first!");
19715 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
19716 return nativeResponseValue;
19718 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
19719 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
19720 if(!isWasmInitialized) {
19721 throw new Error("initializeWasm() must be awaited first!");
19723 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
19724 return decodeArray(nativeResponseValue);
19726 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
19727 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
19728 if(!isWasmInitialized) {
19729 throw new Error("initializeWasm() must be awaited first!");
19731 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
19732 return nativeResponseValue;
19734 // void NodeInfo_free(struct LDKNodeInfo this_obj);
19735 export function NodeInfo_free(this_obj: number): void {
19736 if(!isWasmInitialized) {
19737 throw new Error("initializeWasm() must be awaited first!");
19739 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
19740 // debug statements here
19742 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
19743 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
19744 if(!isWasmInitialized) {
19745 throw new Error("initializeWasm() must be awaited first!");
19747 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
19748 // debug statements here
19750 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
19751 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
19752 if(!isWasmInitialized) {
19753 throw new Error("initializeWasm() must be awaited first!");
19755 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
19756 return nativeResponseValue;
19758 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
19759 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
19760 if(!isWasmInitialized) {
19761 throw new Error("initializeWasm() must be awaited first!");
19763 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
19764 // debug statements here
19766 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
19767 export function NodeInfo_get_announcement_info(this_ptr: number): number {
19768 if(!isWasmInitialized) {
19769 throw new Error("initializeWasm() must be awaited first!");
19771 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
19772 return nativeResponseValue;
19774 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
19775 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
19776 if(!isWasmInitialized) {
19777 throw new Error("initializeWasm() must be awaited first!");
19779 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
19780 // debug statements here
19782 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
19783 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
19784 if(!isWasmInitialized) {
19785 throw new Error("initializeWasm() must be awaited first!");
19787 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
19788 return nativeResponseValue;
19790 // uint64_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
19791 export function NodeInfo_clone_ptr(arg: number): number {
19792 if(!isWasmInitialized) {
19793 throw new Error("initializeWasm() must be awaited first!");
19795 const nativeResponseValue = wasm.NodeInfo_clone_ptr(arg);
19796 return nativeResponseValue;
19798 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
19799 export function NodeInfo_clone(orig: number): number {
19800 if(!isWasmInitialized) {
19801 throw new Error("initializeWasm() must be awaited first!");
19803 const nativeResponseValue = wasm.NodeInfo_clone(orig);
19804 return nativeResponseValue;
19806 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
19807 export function NodeInfo_write(obj: number): Uint8Array {
19808 if(!isWasmInitialized) {
19809 throw new Error("initializeWasm() must be awaited first!");
19811 const nativeResponseValue = wasm.NodeInfo_write(obj);
19812 return decodeArray(nativeResponseValue);
19814 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
19815 export function NodeInfo_read(ser: Uint8Array): number {
19816 if(!isWasmInitialized) {
19817 throw new Error("initializeWasm() must be awaited first!");
19819 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
19820 return nativeResponseValue;
19822 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
19823 export function NetworkGraph_write(obj: number): Uint8Array {
19824 if(!isWasmInitialized) {
19825 throw new Error("initializeWasm() must be awaited first!");
19827 const nativeResponseValue = wasm.NetworkGraph_write(obj);
19828 return decodeArray(nativeResponseValue);
19830 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
19831 export function NetworkGraph_read(ser: Uint8Array): number {
19832 if(!isWasmInitialized) {
19833 throw new Error("initializeWasm() must be awaited first!");
19835 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
19836 return nativeResponseValue;
19838 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
19839 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
19840 if(!isWasmInitialized) {
19841 throw new Error("initializeWasm() must be awaited first!");
19843 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
19844 return nativeResponseValue;
19846 // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
19847 export function NetworkGraph_read_only(this_arg: number): number {
19848 if(!isWasmInitialized) {
19849 throw new Error("initializeWasm() must be awaited first!");
19851 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
19852 return nativeResponseValue;
19854 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
19855 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
19856 if(!isWasmInitialized) {
19857 throw new Error("initializeWasm() must be awaited first!");
19859 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
19860 return nativeResponseValue;
19862 // 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);
19863 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
19864 if(!isWasmInitialized) {
19865 throw new Error("initializeWasm() must be awaited first!");
19867 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
19868 return nativeResponseValue;
19870 // 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);
19871 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
19872 if(!isWasmInitialized) {
19873 throw new Error("initializeWasm() must be awaited first!");
19875 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
19876 return nativeResponseValue;
19878 // 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);
19879 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
19880 if(!isWasmInitialized) {
19881 throw new Error("initializeWasm() must be awaited first!");
19883 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
19884 return nativeResponseValue;
19886 // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
19887 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
19888 if(!isWasmInitialized) {
19889 throw new Error("initializeWasm() must be awaited first!");
19891 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
19892 // debug statements here
19894 // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
19895 export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
19896 if(!isWasmInitialized) {
19897 throw new Error("initializeWasm() must be awaited first!");
19899 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
19900 // debug statements here
19902 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
19903 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
19904 if(!isWasmInitialized) {
19905 throw new Error("initializeWasm() must be awaited first!");
19907 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
19908 return nativeResponseValue;
19910 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
19911 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
19912 if(!isWasmInitialized) {
19913 throw new Error("initializeWasm() must be awaited first!");
19915 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
19916 return nativeResponseValue;
19918 // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
19919 export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
19920 if(!isWasmInitialized) {
19921 throw new Error("initializeWasm() must be awaited first!");
19923 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_get_addresses(this_arg, encodeArray(pubkey));
19924 return nativeResponseValue;
19926 // void RouteHop_free(struct LDKRouteHop this_obj);
19927 export function RouteHop_free(this_obj: number): void {
19928 if(!isWasmInitialized) {
19929 throw new Error("initializeWasm() must be awaited first!");
19931 const nativeResponseValue = wasm.RouteHop_free(this_obj);
19932 // debug statements here
19934 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
19935 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
19936 if(!isWasmInitialized) {
19937 throw new Error("initializeWasm() must be awaited first!");
19939 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
19940 return decodeArray(nativeResponseValue);
19942 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
19943 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
19944 if(!isWasmInitialized) {
19945 throw new Error("initializeWasm() must be awaited first!");
19947 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
19948 // debug statements here
19950 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
19951 export function RouteHop_get_node_features(this_ptr: number): number {
19952 if(!isWasmInitialized) {
19953 throw new Error("initializeWasm() must be awaited first!");
19955 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
19956 return nativeResponseValue;
19958 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
19959 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
19960 if(!isWasmInitialized) {
19961 throw new Error("initializeWasm() must be awaited first!");
19963 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
19964 // debug statements here
19966 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
19967 export function RouteHop_get_short_channel_id(this_ptr: number): number {
19968 if(!isWasmInitialized) {
19969 throw new Error("initializeWasm() must be awaited first!");
19971 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
19972 return nativeResponseValue;
19974 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
19975 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
19976 if(!isWasmInitialized) {
19977 throw new Error("initializeWasm() must be awaited first!");
19979 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
19980 // debug statements here
19982 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
19983 export function RouteHop_get_channel_features(this_ptr: number): number {
19984 if(!isWasmInitialized) {
19985 throw new Error("initializeWasm() must be awaited first!");
19987 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
19988 return nativeResponseValue;
19990 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
19991 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
19992 if(!isWasmInitialized) {
19993 throw new Error("initializeWasm() must be awaited first!");
19995 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
19996 // debug statements here
19998 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
19999 export function RouteHop_get_fee_msat(this_ptr: number): number {
20000 if(!isWasmInitialized) {
20001 throw new Error("initializeWasm() must be awaited first!");
20003 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
20004 return nativeResponseValue;
20006 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
20007 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
20008 if(!isWasmInitialized) {
20009 throw new Error("initializeWasm() must be awaited first!");
20011 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
20012 // debug statements here
20014 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
20015 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
20016 if(!isWasmInitialized) {
20017 throw new Error("initializeWasm() must be awaited first!");
20019 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
20020 return nativeResponseValue;
20022 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
20023 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
20024 if(!isWasmInitialized) {
20025 throw new Error("initializeWasm() must be awaited first!");
20027 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
20028 // debug statements here
20030 // 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);
20031 export function RouteHop_new(pubkey_arg: Uint8Array, node_features_arg: number, short_channel_id_arg: number, channel_features_arg: number, fee_msat_arg: number, cltv_expiry_delta_arg: number): number {
20032 if(!isWasmInitialized) {
20033 throw new Error("initializeWasm() must be awaited first!");
20035 const nativeResponseValue = wasm.RouteHop_new(encodeArray(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
20036 return nativeResponseValue;
20038 // uint64_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
20039 export function RouteHop_clone_ptr(arg: number): number {
20040 if(!isWasmInitialized) {
20041 throw new Error("initializeWasm() must be awaited first!");
20043 const nativeResponseValue = wasm.RouteHop_clone_ptr(arg);
20044 return nativeResponseValue;
20046 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
20047 export function RouteHop_clone(orig: number): number {
20048 if(!isWasmInitialized) {
20049 throw new Error("initializeWasm() must be awaited first!");
20051 const nativeResponseValue = wasm.RouteHop_clone(orig);
20052 return nativeResponseValue;
20054 // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
20055 export function RouteHop_hash(o: number): number {
20056 if(!isWasmInitialized) {
20057 throw new Error("initializeWasm() must be awaited first!");
20059 const nativeResponseValue = wasm.RouteHop_hash(o);
20060 return nativeResponseValue;
20062 // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
20063 export function RouteHop_eq(a: number, b: number): boolean {
20064 if(!isWasmInitialized) {
20065 throw new Error("initializeWasm() must be awaited first!");
20067 const nativeResponseValue = wasm.RouteHop_eq(a, b);
20068 return nativeResponseValue;
20070 // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
20071 export function RouteHop_write(obj: number): Uint8Array {
20072 if(!isWasmInitialized) {
20073 throw new Error("initializeWasm() must be awaited first!");
20075 const nativeResponseValue = wasm.RouteHop_write(obj);
20076 return decodeArray(nativeResponseValue);
20078 // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
20079 export function RouteHop_read(ser: Uint8Array): number {
20080 if(!isWasmInitialized) {
20081 throw new Error("initializeWasm() must be awaited first!");
20083 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
20084 return nativeResponseValue;
20086 // void Route_free(struct LDKRoute this_obj);
20087 export function Route_free(this_obj: number): void {
20088 if(!isWasmInitialized) {
20089 throw new Error("initializeWasm() must be awaited first!");
20091 const nativeResponseValue = wasm.Route_free(this_obj);
20092 // debug statements here
20094 // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
20095 export function Route_get_paths(this_ptr: number): number[][] {
20096 if(!isWasmInitialized) {
20097 throw new Error("initializeWasm() must be awaited first!");
20099 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
20100 return nativeResponseValue;
20102 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
20103 export function Route_set_paths(this_ptr: number, val: number[][]): void {
20104 if(!isWasmInitialized) {
20105 throw new Error("initializeWasm() must be awaited first!");
20107 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
20108 // debug statements here
20110 // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
20111 export function Route_get_payee(this_ptr: number): number {
20112 if(!isWasmInitialized) {
20113 throw new Error("initializeWasm() must be awaited first!");
20115 const nativeResponseValue = wasm.Route_get_payee(this_ptr);
20116 return nativeResponseValue;
20118 // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
20119 export function Route_set_payee(this_ptr: number, val: number): void {
20120 if(!isWasmInitialized) {
20121 throw new Error("initializeWasm() must be awaited first!");
20123 const nativeResponseValue = wasm.Route_set_payee(this_ptr, val);
20124 // debug statements here
20126 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
20127 export function Route_new(paths_arg: number[][], payee_arg: number): number {
20128 if(!isWasmInitialized) {
20129 throw new Error("initializeWasm() must be awaited first!");
20131 const nativeResponseValue = wasm.Route_new(paths_arg, payee_arg);
20132 return nativeResponseValue;
20134 // uint64_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
20135 export function Route_clone_ptr(arg: number): number {
20136 if(!isWasmInitialized) {
20137 throw new Error("initializeWasm() must be awaited first!");
20139 const nativeResponseValue = wasm.Route_clone_ptr(arg);
20140 return nativeResponseValue;
20142 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
20143 export function Route_clone(orig: number): number {
20144 if(!isWasmInitialized) {
20145 throw new Error("initializeWasm() must be awaited first!");
20147 const nativeResponseValue = wasm.Route_clone(orig);
20148 return nativeResponseValue;
20150 // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
20151 export function Route_hash(o: number): number {
20152 if(!isWasmInitialized) {
20153 throw new Error("initializeWasm() must be awaited first!");
20155 const nativeResponseValue = wasm.Route_hash(o);
20156 return nativeResponseValue;
20158 // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
20159 export function Route_eq(a: number, b: number): boolean {
20160 if(!isWasmInitialized) {
20161 throw new Error("initializeWasm() must be awaited first!");
20163 const nativeResponseValue = wasm.Route_eq(a, b);
20164 return nativeResponseValue;
20166 // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
20167 export function Route_get_total_fees(this_arg: number): number {
20168 if(!isWasmInitialized) {
20169 throw new Error("initializeWasm() must be awaited first!");
20171 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
20172 return nativeResponseValue;
20174 // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
20175 export function Route_get_total_amount(this_arg: number): number {
20176 if(!isWasmInitialized) {
20177 throw new Error("initializeWasm() must be awaited first!");
20179 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
20180 return nativeResponseValue;
20182 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
20183 export function Route_write(obj: number): Uint8Array {
20184 if(!isWasmInitialized) {
20185 throw new Error("initializeWasm() must be awaited first!");
20187 const nativeResponseValue = wasm.Route_write(obj);
20188 return decodeArray(nativeResponseValue);
20190 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
20191 export function Route_read(ser: Uint8Array): number {
20192 if(!isWasmInitialized) {
20193 throw new Error("initializeWasm() must be awaited first!");
20195 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
20196 return nativeResponseValue;
20198 // void RouteParameters_free(struct LDKRouteParameters this_obj);
20199 export function RouteParameters_free(this_obj: number): void {
20200 if(!isWasmInitialized) {
20201 throw new Error("initializeWasm() must be awaited first!");
20203 const nativeResponseValue = wasm.RouteParameters_free(this_obj);
20204 // debug statements here
20206 // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
20207 export function RouteParameters_get_payee(this_ptr: number): number {
20208 if(!isWasmInitialized) {
20209 throw new Error("initializeWasm() must be awaited first!");
20211 const nativeResponseValue = wasm.RouteParameters_get_payee(this_ptr);
20212 return nativeResponseValue;
20214 // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
20215 export function RouteParameters_set_payee(this_ptr: number, val: number): void {
20216 if(!isWasmInitialized) {
20217 throw new Error("initializeWasm() must be awaited first!");
20219 const nativeResponseValue = wasm.RouteParameters_set_payee(this_ptr, val);
20220 // debug statements here
20222 // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
20223 export function RouteParameters_get_final_value_msat(this_ptr: number): number {
20224 if(!isWasmInitialized) {
20225 throw new Error("initializeWasm() must be awaited first!");
20227 const nativeResponseValue = wasm.RouteParameters_get_final_value_msat(this_ptr);
20228 return nativeResponseValue;
20230 // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
20231 export function RouteParameters_set_final_value_msat(this_ptr: number, val: number): void {
20232 if(!isWasmInitialized) {
20233 throw new Error("initializeWasm() must be awaited first!");
20235 const nativeResponseValue = wasm.RouteParameters_set_final_value_msat(this_ptr, val);
20236 // debug statements here
20238 // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
20239 export function RouteParameters_get_final_cltv_expiry_delta(this_ptr: number): number {
20240 if(!isWasmInitialized) {
20241 throw new Error("initializeWasm() must be awaited first!");
20243 const nativeResponseValue = wasm.RouteParameters_get_final_cltv_expiry_delta(this_ptr);
20244 return nativeResponseValue;
20246 // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
20247 export function RouteParameters_set_final_cltv_expiry_delta(this_ptr: number, val: number): void {
20248 if(!isWasmInitialized) {
20249 throw new Error("initializeWasm() must be awaited first!");
20251 const nativeResponseValue = wasm.RouteParameters_set_final_cltv_expiry_delta(this_ptr, val);
20252 // debug statements here
20254 // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
20255 export function RouteParameters_new(payee_arg: number, final_value_msat_arg: number, final_cltv_expiry_delta_arg: number): number {
20256 if(!isWasmInitialized) {
20257 throw new Error("initializeWasm() must be awaited first!");
20259 const nativeResponseValue = wasm.RouteParameters_new(payee_arg, final_value_msat_arg, final_cltv_expiry_delta_arg);
20260 return nativeResponseValue;
20262 // uint64_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
20263 export function RouteParameters_clone_ptr(arg: number): number {
20264 if(!isWasmInitialized) {
20265 throw new Error("initializeWasm() must be awaited first!");
20267 const nativeResponseValue = wasm.RouteParameters_clone_ptr(arg);
20268 return nativeResponseValue;
20270 // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
20271 export function RouteParameters_clone(orig: number): number {
20272 if(!isWasmInitialized) {
20273 throw new Error("initializeWasm() must be awaited first!");
20275 const nativeResponseValue = wasm.RouteParameters_clone(orig);
20276 return nativeResponseValue;
20278 // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
20279 export function RouteParameters_write(obj: number): Uint8Array {
20280 if(!isWasmInitialized) {
20281 throw new Error("initializeWasm() must be awaited first!");
20283 const nativeResponseValue = wasm.RouteParameters_write(obj);
20284 return decodeArray(nativeResponseValue);
20286 // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
20287 export function RouteParameters_read(ser: Uint8Array): number {
20288 if(!isWasmInitialized) {
20289 throw new Error("initializeWasm() must be awaited first!");
20291 const nativeResponseValue = wasm.RouteParameters_read(encodeArray(ser));
20292 return nativeResponseValue;
20294 // void Payee_free(struct LDKPayee this_obj);
20295 export function Payee_free(this_obj: number): void {
20296 if(!isWasmInitialized) {
20297 throw new Error("initializeWasm() must be awaited first!");
20299 const nativeResponseValue = wasm.Payee_free(this_obj);
20300 // debug statements here
20302 // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
20303 export function Payee_get_pubkey(this_ptr: number): Uint8Array {
20304 if(!isWasmInitialized) {
20305 throw new Error("initializeWasm() must be awaited first!");
20307 const nativeResponseValue = wasm.Payee_get_pubkey(this_ptr);
20308 return decodeArray(nativeResponseValue);
20310 // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
20311 export function Payee_set_pubkey(this_ptr: number, val: Uint8Array): void {
20312 if(!isWasmInitialized) {
20313 throw new Error("initializeWasm() must be awaited first!");
20315 const nativeResponseValue = wasm.Payee_set_pubkey(this_ptr, encodeArray(val));
20316 // debug statements here
20318 // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
20319 export function Payee_get_features(this_ptr: number): number {
20320 if(!isWasmInitialized) {
20321 throw new Error("initializeWasm() must be awaited first!");
20323 const nativeResponseValue = wasm.Payee_get_features(this_ptr);
20324 return nativeResponseValue;
20326 // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
20327 export function Payee_set_features(this_ptr: number, val: number): void {
20328 if(!isWasmInitialized) {
20329 throw new Error("initializeWasm() must be awaited first!");
20331 const nativeResponseValue = wasm.Payee_set_features(this_ptr, val);
20332 // debug statements here
20334 // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
20335 export function Payee_get_route_hints(this_ptr: number): number[] {
20336 if(!isWasmInitialized) {
20337 throw new Error("initializeWasm() must be awaited first!");
20339 const nativeResponseValue = wasm.Payee_get_route_hints(this_ptr);
20340 return nativeResponseValue;
20342 // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
20343 export function Payee_set_route_hints(this_ptr: number, val: number[]): void {
20344 if(!isWasmInitialized) {
20345 throw new Error("initializeWasm() must be awaited first!");
20347 const nativeResponseValue = wasm.Payee_set_route_hints(this_ptr, val);
20348 // debug statements here
20350 // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
20351 export function Payee_get_expiry_time(this_ptr: number): number {
20352 if(!isWasmInitialized) {
20353 throw new Error("initializeWasm() must be awaited first!");
20355 const nativeResponseValue = wasm.Payee_get_expiry_time(this_ptr);
20356 return nativeResponseValue;
20358 // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20359 export function Payee_set_expiry_time(this_ptr: number, val: number): void {
20360 if(!isWasmInitialized) {
20361 throw new Error("initializeWasm() must be awaited first!");
20363 const nativeResponseValue = wasm.Payee_set_expiry_time(this_ptr, val);
20364 // debug statements here
20366 // 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);
20367 export function Payee_new(pubkey_arg: Uint8Array, features_arg: number, route_hints_arg: number[], expiry_time_arg: number): number {
20368 if(!isWasmInitialized) {
20369 throw new Error("initializeWasm() must be awaited first!");
20371 const nativeResponseValue = wasm.Payee_new(encodeArray(pubkey_arg), features_arg, route_hints_arg, expiry_time_arg);
20372 return nativeResponseValue;
20374 // uint64_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
20375 export function Payee_clone_ptr(arg: number): number {
20376 if(!isWasmInitialized) {
20377 throw new Error("initializeWasm() must be awaited first!");
20379 const nativeResponseValue = wasm.Payee_clone_ptr(arg);
20380 return nativeResponseValue;
20382 // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
20383 export function Payee_clone(orig: number): number {
20384 if(!isWasmInitialized) {
20385 throw new Error("initializeWasm() must be awaited first!");
20387 const nativeResponseValue = wasm.Payee_clone(orig);
20388 return nativeResponseValue;
20390 // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
20391 export function Payee_hash(o: number): number {
20392 if(!isWasmInitialized) {
20393 throw new Error("initializeWasm() must be awaited first!");
20395 const nativeResponseValue = wasm.Payee_hash(o);
20396 return nativeResponseValue;
20398 // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
20399 export function Payee_eq(a: number, b: number): boolean {
20400 if(!isWasmInitialized) {
20401 throw new Error("initializeWasm() must be awaited first!");
20403 const nativeResponseValue = wasm.Payee_eq(a, b);
20404 return nativeResponseValue;
20406 // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
20407 export function Payee_write(obj: number): Uint8Array {
20408 if(!isWasmInitialized) {
20409 throw new Error("initializeWasm() must be awaited first!");
20411 const nativeResponseValue = wasm.Payee_write(obj);
20412 return decodeArray(nativeResponseValue);
20414 // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
20415 export function Payee_read(ser: Uint8Array): number {
20416 if(!isWasmInitialized) {
20417 throw new Error("initializeWasm() must be awaited first!");
20419 const nativeResponseValue = wasm.Payee_read(encodeArray(ser));
20420 return nativeResponseValue;
20422 // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
20423 export function Payee_from_node_id(pubkey: Uint8Array): number {
20424 if(!isWasmInitialized) {
20425 throw new Error("initializeWasm() must be awaited first!");
20427 const nativeResponseValue = wasm.Payee_from_node_id(encodeArray(pubkey));
20428 return nativeResponseValue;
20430 // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
20431 export function Payee_for_keysend(pubkey: Uint8Array): number {
20432 if(!isWasmInitialized) {
20433 throw new Error("initializeWasm() must be awaited first!");
20435 const nativeResponseValue = wasm.Payee_for_keysend(encodeArray(pubkey));
20436 return nativeResponseValue;
20438 // void RouteHint_free(struct LDKRouteHint this_obj);
20439 export function RouteHint_free(this_obj: number): void {
20440 if(!isWasmInitialized) {
20441 throw new Error("initializeWasm() must be awaited first!");
20443 const nativeResponseValue = wasm.RouteHint_free(this_obj);
20444 // debug statements here
20446 // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
20447 export function RouteHint_get_a(this_ptr: number): number[] {
20448 if(!isWasmInitialized) {
20449 throw new Error("initializeWasm() must be awaited first!");
20451 const nativeResponseValue = wasm.RouteHint_get_a(this_ptr);
20452 return nativeResponseValue;
20454 // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
20455 export function RouteHint_set_a(this_ptr: number, val: number[]): void {
20456 if(!isWasmInitialized) {
20457 throw new Error("initializeWasm() must be awaited first!");
20459 const nativeResponseValue = wasm.RouteHint_set_a(this_ptr, val);
20460 // debug statements here
20462 // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
20463 export function RouteHint_new(a_arg: number[]): number {
20464 if(!isWasmInitialized) {
20465 throw new Error("initializeWasm() must be awaited first!");
20467 const nativeResponseValue = wasm.RouteHint_new(a_arg);
20468 return nativeResponseValue;
20470 // uint64_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
20471 export function RouteHint_clone_ptr(arg: number): number {
20472 if(!isWasmInitialized) {
20473 throw new Error("initializeWasm() must be awaited first!");
20475 const nativeResponseValue = wasm.RouteHint_clone_ptr(arg);
20476 return nativeResponseValue;
20478 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
20479 export function RouteHint_clone(orig: number): number {
20480 if(!isWasmInitialized) {
20481 throw new Error("initializeWasm() must be awaited first!");
20483 const nativeResponseValue = wasm.RouteHint_clone(orig);
20484 return nativeResponseValue;
20486 // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
20487 export function RouteHint_hash(o: number): number {
20488 if(!isWasmInitialized) {
20489 throw new Error("initializeWasm() must be awaited first!");
20491 const nativeResponseValue = wasm.RouteHint_hash(o);
20492 return nativeResponseValue;
20494 // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
20495 export function RouteHint_eq(a: number, b: number): boolean {
20496 if(!isWasmInitialized) {
20497 throw new Error("initializeWasm() must be awaited first!");
20499 const nativeResponseValue = wasm.RouteHint_eq(a, b);
20500 return nativeResponseValue;
20502 // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
20503 export function RouteHint_write(obj: number): Uint8Array {
20504 if(!isWasmInitialized) {
20505 throw new Error("initializeWasm() must be awaited first!");
20507 const nativeResponseValue = wasm.RouteHint_write(obj);
20508 return decodeArray(nativeResponseValue);
20510 // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
20511 export function RouteHint_read(ser: Uint8Array): number {
20512 if(!isWasmInitialized) {
20513 throw new Error("initializeWasm() must be awaited first!");
20515 const nativeResponseValue = wasm.RouteHint_read(encodeArray(ser));
20516 return nativeResponseValue;
20518 // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
20519 export function RouteHintHop_free(this_obj: number): void {
20520 if(!isWasmInitialized) {
20521 throw new Error("initializeWasm() must be awaited first!");
20523 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
20524 // debug statements here
20526 // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20527 export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
20528 if(!isWasmInitialized) {
20529 throw new Error("initializeWasm() must be awaited first!");
20531 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
20532 return decodeArray(nativeResponseValue);
20534 // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
20535 export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
20536 if(!isWasmInitialized) {
20537 throw new Error("initializeWasm() must be awaited first!");
20539 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
20540 // debug statements here
20542 // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20543 export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
20544 if(!isWasmInitialized) {
20545 throw new Error("initializeWasm() must be awaited first!");
20547 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
20548 return nativeResponseValue;
20550 // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
20551 export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
20552 if(!isWasmInitialized) {
20553 throw new Error("initializeWasm() must be awaited first!");
20555 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
20556 // debug statements here
20558 // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20559 export function RouteHintHop_get_fees(this_ptr: number): number {
20560 if(!isWasmInitialized) {
20561 throw new Error("initializeWasm() must be awaited first!");
20563 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
20564 return nativeResponseValue;
20566 // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
20567 export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
20568 if(!isWasmInitialized) {
20569 throw new Error("initializeWasm() must be awaited first!");
20571 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
20572 // debug statements here
20574 // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20575 export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
20576 if(!isWasmInitialized) {
20577 throw new Error("initializeWasm() must be awaited first!");
20579 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
20580 return nativeResponseValue;
20582 // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
20583 export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
20584 if(!isWasmInitialized) {
20585 throw new Error("initializeWasm() must be awaited first!");
20587 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
20588 // debug statements here
20590 // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20591 export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
20592 if(!isWasmInitialized) {
20593 throw new Error("initializeWasm() must be awaited first!");
20595 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
20596 return nativeResponseValue;
20598 // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20599 export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
20600 if(!isWasmInitialized) {
20601 throw new Error("initializeWasm() must be awaited first!");
20603 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
20604 // debug statements here
20606 // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
20607 export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
20608 if(!isWasmInitialized) {
20609 throw new Error("initializeWasm() must be awaited first!");
20611 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
20612 return nativeResponseValue;
20614 // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
20615 export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
20616 if(!isWasmInitialized) {
20617 throw new Error("initializeWasm() must be awaited first!");
20619 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
20620 // debug statements here
20622 // 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);
20623 export function RouteHintHop_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
20624 if(!isWasmInitialized) {
20625 throw new Error("initializeWasm() must be awaited first!");
20627 const nativeResponseValue = wasm.RouteHintHop_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
20628 return nativeResponseValue;
20630 // uint64_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
20631 export function RouteHintHop_clone_ptr(arg: number): number {
20632 if(!isWasmInitialized) {
20633 throw new Error("initializeWasm() must be awaited first!");
20635 const nativeResponseValue = wasm.RouteHintHop_clone_ptr(arg);
20636 return nativeResponseValue;
20638 // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
20639 export function RouteHintHop_clone(orig: number): number {
20640 if(!isWasmInitialized) {
20641 throw new Error("initializeWasm() must be awaited first!");
20643 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
20644 return nativeResponseValue;
20646 // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
20647 export function RouteHintHop_hash(o: number): number {
20648 if(!isWasmInitialized) {
20649 throw new Error("initializeWasm() must be awaited first!");
20651 const nativeResponseValue = wasm.RouteHintHop_hash(o);
20652 return nativeResponseValue;
20654 // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
20655 export function RouteHintHop_eq(a: number, b: number): boolean {
20656 if(!isWasmInitialized) {
20657 throw new Error("initializeWasm() must be awaited first!");
20659 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
20660 return nativeResponseValue;
20662 // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
20663 export function RouteHintHop_write(obj: number): Uint8Array {
20664 if(!isWasmInitialized) {
20665 throw new Error("initializeWasm() must be awaited first!");
20667 const nativeResponseValue = wasm.RouteHintHop_write(obj);
20668 return decodeArray(nativeResponseValue);
20670 // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
20671 export function RouteHintHop_read(ser: Uint8Array): number {
20672 if(!isWasmInitialized) {
20673 throw new Error("initializeWasm() must be awaited first!");
20675 const nativeResponseValue = wasm.RouteHintHop_read(encodeArray(ser));
20676 return nativeResponseValue;
20678 // 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);
20679 export function find_route(our_node_pubkey: Uint8Array, params: number, network: number, first_hops: number[], logger: number, scorer: number): number {
20680 if(!isWasmInitialized) {
20681 throw new Error("initializeWasm() must be awaited first!");
20683 const nativeResponseValue = wasm.find_route(encodeArray(our_node_pubkey), params, network, first_hops, logger, scorer);
20684 return nativeResponseValue;
20686 // void Scorer_free(struct LDKScorer this_obj);
20687 export function Scorer_free(this_obj: number): void {
20688 if(!isWasmInitialized) {
20689 throw new Error("initializeWasm() must be awaited first!");
20691 const nativeResponseValue = wasm.Scorer_free(this_obj);
20692 // debug statements here
20694 // void ScoringParameters_free(struct LDKScoringParameters this_obj);
20695 export function ScoringParameters_free(this_obj: number): void {
20696 if(!isWasmInitialized) {
20697 throw new Error("initializeWasm() must be awaited first!");
20699 const nativeResponseValue = wasm.ScoringParameters_free(this_obj);
20700 // debug statements here
20702 // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
20703 export function ScoringParameters_get_base_penalty_msat(this_ptr: number): number {
20704 if(!isWasmInitialized) {
20705 throw new Error("initializeWasm() must be awaited first!");
20707 const nativeResponseValue = wasm.ScoringParameters_get_base_penalty_msat(this_ptr);
20708 return nativeResponseValue;
20710 // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
20711 export function ScoringParameters_set_base_penalty_msat(this_ptr: number, val: number): void {
20712 if(!isWasmInitialized) {
20713 throw new Error("initializeWasm() must be awaited first!");
20715 const nativeResponseValue = wasm.ScoringParameters_set_base_penalty_msat(this_ptr, val);
20716 // debug statements here
20718 // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
20719 export function ScoringParameters_get_failure_penalty_msat(this_ptr: number): number {
20720 if(!isWasmInitialized) {
20721 throw new Error("initializeWasm() must be awaited first!");
20723 const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_msat(this_ptr);
20724 return nativeResponseValue;
20726 // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
20727 export function ScoringParameters_set_failure_penalty_msat(this_ptr: number, val: number): void {
20728 if(!isWasmInitialized) {
20729 throw new Error("initializeWasm() must be awaited first!");
20731 const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_msat(this_ptr, val);
20732 // debug statements here
20734 // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
20735 export function ScoringParameters_get_failure_penalty_half_life(this_ptr: number): number {
20736 if(!isWasmInitialized) {
20737 throw new Error("initializeWasm() must be awaited first!");
20739 const nativeResponseValue = wasm.ScoringParameters_get_failure_penalty_half_life(this_ptr);
20740 return nativeResponseValue;
20742 // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
20743 export function ScoringParameters_set_failure_penalty_half_life(this_ptr: number, val: number): void {
20744 if(!isWasmInitialized) {
20745 throw new Error("initializeWasm() must be awaited first!");
20747 const nativeResponseValue = wasm.ScoringParameters_set_failure_penalty_half_life(this_ptr, val);
20748 // debug statements here
20750 // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint64_t failure_penalty_half_life_arg);
20751 export function ScoringParameters_new(base_penalty_msat_arg: number, failure_penalty_msat_arg: number, failure_penalty_half_life_arg: number): number {
20752 if(!isWasmInitialized) {
20753 throw new Error("initializeWasm() must be awaited first!");
20755 const nativeResponseValue = wasm.ScoringParameters_new(base_penalty_msat_arg, failure_penalty_msat_arg, failure_penalty_half_life_arg);
20756 return nativeResponseValue;
20758 // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
20759 export function ScoringParameters_write(obj: number): Uint8Array {
20760 if(!isWasmInitialized) {
20761 throw new Error("initializeWasm() must be awaited first!");
20763 const nativeResponseValue = wasm.ScoringParameters_write(obj);
20764 return decodeArray(nativeResponseValue);
20766 // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
20767 export function ScoringParameters_read(ser: Uint8Array): number {
20768 if(!isWasmInitialized) {
20769 throw new Error("initializeWasm() must be awaited first!");
20771 const nativeResponseValue = wasm.ScoringParameters_read(encodeArray(ser));
20772 return nativeResponseValue;
20774 // MUST_USE_RES struct LDKScorer Scorer_new(struct LDKScoringParameters params);
20775 export function Scorer_new(params: number): number {
20776 if(!isWasmInitialized) {
20777 throw new Error("initializeWasm() must be awaited first!");
20779 const nativeResponseValue = wasm.Scorer_new(params);
20780 return nativeResponseValue;
20782 // MUST_USE_RES struct LDKScorer Scorer_default(void);
20783 export function Scorer_default(): number {
20784 if(!isWasmInitialized) {
20785 throw new Error("initializeWasm() must be awaited first!");
20787 const nativeResponseValue = wasm.Scorer_default();
20788 return nativeResponseValue;
20790 // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
20791 export function ScoringParameters_default(): number {
20792 if(!isWasmInitialized) {
20793 throw new Error("initializeWasm() must be awaited first!");
20795 const nativeResponseValue = wasm.ScoringParameters_default();
20796 return nativeResponseValue;
20798 // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
20799 export function Scorer_as_Score(this_arg: number): number {
20800 if(!isWasmInitialized) {
20801 throw new Error("initializeWasm() must be awaited first!");
20803 const nativeResponseValue = wasm.Scorer_as_Score(this_arg);
20804 return nativeResponseValue;
20806 // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
20807 export function Scorer_write(obj: number): Uint8Array {
20808 if(!isWasmInitialized) {
20809 throw new Error("initializeWasm() must be awaited first!");
20811 const nativeResponseValue = wasm.Scorer_write(obj);
20812 return decodeArray(nativeResponseValue);
20814 // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
20815 export function Scorer_read(ser: Uint8Array): number {
20816 if(!isWasmInitialized) {
20817 throw new Error("initializeWasm() must be awaited first!");
20819 const nativeResponseValue = wasm.Scorer_read(encodeArray(ser));
20820 return nativeResponseValue;
20822 // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
20823 export function FilesystemPersister_free(this_obj: number): void {
20824 if(!isWasmInitialized) {
20825 throw new Error("initializeWasm() must be awaited first!");
20827 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
20828 // debug statements here
20830 // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
20831 export function FilesystemPersister_new(path_to_channel_data: String): number {
20832 if(!isWasmInitialized) {
20833 throw new Error("initializeWasm() must be awaited first!");
20835 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
20836 return nativeResponseValue;
20838 // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
20839 export function FilesystemPersister_get_data_dir(this_arg: number): String {
20840 if(!isWasmInitialized) {
20841 throw new Error("initializeWasm() must be awaited first!");
20843 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
20844 return nativeResponseValue;
20846 // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
20847 export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
20848 if(!isWasmInitialized) {
20849 throw new Error("initializeWasm() must be awaited first!");
20851 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
20852 return nativeResponseValue;
20854 // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
20855 export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
20856 if(!isWasmInitialized) {
20857 throw new Error("initializeWasm() must be awaited first!");
20859 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
20860 return nativeResponseValue;
20862 // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
20863 export function FilesystemPersister_as_Persist(this_arg: number): number {
20864 if(!isWasmInitialized) {
20865 throw new Error("initializeWasm() must be awaited first!");
20867 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
20868 return nativeResponseValue;
20870 // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
20871 export function BackgroundProcessor_free(this_obj: number): void {
20872 if(!isWasmInitialized) {
20873 throw new Error("initializeWasm() must be awaited first!");
20875 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
20876 // debug statements here
20878 // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
20879 export function ChannelManagerPersister_free(this_ptr: number): void {
20880 if(!isWasmInitialized) {
20881 throw new Error("initializeWasm() must be awaited first!");
20883 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
20884 // debug statements here
20886 // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKNetGraphMsgHandler net_graph_msg_handler, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
20887 export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, net_graph_msg_handler: number, peer_manager: number, logger: number): number {
20888 if(!isWasmInitialized) {
20889 throw new Error("initializeWasm() must be awaited first!");
20891 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
20892 return nativeResponseValue;
20894 // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
20895 export function BackgroundProcessor_join(this_arg: number): number {
20896 if(!isWasmInitialized) {
20897 throw new Error("initializeWasm() must be awaited first!");
20899 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
20900 return nativeResponseValue;
20902 // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
20903 export function BackgroundProcessor_stop(this_arg: number): number {
20904 if(!isWasmInitialized) {
20905 throw new Error("initializeWasm() must be awaited first!");
20907 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
20908 return nativeResponseValue;
20910 // void check_platform(void);
20911 export function check_platform(): void {
20912 if(!isWasmInitialized) {
20913 throw new Error("initializeWasm() must be awaited first!");
20915 const nativeResponseValue = wasm.check_platform();
20916 // debug statements here
20918 // void Invoice_free(struct LDKInvoice this_obj);
20919 export function Invoice_free(this_obj: number): void {
20920 if(!isWasmInitialized) {
20921 throw new Error("initializeWasm() must be awaited first!");
20923 const nativeResponseValue = wasm.Invoice_free(this_obj);
20924 // debug statements here
20926 // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
20927 export function Invoice_eq(a: number, b: number): boolean {
20928 if(!isWasmInitialized) {
20929 throw new Error("initializeWasm() must be awaited first!");
20931 const nativeResponseValue = wasm.Invoice_eq(a, b);
20932 return nativeResponseValue;
20934 // uint64_t Invoice_clone_ptr(LDKInvoice *NONNULL_PTR arg);
20935 export function Invoice_clone_ptr(arg: number): number {
20936 if(!isWasmInitialized) {
20937 throw new Error("initializeWasm() must be awaited first!");
20939 const nativeResponseValue = wasm.Invoice_clone_ptr(arg);
20940 return nativeResponseValue;
20942 // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
20943 export function Invoice_clone(orig: number): number {
20944 if(!isWasmInitialized) {
20945 throw new Error("initializeWasm() must be awaited first!");
20947 const nativeResponseValue = wasm.Invoice_clone(orig);
20948 return nativeResponseValue;
20950 // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
20951 export function SignedRawInvoice_free(this_obj: number): void {
20952 if(!isWasmInitialized) {
20953 throw new Error("initializeWasm() must be awaited first!");
20955 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
20956 // debug statements here
20958 // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
20959 export function SignedRawInvoice_eq(a: number, b: number): boolean {
20960 if(!isWasmInitialized) {
20961 throw new Error("initializeWasm() must be awaited first!");
20963 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
20964 return nativeResponseValue;
20966 // uint64_t SignedRawInvoice_clone_ptr(LDKSignedRawInvoice *NONNULL_PTR arg);
20967 export function SignedRawInvoice_clone_ptr(arg: number): number {
20968 if(!isWasmInitialized) {
20969 throw new Error("initializeWasm() must be awaited first!");
20971 const nativeResponseValue = wasm.SignedRawInvoice_clone_ptr(arg);
20972 return nativeResponseValue;
20974 // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
20975 export function SignedRawInvoice_clone(orig: number): number {
20976 if(!isWasmInitialized) {
20977 throw new Error("initializeWasm() must be awaited first!");
20979 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
20980 return nativeResponseValue;
20982 // void RawInvoice_free(struct LDKRawInvoice this_obj);
20983 export function RawInvoice_free(this_obj: number): void {
20984 if(!isWasmInitialized) {
20985 throw new Error("initializeWasm() must be awaited first!");
20987 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
20988 // debug statements here
20990 // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
20991 export function RawInvoice_get_data(this_ptr: number): number {
20992 if(!isWasmInitialized) {
20993 throw new Error("initializeWasm() must be awaited first!");
20995 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
20996 return nativeResponseValue;
20998 // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
20999 export function RawInvoice_set_data(this_ptr: number, val: number): void {
21000 if(!isWasmInitialized) {
21001 throw new Error("initializeWasm() must be awaited first!");
21003 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
21004 // debug statements here
21006 // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
21007 export function RawInvoice_eq(a: number, b: number): boolean {
21008 if(!isWasmInitialized) {
21009 throw new Error("initializeWasm() must be awaited first!");
21011 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
21012 return nativeResponseValue;
21014 // uint64_t RawInvoice_clone_ptr(LDKRawInvoice *NONNULL_PTR arg);
21015 export function RawInvoice_clone_ptr(arg: number): number {
21016 if(!isWasmInitialized) {
21017 throw new Error("initializeWasm() must be awaited first!");
21019 const nativeResponseValue = wasm.RawInvoice_clone_ptr(arg);
21020 return nativeResponseValue;
21022 // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
21023 export function RawInvoice_clone(orig: number): number {
21024 if(!isWasmInitialized) {
21025 throw new Error("initializeWasm() must be awaited first!");
21027 const nativeResponseValue = wasm.RawInvoice_clone(orig);
21028 return nativeResponseValue;
21030 // void RawDataPart_free(struct LDKRawDataPart this_obj);
21031 export function RawDataPart_free(this_obj: number): void {
21032 if(!isWasmInitialized) {
21033 throw new Error("initializeWasm() must be awaited first!");
21035 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
21036 // debug statements here
21038 // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
21039 export function RawDataPart_get_timestamp(this_ptr: number): number {
21040 if(!isWasmInitialized) {
21041 throw new Error("initializeWasm() must be awaited first!");
21043 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
21044 return nativeResponseValue;
21046 // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
21047 export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
21048 if(!isWasmInitialized) {
21049 throw new Error("initializeWasm() must be awaited first!");
21051 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
21052 // debug statements here
21054 // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
21055 export function RawDataPart_eq(a: number, b: number): boolean {
21056 if(!isWasmInitialized) {
21057 throw new Error("initializeWasm() must be awaited first!");
21059 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
21060 return nativeResponseValue;
21062 // uint64_t RawDataPart_clone_ptr(LDKRawDataPart *NONNULL_PTR arg);
21063 export function RawDataPart_clone_ptr(arg: number): number {
21064 if(!isWasmInitialized) {
21065 throw new Error("initializeWasm() must be awaited first!");
21067 const nativeResponseValue = wasm.RawDataPart_clone_ptr(arg);
21068 return nativeResponseValue;
21070 // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
21071 export function RawDataPart_clone(orig: number): number {
21072 if(!isWasmInitialized) {
21073 throw new Error("initializeWasm() must be awaited first!");
21075 const nativeResponseValue = wasm.RawDataPart_clone(orig);
21076 return nativeResponseValue;
21078 // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
21079 export function PositiveTimestamp_free(this_obj: number): void {
21080 if(!isWasmInitialized) {
21081 throw new Error("initializeWasm() must be awaited first!");
21083 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
21084 // debug statements here
21086 // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
21087 export function PositiveTimestamp_eq(a: number, b: number): boolean {
21088 if(!isWasmInitialized) {
21089 throw new Error("initializeWasm() must be awaited first!");
21091 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
21092 return nativeResponseValue;
21094 // uint64_t PositiveTimestamp_clone_ptr(LDKPositiveTimestamp *NONNULL_PTR arg);
21095 export function PositiveTimestamp_clone_ptr(arg: number): number {
21096 if(!isWasmInitialized) {
21097 throw new Error("initializeWasm() must be awaited first!");
21099 const nativeResponseValue = wasm.PositiveTimestamp_clone_ptr(arg);
21100 return nativeResponseValue;
21102 // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
21103 export function PositiveTimestamp_clone(orig: number): number {
21104 if(!isWasmInitialized) {
21105 throw new Error("initializeWasm() must be awaited first!");
21107 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
21108 return nativeResponseValue;
21110 // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
21111 export function SiPrefix_clone(orig: number): SiPrefix {
21112 if(!isWasmInitialized) {
21113 throw new Error("initializeWasm() must be awaited first!");
21115 const nativeResponseValue = wasm.SiPrefix_clone(orig);
21116 return nativeResponseValue;
21118 // enum LDKSiPrefix SiPrefix_milli(void);
21119 export function SiPrefix_milli(): SiPrefix {
21120 if(!isWasmInitialized) {
21121 throw new Error("initializeWasm() must be awaited first!");
21123 const nativeResponseValue = wasm.SiPrefix_milli();
21124 return nativeResponseValue;
21126 // enum LDKSiPrefix SiPrefix_micro(void);
21127 export function SiPrefix_micro(): SiPrefix {
21128 if(!isWasmInitialized) {
21129 throw new Error("initializeWasm() must be awaited first!");
21131 const nativeResponseValue = wasm.SiPrefix_micro();
21132 return nativeResponseValue;
21134 // enum LDKSiPrefix SiPrefix_nano(void);
21135 export function SiPrefix_nano(): SiPrefix {
21136 if(!isWasmInitialized) {
21137 throw new Error("initializeWasm() must be awaited first!");
21139 const nativeResponseValue = wasm.SiPrefix_nano();
21140 return nativeResponseValue;
21142 // enum LDKSiPrefix SiPrefix_pico(void);
21143 export function SiPrefix_pico(): SiPrefix {
21144 if(!isWasmInitialized) {
21145 throw new Error("initializeWasm() must be awaited first!");
21147 const nativeResponseValue = wasm.SiPrefix_pico();
21148 return nativeResponseValue;
21150 // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
21151 export function SiPrefix_eq(a: number, b: number): boolean {
21152 if(!isWasmInitialized) {
21153 throw new Error("initializeWasm() must be awaited first!");
21155 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
21156 return nativeResponseValue;
21158 // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
21159 export function SiPrefix_multiplier(this_arg: number): number {
21160 if(!isWasmInitialized) {
21161 throw new Error("initializeWasm() must be awaited first!");
21163 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
21164 return nativeResponseValue;
21166 // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
21167 export function Currency_clone(orig: number): Currency {
21168 if(!isWasmInitialized) {
21169 throw new Error("initializeWasm() must be awaited first!");
21171 const nativeResponseValue = wasm.Currency_clone(orig);
21172 return nativeResponseValue;
21174 // enum LDKCurrency Currency_bitcoin(void);
21175 export function Currency_bitcoin(): Currency {
21176 if(!isWasmInitialized) {
21177 throw new Error("initializeWasm() must be awaited first!");
21179 const nativeResponseValue = wasm.Currency_bitcoin();
21180 return nativeResponseValue;
21182 // enum LDKCurrency Currency_bitcoin_testnet(void);
21183 export function Currency_bitcoin_testnet(): Currency {
21184 if(!isWasmInitialized) {
21185 throw new Error("initializeWasm() must be awaited first!");
21187 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
21188 return nativeResponseValue;
21190 // enum LDKCurrency Currency_regtest(void);
21191 export function Currency_regtest(): Currency {
21192 if(!isWasmInitialized) {
21193 throw new Error("initializeWasm() must be awaited first!");
21195 const nativeResponseValue = wasm.Currency_regtest();
21196 return nativeResponseValue;
21198 // enum LDKCurrency Currency_simnet(void);
21199 export function Currency_simnet(): Currency {
21200 if(!isWasmInitialized) {
21201 throw new Error("initializeWasm() must be awaited first!");
21203 const nativeResponseValue = wasm.Currency_simnet();
21204 return nativeResponseValue;
21206 // enum LDKCurrency Currency_signet(void);
21207 export function Currency_signet(): Currency {
21208 if(!isWasmInitialized) {
21209 throw new Error("initializeWasm() must be awaited first!");
21211 const nativeResponseValue = wasm.Currency_signet();
21212 return nativeResponseValue;
21214 // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
21215 export function Currency_hash(o: number): number {
21216 if(!isWasmInitialized) {
21217 throw new Error("initializeWasm() must be awaited first!");
21219 const nativeResponseValue = wasm.Currency_hash(o);
21220 return nativeResponseValue;
21222 // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
21223 export function Currency_eq(a: number, b: number): boolean {
21224 if(!isWasmInitialized) {
21225 throw new Error("initializeWasm() must be awaited first!");
21227 const nativeResponseValue = wasm.Currency_eq(a, b);
21228 return nativeResponseValue;
21230 // void Sha256_free(struct LDKSha256 this_obj);
21231 export function Sha256_free(this_obj: number): void {
21232 if(!isWasmInitialized) {
21233 throw new Error("initializeWasm() must be awaited first!");
21235 const nativeResponseValue = wasm.Sha256_free(this_obj);
21236 // debug statements here
21238 // uint64_t Sha256_clone_ptr(LDKSha256 *NONNULL_PTR arg);
21239 export function Sha256_clone_ptr(arg: number): number {
21240 if(!isWasmInitialized) {
21241 throw new Error("initializeWasm() must be awaited first!");
21243 const nativeResponseValue = wasm.Sha256_clone_ptr(arg);
21244 return nativeResponseValue;
21246 // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
21247 export function Sha256_clone(orig: number): number {
21248 if(!isWasmInitialized) {
21249 throw new Error("initializeWasm() must be awaited first!");
21251 const nativeResponseValue = wasm.Sha256_clone(orig);
21252 return nativeResponseValue;
21254 // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
21255 export function Sha256_hash(o: number): number {
21256 if(!isWasmInitialized) {
21257 throw new Error("initializeWasm() must be awaited first!");
21259 const nativeResponseValue = wasm.Sha256_hash(o);
21260 return nativeResponseValue;
21262 // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
21263 export function Sha256_eq(a: number, b: number): boolean {
21264 if(!isWasmInitialized) {
21265 throw new Error("initializeWasm() must be awaited first!");
21267 const nativeResponseValue = wasm.Sha256_eq(a, b);
21268 return nativeResponseValue;
21270 // void Description_free(struct LDKDescription this_obj);
21271 export function Description_free(this_obj: number): void {
21272 if(!isWasmInitialized) {
21273 throw new Error("initializeWasm() must be awaited first!");
21275 const nativeResponseValue = wasm.Description_free(this_obj);
21276 // debug statements here
21278 // uint64_t Description_clone_ptr(LDKDescription *NONNULL_PTR arg);
21279 export function Description_clone_ptr(arg: number): number {
21280 if(!isWasmInitialized) {
21281 throw new Error("initializeWasm() must be awaited first!");
21283 const nativeResponseValue = wasm.Description_clone_ptr(arg);
21284 return nativeResponseValue;
21286 // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
21287 export function Description_clone(orig: number): number {
21288 if(!isWasmInitialized) {
21289 throw new Error("initializeWasm() must be awaited first!");
21291 const nativeResponseValue = wasm.Description_clone(orig);
21292 return nativeResponseValue;
21294 // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
21295 export function Description_hash(o: number): number {
21296 if(!isWasmInitialized) {
21297 throw new Error("initializeWasm() must be awaited first!");
21299 const nativeResponseValue = wasm.Description_hash(o);
21300 return nativeResponseValue;
21302 // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
21303 export function Description_eq(a: number, b: number): boolean {
21304 if(!isWasmInitialized) {
21305 throw new Error("initializeWasm() must be awaited first!");
21307 const nativeResponseValue = wasm.Description_eq(a, b);
21308 return nativeResponseValue;
21310 // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
21311 export function PayeePubKey_free(this_obj: number): void {
21312 if(!isWasmInitialized) {
21313 throw new Error("initializeWasm() must be awaited first!");
21315 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
21316 // debug statements here
21318 // struct LDKPublicKey PayeePubKey_get_a(const struct LDKPayeePubKey *NONNULL_PTR this_ptr);
21319 export function PayeePubKey_get_a(this_ptr: number): Uint8Array {
21320 if(!isWasmInitialized) {
21321 throw new Error("initializeWasm() must be awaited first!");
21323 const nativeResponseValue = wasm.PayeePubKey_get_a(this_ptr);
21324 return decodeArray(nativeResponseValue);
21326 // void PayeePubKey_set_a(struct LDKPayeePubKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
21327 export function PayeePubKey_set_a(this_ptr: number, val: Uint8Array): void {
21328 if(!isWasmInitialized) {
21329 throw new Error("initializeWasm() must be awaited first!");
21331 const nativeResponseValue = wasm.PayeePubKey_set_a(this_ptr, encodeArray(val));
21332 // debug statements here
21334 // MUST_USE_RES struct LDKPayeePubKey PayeePubKey_new(struct LDKPublicKey a_arg);
21335 export function PayeePubKey_new(a_arg: Uint8Array): number {
21336 if(!isWasmInitialized) {
21337 throw new Error("initializeWasm() must be awaited first!");
21339 const nativeResponseValue = wasm.PayeePubKey_new(encodeArray(a_arg));
21340 return nativeResponseValue;
21342 // uint64_t PayeePubKey_clone_ptr(LDKPayeePubKey *NONNULL_PTR arg);
21343 export function PayeePubKey_clone_ptr(arg: number): number {
21344 if(!isWasmInitialized) {
21345 throw new Error("initializeWasm() must be awaited first!");
21347 const nativeResponseValue = wasm.PayeePubKey_clone_ptr(arg);
21348 return nativeResponseValue;
21350 // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
21351 export function PayeePubKey_clone(orig: number): number {
21352 if(!isWasmInitialized) {
21353 throw new Error("initializeWasm() must be awaited first!");
21355 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
21356 return nativeResponseValue;
21358 // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
21359 export function PayeePubKey_hash(o: number): number {
21360 if(!isWasmInitialized) {
21361 throw new Error("initializeWasm() must be awaited first!");
21363 const nativeResponseValue = wasm.PayeePubKey_hash(o);
21364 return nativeResponseValue;
21366 // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
21367 export function PayeePubKey_eq(a: number, b: number): boolean {
21368 if(!isWasmInitialized) {
21369 throw new Error("initializeWasm() must be awaited first!");
21371 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
21372 return nativeResponseValue;
21374 // void ExpiryTime_free(struct LDKExpiryTime this_obj);
21375 export function ExpiryTime_free(this_obj: number): void {
21376 if(!isWasmInitialized) {
21377 throw new Error("initializeWasm() must be awaited first!");
21379 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
21380 // debug statements here
21382 // uint64_t ExpiryTime_clone_ptr(LDKExpiryTime *NONNULL_PTR arg);
21383 export function ExpiryTime_clone_ptr(arg: number): number {
21384 if(!isWasmInitialized) {
21385 throw new Error("initializeWasm() must be awaited first!");
21387 const nativeResponseValue = wasm.ExpiryTime_clone_ptr(arg);
21388 return nativeResponseValue;
21390 // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
21391 export function ExpiryTime_clone(orig: number): number {
21392 if(!isWasmInitialized) {
21393 throw new Error("initializeWasm() must be awaited first!");
21395 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
21396 return nativeResponseValue;
21398 // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
21399 export function ExpiryTime_hash(o: number): number {
21400 if(!isWasmInitialized) {
21401 throw new Error("initializeWasm() must be awaited first!");
21403 const nativeResponseValue = wasm.ExpiryTime_hash(o);
21404 return nativeResponseValue;
21406 // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
21407 export function ExpiryTime_eq(a: number, b: number): boolean {
21408 if(!isWasmInitialized) {
21409 throw new Error("initializeWasm() must be awaited first!");
21411 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
21412 return nativeResponseValue;
21414 // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
21415 export function MinFinalCltvExpiry_free(this_obj: number): void {
21416 if(!isWasmInitialized) {
21417 throw new Error("initializeWasm() must be awaited first!");
21419 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
21420 // debug statements here
21422 // uint64_t MinFinalCltvExpiry_get_a(const struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr);
21423 export function MinFinalCltvExpiry_get_a(this_ptr: number): number {
21424 if(!isWasmInitialized) {
21425 throw new Error("initializeWasm() must be awaited first!");
21427 const nativeResponseValue = wasm.MinFinalCltvExpiry_get_a(this_ptr);
21428 return nativeResponseValue;
21430 // void MinFinalCltvExpiry_set_a(struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr, uint64_t val);
21431 export function MinFinalCltvExpiry_set_a(this_ptr: number, val: number): void {
21432 if(!isWasmInitialized) {
21433 throw new Error("initializeWasm() must be awaited first!");
21435 const nativeResponseValue = wasm.MinFinalCltvExpiry_set_a(this_ptr, val);
21436 // debug statements here
21438 // MUST_USE_RES struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_new(uint64_t a_arg);
21439 export function MinFinalCltvExpiry_new(a_arg: number): number {
21440 if(!isWasmInitialized) {
21441 throw new Error("initializeWasm() must be awaited first!");
21443 const nativeResponseValue = wasm.MinFinalCltvExpiry_new(a_arg);
21444 return nativeResponseValue;
21446 // uint64_t MinFinalCltvExpiry_clone_ptr(LDKMinFinalCltvExpiry *NONNULL_PTR arg);
21447 export function MinFinalCltvExpiry_clone_ptr(arg: number): number {
21448 if(!isWasmInitialized) {
21449 throw new Error("initializeWasm() must be awaited first!");
21451 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone_ptr(arg);
21452 return nativeResponseValue;
21454 // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
21455 export function MinFinalCltvExpiry_clone(orig: number): number {
21456 if(!isWasmInitialized) {
21457 throw new Error("initializeWasm() must be awaited first!");
21459 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
21460 return nativeResponseValue;
21462 // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
21463 export function MinFinalCltvExpiry_hash(o: number): number {
21464 if(!isWasmInitialized) {
21465 throw new Error("initializeWasm() must be awaited first!");
21467 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
21468 return nativeResponseValue;
21470 // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
21471 export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
21472 if(!isWasmInitialized) {
21473 throw new Error("initializeWasm() must be awaited first!");
21475 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
21476 return nativeResponseValue;
21478 // void Fallback_free(struct LDKFallback this_ptr);
21479 export function Fallback_free(this_ptr: number): void {
21480 if(!isWasmInitialized) {
21481 throw new Error("initializeWasm() must be awaited first!");
21483 const nativeResponseValue = wasm.Fallback_free(this_ptr);
21484 // debug statements here
21486 // uint64_t Fallback_clone_ptr(LDKFallback *NONNULL_PTR arg);
21487 export function Fallback_clone_ptr(arg: number): number {
21488 if(!isWasmInitialized) {
21489 throw new Error("initializeWasm() must be awaited first!");
21491 const nativeResponseValue = wasm.Fallback_clone_ptr(arg);
21492 return nativeResponseValue;
21494 // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
21495 export function Fallback_clone(orig: number): number {
21496 if(!isWasmInitialized) {
21497 throw new Error("initializeWasm() must be awaited first!");
21499 const nativeResponseValue = wasm.Fallback_clone(orig);
21500 return nativeResponseValue;
21502 // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
21503 export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
21504 if(!isWasmInitialized) {
21505 throw new Error("initializeWasm() must be awaited first!");
21507 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
21508 return nativeResponseValue;
21510 // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
21511 export function Fallback_pub_key_hash(a: Uint8Array): number {
21512 if(!isWasmInitialized) {
21513 throw new Error("initializeWasm() must be awaited first!");
21515 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
21516 return nativeResponseValue;
21518 // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
21519 export function Fallback_script_hash(a: Uint8Array): number {
21520 if(!isWasmInitialized) {
21521 throw new Error("initializeWasm() must be awaited first!");
21523 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
21524 return nativeResponseValue;
21526 // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
21527 export function Fallback_hash(o: number): number {
21528 if(!isWasmInitialized) {
21529 throw new Error("initializeWasm() must be awaited first!");
21531 const nativeResponseValue = wasm.Fallback_hash(o);
21532 return nativeResponseValue;
21534 // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
21535 export function Fallback_eq(a: number, b: number): boolean {
21536 if(!isWasmInitialized) {
21537 throw new Error("initializeWasm() must be awaited first!");
21539 const nativeResponseValue = wasm.Fallback_eq(a, b);
21540 return nativeResponseValue;
21542 // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
21543 export function InvoiceSignature_free(this_obj: number): void {
21544 if(!isWasmInitialized) {
21545 throw new Error("initializeWasm() must be awaited first!");
21547 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
21548 // debug statements here
21550 // uint64_t InvoiceSignature_clone_ptr(LDKInvoiceSignature *NONNULL_PTR arg);
21551 export function InvoiceSignature_clone_ptr(arg: number): number {
21552 if(!isWasmInitialized) {
21553 throw new Error("initializeWasm() must be awaited first!");
21555 const nativeResponseValue = wasm.InvoiceSignature_clone_ptr(arg);
21556 return nativeResponseValue;
21558 // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
21559 export function InvoiceSignature_clone(orig: number): number {
21560 if(!isWasmInitialized) {
21561 throw new Error("initializeWasm() must be awaited first!");
21563 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
21564 return nativeResponseValue;
21566 // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
21567 export function InvoiceSignature_eq(a: number, b: number): boolean {
21568 if(!isWasmInitialized) {
21569 throw new Error("initializeWasm() must be awaited first!");
21571 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
21572 return nativeResponseValue;
21574 // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
21575 export function PrivateRoute_free(this_obj: number): void {
21576 if(!isWasmInitialized) {
21577 throw new Error("initializeWasm() must be awaited first!");
21579 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
21580 // debug statements here
21582 // uint64_t PrivateRoute_clone_ptr(LDKPrivateRoute *NONNULL_PTR arg);
21583 export function PrivateRoute_clone_ptr(arg: number): number {
21584 if(!isWasmInitialized) {
21585 throw new Error("initializeWasm() must be awaited first!");
21587 const nativeResponseValue = wasm.PrivateRoute_clone_ptr(arg);
21588 return nativeResponseValue;
21590 // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
21591 export function PrivateRoute_clone(orig: number): number {
21592 if(!isWasmInitialized) {
21593 throw new Error("initializeWasm() must be awaited first!");
21595 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
21596 return nativeResponseValue;
21598 // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
21599 export function PrivateRoute_hash(o: number): number {
21600 if(!isWasmInitialized) {
21601 throw new Error("initializeWasm() must be awaited first!");
21603 const nativeResponseValue = wasm.PrivateRoute_hash(o);
21604 return nativeResponseValue;
21606 // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
21607 export function PrivateRoute_eq(a: number, b: number): boolean {
21608 if(!isWasmInitialized) {
21609 throw new Error("initializeWasm() must be awaited first!");
21611 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
21612 return nativeResponseValue;
21614 // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
21615 export function SignedRawInvoice_into_parts(this_arg: number): number {
21616 if(!isWasmInitialized) {
21617 throw new Error("initializeWasm() must be awaited first!");
21619 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
21620 return nativeResponseValue;
21622 // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
21623 export function SignedRawInvoice_raw_invoice(this_arg: number): number {
21624 if(!isWasmInitialized) {
21625 throw new Error("initializeWasm() must be awaited first!");
21627 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
21628 return nativeResponseValue;
21630 // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
21631 export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
21632 if(!isWasmInitialized) {
21633 throw new Error("initializeWasm() must be awaited first!");
21635 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
21636 return decodeArray(nativeResponseValue);
21638 // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
21639 export function SignedRawInvoice_signature(this_arg: number): number {
21640 if(!isWasmInitialized) {
21641 throw new Error("initializeWasm() must be awaited first!");
21643 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
21644 return nativeResponseValue;
21646 // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
21647 export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
21648 if(!isWasmInitialized) {
21649 throw new Error("initializeWasm() must be awaited first!");
21651 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
21652 return nativeResponseValue;
21654 // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
21655 export function SignedRawInvoice_check_signature(this_arg: number): boolean {
21656 if(!isWasmInitialized) {
21657 throw new Error("initializeWasm() must be awaited first!");
21659 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
21660 return nativeResponseValue;
21662 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21663 export function RawInvoice_hash(this_arg: number): Uint8Array {
21664 if(!isWasmInitialized) {
21665 throw new Error("initializeWasm() must be awaited first!");
21667 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
21668 return decodeArray(nativeResponseValue);
21670 // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21671 export function RawInvoice_payment_hash(this_arg: number): number {
21672 if(!isWasmInitialized) {
21673 throw new Error("initializeWasm() must be awaited first!");
21675 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
21676 return nativeResponseValue;
21678 // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21679 export function RawInvoice_description(this_arg: number): number {
21680 if(!isWasmInitialized) {
21681 throw new Error("initializeWasm() must be awaited first!");
21683 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
21684 return nativeResponseValue;
21686 // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21687 export function RawInvoice_payee_pub_key(this_arg: number): number {
21688 if(!isWasmInitialized) {
21689 throw new Error("initializeWasm() must be awaited first!");
21691 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
21692 return nativeResponseValue;
21694 // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21695 export function RawInvoice_description_hash(this_arg: number): number {
21696 if(!isWasmInitialized) {
21697 throw new Error("initializeWasm() must be awaited first!");
21699 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
21700 return nativeResponseValue;
21702 // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21703 export function RawInvoice_expiry_time(this_arg: number): number {
21704 if(!isWasmInitialized) {
21705 throw new Error("initializeWasm() must be awaited first!");
21707 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
21708 return nativeResponseValue;
21710 // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21711 export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
21712 if(!isWasmInitialized) {
21713 throw new Error("initializeWasm() must be awaited first!");
21715 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
21716 return nativeResponseValue;
21718 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21719 export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
21720 if(!isWasmInitialized) {
21721 throw new Error("initializeWasm() must be awaited first!");
21723 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
21724 return decodeArray(nativeResponseValue);
21726 // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21727 export function RawInvoice_features(this_arg: number): number {
21728 if(!isWasmInitialized) {
21729 throw new Error("initializeWasm() must be awaited first!");
21731 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
21732 return nativeResponseValue;
21734 // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21735 export function RawInvoice_private_routes(this_arg: number): number[] {
21736 if(!isWasmInitialized) {
21737 throw new Error("initializeWasm() must be awaited first!");
21739 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
21740 return nativeResponseValue;
21742 // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21743 export function RawInvoice_amount_pico_btc(this_arg: number): number {
21744 if(!isWasmInitialized) {
21745 throw new Error("initializeWasm() must be awaited first!");
21747 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
21748 return nativeResponseValue;
21750 // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
21751 export function RawInvoice_currency(this_arg: number): Currency {
21752 if(!isWasmInitialized) {
21753 throw new Error("initializeWasm() must be awaited first!");
21755 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
21756 return nativeResponseValue;
21758 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
21759 export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
21760 if(!isWasmInitialized) {
21761 throw new Error("initializeWasm() must be awaited first!");
21763 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
21764 return nativeResponseValue;
21766 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
21767 export function PositiveTimestamp_from_system_time(time: number): number {
21768 if(!isWasmInitialized) {
21769 throw new Error("initializeWasm() must be awaited first!");
21771 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
21772 return nativeResponseValue;
21774 // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
21775 export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
21776 if(!isWasmInitialized) {
21777 throw new Error("initializeWasm() must be awaited first!");
21779 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
21780 return nativeResponseValue;
21782 // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
21783 export function PositiveTimestamp_as_time(this_arg: number): number {
21784 if(!isWasmInitialized) {
21785 throw new Error("initializeWasm() must be awaited first!");
21787 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
21788 return nativeResponseValue;
21790 // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
21791 export function Invoice_into_signed_raw(this_arg: number): number {
21792 if(!isWasmInitialized) {
21793 throw new Error("initializeWasm() must be awaited first!");
21795 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
21796 return nativeResponseValue;
21798 // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
21799 export function Invoice_check_signature(this_arg: number): number {
21800 if(!isWasmInitialized) {
21801 throw new Error("initializeWasm() must be awaited first!");
21803 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
21804 return nativeResponseValue;
21806 // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
21807 export function Invoice_from_signed(signed_invoice: number): number {
21808 if(!isWasmInitialized) {
21809 throw new Error("initializeWasm() must be awaited first!");
21811 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
21812 return nativeResponseValue;
21814 // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
21815 export function Invoice_timestamp(this_arg: number): number {
21816 if(!isWasmInitialized) {
21817 throw new Error("initializeWasm() must be awaited first!");
21819 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
21820 return nativeResponseValue;
21822 // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
21823 export function Invoice_payment_hash(this_arg: number): Uint8Array {
21824 if(!isWasmInitialized) {
21825 throw new Error("initializeWasm() must be awaited first!");
21827 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
21828 return decodeArray(nativeResponseValue);
21830 // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
21831 export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
21832 if(!isWasmInitialized) {
21833 throw new Error("initializeWasm() must be awaited first!");
21835 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
21836 return decodeArray(nativeResponseValue);
21838 // MUST_USE_RES const uint8_t (*Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
21839 export function Invoice_payment_secret(this_arg: number): Uint8Array {
21840 if(!isWasmInitialized) {
21841 throw new Error("initializeWasm() must be awaited first!");
21843 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
21844 return decodeArray(nativeResponseValue);
21846 // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
21847 export function Invoice_features(this_arg: number): number {
21848 if(!isWasmInitialized) {
21849 throw new Error("initializeWasm() must be awaited first!");
21851 const nativeResponseValue = wasm.Invoice_features(this_arg);
21852 return nativeResponseValue;
21854 // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
21855 export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
21856 if(!isWasmInitialized) {
21857 throw new Error("initializeWasm() must be awaited first!");
21859 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
21860 return decodeArray(nativeResponseValue);
21862 // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
21863 export function Invoice_expiry_time(this_arg: number): number {
21864 if(!isWasmInitialized) {
21865 throw new Error("initializeWasm() must be awaited first!");
21867 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
21868 return nativeResponseValue;
21870 // MUST_USE_RES bool Invoice_is_expired(const struct LDKInvoice *NONNULL_PTR this_arg);
21871 export function Invoice_is_expired(this_arg: number): boolean {
21872 if(!isWasmInitialized) {
21873 throw new Error("initializeWasm() must be awaited first!");
21875 const nativeResponseValue = wasm.Invoice_is_expired(this_arg);
21876 return nativeResponseValue;
21878 // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
21879 export function Invoice_min_final_cltv_expiry(this_arg: number): number {
21880 if(!isWasmInitialized) {
21881 throw new Error("initializeWasm() must be awaited first!");
21883 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
21884 return nativeResponseValue;
21886 // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
21887 export function Invoice_private_routes(this_arg: number): number[] {
21888 if(!isWasmInitialized) {
21889 throw new Error("initializeWasm() must be awaited first!");
21891 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
21892 return nativeResponseValue;
21894 // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
21895 export function Invoice_route_hints(this_arg: number): number[] {
21896 if(!isWasmInitialized) {
21897 throw new Error("initializeWasm() must be awaited first!");
21899 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
21900 return nativeResponseValue;
21902 // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
21903 export function Invoice_currency(this_arg: number): Currency {
21904 if(!isWasmInitialized) {
21905 throw new Error("initializeWasm() must be awaited first!");
21907 const nativeResponseValue = wasm.Invoice_currency(this_arg);
21908 return nativeResponseValue;
21910 // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_milli_satoshis(const struct LDKInvoice *NONNULL_PTR this_arg);
21911 export function Invoice_amount_milli_satoshis(this_arg: number): number {
21912 if(!isWasmInitialized) {
21913 throw new Error("initializeWasm() must be awaited first!");
21915 const nativeResponseValue = wasm.Invoice_amount_milli_satoshis(this_arg);
21916 return nativeResponseValue;
21918 // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
21919 export function Description_new(description: String): number {
21920 if(!isWasmInitialized) {
21921 throw new Error("initializeWasm() must be awaited first!");
21923 const nativeResponseValue = wasm.Description_new(description);
21924 return nativeResponseValue;
21926 // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
21927 export function Description_into_inner(this_arg: number): String {
21928 if(!isWasmInitialized) {
21929 throw new Error("initializeWasm() must be awaited first!");
21931 const nativeResponseValue = wasm.Description_into_inner(this_arg);
21932 return nativeResponseValue;
21934 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
21935 export function ExpiryTime_from_seconds(seconds: number): number {
21936 if(!isWasmInitialized) {
21937 throw new Error("initializeWasm() must be awaited first!");
21939 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
21940 return nativeResponseValue;
21942 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
21943 export function ExpiryTime_from_duration(duration: number): number {
21944 if(!isWasmInitialized) {
21945 throw new Error("initializeWasm() must be awaited first!");
21947 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
21948 return nativeResponseValue;
21950 // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
21951 export function ExpiryTime_as_seconds(this_arg: number): number {
21952 if(!isWasmInitialized) {
21953 throw new Error("initializeWasm() must be awaited first!");
21955 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
21956 return nativeResponseValue;
21958 // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
21959 export function ExpiryTime_as_duration(this_arg: number): number {
21960 if(!isWasmInitialized) {
21961 throw new Error("initializeWasm() must be awaited first!");
21963 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
21964 return nativeResponseValue;
21966 // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
21967 export function PrivateRoute_new(hops: number): number {
21968 if(!isWasmInitialized) {
21969 throw new Error("initializeWasm() must be awaited first!");
21971 const nativeResponseValue = wasm.PrivateRoute_new(hops);
21972 return nativeResponseValue;
21974 // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
21975 export function PrivateRoute_into_inner(this_arg: number): number {
21976 if(!isWasmInitialized) {
21977 throw new Error("initializeWasm() must be awaited first!");
21979 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
21980 return nativeResponseValue;
21982 // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
21983 export function CreationError_clone(orig: number): CreationError {
21984 if(!isWasmInitialized) {
21985 throw new Error("initializeWasm() must be awaited first!");
21987 const nativeResponseValue = wasm.CreationError_clone(orig);
21988 return nativeResponseValue;
21990 // enum LDKCreationError CreationError_description_too_long(void);
21991 export function CreationError_description_too_long(): CreationError {
21992 if(!isWasmInitialized) {
21993 throw new Error("initializeWasm() must be awaited first!");
21995 const nativeResponseValue = wasm.CreationError_description_too_long();
21996 return nativeResponseValue;
21998 // enum LDKCreationError CreationError_route_too_long(void);
21999 export function CreationError_route_too_long(): CreationError {
22000 if(!isWasmInitialized) {
22001 throw new Error("initializeWasm() must be awaited first!");
22003 const nativeResponseValue = wasm.CreationError_route_too_long();
22004 return nativeResponseValue;
22006 // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
22007 export function CreationError_timestamp_out_of_bounds(): CreationError {
22008 if(!isWasmInitialized) {
22009 throw new Error("initializeWasm() must be awaited first!");
22011 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
22012 return nativeResponseValue;
22014 // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
22015 export function CreationError_expiry_time_out_of_bounds(): CreationError {
22016 if(!isWasmInitialized) {
22017 throw new Error("initializeWasm() must be awaited first!");
22019 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
22020 return nativeResponseValue;
22022 // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
22023 export function CreationError_eq(a: number, b: number): boolean {
22024 if(!isWasmInitialized) {
22025 throw new Error("initializeWasm() must be awaited first!");
22027 const nativeResponseValue = wasm.CreationError_eq(a, b);
22028 return nativeResponseValue;
22030 // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
22031 export function CreationError_to_str(o: number): String {
22032 if(!isWasmInitialized) {
22033 throw new Error("initializeWasm() must be awaited first!");
22035 const nativeResponseValue = wasm.CreationError_to_str(o);
22036 return nativeResponseValue;
22038 // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
22039 export function SemanticError_clone(orig: number): SemanticError {
22040 if(!isWasmInitialized) {
22041 throw new Error("initializeWasm() must be awaited first!");
22043 const nativeResponseValue = wasm.SemanticError_clone(orig);
22044 return nativeResponseValue;
22046 // enum LDKSemanticError SemanticError_no_payment_hash(void);
22047 export function SemanticError_no_payment_hash(): SemanticError {
22048 if(!isWasmInitialized) {
22049 throw new Error("initializeWasm() must be awaited first!");
22051 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
22052 return nativeResponseValue;
22054 // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
22055 export function SemanticError_multiple_payment_hashes(): SemanticError {
22056 if(!isWasmInitialized) {
22057 throw new Error("initializeWasm() must be awaited first!");
22059 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
22060 return nativeResponseValue;
22062 // enum LDKSemanticError SemanticError_no_description(void);
22063 export function SemanticError_no_description(): SemanticError {
22064 if(!isWasmInitialized) {
22065 throw new Error("initializeWasm() must be awaited first!");
22067 const nativeResponseValue = wasm.SemanticError_no_description();
22068 return nativeResponseValue;
22070 // enum LDKSemanticError SemanticError_multiple_descriptions(void);
22071 export function SemanticError_multiple_descriptions(): SemanticError {
22072 if(!isWasmInitialized) {
22073 throw new Error("initializeWasm() must be awaited first!");
22075 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
22076 return nativeResponseValue;
22078 // enum LDKSemanticError SemanticError_no_payment_secret(void);
22079 export function SemanticError_no_payment_secret(): SemanticError {
22080 if(!isWasmInitialized) {
22081 throw new Error("initializeWasm() must be awaited first!");
22083 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
22084 return nativeResponseValue;
22086 // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
22087 export function SemanticError_multiple_payment_secrets(): SemanticError {
22088 if(!isWasmInitialized) {
22089 throw new Error("initializeWasm() must be awaited first!");
22091 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
22092 return nativeResponseValue;
22094 // enum LDKSemanticError SemanticError_invalid_features(void);
22095 export function SemanticError_invalid_features(): SemanticError {
22096 if(!isWasmInitialized) {
22097 throw new Error("initializeWasm() must be awaited first!");
22099 const nativeResponseValue = wasm.SemanticError_invalid_features();
22100 return nativeResponseValue;
22102 // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
22103 export function SemanticError_invalid_recovery_id(): SemanticError {
22104 if(!isWasmInitialized) {
22105 throw new Error("initializeWasm() must be awaited first!");
22107 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
22108 return nativeResponseValue;
22110 // enum LDKSemanticError SemanticError_invalid_signature(void);
22111 export function SemanticError_invalid_signature(): SemanticError {
22112 if(!isWasmInitialized) {
22113 throw new Error("initializeWasm() must be awaited first!");
22115 const nativeResponseValue = wasm.SemanticError_invalid_signature();
22116 return nativeResponseValue;
22118 // enum LDKSemanticError SemanticError_imprecise_amount(void);
22119 export function SemanticError_imprecise_amount(): SemanticError {
22120 if(!isWasmInitialized) {
22121 throw new Error("initializeWasm() must be awaited first!");
22123 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
22124 return nativeResponseValue;
22126 // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
22127 export function SemanticError_eq(a: number, b: number): boolean {
22128 if(!isWasmInitialized) {
22129 throw new Error("initializeWasm() must be awaited first!");
22131 const nativeResponseValue = wasm.SemanticError_eq(a, b);
22132 return nativeResponseValue;
22134 // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
22135 export function SemanticError_to_str(o: number): String {
22136 if(!isWasmInitialized) {
22137 throw new Error("initializeWasm() must be awaited first!");
22139 const nativeResponseValue = wasm.SemanticError_to_str(o);
22140 return nativeResponseValue;
22142 // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
22143 export function SignOrCreationError_free(this_ptr: number): void {
22144 if(!isWasmInitialized) {
22145 throw new Error("initializeWasm() must be awaited first!");
22147 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
22148 // debug statements here
22150 // uint64_t SignOrCreationError_clone_ptr(LDKSignOrCreationError *NONNULL_PTR arg);
22151 export function SignOrCreationError_clone_ptr(arg: number): number {
22152 if(!isWasmInitialized) {
22153 throw new Error("initializeWasm() must be awaited first!");
22155 const nativeResponseValue = wasm.SignOrCreationError_clone_ptr(arg);
22156 return nativeResponseValue;
22158 // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
22159 export function SignOrCreationError_clone(orig: number): number {
22160 if(!isWasmInitialized) {
22161 throw new Error("initializeWasm() must be awaited first!");
22163 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
22164 return nativeResponseValue;
22166 // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
22167 export function SignOrCreationError_sign_error(): number {
22168 if(!isWasmInitialized) {
22169 throw new Error("initializeWasm() must be awaited first!");
22171 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
22172 return nativeResponseValue;
22174 // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
22175 export function SignOrCreationError_creation_error(a: CreationError): number {
22176 if(!isWasmInitialized) {
22177 throw new Error("initializeWasm() must be awaited first!");
22179 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
22180 return nativeResponseValue;
22182 // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
22183 export function SignOrCreationError_eq(a: number, b: number): boolean {
22184 if(!isWasmInitialized) {
22185 throw new Error("initializeWasm() must be awaited first!");
22187 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
22188 return nativeResponseValue;
22190 // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
22191 export function SignOrCreationError_to_str(o: number): String {
22192 if(!isWasmInitialized) {
22193 throw new Error("initializeWasm() must be awaited first!");
22195 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
22196 return nativeResponseValue;
22198 // void InvoicePayer_free(struct LDKInvoicePayer this_obj);
22199 export function InvoicePayer_free(this_obj: number): void {
22200 if(!isWasmInitialized) {
22201 throw new Error("initializeWasm() must be awaited first!");
22203 const nativeResponseValue = wasm.InvoicePayer_free(this_obj);
22204 // debug statements here
22206 // void Payer_free(struct LDKPayer this_ptr);
22207 export function Payer_free(this_ptr: number): void {
22208 if(!isWasmInitialized) {
22209 throw new Error("initializeWasm() must be awaited first!");
22211 const nativeResponseValue = wasm.Payer_free(this_ptr);
22212 // debug statements here
22214 // void Router_free(struct LDKRouter this_ptr);
22215 export function Router_free(this_ptr: number): void {
22216 if(!isWasmInitialized) {
22217 throw new Error("initializeWasm() must be awaited first!");
22219 const nativeResponseValue = wasm.Router_free(this_ptr);
22220 // debug statements here
22222 // void RetryAttempts_free(struct LDKRetryAttempts this_obj);
22223 export function RetryAttempts_free(this_obj: number): void {
22224 if(!isWasmInitialized) {
22225 throw new Error("initializeWasm() must be awaited first!");
22227 const nativeResponseValue = wasm.RetryAttempts_free(this_obj);
22228 // debug statements here
22230 // uintptr_t RetryAttempts_get_a(const struct LDKRetryAttempts *NONNULL_PTR this_ptr);
22231 export function RetryAttempts_get_a(this_ptr: number): number {
22232 if(!isWasmInitialized) {
22233 throw new Error("initializeWasm() must be awaited first!");
22235 const nativeResponseValue = wasm.RetryAttempts_get_a(this_ptr);
22236 return nativeResponseValue;
22238 // void RetryAttempts_set_a(struct LDKRetryAttempts *NONNULL_PTR this_ptr, uintptr_t val);
22239 export function RetryAttempts_set_a(this_ptr: number, val: number): void {
22240 if(!isWasmInitialized) {
22241 throw new Error("initializeWasm() must be awaited first!");
22243 const nativeResponseValue = wasm.RetryAttempts_set_a(this_ptr, val);
22244 // debug statements here
22246 // MUST_USE_RES struct LDKRetryAttempts RetryAttempts_new(uintptr_t a_arg);
22247 export function RetryAttempts_new(a_arg: number): number {
22248 if(!isWasmInitialized) {
22249 throw new Error("initializeWasm() must be awaited first!");
22251 const nativeResponseValue = wasm.RetryAttempts_new(a_arg);
22252 return nativeResponseValue;
22254 // uint64_t RetryAttempts_clone_ptr(LDKRetryAttempts *NONNULL_PTR arg);
22255 export function RetryAttempts_clone_ptr(arg: number): number {
22256 if(!isWasmInitialized) {
22257 throw new Error("initializeWasm() must be awaited first!");
22259 const nativeResponseValue = wasm.RetryAttempts_clone_ptr(arg);
22260 return nativeResponseValue;
22262 // struct LDKRetryAttempts RetryAttempts_clone(const struct LDKRetryAttempts *NONNULL_PTR orig);
22263 export function RetryAttempts_clone(orig: number): number {
22264 if(!isWasmInitialized) {
22265 throw new Error("initializeWasm() must be awaited first!");
22267 const nativeResponseValue = wasm.RetryAttempts_clone(orig);
22268 return nativeResponseValue;
22270 // bool RetryAttempts_eq(const struct LDKRetryAttempts *NONNULL_PTR a, const struct LDKRetryAttempts *NONNULL_PTR b);
22271 export function RetryAttempts_eq(a: number, b: number): boolean {
22272 if(!isWasmInitialized) {
22273 throw new Error("initializeWasm() must be awaited first!");
22275 const nativeResponseValue = wasm.RetryAttempts_eq(a, b);
22276 return nativeResponseValue;
22278 // uint64_t RetryAttempts_hash(const struct LDKRetryAttempts *NONNULL_PTR o);
22279 export function RetryAttempts_hash(o: number): number {
22280 if(!isWasmInitialized) {
22281 throw new Error("initializeWasm() must be awaited first!");
22283 const nativeResponseValue = wasm.RetryAttempts_hash(o);
22284 return nativeResponseValue;
22286 // void PaymentError_free(struct LDKPaymentError this_ptr);
22287 export function PaymentError_free(this_ptr: number): void {
22288 if(!isWasmInitialized) {
22289 throw new Error("initializeWasm() must be awaited first!");
22291 const nativeResponseValue = wasm.PaymentError_free(this_ptr);
22292 // debug statements here
22294 // uint64_t PaymentError_clone_ptr(LDKPaymentError *NONNULL_PTR arg);
22295 export function PaymentError_clone_ptr(arg: number): number {
22296 if(!isWasmInitialized) {
22297 throw new Error("initializeWasm() must be awaited first!");
22299 const nativeResponseValue = wasm.PaymentError_clone_ptr(arg);
22300 return nativeResponseValue;
22302 // struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
22303 export function PaymentError_clone(orig: number): number {
22304 if(!isWasmInitialized) {
22305 throw new Error("initializeWasm() must be awaited first!");
22307 const nativeResponseValue = wasm.PaymentError_clone(orig);
22308 return nativeResponseValue;
22310 // struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
22311 export function PaymentError_invoice(a: String): number {
22312 if(!isWasmInitialized) {
22313 throw new Error("initializeWasm() must be awaited first!");
22315 const nativeResponseValue = wasm.PaymentError_invoice(a);
22316 return nativeResponseValue;
22318 // struct LDKPaymentError PaymentError_routing(struct LDKLightningError a);
22319 export function PaymentError_routing(a: number): number {
22320 if(!isWasmInitialized) {
22321 throw new Error("initializeWasm() must be awaited first!");
22323 const nativeResponseValue = wasm.PaymentError_routing(a);
22324 return nativeResponseValue;
22326 // struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
22327 export function PaymentError_sending(a: number): number {
22328 if(!isWasmInitialized) {
22329 throw new Error("initializeWasm() must be awaited first!");
22331 const nativeResponseValue = wasm.PaymentError_sending(a);
22332 return nativeResponseValue;
22334 // MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetryAttempts retry_attempts);
22335 export function InvoicePayer_new(payer: number, router: number, scorer: number, logger: number, event_handler: number, retry_attempts: number): number {
22336 if(!isWasmInitialized) {
22337 throw new Error("initializeWasm() must be awaited first!");
22339 const nativeResponseValue = wasm.InvoicePayer_new(payer, router, scorer, logger, event_handler, retry_attempts);
22340 return nativeResponseValue;
22342 // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice);
22343 export function InvoicePayer_pay_invoice(this_arg: number, invoice: number): number {
22344 if(!isWasmInitialized) {
22345 throw new Error("initializeWasm() must be awaited first!");
22347 const nativeResponseValue = wasm.InvoicePayer_pay_invoice(this_arg, invoice);
22348 return nativeResponseValue;
22350 // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_zero_value_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats);
22351 export function InvoicePayer_pay_zero_value_invoice(this_arg: number, invoice: number, amount_msats: number): number {
22352 if(!isWasmInitialized) {
22353 throw new Error("initializeWasm() must be awaited first!");
22355 const nativeResponseValue = wasm.InvoicePayer_pay_zero_value_invoice(this_arg, invoice, amount_msats);
22356 return nativeResponseValue;
22358 // void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
22359 export function InvoicePayer_remove_cached_payment(this_arg: number, payment_hash: Uint8Array): void {
22360 if(!isWasmInitialized) {
22361 throw new Error("initializeWasm() must be awaited first!");
22363 const nativeResponseValue = wasm.InvoicePayer_remove_cached_payment(this_arg, encodeArray(payment_hash));
22364 // debug statements here
22366 // struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *NONNULL_PTR this_arg);
22367 export function InvoicePayer_as_EventHandler(this_arg: number): number {
22368 if(!isWasmInitialized) {
22369 throw new Error("initializeWasm() must be awaited first!");
22371 const nativeResponseValue = wasm.InvoicePayer_as_EventHandler(this_arg);
22372 return nativeResponseValue;
22374 // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description);
22375 export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
22376 if(!isWasmInitialized) {
22377 throw new Error("initializeWasm() must be awaited first!");
22379 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
22380 return nativeResponseValue;
22382 // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
22383 export function DefaultRouter_free(this_obj: number): void {
22384 if(!isWasmInitialized) {
22385 throw new Error("initializeWasm() must be awaited first!");
22387 const nativeResponseValue = wasm.DefaultRouter_free(this_obj);
22388 // debug statements here
22390 // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
22391 export function DefaultRouter_new(network_graph: number, logger: number): number {
22392 if(!isWasmInitialized) {
22393 throw new Error("initializeWasm() must be awaited first!");
22395 const nativeResponseValue = wasm.DefaultRouter_new(network_graph, logger);
22396 return nativeResponseValue;
22398 // struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
22399 export function DefaultRouter_as_Router(this_arg: number): number {
22400 if(!isWasmInitialized) {
22401 throw new Error("initializeWasm() must be awaited first!");
22403 const nativeResponseValue = wasm.DefaultRouter_as_Router(this_arg);
22404 return nativeResponseValue;
22406 // struct LDKPayer ChannelManager_as_Payer(const struct LDKChannelManager *NONNULL_PTR this_arg);
22407 export function ChannelManager_as_Payer(this_arg: number): number {
22408 if(!isWasmInitialized) {
22409 throw new Error("initializeWasm() must be awaited first!");
22411 const nativeResponseValue = wasm.ChannelManager_as_Payer(this_arg);
22412 return nativeResponseValue;
22414 // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
22415 export function SiPrefix_from_str(s: String): number {
22416 if(!isWasmInitialized) {
22417 throw new Error("initializeWasm() must be awaited first!");
22419 const nativeResponseValue = wasm.SiPrefix_from_str(s);
22420 return nativeResponseValue;
22422 // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
22423 export function Invoice_from_str(s: String): number {
22424 if(!isWasmInitialized) {
22425 throw new Error("initializeWasm() must be awaited first!");
22427 const nativeResponseValue = wasm.Invoice_from_str(s);
22428 return nativeResponseValue;
22430 // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
22431 export function SignedRawInvoice_from_str(s: String): number {
22432 if(!isWasmInitialized) {
22433 throw new Error("initializeWasm() must be awaited first!");
22435 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
22436 return nativeResponseValue;
22438 // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
22439 export function Invoice_to_str(o: number): String {
22440 if(!isWasmInitialized) {
22441 throw new Error("initializeWasm() must be awaited first!");
22443 const nativeResponseValue = wasm.Invoice_to_str(o);
22444 return nativeResponseValue;
22446 // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
22447 export function SignedRawInvoice_to_str(o: number): String {
22448 if(!isWasmInitialized) {
22449 throw new Error("initializeWasm() must be awaited first!");
22451 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
22452 return nativeResponseValue;
22454 // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
22455 export function Currency_to_str(o: number): String {
22456 if(!isWasmInitialized) {
22457 throw new Error("initializeWasm() must be awaited first!");
22459 const nativeResponseValue = wasm.Currency_to_str(o);
22460 return nativeResponseValue;
22462 // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
22463 export function SiPrefix_to_str(o: number): String {
22464 if(!isWasmInitialized) {
22465 throw new Error("initializeWasm() must be awaited first!");
22467 const nativeResponseValue = wasm.SiPrefix_to_str(o);
22468 return nativeResponseValue;
22471 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
22472 if(isWasmInitialized && !allowDoubleInitialization) {
22475 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
22476 wasm = wasmInstance.exports;
22477 isWasmInitialized = true;