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 public static native long LDKCVec_u8Z_new(number[] elems);
155 // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
156 export function TxOut_get_script_pubkey(thing: number): Uint8Array {
157 if(!isWasmInitialized) {
158 throw new Error("initializeWasm() must be awaited first!");
160 const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
161 return decodeArray(nativeResponseValue);
163 // uint64_t TxOut_get_value (struct LDKTxOut* thing)
164 export function TxOut_get_value(thing: number): number {
165 if(!isWasmInitialized) {
166 throw new Error("initializeWasm() must be awaited first!");
168 const nativeResponseValue = wasm.TxOut_get_value(thing);
169 return nativeResponseValue;
171 public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
172 public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
173 public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
174 public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
175 public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
176 public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
177 public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
178 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
179 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
180 public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
181 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
182 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
183 public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
184 public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
185 public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
186 public static class LDKCOption_u32Z {
187 private LDKCOption_u32Z() {}
188 export class Some extends LDKCOption_u32Z {
190 Some(number some) { this.some = some; }
192 export class None extends LDKCOption_u32Z {
195 static native void init();
197 static { LDKCOption_u32Z.init(); }
198 public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
199 public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
200 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
201 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
202 public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
203 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
204 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
205 public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
206 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
207 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
208 public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
209 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
210 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
211 public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
212 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
213 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
214 public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
215 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
216 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
217 public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
218 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
219 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
220 public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
221 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
222 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
223 public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
224 public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
225 public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
226 public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
227 public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
228 public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
229 public static native long LDKCVec_RouteHopZ_new(number[] elems);
230 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
231 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
232 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
233 public static class LDKCOption_u64Z {
234 private LDKCOption_u64Z() {}
235 export class Some extends LDKCOption_u64Z {
237 Some(number some) { this.some = some; }
239 export class None extends LDKCOption_u64Z {
242 static native void init();
244 static { LDKCOption_u64Z.init(); }
245 public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
246 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
247 public static native long LDKCVec_RouteHintZ_new(number[] elems);
248 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
249 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
250 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
251 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
252 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
253 public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
254 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
255 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
256 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
257 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
258 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
259 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
260 public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
261 public static class LDKMonitorEvent {
262 private LDKMonitorEvent() {}
263 export class HTLCEvent extends LDKMonitorEvent {
264 public number htlc_event;
265 HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
267 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
268 public number commitment_tx_broadcasted;
269 CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
271 static native void init();
273 static { LDKMonitorEvent.init(); }
274 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
275 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
276 public static class LDKCOption_C2Tuple_usizeTransactionZZ {
277 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
278 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
280 Some(number some) { this.some = some; }
282 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
285 static native void init();
287 static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
288 public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
289 public static class LDKSpendableOutputDescriptor {
290 private LDKSpendableOutputDescriptor() {}
291 export class StaticOutput extends LDKSpendableOutputDescriptor {
292 public number outpoint;
293 public number output;
294 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
296 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
297 public number delayed_payment_output;
298 DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
300 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
301 public number static_payment_output;
302 StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
304 static native void init();
306 static { LDKSpendableOutputDescriptor.init(); }
307 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
308 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
309 public static class LDKErrorAction {
310 private LDKErrorAction() {}
311 export class DisconnectPeer extends LDKErrorAction {
313 DisconnectPeer(number msg) { this.msg = msg; }
315 export class IgnoreError extends LDKErrorAction {
318 export class IgnoreAndLog extends LDKErrorAction {
319 public Level ignore_and_log;
320 IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
322 export class SendErrorMessage extends LDKErrorAction {
324 SendErrorMessage(number msg) { this.msg = msg; }
326 static native void init();
328 static { LDKErrorAction.init(); }
329 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
330 public static class LDKHTLCFailChannelUpdate {
331 private LDKHTLCFailChannelUpdate() {}
332 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
334 ChannelUpdateMessage(number msg) { this.msg = msg; }
336 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
337 public number short_channel_id;
338 public boolean is_permanent;
339 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
341 export class NodeFailure extends LDKHTLCFailChannelUpdate {
342 public Uint8Array node_id;
343 public boolean is_permanent;
344 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
346 static native void init();
348 static { LDKHTLCFailChannelUpdate.init(); }
349 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
350 public static class LDKMessageSendEvent {
351 private LDKMessageSendEvent() {}
352 export class SendAcceptChannel extends LDKMessageSendEvent {
353 public Uint8Array node_id;
355 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
357 export class SendOpenChannel extends LDKMessageSendEvent {
358 public Uint8Array node_id;
360 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
362 export class SendFundingCreated extends LDKMessageSendEvent {
363 public Uint8Array node_id;
365 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
367 export class SendFundingSigned extends LDKMessageSendEvent {
368 public Uint8Array node_id;
370 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
372 export class SendFundingLocked extends LDKMessageSendEvent {
373 public Uint8Array node_id;
375 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
377 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
378 public Uint8Array node_id;
380 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
382 export class UpdateHTLCs extends LDKMessageSendEvent {
383 public Uint8Array node_id;
384 public number updates;
385 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
387 export class SendRevokeAndACK extends LDKMessageSendEvent {
388 public Uint8Array node_id;
390 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
392 export class SendClosingSigned extends LDKMessageSendEvent {
393 public Uint8Array node_id;
395 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
397 export class SendShutdown extends LDKMessageSendEvent {
398 public Uint8Array node_id;
400 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
402 export class SendChannelReestablish extends LDKMessageSendEvent {
403 public Uint8Array node_id;
405 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
407 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
409 public number update_msg;
410 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
412 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
414 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
416 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
418 BroadcastChannelUpdate(number msg) { this.msg = msg; }
420 export class SendChannelUpdate extends LDKMessageSendEvent {
421 public Uint8Array node_id;
423 SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
425 export class HandleError extends LDKMessageSendEvent {
426 public Uint8Array node_id;
427 public number action;
428 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
430 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
431 public number update;
432 PaymentFailureNetworkUpdate(number update) { this.update = update; }
434 export class SendChannelRangeQuery extends LDKMessageSendEvent {
435 public Uint8Array node_id;
437 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
439 export class SendShortIdsQuery extends LDKMessageSendEvent {
440 public Uint8Array node_id;
442 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
444 export class SendReplyChannelRange extends LDKMessageSendEvent {
445 public Uint8Array node_id;
447 SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
449 static native void init();
451 static { LDKMessageSendEvent.init(); }
452 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
453 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
454 public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
455 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
456 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
457 public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
458 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
459 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
460 public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
461 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
462 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
463 public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
464 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
465 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
466 public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
467 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
468 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
469 public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
470 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
471 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
472 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
473 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
474 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
475 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
476 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
477 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
478 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
479 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
480 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
481 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
482 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
483 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
487 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
489 export interface LDKBaseSign {
490 get_per_commitment_point (idx: number): Uint8Array;
491 release_commitment_secret (idx: number): Uint8Array;
492 channel_keys_id (): Uint8Array;
493 sign_counterparty_commitment (commitment_tx: number): number;
494 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
495 sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
496 sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
497 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
498 sign_closing_transaction (closing_tx: Uint8Array): number;
499 sign_channel_announcement (msg: number): number;
500 ready_channel (channel_parameters: number): void;
503 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
504 throw new Error('unimplemented'); // TODO: bind to WASM
507 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
510 // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
511 export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
512 if(!isWasmInitialized) {
513 throw new Error("initializeWasm() must be awaited first!");
515 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
516 return decodeArray(nativeResponseValue);
518 // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
519 export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
520 if(!isWasmInitialized) {
521 throw new Error("initializeWasm() must be awaited first!");
523 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
524 return decodeArray(nativeResponseValue);
526 // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
527 export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
528 if(!isWasmInitialized) {
529 throw new Error("initializeWasm() must be awaited first!");
531 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
532 return decodeArray(nativeResponseValue);
534 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
535 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
536 if(!isWasmInitialized) {
537 throw new Error("initializeWasm() must be awaited first!");
539 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
540 return nativeResponseValue;
542 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
543 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
544 if(!isWasmInitialized) {
545 throw new Error("initializeWasm() must be awaited first!");
547 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
548 return nativeResponseValue;
550 // 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]
551 export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
552 if(!isWasmInitialized) {
553 throw new Error("initializeWasm() must be awaited first!");
555 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
556 return nativeResponseValue;
558 // 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
559 export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
560 if(!isWasmInitialized) {
561 throw new Error("initializeWasm() must be awaited first!");
563 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
564 return nativeResponseValue;
566 // 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
567 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
568 if(!isWasmInitialized) {
569 throw new Error("initializeWasm() must be awaited first!");
571 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
572 return nativeResponseValue;
574 // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
575 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
576 if(!isWasmInitialized) {
577 throw new Error("initializeWasm() must be awaited first!");
579 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
580 return nativeResponseValue;
582 // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
583 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
584 if(!isWasmInitialized) {
585 throw new Error("initializeWasm() must be awaited first!");
587 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
588 return nativeResponseValue;
590 // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
591 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
592 if(!isWasmInitialized) {
593 throw new Error("initializeWasm() must be awaited first!");
595 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
596 // debug statements here
598 // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
599 export function BaseSign_get_pubkeys(this_arg: number): number {
600 if(!isWasmInitialized) {
601 throw new Error("initializeWasm() must be awaited first!");
603 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
604 return nativeResponseValue;
609 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
611 export interface LDKSign {
612 write (): Uint8Array;
615 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
616 throw new Error('unimplemented'); // TODO: bind to WASM
619 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
622 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
623 export function Sign_write(this_arg: number): Uint8Array {
624 if(!isWasmInitialized) {
625 throw new Error("initializeWasm() must be awaited first!");
627 const nativeResponseValue = wasm.Sign_write(this_arg);
628 return decodeArray(nativeResponseValue);
630 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
631 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
632 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
633 public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
634 public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
635 public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
636 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
637 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
638 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
639 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
640 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
641 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
642 public static native long LDKCVec_TxOutZ_new(number[] elems);
643 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
644 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
645 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
646 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
647 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
648 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
649 public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
650 public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
651 public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
652 public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
653 public static class LDKCOption_u16Z {
654 private LDKCOption_u16Z() {}
655 export class Some extends LDKCOption_u16Z {
657 Some(number some) { this.some = some; }
659 export class None extends LDKCOption_u16Z {
662 static native void init();
664 static { LDKCOption_u16Z.init(); }
665 public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
666 public static class LDKAPIError {
667 private LDKAPIError() {}
668 export class APIMisuseError extends LDKAPIError {
670 APIMisuseError(String err) { this.err = err; }
672 export class FeeRateTooHigh extends LDKAPIError {
674 public number feerate;
675 FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
677 export class RouteError extends LDKAPIError {
679 RouteError(String err) { this.err = err; }
681 export class ChannelUnavailable extends LDKAPIError {
683 ChannelUnavailable(String err) { this.err = err; }
685 export class MonitorUpdateFailed extends LDKAPIError {
686 MonitorUpdateFailed() { }
688 static native void init();
690 static { LDKAPIError.init(); }
691 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
692 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
693 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
694 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
695 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
696 public static native long LDKCVec_APIErrorZ_new(number[] elems);
697 public static class LDKPaymentSendFailure {
698 private LDKPaymentSendFailure() {}
699 export class ParameterError extends LDKPaymentSendFailure {
700 public number parameter_error;
701 ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
703 export class PathParameterError extends LDKPaymentSendFailure {
704 public number[] path_parameter_error;
705 PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
707 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
708 public number[] all_failed_retry_safe;
709 AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
711 export class PartialFailure extends LDKPaymentSendFailure {
712 public number[] partial_failure;
713 PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
715 static native void init();
717 static { LDKPaymentSendFailure.init(); }
718 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
719 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
720 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
721 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
722 public static class LDKNetAddress {
723 private LDKNetAddress() {}
724 export class IPv4 extends LDKNetAddress {
725 public Uint8Array addr;
727 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
729 export class IPv6 extends LDKNetAddress {
730 public Uint8Array addr;
732 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
734 export class OnionV2 extends LDKNetAddress {
735 public Uint8Array addr;
737 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
739 export class OnionV3 extends LDKNetAddress {
740 public Uint8Array ed25519_pubkey;
741 public number checksum;
742 public number version;
744 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
746 static native void init();
748 static { LDKNetAddress.init(); }
749 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
750 public static native long LDKCVec_NetAddressZ_new(number[] elems);
751 public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
752 public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
753 public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
754 public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
755 public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
756 public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
757 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
761 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
763 export interface LDKWatch {
764 watch_channel (funding_txo: number, monitor: number): number;
765 update_channel (funding_txo: number, update: number): number;
766 release_pending_monitor_events (): number[];
769 export function LDKWatch_new(impl: LDKWatch): number {
770 throw new Error('unimplemented'); // TODO: bind to WASM
773 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
776 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
777 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
778 if(!isWasmInitialized) {
779 throw new Error("initializeWasm() must be awaited first!");
781 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
782 return nativeResponseValue;
784 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
785 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
786 if(!isWasmInitialized) {
787 throw new Error("initializeWasm() must be awaited first!");
789 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
790 return nativeResponseValue;
792 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
793 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
794 if(!isWasmInitialized) {
795 throw new Error("initializeWasm() must be awaited first!");
797 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
798 return nativeResponseValue;
803 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
805 export interface LDKBroadcasterInterface {
806 broadcast_transaction (tx: Uint8Array): void;
809 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
810 throw new Error('unimplemented'); // TODO: bind to WASM
813 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
816 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
817 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
818 if(!isWasmInitialized) {
819 throw new Error("initializeWasm() must be awaited first!");
821 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
822 // debug statements here
827 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
829 export interface LDKKeysInterface {
830 get_node_secret (): Uint8Array;
831 get_destination_script (): Uint8Array;
832 get_shutdown_pubkey (): Uint8Array;
833 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
834 get_secure_random_bytes (): Uint8Array;
835 read_chan_signer (reader: Uint8Array): number;
836 sign_invoice (invoice_preimage: Uint8Array): number;
839 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
840 throw new Error('unimplemented'); // TODO: bind to WASM
843 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
846 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
847 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
848 if(!isWasmInitialized) {
849 throw new Error("initializeWasm() must be awaited first!");
851 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
852 return decodeArray(nativeResponseValue);
854 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
855 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
856 if(!isWasmInitialized) {
857 throw new Error("initializeWasm() must be awaited first!");
859 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
860 return decodeArray(nativeResponseValue);
862 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
863 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
864 if(!isWasmInitialized) {
865 throw new Error("initializeWasm() must be awaited first!");
867 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
868 return decodeArray(nativeResponseValue);
870 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
871 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
872 if(!isWasmInitialized) {
873 throw new Error("initializeWasm() must be awaited first!");
875 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
876 return nativeResponseValue;
878 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
879 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
880 if(!isWasmInitialized) {
881 throw new Error("initializeWasm() must be awaited first!");
883 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
884 return decodeArray(nativeResponseValue);
886 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
887 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
888 if(!isWasmInitialized) {
889 throw new Error("initializeWasm() must be awaited first!");
891 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
892 return nativeResponseValue;
894 // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
895 export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
896 if(!isWasmInitialized) {
897 throw new Error("initializeWasm() must be awaited first!");
899 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
900 return nativeResponseValue;
905 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
907 export interface LDKFeeEstimator {
908 get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
911 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
912 throw new Error('unimplemented'); // TODO: bind to WASM
915 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
918 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
919 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
920 if(!isWasmInitialized) {
921 throw new Error("initializeWasm() must be awaited first!");
923 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
924 return nativeResponseValue;
929 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
931 export interface LDKLogger {
932 log (record: String): void;
935 export function LDKLogger_new(impl: LDKLogger): number {
936 throw new Error('unimplemented'); // TODO: bind to WASM
939 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
942 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
943 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
944 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
945 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
946 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
947 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
948 public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
949 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
950 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
951 public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
952 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
953 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
954 public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
955 public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
956 public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
957 public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
958 public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
959 public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
960 public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
961 public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
962 public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
963 public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
964 public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
965 public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
966 public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
967 public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
968 public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
969 public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
970 public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
971 public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
972 public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
973 public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
974 public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
975 public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
976 public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
977 public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
978 public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
979 public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
980 public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
981 public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
982 public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
983 public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
984 public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
985 public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
986 public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
987 public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
988 public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
989 public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
990 public static native String LDKCResult_StringErrorZ_get_ok(long arg);
991 public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
992 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
993 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
994 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
995 public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
996 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
997 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
998 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
999 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1000 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1001 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
1002 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
1003 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
1004 public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
1005 public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
1006 public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
1007 public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1008 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
1009 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
1010 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
1011 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1012 public static class LDKEvent {
1013 private LDKEvent() {}
1014 export class FundingGenerationReady extends LDKEvent {
1015 public Uint8Array temporary_channel_id;
1016 public number channel_value_satoshis;
1017 public Uint8Array output_script;
1018 public number user_channel_id;
1019 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; }
1021 export class PaymentReceived extends LDKEvent {
1022 public Uint8Array payment_hash;
1023 public Uint8Array payment_preimage;
1024 public Uint8Array payment_secret;
1026 public number user_payment_id;
1027 PaymentReceived(Uint8Array payment_hash, Uint8Array payment_preimage, Uint8Array payment_secret, number amt, number user_payment_id) { this.payment_hash = payment_hash; this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.amt = amt; this.user_payment_id = user_payment_id; }
1029 export class PaymentSent extends LDKEvent {
1030 public Uint8Array payment_preimage;
1031 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
1033 export class PaymentFailed extends LDKEvent {
1034 public Uint8Array payment_hash;
1035 public boolean rejected_by_dest;
1036 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
1038 export class PendingHTLCsForwardable extends LDKEvent {
1039 public number time_forwardable;
1040 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1042 export class SpendableOutputs extends LDKEvent {
1043 public number[] outputs;
1044 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1046 static native void init();
1048 static { LDKEvent.init(); }
1049 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1050 public static native long LDKCVec_EventZ_new(number[] elems);
1051 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1052 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
1053 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
1054 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1055 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1056 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
1057 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
1058 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1059 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1060 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1061 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1062 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1063 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1064 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1065 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1066 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
1067 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
1068 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
1069 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1070 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1071 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1072 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1073 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1074 public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1075 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1076 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1077 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1078 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1079 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1080 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1081 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1082 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1083 public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1084 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1085 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1086 public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1087 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1088 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1089 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1090 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1091 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1092 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1093 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1094 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1095 public static native long LDKCVec_u64Z_new(number[] elems);
1096 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1097 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1098 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1099 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1100 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1101 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1102 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1103 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1104 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1105 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1106 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1107 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1108 public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1109 public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1110 public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1111 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1112 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1113 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1114 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1115 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1116 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1117 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1118 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1119 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1120 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1121 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1122 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1123 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1124 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1125 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1126 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1127 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1128 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1129 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1130 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1131 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1132 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1133 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1134 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1135 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1136 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1137 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1138 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1139 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1140 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1141 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1142 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1143 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1144 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1145 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1146 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1147 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1148 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1149 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1150 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1151 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1152 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1153 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1154 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1155 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1156 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1157 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1158 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1159 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1160 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1161 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1162 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1163 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1164 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1165 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1166 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1167 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1168 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1169 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1170 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1171 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1172 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1173 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1174 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1175 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1176 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1177 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1178 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1179 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1180 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1181 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1182 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1183 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1184 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1185 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1186 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1187 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1188 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1189 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1190 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1191 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1192 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1193 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1194 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1195 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1196 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1197 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1198 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1199 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1200 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1201 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1202 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1203 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1204 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1205 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1206 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1207 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1208 public static class LDKSignOrCreationError {
1209 private LDKSignOrCreationError() {}
1210 export class SignError extends LDKSignOrCreationError {
1213 export class CreationError extends LDKSignOrCreationError {
1214 public CreationError creation_error;
1215 CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1217 static native void init();
1219 static { LDKSignOrCreationError.init(); }
1220 public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1221 public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1222 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1223 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1227 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1229 export interface LDKMessageSendEventsProvider {
1230 get_and_clear_pending_msg_events (): number[];
1233 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1234 throw new Error('unimplemented'); // TODO: bind to WASM
1237 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1240 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1241 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1242 if(!isWasmInitialized) {
1243 throw new Error("initializeWasm() must be awaited first!");
1245 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1246 return nativeResponseValue;
1251 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1253 export interface LDKEventHandler {
1254 handle_event (event: number): void;
1257 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1258 throw new Error('unimplemented'); // TODO: bind to WASM
1261 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1264 // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
1265 export function EventHandler_handle_event(this_arg: number, event: number): void {
1266 if(!isWasmInitialized) {
1267 throw new Error("initializeWasm() must be awaited first!");
1269 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1270 // debug statements here
1275 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1277 export interface LDKEventsProvider {
1278 process_pending_events (handler: number): void;
1281 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1282 throw new Error('unimplemented'); // TODO: bind to WASM
1285 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1288 // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1289 export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1290 if(!isWasmInitialized) {
1291 throw new Error("initializeWasm() must be awaited first!");
1293 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1294 // debug statements here
1299 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1301 export interface LDKAccess {
1302 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1305 export function LDKAccess_new(impl: LDKAccess): number {
1306 throw new Error('unimplemented'); // TODO: bind to WASM
1309 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1312 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1313 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1314 if(!isWasmInitialized) {
1315 throw new Error("initializeWasm() must be awaited first!");
1317 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1318 return nativeResponseValue;
1323 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1325 export interface LDKListen {
1326 block_connected (block: Uint8Array, height: number): void;
1327 block_disconnected (header: Uint8Array, height: number): void;
1330 export function LDKListen_new(impl: LDKListen): number {
1331 throw new Error('unimplemented'); // TODO: bind to WASM
1334 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1337 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1338 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1339 if(!isWasmInitialized) {
1340 throw new Error("initializeWasm() must be awaited first!");
1342 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1343 // debug statements here
1345 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1346 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1347 if(!isWasmInitialized) {
1348 throw new Error("initializeWasm() must be awaited first!");
1350 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1351 // debug statements here
1356 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1358 export interface LDKConfirm {
1359 transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1360 transaction_unconfirmed (txid: Uint8Array): void;
1361 best_block_updated (header: Uint8Array, height: number): void;
1362 get_relevant_txids (): Uint8Array[];
1365 export function LDKConfirm_new(impl: LDKConfirm): number {
1366 throw new Error('unimplemented'); // TODO: bind to WASM
1369 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1372 // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1373 export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1374 if(!isWasmInitialized) {
1375 throw new Error("initializeWasm() must be awaited first!");
1377 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1378 // debug statements here
1380 // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1381 export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1382 if(!isWasmInitialized) {
1383 throw new Error("initializeWasm() must be awaited first!");
1385 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1386 // debug statements here
1388 // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1389 export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1390 if(!isWasmInitialized) {
1391 throw new Error("initializeWasm() must be awaited first!");
1393 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1394 // debug statements here
1396 // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1397 export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1398 if(!isWasmInitialized) {
1399 throw new Error("initializeWasm() must be awaited first!");
1401 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1402 return nativeResponseValue;
1407 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1409 export interface LDKFilter {
1410 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1411 register_output (output: number): number;
1414 export function LDKFilter_new(impl: LDKFilter): number {
1415 throw new Error('unimplemented'); // TODO: bind to WASM
1418 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1421 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1422 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1423 if(!isWasmInitialized) {
1424 throw new Error("initializeWasm() must be awaited first!");
1426 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1427 // debug statements here
1429 // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1430 export function Filter_register_output(this_arg: number, output: number): number {
1431 if(!isWasmInitialized) {
1432 throw new Error("initializeWasm() must be awaited first!");
1434 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1435 return nativeResponseValue;
1440 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1442 export interface LDKPersist {
1443 persist_new_channel (id: number, data: number): number;
1444 update_persisted_channel (id: number, update: number, data: number): number;
1447 export function LDKPersist_new(impl: LDKPersist): number {
1448 throw new Error('unimplemented'); // TODO: bind to WASM
1451 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1454 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1455 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1456 if(!isWasmInitialized) {
1457 throw new Error("initializeWasm() must be awaited first!");
1459 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1460 return nativeResponseValue;
1462 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1463 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1464 if(!isWasmInitialized) {
1465 throw new Error("initializeWasm() must be awaited first!");
1467 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1468 return nativeResponseValue;
1473 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1475 export interface LDKChannelMessageHandler {
1476 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1477 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1478 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1479 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1480 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1481 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1482 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1483 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1484 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1485 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1486 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1487 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1488 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1489 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1490 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1491 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1492 peer_connected (their_node_id: Uint8Array, msg: number): void;
1493 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1494 handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1495 handle_error (their_node_id: Uint8Array, msg: number): void;
1498 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1499 throw new Error('unimplemented'); // TODO: bind to WASM
1502 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1505 // 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
1506 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1507 if(!isWasmInitialized) {
1508 throw new Error("initializeWasm() must be awaited first!");
1510 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1511 // debug statements here
1513 // 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
1514 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1515 if(!isWasmInitialized) {
1516 throw new Error("initializeWasm() must be awaited first!");
1518 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1519 // debug statements here
1521 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1522 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1523 if(!isWasmInitialized) {
1524 throw new Error("initializeWasm() must be awaited first!");
1526 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1527 // debug statements here
1529 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1530 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1531 if(!isWasmInitialized) {
1532 throw new Error("initializeWasm() must be awaited first!");
1534 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1535 // debug statements here
1537 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1538 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1539 if(!isWasmInitialized) {
1540 throw new Error("initializeWasm() must be awaited first!");
1542 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1543 // debug statements here
1545 // 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
1546 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1547 if(!isWasmInitialized) {
1548 throw new Error("initializeWasm() must be awaited first!");
1550 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1551 // debug statements here
1553 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1554 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1555 if(!isWasmInitialized) {
1556 throw new Error("initializeWasm() must be awaited first!");
1558 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1559 // debug statements here
1561 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1562 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1563 if(!isWasmInitialized) {
1564 throw new Error("initializeWasm() must be awaited first!");
1566 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1567 // debug statements here
1569 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1570 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1571 if(!isWasmInitialized) {
1572 throw new Error("initializeWasm() must be awaited first!");
1574 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1575 // debug statements here
1577 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1578 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1579 if(!isWasmInitialized) {
1580 throw new Error("initializeWasm() must be awaited first!");
1582 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1583 // debug statements here
1585 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1586 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1587 if(!isWasmInitialized) {
1588 throw new Error("initializeWasm() must be awaited first!");
1590 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1591 // debug statements here
1593 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1594 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1595 if(!isWasmInitialized) {
1596 throw new Error("initializeWasm() must be awaited first!");
1598 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1599 // debug statements here
1601 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1602 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1603 if(!isWasmInitialized) {
1604 throw new Error("initializeWasm() must be awaited first!");
1606 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1607 // debug statements here
1609 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1610 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1611 if(!isWasmInitialized) {
1612 throw new Error("initializeWasm() must be awaited first!");
1614 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1615 // debug statements here
1617 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1618 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1619 if(!isWasmInitialized) {
1620 throw new Error("initializeWasm() must be awaited first!");
1622 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1623 // debug statements here
1625 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1626 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1627 if(!isWasmInitialized) {
1628 throw new Error("initializeWasm() must be awaited first!");
1630 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1631 // debug statements here
1633 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1634 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1635 if(!isWasmInitialized) {
1636 throw new Error("initializeWasm() must be awaited first!");
1638 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1639 // debug statements here
1641 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1642 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1643 if(!isWasmInitialized) {
1644 throw new Error("initializeWasm() must be awaited first!");
1646 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1647 // debug statements here
1649 // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1650 export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1651 if(!isWasmInitialized) {
1652 throw new Error("initializeWasm() must be awaited first!");
1654 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1655 // debug statements here
1657 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1658 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1659 if(!isWasmInitialized) {
1660 throw new Error("initializeWasm() must be awaited first!");
1662 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1663 // debug statements here
1668 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1670 export interface LDKRoutingMessageHandler {
1671 handle_node_announcement (msg: number): number;
1672 handle_channel_announcement (msg: number): number;
1673 handle_channel_update (msg: number): number;
1674 handle_htlc_fail_channel_update (update: number): void;
1675 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1676 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1677 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1678 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1679 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1680 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1681 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1684 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1685 throw new Error('unimplemented'); // TODO: bind to WASM
1688 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1691 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1692 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1693 if(!isWasmInitialized) {
1694 throw new Error("initializeWasm() must be awaited first!");
1696 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1697 return nativeResponseValue;
1699 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1700 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1701 if(!isWasmInitialized) {
1702 throw new Error("initializeWasm() must be awaited first!");
1704 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1705 return nativeResponseValue;
1707 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1708 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1709 if(!isWasmInitialized) {
1710 throw new Error("initializeWasm() must be awaited first!");
1712 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1713 return nativeResponseValue;
1715 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1716 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1717 if(!isWasmInitialized) {
1718 throw new Error("initializeWasm() must be awaited first!");
1720 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1721 // debug statements here
1723 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1724 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1725 if(!isWasmInitialized) {
1726 throw new Error("initializeWasm() must be awaited first!");
1728 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1729 return nativeResponseValue;
1731 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1732 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1733 if(!isWasmInitialized) {
1734 throw new Error("initializeWasm() must be awaited first!");
1736 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1737 return nativeResponseValue;
1739 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1740 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1741 if(!isWasmInitialized) {
1742 throw new Error("initializeWasm() must be awaited first!");
1744 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1745 // debug statements here
1747 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1748 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1749 if(!isWasmInitialized) {
1750 throw new Error("initializeWasm() must be awaited first!");
1752 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1753 return nativeResponseValue;
1755 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1756 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1757 if(!isWasmInitialized) {
1758 throw new Error("initializeWasm() must be awaited first!");
1760 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1761 return nativeResponseValue;
1763 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1764 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1765 if(!isWasmInitialized) {
1766 throw new Error("initializeWasm() must be awaited first!");
1768 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1769 return nativeResponseValue;
1771 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1772 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1773 if(!isWasmInitialized) {
1774 throw new Error("initializeWasm() must be awaited first!");
1776 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1777 return nativeResponseValue;
1782 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1784 export interface LDKSocketDescriptor {
1785 send_data (data: Uint8Array, resume_read: boolean): number;
1786 disconnect_socket (): void;
1787 eq (other_arg: number): boolean;
1791 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1792 throw new Error('unimplemented'); // TODO: bind to WASM
1795 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1798 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1799 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1800 if(!isWasmInitialized) {
1801 throw new Error("initializeWasm() must be awaited first!");
1803 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1804 return nativeResponseValue;
1806 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1807 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1808 if(!isWasmInitialized) {
1809 throw new Error("initializeWasm() must be awaited first!");
1811 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1812 // debug statements here
1814 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1815 export function SocketDescriptor_hash(this_arg: number): number {
1816 if(!isWasmInitialized) {
1817 throw new Error("initializeWasm() must be awaited first!");
1819 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1820 return nativeResponseValue;
1825 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1827 export interface LDKChannelManagerPersister {
1828 persist_manager (channel_manager: number): number;
1831 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
1832 throw new Error('unimplemented'); // TODO: bind to WASM
1835 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1838 // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1839 export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
1840 if(!isWasmInitialized) {
1841 throw new Error("initializeWasm() must be awaited first!");
1843 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
1844 return nativeResponseValue;
1846 public static class LDKFallback {
1847 private LDKFallback() {}
1848 export class SegWitProgram extends LDKFallback {
1849 public number version;
1850 public Uint8Array program;
1851 SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
1853 export class PubKeyHash extends LDKFallback {
1854 public Uint8Array pub_key_hash;
1855 PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1857 export class ScriptHash extends LDKFallback {
1858 public Uint8Array script_hash;
1859 ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
1861 static native void init();
1863 static { LDKFallback.init(); }
1864 public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1865 // struct LDKStr _ldk_get_compiled_version(void);
1866 export function _ldk_get_compiled_version(): String {
1867 if(!isWasmInitialized) {
1868 throw new Error("initializeWasm() must be awaited first!");
1870 const nativeResponseValue = wasm._ldk_get_compiled_version();
1871 return nativeResponseValue;
1873 // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1874 export function _ldk_c_bindings_get_compiled_version(): String {
1875 if(!isWasmInitialized) {
1876 throw new Error("initializeWasm() must be awaited first!");
1878 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
1879 return nativeResponseValue;
1881 // void Transaction_free(struct LDKTransaction _res);
1882 export function Transaction_free(_res: Uint8Array): void {
1883 if(!isWasmInitialized) {
1884 throw new Error("initializeWasm() must be awaited first!");
1886 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1887 // debug statements here
1889 // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
1890 export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
1891 if(!isWasmInitialized) {
1892 throw new Error("initializeWasm() must be awaited first!");
1894 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
1895 return nativeResponseValue;
1897 // void TxOut_free(struct LDKTxOut _res);
1898 export function TxOut_free(_res: number): void {
1899 if(!isWasmInitialized) {
1900 throw new Error("initializeWasm() must be awaited first!");
1902 const nativeResponseValue = wasm.TxOut_free(_res);
1903 // debug statements here
1905 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1906 export function TxOut_clone(orig: number): number {
1907 if(!isWasmInitialized) {
1908 throw new Error("initializeWasm() must be awaited first!");
1910 const nativeResponseValue = wasm.TxOut_clone(orig);
1911 return nativeResponseValue;
1913 // void Str_free(struct LDKStr _res);
1914 export function Str_free(_res: String): void {
1915 if(!isWasmInitialized) {
1916 throw new Error("initializeWasm() must be awaited first!");
1918 const nativeResponseValue = wasm.Str_free(_res);
1919 // debug statements here
1921 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1922 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1923 if(!isWasmInitialized) {
1924 throw new Error("initializeWasm() must be awaited first!");
1926 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1927 return nativeResponseValue;
1929 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1930 export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
1931 if(!isWasmInitialized) {
1932 throw new Error("initializeWasm() must be awaited first!");
1934 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1935 return nativeResponseValue;
1937 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1938 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1939 if(!isWasmInitialized) {
1940 throw new Error("initializeWasm() must be awaited first!");
1942 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1943 // debug statements here
1945 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1946 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1947 if(!isWasmInitialized) {
1948 throw new Error("initializeWasm() must be awaited first!");
1950 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1951 return nativeResponseValue;
1953 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1954 export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
1955 if(!isWasmInitialized) {
1956 throw new Error("initializeWasm() must be awaited first!");
1958 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1959 return nativeResponseValue;
1961 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1962 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1963 if(!isWasmInitialized) {
1964 throw new Error("initializeWasm() must be awaited first!");
1966 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1967 // debug statements here
1969 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
1970 export function CResult_PublicKeyErrorZ_clone(orig: number): number {
1971 if(!isWasmInitialized) {
1972 throw new Error("initializeWasm() must be awaited first!");
1974 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
1975 return nativeResponseValue;
1977 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1978 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1979 if(!isWasmInitialized) {
1980 throw new Error("initializeWasm() must be awaited first!");
1982 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1983 return nativeResponseValue;
1985 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1986 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1987 if(!isWasmInitialized) {
1988 throw new Error("initializeWasm() must be awaited first!");
1990 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1991 return nativeResponseValue;
1993 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1994 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1995 if(!isWasmInitialized) {
1996 throw new Error("initializeWasm() must be awaited first!");
1998 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1999 // debug statements here
2001 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2002 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2003 if(!isWasmInitialized) {
2004 throw new Error("initializeWasm() must be awaited first!");
2006 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2007 return nativeResponseValue;
2009 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2010 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2011 if(!isWasmInitialized) {
2012 throw new Error("initializeWasm() must be awaited first!");
2014 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2015 return nativeResponseValue;
2017 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2018 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2019 if(!isWasmInitialized) {
2020 throw new Error("initializeWasm() must be awaited first!");
2022 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2023 return nativeResponseValue;
2025 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2026 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2027 if(!isWasmInitialized) {
2028 throw new Error("initializeWasm() must be awaited first!");
2030 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2031 // debug statements here
2033 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2034 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2035 if(!isWasmInitialized) {
2036 throw new Error("initializeWasm() must be awaited first!");
2038 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2039 return nativeResponseValue;
2041 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2042 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2043 if(!isWasmInitialized) {
2044 throw new Error("initializeWasm() must be awaited first!");
2046 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2047 return nativeResponseValue;
2049 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2050 export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2051 if(!isWasmInitialized) {
2052 throw new Error("initializeWasm() must be awaited first!");
2054 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2055 return nativeResponseValue;
2057 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2058 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2059 if(!isWasmInitialized) {
2060 throw new Error("initializeWasm() must be awaited first!");
2062 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2063 // debug statements here
2065 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2066 export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2067 if(!isWasmInitialized) {
2068 throw new Error("initializeWasm() must be awaited first!");
2070 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2071 return nativeResponseValue;
2073 // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2074 export function COption_u32Z_some(o: number): number {
2075 if(!isWasmInitialized) {
2076 throw new Error("initializeWasm() must be awaited first!");
2078 const nativeResponseValue = wasm.COption_u32Z_some(o);
2079 return nativeResponseValue;
2081 // struct LDKCOption_u32Z COption_u32Z_none(void);
2082 export function COption_u32Z_none(): number {
2083 if(!isWasmInitialized) {
2084 throw new Error("initializeWasm() must be awaited first!");
2086 const nativeResponseValue = wasm.COption_u32Z_none();
2087 return nativeResponseValue;
2089 // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2090 export function COption_u32Z_free(_res: number): void {
2091 if(!isWasmInitialized) {
2092 throw new Error("initializeWasm() must be awaited first!");
2094 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2095 // debug statements here
2097 // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2098 export function COption_u32Z_clone(orig: number): number {
2099 if(!isWasmInitialized) {
2100 throw new Error("initializeWasm() must be awaited first!");
2102 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2103 return nativeResponseValue;
2105 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2106 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2107 if(!isWasmInitialized) {
2108 throw new Error("initializeWasm() must be awaited first!");
2110 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2111 return nativeResponseValue;
2113 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2114 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2115 if(!isWasmInitialized) {
2116 throw new Error("initializeWasm() must be awaited first!");
2118 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2119 return nativeResponseValue;
2121 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2122 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2123 if(!isWasmInitialized) {
2124 throw new Error("initializeWasm() must be awaited first!");
2126 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2127 // debug statements here
2129 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2130 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2131 if(!isWasmInitialized) {
2132 throw new Error("initializeWasm() must be awaited first!");
2134 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2135 return nativeResponseValue;
2137 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2138 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2139 if(!isWasmInitialized) {
2140 throw new Error("initializeWasm() must be awaited first!");
2142 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2143 return nativeResponseValue;
2145 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2146 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2147 if(!isWasmInitialized) {
2148 throw new Error("initializeWasm() must be awaited first!");
2150 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2151 return nativeResponseValue;
2153 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2154 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2155 if(!isWasmInitialized) {
2156 throw new Error("initializeWasm() must be awaited first!");
2158 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2159 // debug statements here
2161 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2162 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2163 if(!isWasmInitialized) {
2164 throw new Error("initializeWasm() must be awaited first!");
2166 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2167 return nativeResponseValue;
2169 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2170 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2171 if(!isWasmInitialized) {
2172 throw new Error("initializeWasm() must be awaited first!");
2174 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2175 return nativeResponseValue;
2177 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2178 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2179 if(!isWasmInitialized) {
2180 throw new Error("initializeWasm() must be awaited first!");
2182 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2183 return nativeResponseValue;
2185 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2186 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2187 if(!isWasmInitialized) {
2188 throw new Error("initializeWasm() must be awaited first!");
2190 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2191 // debug statements here
2193 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2194 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2195 if(!isWasmInitialized) {
2196 throw new Error("initializeWasm() must be awaited first!");
2198 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2199 return nativeResponseValue;
2201 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2202 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2203 if(!isWasmInitialized) {
2204 throw new Error("initializeWasm() must be awaited first!");
2206 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2207 // debug statements here
2209 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2210 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2211 if(!isWasmInitialized) {
2212 throw new Error("initializeWasm() must be awaited first!");
2214 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2215 return nativeResponseValue;
2217 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2218 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2219 if(!isWasmInitialized) {
2220 throw new Error("initializeWasm() must be awaited first!");
2222 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2223 return nativeResponseValue;
2225 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2226 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2227 if(!isWasmInitialized) {
2228 throw new Error("initializeWasm() must be awaited first!");
2230 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2231 // debug statements here
2233 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2234 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2235 if(!isWasmInitialized) {
2236 throw new Error("initializeWasm() must be awaited first!");
2238 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2239 return nativeResponseValue;
2241 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2242 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2243 if(!isWasmInitialized) {
2244 throw new Error("initializeWasm() must be awaited first!");
2246 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2247 return nativeResponseValue;
2249 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2250 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2251 if(!isWasmInitialized) {
2252 throw new Error("initializeWasm() must be awaited first!");
2254 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2255 return nativeResponseValue;
2257 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2258 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2259 if(!isWasmInitialized) {
2260 throw new Error("initializeWasm() must be awaited first!");
2262 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2263 // debug statements here
2265 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2266 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2267 if(!isWasmInitialized) {
2268 throw new Error("initializeWasm() must be awaited first!");
2270 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2271 return nativeResponseValue;
2273 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2274 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2275 if(!isWasmInitialized) {
2276 throw new Error("initializeWasm() must be awaited first!");
2278 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2279 return nativeResponseValue;
2281 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2282 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2283 if(!isWasmInitialized) {
2284 throw new Error("initializeWasm() must be awaited first!");
2286 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2287 return nativeResponseValue;
2289 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2290 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2291 if(!isWasmInitialized) {
2292 throw new Error("initializeWasm() must be awaited first!");
2294 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2295 // debug statements here
2297 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2298 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2299 if(!isWasmInitialized) {
2300 throw new Error("initializeWasm() must be awaited first!");
2302 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2303 return nativeResponseValue;
2305 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2306 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2307 if(!isWasmInitialized) {
2308 throw new Error("initializeWasm() must be awaited first!");
2310 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2311 return nativeResponseValue;
2313 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2314 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2315 if(!isWasmInitialized) {
2316 throw new Error("initializeWasm() must be awaited first!");
2318 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2319 return nativeResponseValue;
2321 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2322 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2323 if(!isWasmInitialized) {
2324 throw new Error("initializeWasm() must be awaited first!");
2326 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2327 // debug statements here
2329 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2330 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2331 if(!isWasmInitialized) {
2332 throw new Error("initializeWasm() must be awaited first!");
2334 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2335 return nativeResponseValue;
2337 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2338 export function CResult_CVec_SignatureZNoneZ_err(): number {
2339 if(!isWasmInitialized) {
2340 throw new Error("initializeWasm() must be awaited first!");
2342 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2343 return nativeResponseValue;
2345 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2346 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2347 if(!isWasmInitialized) {
2348 throw new Error("initializeWasm() must be awaited first!");
2350 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2351 // debug statements here
2353 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2354 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2355 if(!isWasmInitialized) {
2356 throw new Error("initializeWasm() must be awaited first!");
2358 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2359 return nativeResponseValue;
2361 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2362 export function CResult_NoneErrorZ_ok(): number {
2363 if(!isWasmInitialized) {
2364 throw new Error("initializeWasm() must be awaited first!");
2366 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2367 return nativeResponseValue;
2369 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2370 export function CResult_NoneErrorZ_err(e: IOError): number {
2371 if(!isWasmInitialized) {
2372 throw new Error("initializeWasm() must be awaited first!");
2374 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2375 return nativeResponseValue;
2377 // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2378 export function CResult_NoneErrorZ_free(_res: number): void {
2379 if(!isWasmInitialized) {
2380 throw new Error("initializeWasm() must be awaited first!");
2382 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2383 // debug statements here
2385 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2386 export function CResult_NoneErrorZ_clone(orig: number): number {
2387 if(!isWasmInitialized) {
2388 throw new Error("initializeWasm() must be awaited first!");
2390 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2391 return nativeResponseValue;
2393 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2394 export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2395 if(!isWasmInitialized) {
2396 throw new Error("initializeWasm() must be awaited first!");
2398 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2399 return nativeResponseValue;
2401 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2402 export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2403 if(!isWasmInitialized) {
2404 throw new Error("initializeWasm() must be awaited first!");
2406 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2407 return nativeResponseValue;
2409 // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2410 export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2411 if(!isWasmInitialized) {
2412 throw new Error("initializeWasm() must be awaited first!");
2414 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2415 // debug statements here
2417 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2418 export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2419 if(!isWasmInitialized) {
2420 throw new Error("initializeWasm() must be awaited first!");
2422 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2423 return nativeResponseValue;
2425 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2426 export function CVec_RouteHopZ_free(_res: number[]): void {
2427 if(!isWasmInitialized) {
2428 throw new Error("initializeWasm() must be awaited first!");
2430 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2431 // debug statements here
2433 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2434 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2435 if(!isWasmInitialized) {
2436 throw new Error("initializeWasm() must be awaited first!");
2438 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2439 // debug statements here
2441 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2442 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2443 if(!isWasmInitialized) {
2444 throw new Error("initializeWasm() must be awaited first!");
2446 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2447 return nativeResponseValue;
2449 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2450 export function CResult_RouteDecodeErrorZ_err(e: number): number {
2451 if(!isWasmInitialized) {
2452 throw new Error("initializeWasm() must be awaited first!");
2454 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2455 return nativeResponseValue;
2457 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2458 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2459 if(!isWasmInitialized) {
2460 throw new Error("initializeWasm() must be awaited first!");
2462 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2463 // debug statements here
2465 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2466 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2467 if(!isWasmInitialized) {
2468 throw new Error("initializeWasm() must be awaited first!");
2470 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2471 return nativeResponseValue;
2473 // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2474 export function COption_u64Z_some(o: number): number {
2475 if(!isWasmInitialized) {
2476 throw new Error("initializeWasm() must be awaited first!");
2478 const nativeResponseValue = wasm.COption_u64Z_some(o);
2479 return nativeResponseValue;
2481 // struct LDKCOption_u64Z COption_u64Z_none(void);
2482 export function COption_u64Z_none(): number {
2483 if(!isWasmInitialized) {
2484 throw new Error("initializeWasm() must be awaited first!");
2486 const nativeResponseValue = wasm.COption_u64Z_none();
2487 return nativeResponseValue;
2489 // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2490 export function COption_u64Z_free(_res: number): void {
2491 if(!isWasmInitialized) {
2492 throw new Error("initializeWasm() must be awaited first!");
2494 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2495 // debug statements here
2497 // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2498 export function COption_u64Z_clone(orig: number): number {
2499 if(!isWasmInitialized) {
2500 throw new Error("initializeWasm() must be awaited first!");
2502 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2503 return nativeResponseValue;
2505 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2506 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2507 if(!isWasmInitialized) {
2508 throw new Error("initializeWasm() must be awaited first!");
2510 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2511 // debug statements here
2513 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2514 export function CVec_RouteHintZ_free(_res: number[]): void {
2515 if(!isWasmInitialized) {
2516 throw new Error("initializeWasm() must be awaited first!");
2518 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2519 // debug statements here
2521 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2522 export function CResult_RouteLightningErrorZ_ok(o: number): number {
2523 if(!isWasmInitialized) {
2524 throw new Error("initializeWasm() must be awaited first!");
2526 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2527 return nativeResponseValue;
2529 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2530 export function CResult_RouteLightningErrorZ_err(e: number): number {
2531 if(!isWasmInitialized) {
2532 throw new Error("initializeWasm() must be awaited first!");
2534 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2535 return nativeResponseValue;
2537 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2538 export function CResult_RouteLightningErrorZ_free(_res: number): void {
2539 if(!isWasmInitialized) {
2540 throw new Error("initializeWasm() must be awaited first!");
2542 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2543 // debug statements here
2545 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2546 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2547 if(!isWasmInitialized) {
2548 throw new Error("initializeWasm() must be awaited first!");
2550 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2551 return nativeResponseValue;
2553 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2554 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2555 if(!isWasmInitialized) {
2556 throw new Error("initializeWasm() must be awaited first!");
2558 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2559 return nativeResponseValue;
2561 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2562 export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
2563 if(!isWasmInitialized) {
2564 throw new Error("initializeWasm() must be awaited first!");
2566 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2567 return nativeResponseValue;
2569 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2570 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2571 if(!isWasmInitialized) {
2572 throw new Error("initializeWasm() must be awaited first!");
2574 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2575 // debug statements here
2577 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2578 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2579 if(!isWasmInitialized) {
2580 throw new Error("initializeWasm() must be awaited first!");
2582 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2583 return nativeResponseValue;
2585 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
2586 export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
2587 if(!isWasmInitialized) {
2588 throw new Error("initializeWasm() must be awaited first!");
2590 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
2591 return nativeResponseValue;
2593 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2594 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2595 if(!isWasmInitialized) {
2596 throw new Error("initializeWasm() must be awaited first!");
2598 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2599 return nativeResponseValue;
2601 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2602 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2603 if(!isWasmInitialized) {
2604 throw new Error("initializeWasm() must be awaited first!");
2606 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2607 // debug statements here
2609 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2610 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2611 if(!isWasmInitialized) {
2612 throw new Error("initializeWasm() must be awaited first!");
2614 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2615 // debug statements here
2617 // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2618 export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2619 if(!isWasmInitialized) {
2620 throw new Error("initializeWasm() must be awaited first!");
2622 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2623 // debug statements here
2625 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2626 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2627 if(!isWasmInitialized) {
2628 throw new Error("initializeWasm() must be awaited first!");
2630 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2631 return nativeResponseValue;
2633 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2634 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
2635 if(!isWasmInitialized) {
2636 throw new Error("initializeWasm() must be awaited first!");
2638 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2639 return nativeResponseValue;
2641 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2642 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2643 if(!isWasmInitialized) {
2644 throw new Error("initializeWasm() must be awaited first!");
2646 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2647 // debug statements here
2649 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2650 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2651 if(!isWasmInitialized) {
2652 throw new Error("initializeWasm() must be awaited first!");
2654 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2655 return nativeResponseValue;
2657 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2658 export function CVec_MonitorEventZ_free(_res: number[]): void {
2659 if(!isWasmInitialized) {
2660 throw new Error("initializeWasm() must be awaited first!");
2662 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2663 // debug statements here
2665 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2666 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2667 if(!isWasmInitialized) {
2668 throw new Error("initializeWasm() must be awaited first!");
2670 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2671 return nativeResponseValue;
2673 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2674 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2675 if(!isWasmInitialized) {
2676 throw new Error("initializeWasm() must be awaited first!");
2678 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2679 return nativeResponseValue;
2681 // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2682 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2683 if(!isWasmInitialized) {
2684 throw new Error("initializeWasm() must be awaited first!");
2686 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2687 // debug statements here
2689 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
2690 export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
2691 if(!isWasmInitialized) {
2692 throw new Error("initializeWasm() must be awaited first!");
2694 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
2695 return nativeResponseValue;
2697 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2698 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2699 if(!isWasmInitialized) {
2700 throw new Error("initializeWasm() must be awaited first!");
2702 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2703 // debug statements here
2705 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2706 export function CVec_MessageSendEventZ_free(_res: number[]): void {
2707 if(!isWasmInitialized) {
2708 throw new Error("initializeWasm() must be awaited first!");
2710 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2711 // debug statements here
2713 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2714 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2715 if(!isWasmInitialized) {
2716 throw new Error("initializeWasm() must be awaited first!");
2718 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2719 return nativeResponseValue;
2721 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2722 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2723 if(!isWasmInitialized) {
2724 throw new Error("initializeWasm() must be awaited first!");
2726 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2727 return nativeResponseValue;
2729 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2730 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2731 if(!isWasmInitialized) {
2732 throw new Error("initializeWasm() must be awaited first!");
2734 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2735 // debug statements here
2737 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2738 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2739 if(!isWasmInitialized) {
2740 throw new Error("initializeWasm() must be awaited first!");
2742 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2743 return nativeResponseValue;
2745 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2746 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2747 if(!isWasmInitialized) {
2748 throw new Error("initializeWasm() must be awaited first!");
2750 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2751 return nativeResponseValue;
2753 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2754 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2755 if(!isWasmInitialized) {
2756 throw new Error("initializeWasm() must be awaited first!");
2758 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2759 // debug statements here
2761 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2762 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2763 if(!isWasmInitialized) {
2764 throw new Error("initializeWasm() must be awaited first!");
2766 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2767 return nativeResponseValue;
2769 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2770 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2771 if(!isWasmInitialized) {
2772 throw new Error("initializeWasm() must be awaited first!");
2774 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2775 return nativeResponseValue;
2777 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2778 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2779 if(!isWasmInitialized) {
2780 throw new Error("initializeWasm() must be awaited first!");
2782 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2783 // debug statements here
2785 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2786 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2787 if(!isWasmInitialized) {
2788 throw new Error("initializeWasm() must be awaited first!");
2790 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2791 return nativeResponseValue;
2793 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2794 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2795 if(!isWasmInitialized) {
2796 throw new Error("initializeWasm() must be awaited first!");
2798 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2799 return nativeResponseValue;
2801 // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2802 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2803 if(!isWasmInitialized) {
2804 throw new Error("initializeWasm() must be awaited first!");
2806 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2807 // debug statements here
2809 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
2810 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2811 if(!isWasmInitialized) {
2812 throw new Error("initializeWasm() must be awaited first!");
2814 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
2815 return nativeResponseValue;
2817 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2818 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2819 if(!isWasmInitialized) {
2820 throw new Error("initializeWasm() must be awaited first!");
2822 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
2823 return nativeResponseValue;
2825 // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
2826 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2827 if(!isWasmInitialized) {
2828 throw new Error("initializeWasm() must be awaited first!");
2830 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
2831 // debug statements here
2833 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2834 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2835 if(!isWasmInitialized) {
2836 throw new Error("initializeWasm() must be awaited first!");
2838 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2839 return nativeResponseValue;
2841 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
2842 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2843 if(!isWasmInitialized) {
2844 throw new Error("initializeWasm() must be awaited first!");
2846 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
2847 return nativeResponseValue;
2849 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2850 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2851 if(!isWasmInitialized) {
2852 throw new Error("initializeWasm() must be awaited first!");
2854 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
2855 return nativeResponseValue;
2857 // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
2858 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2859 if(!isWasmInitialized) {
2860 throw new Error("initializeWasm() must be awaited first!");
2862 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
2863 // debug statements here
2865 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2866 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2867 if(!isWasmInitialized) {
2868 throw new Error("initializeWasm() must be awaited first!");
2870 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2871 return nativeResponseValue;
2873 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2874 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2875 if(!isWasmInitialized) {
2876 throw new Error("initializeWasm() must be awaited first!");
2878 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2879 return nativeResponseValue;
2881 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2882 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2883 if(!isWasmInitialized) {
2884 throw new Error("initializeWasm() must be awaited first!");
2886 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2887 return nativeResponseValue;
2889 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2890 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2891 if(!isWasmInitialized) {
2892 throw new Error("initializeWasm() must be awaited first!");
2894 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
2895 // debug statements here
2897 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2898 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2899 if(!isWasmInitialized) {
2900 throw new Error("initializeWasm() must be awaited first!");
2902 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
2903 return nativeResponseValue;
2905 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2906 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
2907 if(!isWasmInitialized) {
2908 throw new Error("initializeWasm() must be awaited first!");
2910 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
2911 return nativeResponseValue;
2913 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
2914 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
2915 if(!isWasmInitialized) {
2916 throw new Error("initializeWasm() must be awaited first!");
2918 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
2919 return nativeResponseValue;
2921 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
2922 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
2923 if(!isWasmInitialized) {
2924 throw new Error("initializeWasm() must be awaited first!");
2926 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
2927 // debug statements here
2929 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
2930 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
2931 if(!isWasmInitialized) {
2932 throw new Error("initializeWasm() must be awaited first!");
2934 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
2935 return nativeResponseValue;
2937 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
2938 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
2939 if(!isWasmInitialized) {
2940 throw new Error("initializeWasm() must be awaited first!");
2942 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
2943 return nativeResponseValue;
2945 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
2946 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
2947 if(!isWasmInitialized) {
2948 throw new Error("initializeWasm() must be awaited first!");
2950 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
2951 // debug statements here
2953 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
2954 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
2955 if(!isWasmInitialized) {
2956 throw new Error("initializeWasm() must be awaited first!");
2958 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
2959 return nativeResponseValue;
2961 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
2962 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
2963 if(!isWasmInitialized) {
2964 throw new Error("initializeWasm() must be awaited first!");
2966 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
2967 return nativeResponseValue;
2969 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
2970 export function CResult_SignatureNoneZ_err(): number {
2971 if(!isWasmInitialized) {
2972 throw new Error("initializeWasm() must be awaited first!");
2974 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
2975 return nativeResponseValue;
2977 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
2978 export function CResult_SignatureNoneZ_free(_res: number): void {
2979 if(!isWasmInitialized) {
2980 throw new Error("initializeWasm() must be awaited first!");
2982 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
2983 // debug statements here
2985 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
2986 export function CResult_SignatureNoneZ_clone(orig: number): number {
2987 if(!isWasmInitialized) {
2988 throw new Error("initializeWasm() must be awaited first!");
2990 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
2991 return nativeResponseValue;
2993 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
2994 export function CResult_SignDecodeErrorZ_ok(o: number): number {
2995 if(!isWasmInitialized) {
2996 throw new Error("initializeWasm() must be awaited first!");
2998 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
2999 return nativeResponseValue;
3001 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3002 export function CResult_SignDecodeErrorZ_err(e: number): number {
3003 if(!isWasmInitialized) {
3004 throw new Error("initializeWasm() must be awaited first!");
3006 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3007 return nativeResponseValue;
3009 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3010 export function CResult_SignDecodeErrorZ_free(_res: number): void {
3011 if(!isWasmInitialized) {
3012 throw new Error("initializeWasm() must be awaited first!");
3014 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3015 // debug statements here
3017 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3018 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3019 if(!isWasmInitialized) {
3020 throw new Error("initializeWasm() must be awaited first!");
3022 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3023 return nativeResponseValue;
3025 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3026 export function CVec_u8Z_free(_res: Uint8Array): void {
3027 if(!isWasmInitialized) {
3028 throw new Error("initializeWasm() must be awaited first!");
3030 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3031 // debug statements here
3033 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3034 export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3035 if(!isWasmInitialized) {
3036 throw new Error("initializeWasm() must be awaited first!");
3038 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3039 return nativeResponseValue;
3041 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3042 export function CResult_RecoverableSignatureNoneZ_err(): number {
3043 if(!isWasmInitialized) {
3044 throw new Error("initializeWasm() must be awaited first!");
3046 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3047 return nativeResponseValue;
3049 // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3050 export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3051 if(!isWasmInitialized) {
3052 throw new Error("initializeWasm() must be awaited first!");
3054 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3055 // debug statements here
3057 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3058 export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3059 if(!isWasmInitialized) {
3060 throw new Error("initializeWasm() must be awaited first!");
3062 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3063 return nativeResponseValue;
3065 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3066 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3067 if(!isWasmInitialized) {
3068 throw new Error("initializeWasm() must be awaited first!");
3070 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3071 // debug statements here
3073 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3074 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3075 if(!isWasmInitialized) {
3076 throw new Error("initializeWasm() must be awaited first!");
3078 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3079 return nativeResponseValue;
3081 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3082 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3083 if(!isWasmInitialized) {
3084 throw new Error("initializeWasm() must be awaited first!");
3086 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3087 return nativeResponseValue;
3089 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3090 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3091 if(!isWasmInitialized) {
3092 throw new Error("initializeWasm() must be awaited first!");
3094 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3095 // debug statements here
3097 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3098 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3099 if(!isWasmInitialized) {
3100 throw new Error("initializeWasm() must be awaited first!");
3102 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3103 return nativeResponseValue;
3105 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3106 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3107 if(!isWasmInitialized) {
3108 throw new Error("initializeWasm() must be awaited first!");
3110 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3111 return nativeResponseValue;
3113 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3114 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3115 if(!isWasmInitialized) {
3116 throw new Error("initializeWasm() must be awaited first!");
3118 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3119 return nativeResponseValue;
3121 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3122 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3123 if(!isWasmInitialized) {
3124 throw new Error("initializeWasm() must be awaited first!");
3126 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3127 // debug statements here
3129 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3130 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3131 if(!isWasmInitialized) {
3132 throw new Error("initializeWasm() must be awaited first!");
3134 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3135 return nativeResponseValue;
3137 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3138 export function CVec_TxOutZ_free(_res: number[]): void {
3139 if(!isWasmInitialized) {
3140 throw new Error("initializeWasm() must be awaited first!");
3142 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3143 // debug statements here
3145 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3146 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3147 if(!isWasmInitialized) {
3148 throw new Error("initializeWasm() must be awaited first!");
3150 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3151 return nativeResponseValue;
3153 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3154 export function CResult_TransactionNoneZ_err(): number {
3155 if(!isWasmInitialized) {
3156 throw new Error("initializeWasm() must be awaited first!");
3158 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3159 return nativeResponseValue;
3161 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3162 export function CResult_TransactionNoneZ_free(_res: number): void {
3163 if(!isWasmInitialized) {
3164 throw new Error("initializeWasm() must be awaited first!");
3166 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3167 // debug statements here
3169 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3170 export function CResult_TransactionNoneZ_clone(orig: number): number {
3171 if(!isWasmInitialized) {
3172 throw new Error("initializeWasm() must be awaited first!");
3174 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3175 return nativeResponseValue;
3177 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3178 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3179 if(!isWasmInitialized) {
3180 throw new Error("initializeWasm() must be awaited first!");
3182 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3183 return nativeResponseValue;
3185 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3186 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3187 if(!isWasmInitialized) {
3188 throw new Error("initializeWasm() must be awaited first!");
3190 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3191 // debug statements here
3193 // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3194 export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3195 if(!isWasmInitialized) {
3196 throw new Error("initializeWasm() must be awaited first!");
3198 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3199 // debug statements here
3201 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3202 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3203 if(!isWasmInitialized) {
3204 throw new Error("initializeWasm() must be awaited first!");
3206 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3207 return nativeResponseValue;
3209 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3210 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3211 if(!isWasmInitialized) {
3212 throw new Error("initializeWasm() must be awaited first!");
3214 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3215 return nativeResponseValue;
3217 // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3218 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3219 if(!isWasmInitialized) {
3220 throw new Error("initializeWasm() must be awaited first!");
3222 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3223 // debug statements here
3225 // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3226 export function COption_u16Z_some(o: number): number {
3227 if(!isWasmInitialized) {
3228 throw new Error("initializeWasm() must be awaited first!");
3230 const nativeResponseValue = wasm.COption_u16Z_some(o);
3231 return nativeResponseValue;
3233 // struct LDKCOption_u16Z COption_u16Z_none(void);
3234 export function COption_u16Z_none(): number {
3235 if(!isWasmInitialized) {
3236 throw new Error("initializeWasm() must be awaited first!");
3238 const nativeResponseValue = wasm.COption_u16Z_none();
3239 return nativeResponseValue;
3241 // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3242 export function COption_u16Z_free(_res: number): void {
3243 if(!isWasmInitialized) {
3244 throw new Error("initializeWasm() must be awaited first!");
3246 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3247 // debug statements here
3249 // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3250 export function COption_u16Z_clone(orig: number): number {
3251 if(!isWasmInitialized) {
3252 throw new Error("initializeWasm() must be awaited first!");
3254 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3255 return nativeResponseValue;
3257 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3258 export function CResult_NoneAPIErrorZ_ok(): number {
3259 if(!isWasmInitialized) {
3260 throw new Error("initializeWasm() must be awaited first!");
3262 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3263 return nativeResponseValue;
3265 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3266 export function CResult_NoneAPIErrorZ_err(e: number): number {
3267 if(!isWasmInitialized) {
3268 throw new Error("initializeWasm() must be awaited first!");
3270 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3271 return nativeResponseValue;
3273 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3274 export function CResult_NoneAPIErrorZ_free(_res: number): void {
3275 if(!isWasmInitialized) {
3276 throw new Error("initializeWasm() must be awaited first!");
3278 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3279 // debug statements here
3281 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3282 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3283 if(!isWasmInitialized) {
3284 throw new Error("initializeWasm() must be awaited first!");
3286 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3287 return nativeResponseValue;
3289 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3290 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3291 if(!isWasmInitialized) {
3292 throw new Error("initializeWasm() must be awaited first!");
3294 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3295 // debug statements here
3297 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3298 export function CVec_APIErrorZ_free(_res: number[]): void {
3299 if(!isWasmInitialized) {
3300 throw new Error("initializeWasm() must be awaited first!");
3302 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3303 // debug statements here
3305 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3306 export function CResult_NonePaymentSendFailureZ_ok(): number {
3307 if(!isWasmInitialized) {
3308 throw new Error("initializeWasm() must be awaited first!");
3310 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3311 return nativeResponseValue;
3313 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3314 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3315 if(!isWasmInitialized) {
3316 throw new Error("initializeWasm() must be awaited first!");
3318 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3319 return nativeResponseValue;
3321 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3322 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3323 if(!isWasmInitialized) {
3324 throw new Error("initializeWasm() must be awaited first!");
3326 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3327 // debug statements here
3329 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3330 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3331 if(!isWasmInitialized) {
3332 throw new Error("initializeWasm() must be awaited first!");
3334 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3335 return nativeResponseValue;
3337 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3338 export function CVec_NetAddressZ_free(_res: number[]): void {
3339 if(!isWasmInitialized) {
3340 throw new Error("initializeWasm() must be awaited first!");
3342 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3343 // debug statements here
3345 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
3346 export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
3347 if(!isWasmInitialized) {
3348 throw new Error("initializeWasm() must be awaited first!");
3350 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
3351 return nativeResponseValue;
3353 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
3354 export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
3355 if(!isWasmInitialized) {
3356 throw new Error("initializeWasm() must be awaited first!");
3358 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
3359 return nativeResponseValue;
3361 // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
3362 export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
3363 if(!isWasmInitialized) {
3364 throw new Error("initializeWasm() must be awaited first!");
3366 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
3367 // debug statements here
3369 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
3370 export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
3371 if(!isWasmInitialized) {
3372 throw new Error("initializeWasm() must be awaited first!");
3374 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
3375 return nativeResponseValue;
3377 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
3378 export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
3379 if(!isWasmInitialized) {
3380 throw new Error("initializeWasm() must be awaited first!");
3382 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
3383 return nativeResponseValue;
3385 // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
3386 export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
3387 if(!isWasmInitialized) {
3388 throw new Error("initializeWasm() must be awaited first!");
3390 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
3391 // debug statements here
3393 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
3394 export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
3395 if(!isWasmInitialized) {
3396 throw new Error("initializeWasm() must be awaited first!");
3398 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
3399 return nativeResponseValue;
3401 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3402 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3403 if(!isWasmInitialized) {
3404 throw new Error("initializeWasm() must be awaited first!");
3406 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3407 // debug statements here
3409 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3410 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3411 if(!isWasmInitialized) {
3412 throw new Error("initializeWasm() must be awaited first!");
3414 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3415 return nativeResponseValue;
3417 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3418 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3419 if(!isWasmInitialized) {
3420 throw new Error("initializeWasm() must be awaited first!");
3422 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3423 // debug statements here
3425 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3426 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3427 if(!isWasmInitialized) {
3428 throw new Error("initializeWasm() must be awaited first!");
3430 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3431 return nativeResponseValue;
3433 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3434 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3435 if(!isWasmInitialized) {
3436 throw new Error("initializeWasm() must be awaited first!");
3438 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3439 return nativeResponseValue;
3441 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3442 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3443 if(!isWasmInitialized) {
3444 throw new Error("initializeWasm() must be awaited first!");
3446 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3447 // debug statements here
3449 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
3450 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
3451 if(!isWasmInitialized) {
3452 throw new Error("initializeWasm() must be awaited first!");
3454 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
3455 return nativeResponseValue;
3457 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
3458 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
3459 if(!isWasmInitialized) {
3460 throw new Error("initializeWasm() must be awaited first!");
3462 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
3463 return nativeResponseValue;
3465 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
3466 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
3467 if(!isWasmInitialized) {
3468 throw new Error("initializeWasm() must be awaited first!");
3470 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
3471 // debug statements here
3473 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
3474 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
3475 if(!isWasmInitialized) {
3476 throw new Error("initializeWasm() must be awaited first!");
3478 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
3479 return nativeResponseValue;
3481 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
3482 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
3483 if(!isWasmInitialized) {
3484 throw new Error("initializeWasm() must be awaited first!");
3486 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
3487 return nativeResponseValue;
3489 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
3490 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
3491 if(!isWasmInitialized) {
3492 throw new Error("initializeWasm() must be awaited first!");
3494 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
3495 return nativeResponseValue;
3497 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
3498 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
3499 if(!isWasmInitialized) {
3500 throw new Error("initializeWasm() must be awaited first!");
3502 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
3503 // debug statements here
3505 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
3506 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
3507 if(!isWasmInitialized) {
3508 throw new Error("initializeWasm() must be awaited first!");
3510 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
3511 return nativeResponseValue;
3513 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
3514 export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
3515 if(!isWasmInitialized) {
3516 throw new Error("initializeWasm() must be awaited first!");
3518 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
3519 return nativeResponseValue;
3521 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
3522 export function CResult_SiPrefixNoneZ_err(): number {
3523 if(!isWasmInitialized) {
3524 throw new Error("initializeWasm() must be awaited first!");
3526 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
3527 return nativeResponseValue;
3529 // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
3530 export function CResult_SiPrefixNoneZ_free(_res: number): void {
3531 if(!isWasmInitialized) {
3532 throw new Error("initializeWasm() must be awaited first!");
3534 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
3535 // debug statements here
3537 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
3538 export function CResult_SiPrefixNoneZ_clone(orig: number): number {
3539 if(!isWasmInitialized) {
3540 throw new Error("initializeWasm() must be awaited first!");
3542 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
3543 return nativeResponseValue;
3545 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
3546 export function CResult_InvoiceNoneZ_ok(o: number): number {
3547 if(!isWasmInitialized) {
3548 throw new Error("initializeWasm() must be awaited first!");
3550 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
3551 return nativeResponseValue;
3553 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
3554 export function CResult_InvoiceNoneZ_err(): number {
3555 if(!isWasmInitialized) {
3556 throw new Error("initializeWasm() must be awaited first!");
3558 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
3559 return nativeResponseValue;
3561 // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
3562 export function CResult_InvoiceNoneZ_free(_res: number): void {
3563 if(!isWasmInitialized) {
3564 throw new Error("initializeWasm() must be awaited first!");
3566 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
3567 // debug statements here
3569 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
3570 export function CResult_InvoiceNoneZ_clone(orig: number): number {
3571 if(!isWasmInitialized) {
3572 throw new Error("initializeWasm() must be awaited first!");
3574 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
3575 return nativeResponseValue;
3577 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
3578 export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
3579 if(!isWasmInitialized) {
3580 throw new Error("initializeWasm() must be awaited first!");
3582 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
3583 return nativeResponseValue;
3585 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
3586 export function CResult_SignedRawInvoiceNoneZ_err(): number {
3587 if(!isWasmInitialized) {
3588 throw new Error("initializeWasm() must be awaited first!");
3590 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
3591 return nativeResponseValue;
3593 // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
3594 export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
3595 if(!isWasmInitialized) {
3596 throw new Error("initializeWasm() must be awaited first!");
3598 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
3599 // debug statements here
3601 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
3602 export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
3603 if(!isWasmInitialized) {
3604 throw new Error("initializeWasm() must be awaited first!");
3606 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
3607 return nativeResponseValue;
3609 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
3610 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
3611 if(!isWasmInitialized) {
3612 throw new Error("initializeWasm() must be awaited first!");
3614 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
3615 return nativeResponseValue;
3617 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
3618 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
3619 if(!isWasmInitialized) {
3620 throw new Error("initializeWasm() must be awaited first!");
3622 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
3623 return nativeResponseValue;
3625 // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
3626 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
3627 if(!isWasmInitialized) {
3628 throw new Error("initializeWasm() must be awaited first!");
3630 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
3631 // debug statements here
3633 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
3634 export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
3635 if(!isWasmInitialized) {
3636 throw new Error("initializeWasm() must be awaited first!");
3638 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
3639 return nativeResponseValue;
3641 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
3642 export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
3643 if(!isWasmInitialized) {
3644 throw new Error("initializeWasm() must be awaited first!");
3646 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
3647 return nativeResponseValue;
3649 // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
3650 export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
3651 if(!isWasmInitialized) {
3652 throw new Error("initializeWasm() must be awaited first!");
3654 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
3655 // debug statements here
3657 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
3658 export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
3659 if(!isWasmInitialized) {
3660 throw new Error("initializeWasm() must be awaited first!");
3662 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
3663 return nativeResponseValue;
3665 // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
3666 export function CVec_PrivateRouteZ_free(_res: number[]): void {
3667 if(!isWasmInitialized) {
3668 throw new Error("initializeWasm() must be awaited first!");
3670 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
3671 // debug statements here
3673 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
3674 export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
3675 if(!isWasmInitialized) {
3676 throw new Error("initializeWasm() must be awaited first!");
3678 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
3679 return nativeResponseValue;
3681 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
3682 export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
3683 if(!isWasmInitialized) {
3684 throw new Error("initializeWasm() must be awaited first!");
3686 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
3687 return nativeResponseValue;
3689 // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
3690 export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
3691 if(!isWasmInitialized) {
3692 throw new Error("initializeWasm() must be awaited first!");
3694 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
3695 // debug statements here
3697 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
3698 export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
3699 if(!isWasmInitialized) {
3700 throw new Error("initializeWasm() must be awaited first!");
3702 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
3703 return nativeResponseValue;
3705 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
3706 export function CResult_NoneSemanticErrorZ_ok(): number {
3707 if(!isWasmInitialized) {
3708 throw new Error("initializeWasm() must be awaited first!");
3710 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
3711 return nativeResponseValue;
3713 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
3714 export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
3715 if(!isWasmInitialized) {
3716 throw new Error("initializeWasm() must be awaited first!");
3718 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
3719 return nativeResponseValue;
3721 // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
3722 export function CResult_NoneSemanticErrorZ_free(_res: number): void {
3723 if(!isWasmInitialized) {
3724 throw new Error("initializeWasm() must be awaited first!");
3726 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
3727 // debug statements here
3729 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
3730 export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
3731 if(!isWasmInitialized) {
3732 throw new Error("initializeWasm() must be awaited first!");
3734 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
3735 return nativeResponseValue;
3737 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
3738 export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
3739 if(!isWasmInitialized) {
3740 throw new Error("initializeWasm() must be awaited first!");
3742 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
3743 return nativeResponseValue;
3745 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
3746 export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
3747 if(!isWasmInitialized) {
3748 throw new Error("initializeWasm() must be awaited first!");
3750 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
3751 return nativeResponseValue;
3753 // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
3754 export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
3755 if(!isWasmInitialized) {
3756 throw new Error("initializeWasm() must be awaited first!");
3758 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
3759 // debug statements here
3761 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
3762 export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
3763 if(!isWasmInitialized) {
3764 throw new Error("initializeWasm() must be awaited first!");
3766 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
3767 return nativeResponseValue;
3769 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
3770 export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
3771 if(!isWasmInitialized) {
3772 throw new Error("initializeWasm() must be awaited first!");
3774 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
3775 return nativeResponseValue;
3777 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
3778 export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
3779 if(!isWasmInitialized) {
3780 throw new Error("initializeWasm() must be awaited first!");
3782 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
3783 return nativeResponseValue;
3785 // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
3786 export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
3787 if(!isWasmInitialized) {
3788 throw new Error("initializeWasm() must be awaited first!");
3790 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
3791 // debug statements here
3793 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
3794 export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
3795 if(!isWasmInitialized) {
3796 throw new Error("initializeWasm() must be awaited first!");
3798 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
3799 return nativeResponseValue;
3801 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
3802 export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
3803 if(!isWasmInitialized) {
3804 throw new Error("initializeWasm() must be awaited first!");
3806 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
3807 return nativeResponseValue;
3809 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
3810 export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
3811 if(!isWasmInitialized) {
3812 throw new Error("initializeWasm() must be awaited first!");
3814 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
3815 return nativeResponseValue;
3817 // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
3818 export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
3819 if(!isWasmInitialized) {
3820 throw new Error("initializeWasm() must be awaited first!");
3822 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
3823 // debug statements here
3825 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
3826 export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
3827 if(!isWasmInitialized) {
3828 throw new Error("initializeWasm() must be awaited first!");
3830 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
3831 return nativeResponseValue;
3833 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
3834 export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
3835 if(!isWasmInitialized) {
3836 throw new Error("initializeWasm() must be awaited first!");
3838 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
3839 return nativeResponseValue;
3841 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
3842 export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
3843 if(!isWasmInitialized) {
3844 throw new Error("initializeWasm() must be awaited first!");
3846 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
3847 return nativeResponseValue;
3849 // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
3850 export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
3851 if(!isWasmInitialized) {
3852 throw new Error("initializeWasm() must be awaited first!");
3854 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
3855 // debug statements here
3857 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
3858 export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
3859 if(!isWasmInitialized) {
3860 throw new Error("initializeWasm() must be awaited first!");
3862 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
3863 return nativeResponseValue;
3865 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
3866 export function CResult_StringErrorZ_ok(o: String): number {
3867 if(!isWasmInitialized) {
3868 throw new Error("initializeWasm() must be awaited first!");
3870 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
3871 return nativeResponseValue;
3873 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
3874 export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
3875 if(!isWasmInitialized) {
3876 throw new Error("initializeWasm() must be awaited first!");
3878 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
3879 return nativeResponseValue;
3881 // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
3882 export function CResult_StringErrorZ_free(_res: number): void {
3883 if(!isWasmInitialized) {
3884 throw new Error("initializeWasm() must be awaited first!");
3886 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
3887 // debug statements here
3889 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
3890 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
3891 if(!isWasmInitialized) {
3892 throw new Error("initializeWasm() must be awaited first!");
3894 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
3895 return nativeResponseValue;
3897 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3898 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
3899 if(!isWasmInitialized) {
3900 throw new Error("initializeWasm() must be awaited first!");
3902 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
3903 return nativeResponseValue;
3905 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
3906 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
3907 if(!isWasmInitialized) {
3908 throw new Error("initializeWasm() must be awaited first!");
3910 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
3911 // debug statements here
3913 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
3914 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
3915 if(!isWasmInitialized) {
3916 throw new Error("initializeWasm() must be awaited first!");
3918 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
3919 return nativeResponseValue;
3921 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
3922 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
3923 if(!isWasmInitialized) {
3924 throw new Error("initializeWasm() must be awaited first!");
3926 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
3927 return nativeResponseValue;
3929 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3930 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
3931 if(!isWasmInitialized) {
3932 throw new Error("initializeWasm() must be awaited first!");
3934 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
3935 return nativeResponseValue;
3937 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
3938 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
3939 if(!isWasmInitialized) {
3940 throw new Error("initializeWasm() must be awaited first!");
3942 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
3943 // debug statements here
3945 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
3946 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
3947 if(!isWasmInitialized) {
3948 throw new Error("initializeWasm() must be awaited first!");
3950 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
3951 return nativeResponseValue;
3953 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
3954 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
3955 if(!isWasmInitialized) {
3956 throw new Error("initializeWasm() must be awaited first!");
3958 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
3959 return nativeResponseValue;
3961 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
3962 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
3963 if(!isWasmInitialized) {
3964 throw new Error("initializeWasm() must be awaited first!");
3966 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
3967 return nativeResponseValue;
3969 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
3970 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
3971 if(!isWasmInitialized) {
3972 throw new Error("initializeWasm() must be awaited first!");
3974 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
3975 // debug statements here
3977 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
3978 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
3979 if(!isWasmInitialized) {
3980 throw new Error("initializeWasm() must be awaited first!");
3982 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
3983 return nativeResponseValue;
3985 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
3986 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
3987 if(!isWasmInitialized) {
3988 throw new Error("initializeWasm() must be awaited first!");
3990 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
3991 return nativeResponseValue;
3993 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
3994 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
3995 if(!isWasmInitialized) {
3996 throw new Error("initializeWasm() must be awaited first!");
3998 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
3999 return nativeResponseValue;
4001 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
4002 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
4003 if(!isWasmInitialized) {
4004 throw new Error("initializeWasm() must be awaited first!");
4006 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
4007 // debug statements here
4009 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
4010 export function C2Tuple_u32ScriptZ_clone(orig: number): number {
4011 if(!isWasmInitialized) {
4012 throw new Error("initializeWasm() must be awaited first!");
4014 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
4015 return nativeResponseValue;
4017 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
4018 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
4019 if(!isWasmInitialized) {
4020 throw new Error("initializeWasm() must be awaited first!");
4022 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
4023 return nativeResponseValue;
4025 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4026 export function C2Tuple_u32ScriptZ_free(_res: number): void {
4027 if(!isWasmInitialized) {
4028 throw new Error("initializeWasm() must be awaited first!");
4030 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4031 // debug statements here
4033 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4034 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4035 if(!isWasmInitialized) {
4036 throw new Error("initializeWasm() must be awaited first!");
4038 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4039 // debug statements here
4041 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4042 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4043 if(!isWasmInitialized) {
4044 throw new Error("initializeWasm() must be awaited first!");
4046 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4047 return nativeResponseValue;
4049 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4050 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4051 if(!isWasmInitialized) {
4052 throw new Error("initializeWasm() must be awaited first!");
4054 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4055 return nativeResponseValue;
4057 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4058 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4059 if(!isWasmInitialized) {
4060 throw new Error("initializeWasm() must be awaited first!");
4062 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4063 // debug statements here
4065 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4066 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4067 if(!isWasmInitialized) {
4068 throw new Error("initializeWasm() must be awaited first!");
4070 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4071 // debug statements here
4073 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4074 export function CVec_EventZ_free(_res: number[]): void {
4075 if(!isWasmInitialized) {
4076 throw new Error("initializeWasm() must be awaited first!");
4078 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4079 // debug statements here
4081 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4082 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4083 if(!isWasmInitialized) {
4084 throw new Error("initializeWasm() must be awaited first!");
4086 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4087 // debug statements here
4089 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4090 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4091 if(!isWasmInitialized) {
4092 throw new Error("initializeWasm() must be awaited first!");
4094 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4095 return nativeResponseValue;
4097 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4098 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4099 if(!isWasmInitialized) {
4100 throw new Error("initializeWasm() must be awaited first!");
4102 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4103 return nativeResponseValue;
4105 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4106 export function C2Tuple_u32TxOutZ_free(_res: number): void {
4107 if(!isWasmInitialized) {
4108 throw new Error("initializeWasm() must be awaited first!");
4110 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4111 // debug statements here
4113 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4114 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4115 if(!isWasmInitialized) {
4116 throw new Error("initializeWasm() must be awaited first!");
4118 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4119 // debug statements here
4121 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4122 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4123 if(!isWasmInitialized) {
4124 throw new Error("initializeWasm() must be awaited first!");
4126 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4127 return nativeResponseValue;
4129 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4130 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4131 if(!isWasmInitialized) {
4132 throw new Error("initializeWasm() must be awaited first!");
4134 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4135 return nativeResponseValue;
4137 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4138 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4139 if(!isWasmInitialized) {
4140 throw new Error("initializeWasm() must be awaited first!");
4142 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4143 // debug statements here
4145 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4146 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4147 if(!isWasmInitialized) {
4148 throw new Error("initializeWasm() must be awaited first!");
4150 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4151 // debug statements here
4153 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4154 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4155 if(!isWasmInitialized) {
4156 throw new Error("initializeWasm() must be awaited first!");
4158 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4159 return nativeResponseValue;
4161 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4162 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4163 if(!isWasmInitialized) {
4164 throw new Error("initializeWasm() must be awaited first!");
4166 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4167 return nativeResponseValue;
4169 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4170 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4171 if(!isWasmInitialized) {
4172 throw new Error("initializeWasm() must be awaited first!");
4174 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4175 // debug statements here
4177 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4178 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4179 if(!isWasmInitialized) {
4180 throw new Error("initializeWasm() must be awaited first!");
4182 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4183 return nativeResponseValue;
4185 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4186 export function CResult_boolLightningErrorZ_err(e: number): number {
4187 if(!isWasmInitialized) {
4188 throw new Error("initializeWasm() must be awaited first!");
4190 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4191 return nativeResponseValue;
4193 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4194 export function CResult_boolLightningErrorZ_free(_res: number): void {
4195 if(!isWasmInitialized) {
4196 throw new Error("initializeWasm() must be awaited first!");
4198 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4199 // debug statements here
4201 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
4202 export function CResult_boolLightningErrorZ_clone(orig: number): number {
4203 if(!isWasmInitialized) {
4204 throw new Error("initializeWasm() must be awaited first!");
4206 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
4207 return nativeResponseValue;
4209 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
4210 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
4211 if(!isWasmInitialized) {
4212 throw new Error("initializeWasm() must be awaited first!");
4214 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
4215 return nativeResponseValue;
4217 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
4218 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
4219 if(!isWasmInitialized) {
4220 throw new Error("initializeWasm() must be awaited first!");
4222 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
4223 return nativeResponseValue;
4225 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
4226 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
4227 if(!isWasmInitialized) {
4228 throw new Error("initializeWasm() must be awaited first!");
4230 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
4231 // debug statements here
4233 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
4234 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
4235 if(!isWasmInitialized) {
4236 throw new Error("initializeWasm() must be awaited first!");
4238 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
4239 // debug statements here
4241 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
4242 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
4243 if(!isWasmInitialized) {
4244 throw new Error("initializeWasm() must be awaited first!");
4246 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
4247 // debug statements here
4249 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4250 export function CResult_NoneLightningErrorZ_ok(): number {
4251 if(!isWasmInitialized) {
4252 throw new Error("initializeWasm() must be awaited first!");
4254 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4255 return nativeResponseValue;
4257 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4258 export function CResult_NoneLightningErrorZ_err(e: number): number {
4259 if(!isWasmInitialized) {
4260 throw new Error("initializeWasm() must be awaited first!");
4262 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4263 return nativeResponseValue;
4265 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4266 export function CResult_NoneLightningErrorZ_free(_res: number): void {
4267 if(!isWasmInitialized) {
4268 throw new Error("initializeWasm() must be awaited first!");
4270 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4271 // debug statements here
4273 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4274 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4275 if(!isWasmInitialized) {
4276 throw new Error("initializeWasm() must be awaited first!");
4278 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4279 return nativeResponseValue;
4281 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
4282 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
4283 if(!isWasmInitialized) {
4284 throw new Error("initializeWasm() must be awaited first!");
4286 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
4287 // debug statements here
4289 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
4290 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
4291 if(!isWasmInitialized) {
4292 throw new Error("initializeWasm() must be awaited first!");
4294 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
4295 return nativeResponseValue;
4297 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4298 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
4299 if(!isWasmInitialized) {
4300 throw new Error("initializeWasm() must be awaited first!");
4302 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
4303 return nativeResponseValue;
4305 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
4306 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
4307 if(!isWasmInitialized) {
4308 throw new Error("initializeWasm() must be awaited first!");
4310 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
4311 // debug statements here
4313 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
4314 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
4315 if(!isWasmInitialized) {
4316 throw new Error("initializeWasm() must be awaited first!");
4318 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
4319 return nativeResponseValue;
4321 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
4322 export function CResult_NonePeerHandleErrorZ_ok(): number {
4323 if(!isWasmInitialized) {
4324 throw new Error("initializeWasm() must be awaited first!");
4326 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
4327 return nativeResponseValue;
4329 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
4330 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
4331 if(!isWasmInitialized) {
4332 throw new Error("initializeWasm() must be awaited first!");
4334 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
4335 return nativeResponseValue;
4337 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
4338 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
4339 if(!isWasmInitialized) {
4340 throw new Error("initializeWasm() must be awaited first!");
4342 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
4343 // debug statements here
4345 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
4346 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
4347 if(!isWasmInitialized) {
4348 throw new Error("initializeWasm() must be awaited first!");
4350 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
4351 return nativeResponseValue;
4353 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
4354 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
4355 if(!isWasmInitialized) {
4356 throw new Error("initializeWasm() must be awaited first!");
4358 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
4359 return nativeResponseValue;
4361 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4362 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
4363 if(!isWasmInitialized) {
4364 throw new Error("initializeWasm() must be awaited first!");
4366 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
4367 return nativeResponseValue;
4369 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
4370 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
4371 if(!isWasmInitialized) {
4372 throw new Error("initializeWasm() must be awaited first!");
4374 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
4375 // debug statements here
4377 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
4378 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
4379 if(!isWasmInitialized) {
4380 throw new Error("initializeWasm() must be awaited first!");
4382 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
4383 return nativeResponseValue;
4385 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
4386 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
4387 if(!isWasmInitialized) {
4388 throw new Error("initializeWasm() must be awaited first!");
4390 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
4391 return nativeResponseValue;
4393 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4394 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
4395 if(!isWasmInitialized) {
4396 throw new Error("initializeWasm() must be awaited first!");
4398 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
4399 return nativeResponseValue;
4401 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
4402 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
4403 if(!isWasmInitialized) {
4404 throw new Error("initializeWasm() must be awaited first!");
4406 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
4407 // debug statements here
4409 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4410 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
4411 if(!isWasmInitialized) {
4412 throw new Error("initializeWasm() must be awaited first!");
4414 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
4415 return nativeResponseValue;
4417 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
4418 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
4419 if(!isWasmInitialized) {
4420 throw new Error("initializeWasm() must be awaited first!");
4422 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
4423 return nativeResponseValue;
4425 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4426 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
4427 if(!isWasmInitialized) {
4428 throw new Error("initializeWasm() must be awaited first!");
4430 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
4431 return nativeResponseValue;
4433 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
4434 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
4435 if(!isWasmInitialized) {
4436 throw new Error("initializeWasm() must be awaited first!");
4438 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
4439 // debug statements here
4441 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4442 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
4443 if(!isWasmInitialized) {
4444 throw new Error("initializeWasm() must be awaited first!");
4446 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
4447 return nativeResponseValue;
4449 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
4450 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
4451 if(!isWasmInitialized) {
4452 throw new Error("initializeWasm() must be awaited first!");
4454 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
4455 return nativeResponseValue;
4457 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
4458 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
4459 if(!isWasmInitialized) {
4460 throw new Error("initializeWasm() must be awaited first!");
4462 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
4463 return nativeResponseValue;
4465 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
4466 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
4467 if(!isWasmInitialized) {
4468 throw new Error("initializeWasm() must be awaited first!");
4470 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
4471 // debug statements here
4473 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
4474 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
4475 if(!isWasmInitialized) {
4476 throw new Error("initializeWasm() must be awaited first!");
4478 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
4479 return nativeResponseValue;
4481 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
4482 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
4483 if(!isWasmInitialized) {
4484 throw new Error("initializeWasm() must be awaited first!");
4486 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
4487 return nativeResponseValue;
4489 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
4490 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
4491 if(!isWasmInitialized) {
4492 throw new Error("initializeWasm() must be awaited first!");
4494 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
4495 return nativeResponseValue;
4497 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
4498 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
4499 if(!isWasmInitialized) {
4500 throw new Error("initializeWasm() must be awaited first!");
4502 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
4503 // debug statements here
4505 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
4506 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
4507 if(!isWasmInitialized) {
4508 throw new Error("initializeWasm() must be awaited first!");
4510 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
4511 return nativeResponseValue;
4513 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
4514 export function CVec_u64Z_free(_res: number[]): void {
4515 if(!isWasmInitialized) {
4516 throw new Error("initializeWasm() must be awaited first!");
4518 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
4519 // debug statements here
4521 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
4522 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
4523 if(!isWasmInitialized) {
4524 throw new Error("initializeWasm() must be awaited first!");
4526 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
4527 return nativeResponseValue;
4529 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
4530 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
4531 if(!isWasmInitialized) {
4532 throw new Error("initializeWasm() must be awaited first!");
4534 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
4535 return nativeResponseValue;
4537 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
4538 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
4539 if(!isWasmInitialized) {
4540 throw new Error("initializeWasm() must be awaited first!");
4542 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
4543 // debug statements here
4545 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
4546 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
4547 if(!isWasmInitialized) {
4548 throw new Error("initializeWasm() must be awaited first!");
4550 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
4551 return nativeResponseValue;
4553 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
4554 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
4555 if(!isWasmInitialized) {
4556 throw new Error("initializeWasm() must be awaited first!");
4558 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
4559 return nativeResponseValue;
4561 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
4562 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
4563 if(!isWasmInitialized) {
4564 throw new Error("initializeWasm() must be awaited first!");
4566 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
4567 return nativeResponseValue;
4569 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
4570 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
4571 if(!isWasmInitialized) {
4572 throw new Error("initializeWasm() must be awaited first!");
4574 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
4575 // debug statements here
4577 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
4578 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
4579 if(!isWasmInitialized) {
4580 throw new Error("initializeWasm() must be awaited first!");
4582 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
4583 return nativeResponseValue;
4585 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
4586 export function CResult_NetAddressu8Z_ok(o: number): number {
4587 if(!isWasmInitialized) {
4588 throw new Error("initializeWasm() must be awaited first!");
4590 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
4591 return nativeResponseValue;
4593 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
4594 export function CResult_NetAddressu8Z_err(e: number): number {
4595 if(!isWasmInitialized) {
4596 throw new Error("initializeWasm() must be awaited first!");
4598 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
4599 return nativeResponseValue;
4601 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
4602 export function CResult_NetAddressu8Z_free(_res: number): void {
4603 if(!isWasmInitialized) {
4604 throw new Error("initializeWasm() must be awaited first!");
4606 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
4607 // debug statements here
4609 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
4610 export function CResult_NetAddressu8Z_clone(orig: number): number {
4611 if(!isWasmInitialized) {
4612 throw new Error("initializeWasm() must be awaited first!");
4614 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
4615 return nativeResponseValue;
4617 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
4618 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
4619 if(!isWasmInitialized) {
4620 throw new Error("initializeWasm() must be awaited first!");
4622 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
4623 return nativeResponseValue;
4625 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
4626 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
4627 if(!isWasmInitialized) {
4628 throw new Error("initializeWasm() must be awaited first!");
4630 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
4631 return nativeResponseValue;
4633 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
4634 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
4635 if(!isWasmInitialized) {
4636 throw new Error("initializeWasm() must be awaited first!");
4638 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
4639 // debug statements here
4641 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
4642 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
4643 if(!isWasmInitialized) {
4644 throw new Error("initializeWasm() must be awaited first!");
4646 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
4647 return nativeResponseValue;
4649 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
4650 export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
4651 if(!isWasmInitialized) {
4652 throw new Error("initializeWasm() must be awaited first!");
4654 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
4655 return nativeResponseValue;
4657 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
4658 export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
4659 if(!isWasmInitialized) {
4660 throw new Error("initializeWasm() must be awaited first!");
4662 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
4663 return nativeResponseValue;
4665 // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
4666 export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
4667 if(!isWasmInitialized) {
4668 throw new Error("initializeWasm() must be awaited first!");
4670 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
4671 // debug statements here
4673 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
4674 export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
4675 if(!isWasmInitialized) {
4676 throw new Error("initializeWasm() must be awaited first!");
4678 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
4679 return nativeResponseValue;
4681 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
4682 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
4683 if(!isWasmInitialized) {
4684 throw new Error("initializeWasm() must be awaited first!");
4686 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
4687 // debug statements here
4689 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
4690 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
4691 if(!isWasmInitialized) {
4692 throw new Error("initializeWasm() must be awaited first!");
4694 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
4695 // debug statements here
4697 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
4698 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
4699 if(!isWasmInitialized) {
4700 throw new Error("initializeWasm() must be awaited first!");
4702 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
4703 // debug statements here
4705 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
4706 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
4707 if(!isWasmInitialized) {
4708 throw new Error("initializeWasm() must be awaited first!");
4710 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
4711 // debug statements here
4713 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
4714 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
4715 if(!isWasmInitialized) {
4716 throw new Error("initializeWasm() must be awaited first!");
4718 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
4719 return nativeResponseValue;
4721 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
4722 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
4723 if(!isWasmInitialized) {
4724 throw new Error("initializeWasm() must be awaited first!");
4726 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
4727 return nativeResponseValue;
4729 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
4730 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
4731 if(!isWasmInitialized) {
4732 throw new Error("initializeWasm() must be awaited first!");
4734 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
4735 // debug statements here
4737 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
4738 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
4739 if(!isWasmInitialized) {
4740 throw new Error("initializeWasm() must be awaited first!");
4742 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
4743 return nativeResponseValue;
4745 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
4746 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
4747 if(!isWasmInitialized) {
4748 throw new Error("initializeWasm() must be awaited first!");
4750 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
4751 return nativeResponseValue;
4753 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
4754 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
4755 if(!isWasmInitialized) {
4756 throw new Error("initializeWasm() must be awaited first!");
4758 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
4759 return nativeResponseValue;
4761 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
4762 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
4763 if(!isWasmInitialized) {
4764 throw new Error("initializeWasm() must be awaited first!");
4766 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
4767 // debug statements here
4769 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
4770 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
4771 if(!isWasmInitialized) {
4772 throw new Error("initializeWasm() must be awaited first!");
4774 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
4775 return nativeResponseValue;
4777 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
4778 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
4779 if(!isWasmInitialized) {
4780 throw new Error("initializeWasm() must be awaited first!");
4782 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
4783 return nativeResponseValue;
4785 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
4786 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
4787 if(!isWasmInitialized) {
4788 throw new Error("initializeWasm() must be awaited first!");
4790 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
4791 return nativeResponseValue;
4793 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
4794 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
4795 if(!isWasmInitialized) {
4796 throw new Error("initializeWasm() must be awaited first!");
4798 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
4799 // debug statements here
4801 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
4802 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
4803 if(!isWasmInitialized) {
4804 throw new Error("initializeWasm() must be awaited first!");
4806 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
4807 return nativeResponseValue;
4809 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
4810 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
4811 if(!isWasmInitialized) {
4812 throw new Error("initializeWasm() must be awaited first!");
4814 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
4815 return nativeResponseValue;
4817 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4818 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
4819 if(!isWasmInitialized) {
4820 throw new Error("initializeWasm() must be awaited first!");
4822 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
4823 return nativeResponseValue;
4825 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
4826 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
4827 if(!isWasmInitialized) {
4828 throw new Error("initializeWasm() must be awaited first!");
4830 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
4831 // debug statements here
4833 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
4834 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
4835 if(!isWasmInitialized) {
4836 throw new Error("initializeWasm() must be awaited first!");
4838 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
4839 return nativeResponseValue;
4841 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
4842 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
4843 if(!isWasmInitialized) {
4844 throw new Error("initializeWasm() must be awaited first!");
4846 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
4847 return nativeResponseValue;
4849 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
4850 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
4851 if(!isWasmInitialized) {
4852 throw new Error("initializeWasm() must be awaited first!");
4854 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
4855 return nativeResponseValue;
4857 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
4858 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
4859 if(!isWasmInitialized) {
4860 throw new Error("initializeWasm() must be awaited first!");
4862 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
4863 // debug statements here
4865 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
4866 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
4867 if(!isWasmInitialized) {
4868 throw new Error("initializeWasm() must be awaited first!");
4870 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
4871 return nativeResponseValue;
4873 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
4874 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
4875 if(!isWasmInitialized) {
4876 throw new Error("initializeWasm() must be awaited first!");
4878 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
4879 return nativeResponseValue;
4881 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
4882 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
4883 if(!isWasmInitialized) {
4884 throw new Error("initializeWasm() must be awaited first!");
4886 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
4887 return nativeResponseValue;
4889 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
4890 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
4891 if(!isWasmInitialized) {
4892 throw new Error("initializeWasm() must be awaited first!");
4894 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
4895 // debug statements here
4897 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
4898 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
4899 if(!isWasmInitialized) {
4900 throw new Error("initializeWasm() must be awaited first!");
4902 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
4903 return nativeResponseValue;
4905 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
4906 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
4907 if(!isWasmInitialized) {
4908 throw new Error("initializeWasm() must be awaited first!");
4910 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
4911 return nativeResponseValue;
4913 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4914 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
4915 if(!isWasmInitialized) {
4916 throw new Error("initializeWasm() must be awaited first!");
4918 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
4919 return nativeResponseValue;
4921 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
4922 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
4923 if(!isWasmInitialized) {
4924 throw new Error("initializeWasm() must be awaited first!");
4926 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
4927 // debug statements here
4929 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
4930 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
4931 if(!isWasmInitialized) {
4932 throw new Error("initializeWasm() must be awaited first!");
4934 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
4935 return nativeResponseValue;
4937 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
4938 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
4939 if(!isWasmInitialized) {
4940 throw new Error("initializeWasm() must be awaited first!");
4942 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
4943 return nativeResponseValue;
4945 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
4946 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
4947 if(!isWasmInitialized) {
4948 throw new Error("initializeWasm() must be awaited first!");
4950 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
4951 return nativeResponseValue;
4953 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
4954 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
4955 if(!isWasmInitialized) {
4956 throw new Error("initializeWasm() must be awaited first!");
4958 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
4959 // debug statements here
4961 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
4962 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
4963 if(!isWasmInitialized) {
4964 throw new Error("initializeWasm() must be awaited first!");
4966 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
4967 return nativeResponseValue;
4969 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
4970 export function CResult_InitDecodeErrorZ_ok(o: number): number {
4971 if(!isWasmInitialized) {
4972 throw new Error("initializeWasm() must be awaited first!");
4974 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
4975 return nativeResponseValue;
4977 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
4978 export function CResult_InitDecodeErrorZ_err(e: number): number {
4979 if(!isWasmInitialized) {
4980 throw new Error("initializeWasm() must be awaited first!");
4982 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
4983 return nativeResponseValue;
4985 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
4986 export function CResult_InitDecodeErrorZ_free(_res: number): void {
4987 if(!isWasmInitialized) {
4988 throw new Error("initializeWasm() must be awaited first!");
4990 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
4991 // debug statements here
4993 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
4994 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
4995 if(!isWasmInitialized) {
4996 throw new Error("initializeWasm() must be awaited first!");
4998 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
4999 return nativeResponseValue;
5001 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
5002 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
5003 if(!isWasmInitialized) {
5004 throw new Error("initializeWasm() must be awaited first!");
5006 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
5007 return nativeResponseValue;
5009 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
5010 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
5011 if(!isWasmInitialized) {
5012 throw new Error("initializeWasm() must be awaited first!");
5014 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
5015 return nativeResponseValue;
5017 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
5018 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
5019 if(!isWasmInitialized) {
5020 throw new Error("initializeWasm() must be awaited first!");
5022 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
5023 // debug statements here
5025 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
5026 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
5027 if(!isWasmInitialized) {
5028 throw new Error("initializeWasm() must be awaited first!");
5030 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
5031 return nativeResponseValue;
5033 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
5034 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
5035 if(!isWasmInitialized) {
5036 throw new Error("initializeWasm() must be awaited first!");
5038 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
5039 return nativeResponseValue;
5041 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
5042 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
5043 if(!isWasmInitialized) {
5044 throw new Error("initializeWasm() must be awaited first!");
5046 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
5047 return nativeResponseValue;
5049 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
5050 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
5051 if(!isWasmInitialized) {
5052 throw new Error("initializeWasm() must be awaited first!");
5054 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
5055 // debug statements here
5057 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
5058 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
5059 if(!isWasmInitialized) {
5060 throw new Error("initializeWasm() must be awaited first!");
5062 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
5063 return nativeResponseValue;
5065 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
5066 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
5067 if(!isWasmInitialized) {
5068 throw new Error("initializeWasm() must be awaited first!");
5070 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
5071 return nativeResponseValue;
5073 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
5074 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
5075 if(!isWasmInitialized) {
5076 throw new Error("initializeWasm() must be awaited first!");
5078 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5079 return nativeResponseValue;
5081 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5082 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5083 if(!isWasmInitialized) {
5084 throw new Error("initializeWasm() must be awaited first!");
5086 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5087 // debug statements here
5089 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5090 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5091 if(!isWasmInitialized) {
5092 throw new Error("initializeWasm() must be awaited first!");
5094 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5095 return nativeResponseValue;
5097 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5098 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5099 if(!isWasmInitialized) {
5100 throw new Error("initializeWasm() must be awaited first!");
5102 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5103 return nativeResponseValue;
5105 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5106 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5107 if(!isWasmInitialized) {
5108 throw new Error("initializeWasm() must be awaited first!");
5110 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5111 return nativeResponseValue;
5113 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5114 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5115 if(!isWasmInitialized) {
5116 throw new Error("initializeWasm() must be awaited first!");
5118 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5119 // debug statements here
5121 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5122 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5123 if(!isWasmInitialized) {
5124 throw new Error("initializeWasm() must be awaited first!");
5126 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5127 return nativeResponseValue;
5129 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5130 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5131 if(!isWasmInitialized) {
5132 throw new Error("initializeWasm() must be awaited first!");
5134 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5135 return nativeResponseValue;
5137 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5138 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5139 if(!isWasmInitialized) {
5140 throw new Error("initializeWasm() must be awaited first!");
5142 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5143 return nativeResponseValue;
5145 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5146 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5147 if(!isWasmInitialized) {
5148 throw new Error("initializeWasm() must be awaited first!");
5150 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5151 // debug statements here
5153 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5154 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5155 if(!isWasmInitialized) {
5156 throw new Error("initializeWasm() must be awaited first!");
5158 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5159 return nativeResponseValue;
5161 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5162 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5163 if(!isWasmInitialized) {
5164 throw new Error("initializeWasm() must be awaited first!");
5166 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5167 return nativeResponseValue;
5169 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5170 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5171 if(!isWasmInitialized) {
5172 throw new Error("initializeWasm() must be awaited first!");
5174 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5175 return nativeResponseValue;
5177 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
5178 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
5179 if(!isWasmInitialized) {
5180 throw new Error("initializeWasm() must be awaited first!");
5182 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
5183 // debug statements here
5185 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
5186 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
5187 if(!isWasmInitialized) {
5188 throw new Error("initializeWasm() must be awaited first!");
5190 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
5191 return nativeResponseValue;
5193 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
5194 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
5195 if(!isWasmInitialized) {
5196 throw new Error("initializeWasm() must be awaited first!");
5198 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
5199 return nativeResponseValue;
5201 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5202 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
5203 if(!isWasmInitialized) {
5204 throw new Error("initializeWasm() must be awaited first!");
5206 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
5207 return nativeResponseValue;
5209 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
5210 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
5211 if(!isWasmInitialized) {
5212 throw new Error("initializeWasm() must be awaited first!");
5214 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
5215 // debug statements here
5217 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
5218 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
5219 if(!isWasmInitialized) {
5220 throw new Error("initializeWasm() must be awaited first!");
5222 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
5223 return nativeResponseValue;
5225 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
5226 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
5227 if(!isWasmInitialized) {
5228 throw new Error("initializeWasm() must be awaited first!");
5230 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
5231 return nativeResponseValue;
5233 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5234 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
5235 if(!isWasmInitialized) {
5236 throw new Error("initializeWasm() must be awaited first!");
5238 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
5239 return nativeResponseValue;
5241 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
5242 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
5243 if(!isWasmInitialized) {
5244 throw new Error("initializeWasm() must be awaited first!");
5246 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
5247 // debug statements here
5249 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
5250 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
5251 if(!isWasmInitialized) {
5252 throw new Error("initializeWasm() must be awaited first!");
5254 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
5255 return nativeResponseValue;
5257 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
5258 export function CResult_PingDecodeErrorZ_ok(o: number): number {
5259 if(!isWasmInitialized) {
5260 throw new Error("initializeWasm() must be awaited first!");
5262 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
5263 return nativeResponseValue;
5265 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
5266 export function CResult_PingDecodeErrorZ_err(e: number): number {
5267 if(!isWasmInitialized) {
5268 throw new Error("initializeWasm() must be awaited first!");
5270 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
5271 return nativeResponseValue;
5273 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
5274 export function CResult_PingDecodeErrorZ_free(_res: number): void {
5275 if(!isWasmInitialized) {
5276 throw new Error("initializeWasm() must be awaited first!");
5278 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
5279 // debug statements here
5281 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
5282 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
5283 if(!isWasmInitialized) {
5284 throw new Error("initializeWasm() must be awaited first!");
5286 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
5287 return nativeResponseValue;
5289 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
5290 export function CResult_PongDecodeErrorZ_ok(o: number): number {
5291 if(!isWasmInitialized) {
5292 throw new Error("initializeWasm() must be awaited first!");
5294 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
5295 return nativeResponseValue;
5297 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
5298 export function CResult_PongDecodeErrorZ_err(e: number): number {
5299 if(!isWasmInitialized) {
5300 throw new Error("initializeWasm() must be awaited first!");
5302 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
5303 return nativeResponseValue;
5305 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
5306 export function CResult_PongDecodeErrorZ_free(_res: number): void {
5307 if(!isWasmInitialized) {
5308 throw new Error("initializeWasm() must be awaited first!");
5310 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
5311 // debug statements here
5313 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
5314 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
5315 if(!isWasmInitialized) {
5316 throw new Error("initializeWasm() must be awaited first!");
5318 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
5319 return nativeResponseValue;
5321 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
5322 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5323 if(!isWasmInitialized) {
5324 throw new Error("initializeWasm() must be awaited first!");
5326 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
5327 return nativeResponseValue;
5329 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5330 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
5331 if(!isWasmInitialized) {
5332 throw new Error("initializeWasm() must be awaited first!");
5334 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
5335 return nativeResponseValue;
5337 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
5338 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5339 if(!isWasmInitialized) {
5340 throw new Error("initializeWasm() must be awaited first!");
5342 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
5343 // debug statements here
5345 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5346 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5347 if(!isWasmInitialized) {
5348 throw new Error("initializeWasm() must be awaited first!");
5350 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
5351 return nativeResponseValue;
5353 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
5354 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5355 if(!isWasmInitialized) {
5356 throw new Error("initializeWasm() must be awaited first!");
5358 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
5359 return nativeResponseValue;
5361 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5362 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
5363 if(!isWasmInitialized) {
5364 throw new Error("initializeWasm() must be awaited first!");
5366 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
5367 return nativeResponseValue;
5369 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
5370 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5371 if(!isWasmInitialized) {
5372 throw new Error("initializeWasm() must be awaited first!");
5374 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
5375 // debug statements here
5377 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5378 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5379 if(!isWasmInitialized) {
5380 throw new Error("initializeWasm() must be awaited first!");
5382 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
5383 return nativeResponseValue;
5385 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
5386 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
5387 if(!isWasmInitialized) {
5388 throw new Error("initializeWasm() must be awaited first!");
5390 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
5391 return nativeResponseValue;
5393 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5394 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
5395 if(!isWasmInitialized) {
5396 throw new Error("initializeWasm() must be awaited first!");
5398 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
5399 return nativeResponseValue;
5401 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
5402 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
5403 if(!isWasmInitialized) {
5404 throw new Error("initializeWasm() must be awaited first!");
5406 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
5407 // debug statements here
5409 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5410 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
5411 if(!isWasmInitialized) {
5412 throw new Error("initializeWasm() must be awaited first!");
5414 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
5415 return nativeResponseValue;
5417 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
5418 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
5419 if(!isWasmInitialized) {
5420 throw new Error("initializeWasm() must be awaited first!");
5422 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
5423 return nativeResponseValue;
5425 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5426 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
5427 if(!isWasmInitialized) {
5428 throw new Error("initializeWasm() must be awaited first!");
5430 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
5431 return nativeResponseValue;
5433 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
5434 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
5435 if(!isWasmInitialized) {
5436 throw new Error("initializeWasm() must be awaited first!");
5438 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
5439 // debug statements here
5441 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5442 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
5443 if(!isWasmInitialized) {
5444 throw new Error("initializeWasm() must be awaited first!");
5446 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
5447 return nativeResponseValue;
5449 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
5450 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
5451 if(!isWasmInitialized) {
5452 throw new Error("initializeWasm() must be awaited first!");
5454 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
5455 return nativeResponseValue;
5457 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
5458 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
5459 if(!isWasmInitialized) {
5460 throw new Error("initializeWasm() must be awaited first!");
5462 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
5463 return nativeResponseValue;
5465 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
5466 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
5467 if(!isWasmInitialized) {
5468 throw new Error("initializeWasm() must be awaited first!");
5470 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
5471 // debug statements here
5473 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
5474 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
5475 if(!isWasmInitialized) {
5476 throw new Error("initializeWasm() must be awaited first!");
5478 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
5479 return nativeResponseValue;
5481 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
5482 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
5483 if(!isWasmInitialized) {
5484 throw new Error("initializeWasm() must be awaited first!");
5486 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
5487 return nativeResponseValue;
5489 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5490 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
5491 if(!isWasmInitialized) {
5492 throw new Error("initializeWasm() must be awaited first!");
5494 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
5495 return nativeResponseValue;
5497 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
5498 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
5499 if(!isWasmInitialized) {
5500 throw new Error("initializeWasm() must be awaited first!");
5502 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
5503 // debug statements here
5505 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5506 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5507 if(!isWasmInitialized) {
5508 throw new Error("initializeWasm() must be awaited first!");
5510 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
5511 return nativeResponseValue;
5513 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
5514 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
5515 if(!isWasmInitialized) {
5516 throw new Error("initializeWasm() must be awaited first!");
5518 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
5519 return nativeResponseValue;
5521 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5522 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
5523 if(!isWasmInitialized) {
5524 throw new Error("initializeWasm() must be awaited first!");
5526 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
5527 return nativeResponseValue;
5529 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
5530 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
5531 if(!isWasmInitialized) {
5532 throw new Error("initializeWasm() must be awaited first!");
5534 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
5535 // debug statements here
5537 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5538 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5539 if(!isWasmInitialized) {
5540 throw new Error("initializeWasm() must be awaited first!");
5542 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
5543 return nativeResponseValue;
5545 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
5546 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
5547 if(!isWasmInitialized) {
5548 throw new Error("initializeWasm() must be awaited first!");
5550 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
5551 return nativeResponseValue;
5553 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
5554 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
5555 if(!isWasmInitialized) {
5556 throw new Error("initializeWasm() must be awaited first!");
5558 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
5559 return nativeResponseValue;
5561 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
5562 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
5563 if(!isWasmInitialized) {
5564 throw new Error("initializeWasm() must be awaited first!");
5566 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
5567 // debug statements here
5569 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
5570 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
5571 if(!isWasmInitialized) {
5572 throw new Error("initializeWasm() must be awaited first!");
5574 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
5575 return nativeResponseValue;
5577 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
5578 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
5579 if(!isWasmInitialized) {
5580 throw new Error("initializeWasm() must be awaited first!");
5582 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
5583 return nativeResponseValue;
5585 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
5586 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
5587 if(!isWasmInitialized) {
5588 throw new Error("initializeWasm() must be awaited first!");
5590 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
5591 return nativeResponseValue;
5593 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
5594 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
5595 if(!isWasmInitialized) {
5596 throw new Error("initializeWasm() must be awaited first!");
5598 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
5599 // debug statements here
5601 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
5602 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
5603 if(!isWasmInitialized) {
5604 throw new Error("initializeWasm() must be awaited first!");
5606 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
5607 return nativeResponseValue;
5609 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
5610 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
5611 if(!isWasmInitialized) {
5612 throw new Error("initializeWasm() must be awaited first!");
5614 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
5615 return nativeResponseValue;
5617 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5618 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
5619 if(!isWasmInitialized) {
5620 throw new Error("initializeWasm() must be awaited first!");
5622 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
5623 return nativeResponseValue;
5625 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
5626 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
5627 if(!isWasmInitialized) {
5628 throw new Error("initializeWasm() must be awaited first!");
5630 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
5631 // debug statements here
5633 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5634 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
5635 if(!isWasmInitialized) {
5636 throw new Error("initializeWasm() must be awaited first!");
5638 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
5639 return nativeResponseValue;
5641 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
5642 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
5643 if(!isWasmInitialized) {
5644 throw new Error("initializeWasm() must be awaited first!");
5646 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
5647 return nativeResponseValue;
5649 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5650 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
5651 if(!isWasmInitialized) {
5652 throw new Error("initializeWasm() must be awaited first!");
5654 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
5655 return nativeResponseValue;
5657 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
5658 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
5659 if(!isWasmInitialized) {
5660 throw new Error("initializeWasm() must be awaited first!");
5662 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
5663 // debug statements here
5665 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5666 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
5667 if(!isWasmInitialized) {
5668 throw new Error("initializeWasm() must be awaited first!");
5670 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
5671 return nativeResponseValue;
5673 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
5674 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
5675 if(!isWasmInitialized) {
5676 throw new Error("initializeWasm() must be awaited first!");
5678 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
5679 return nativeResponseValue;
5681 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
5682 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
5683 if(!isWasmInitialized) {
5684 throw new Error("initializeWasm() must be awaited first!");
5686 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
5687 return nativeResponseValue;
5689 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
5690 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
5691 if(!isWasmInitialized) {
5692 throw new Error("initializeWasm() must be awaited first!");
5694 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
5695 // debug statements here
5697 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
5698 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
5699 if(!isWasmInitialized) {
5700 throw new Error("initializeWasm() must be awaited first!");
5702 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
5703 return nativeResponseValue;
5705 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
5706 export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
5707 if(!isWasmInitialized) {
5708 throw new Error("initializeWasm() must be awaited first!");
5710 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
5711 return nativeResponseValue;
5713 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
5714 export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
5715 if(!isWasmInitialized) {
5716 throw new Error("initializeWasm() must be awaited first!");
5718 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
5719 return nativeResponseValue;
5721 // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
5722 export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
5723 if(!isWasmInitialized) {
5724 throw new Error("initializeWasm() must be awaited first!");
5726 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
5727 // debug statements here
5729 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
5730 export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
5731 if(!isWasmInitialized) {
5732 throw new Error("initializeWasm() must be awaited first!");
5734 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
5735 return nativeResponseValue;
5737 // void Event_free(struct LDKEvent this_ptr);
5738 export function Event_free(this_ptr: number): void {
5739 if(!isWasmInitialized) {
5740 throw new Error("initializeWasm() must be awaited first!");
5742 const nativeResponseValue = wasm.Event_free(this_ptr);
5743 // debug statements here
5745 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
5746 export function Event_clone(orig: number): number {
5747 if(!isWasmInitialized) {
5748 throw new Error("initializeWasm() must be awaited first!");
5750 const nativeResponseValue = wasm.Event_clone(orig);
5751 return nativeResponseValue;
5753 // 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);
5754 export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
5755 if(!isWasmInitialized) {
5756 throw new Error("initializeWasm() must be awaited first!");
5758 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
5759 return nativeResponseValue;
5761 // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t amt, uint64_t user_payment_id);
5762 export function Event_payment_received(payment_hash: Uint8Array, payment_preimage: Uint8Array, payment_secret: Uint8Array, amt: number, user_payment_id: number): number {
5763 if(!isWasmInitialized) {
5764 throw new Error("initializeWasm() must be awaited first!");
5766 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), encodeArray(payment_preimage), encodeArray(payment_secret), amt, user_payment_id);
5767 return nativeResponseValue;
5769 // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage);
5770 export function Event_payment_sent(payment_preimage: Uint8Array): number {
5771 if(!isWasmInitialized) {
5772 throw new Error("initializeWasm() must be awaited first!");
5774 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage));
5775 return nativeResponseValue;
5777 // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest);
5778 export function Event_payment_failed(payment_hash: Uint8Array, rejected_by_dest: boolean): number {
5779 if(!isWasmInitialized) {
5780 throw new Error("initializeWasm() must be awaited first!");
5782 const nativeResponseValue = wasm.Event_payment_failed(encodeArray(payment_hash), rejected_by_dest);
5783 return nativeResponseValue;
5785 // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
5786 export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
5787 if(!isWasmInitialized) {
5788 throw new Error("initializeWasm() must be awaited first!");
5790 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
5791 return nativeResponseValue;
5793 // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
5794 export function Event_spendable_outputs(outputs: number[]): number {
5795 if(!isWasmInitialized) {
5796 throw new Error("initializeWasm() must be awaited first!");
5798 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
5799 return nativeResponseValue;
5801 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
5802 export function Event_write(obj: number): Uint8Array {
5803 if(!isWasmInitialized) {
5804 throw new Error("initializeWasm() must be awaited first!");
5806 const nativeResponseValue = wasm.Event_write(obj);
5807 return decodeArray(nativeResponseValue);
5809 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
5810 export function MessageSendEvent_free(this_ptr: number): void {
5811 if(!isWasmInitialized) {
5812 throw new Error("initializeWasm() must be awaited first!");
5814 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
5815 // debug statements here
5817 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
5818 export function MessageSendEvent_clone(orig: number): number {
5819 if(!isWasmInitialized) {
5820 throw new Error("initializeWasm() must be awaited first!");
5822 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
5823 return nativeResponseValue;
5825 // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
5826 export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
5827 if(!isWasmInitialized) {
5828 throw new Error("initializeWasm() must be awaited first!");
5830 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
5831 return nativeResponseValue;
5833 // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
5834 export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
5835 if(!isWasmInitialized) {
5836 throw new Error("initializeWasm() must be awaited first!");
5838 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
5839 return nativeResponseValue;
5841 // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
5842 export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
5843 if(!isWasmInitialized) {
5844 throw new Error("initializeWasm() must be awaited first!");
5846 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
5847 return nativeResponseValue;
5849 // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
5850 export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
5851 if(!isWasmInitialized) {
5852 throw new Error("initializeWasm() must be awaited first!");
5854 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
5855 return nativeResponseValue;
5857 // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
5858 export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
5859 if(!isWasmInitialized) {
5860 throw new Error("initializeWasm() must be awaited first!");
5862 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
5863 return nativeResponseValue;
5865 // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
5866 export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
5867 if(!isWasmInitialized) {
5868 throw new Error("initializeWasm() must be awaited first!");
5870 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
5871 return nativeResponseValue;
5873 // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
5874 export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
5875 if(!isWasmInitialized) {
5876 throw new Error("initializeWasm() must be awaited first!");
5878 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
5879 return nativeResponseValue;
5881 // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
5882 export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
5883 if(!isWasmInitialized) {
5884 throw new Error("initializeWasm() must be awaited first!");
5886 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
5887 return nativeResponseValue;
5889 // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
5890 export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
5891 if(!isWasmInitialized) {
5892 throw new Error("initializeWasm() must be awaited first!");
5894 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
5895 return nativeResponseValue;
5897 // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
5898 export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
5899 if(!isWasmInitialized) {
5900 throw new Error("initializeWasm() must be awaited first!");
5902 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
5903 return nativeResponseValue;
5905 // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
5906 export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
5907 if(!isWasmInitialized) {
5908 throw new Error("initializeWasm() must be awaited first!");
5910 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
5911 return nativeResponseValue;
5913 // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
5914 export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
5915 if(!isWasmInitialized) {
5916 throw new Error("initializeWasm() must be awaited first!");
5918 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
5919 return nativeResponseValue;
5921 // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
5922 export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
5923 if(!isWasmInitialized) {
5924 throw new Error("initializeWasm() must be awaited first!");
5926 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
5927 return nativeResponseValue;
5929 // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
5930 export function MessageSendEvent_broadcast_channel_update(msg: number): number {
5931 if(!isWasmInitialized) {
5932 throw new Error("initializeWasm() must be awaited first!");
5934 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
5935 return nativeResponseValue;
5937 // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
5938 export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
5939 if(!isWasmInitialized) {
5940 throw new Error("initializeWasm() must be awaited first!");
5942 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
5943 return nativeResponseValue;
5945 // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
5946 export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
5947 if(!isWasmInitialized) {
5948 throw new Error("initializeWasm() must be awaited first!");
5950 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
5951 return nativeResponseValue;
5953 // struct LDKMessageSendEvent MessageSendEvent_payment_failure_network_update(struct LDKHTLCFailChannelUpdate update);
5954 export function MessageSendEvent_payment_failure_network_update(update: number): number {
5955 if(!isWasmInitialized) {
5956 throw new Error("initializeWasm() must be awaited first!");
5958 const nativeResponseValue = wasm.MessageSendEvent_payment_failure_network_update(update);
5959 return nativeResponseValue;
5961 // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
5962 export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
5963 if(!isWasmInitialized) {
5964 throw new Error("initializeWasm() must be awaited first!");
5966 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
5967 return nativeResponseValue;
5969 // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
5970 export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
5971 if(!isWasmInitialized) {
5972 throw new Error("initializeWasm() must be awaited first!");
5974 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
5975 return nativeResponseValue;
5977 // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
5978 export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
5979 if(!isWasmInitialized) {
5980 throw new Error("initializeWasm() must be awaited first!");
5982 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
5983 return nativeResponseValue;
5985 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
5986 export function MessageSendEventsProvider_free(this_ptr: number): void {
5987 if(!isWasmInitialized) {
5988 throw new Error("initializeWasm() must be awaited first!");
5990 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
5991 // debug statements here
5993 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
5994 export function EventsProvider_free(this_ptr: number): void {
5995 if(!isWasmInitialized) {
5996 throw new Error("initializeWasm() must be awaited first!");
5998 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
5999 // debug statements here
6001 // void EventHandler_free(struct LDKEventHandler this_ptr);
6002 export function EventHandler_free(this_ptr: number): void {
6003 if(!isWasmInitialized) {
6004 throw new Error("initializeWasm() must be awaited first!");
6006 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
6007 // debug statements here
6009 // void APIError_free(struct LDKAPIError this_ptr);
6010 export function APIError_free(this_ptr: number): void {
6011 if(!isWasmInitialized) {
6012 throw new Error("initializeWasm() must be awaited first!");
6014 const nativeResponseValue = wasm.APIError_free(this_ptr);
6015 // debug statements here
6017 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
6018 export function APIError_clone(orig: number): number {
6019 if(!isWasmInitialized) {
6020 throw new Error("initializeWasm() must be awaited first!");
6022 const nativeResponseValue = wasm.APIError_clone(orig);
6023 return nativeResponseValue;
6025 // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
6026 export function APIError_apimisuse_error(err: String): number {
6027 if(!isWasmInitialized) {
6028 throw new Error("initializeWasm() must be awaited first!");
6030 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
6031 return nativeResponseValue;
6033 // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
6034 export function APIError_fee_rate_too_high(err: String, feerate: number): number {
6035 if(!isWasmInitialized) {
6036 throw new Error("initializeWasm() must be awaited first!");
6038 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
6039 return nativeResponseValue;
6041 // struct LDKAPIError APIError_route_error(struct LDKStr err);
6042 export function APIError_route_error(err: String): number {
6043 if(!isWasmInitialized) {
6044 throw new Error("initializeWasm() must be awaited first!");
6046 const nativeResponseValue = wasm.APIError_route_error(err);
6047 return nativeResponseValue;
6049 // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
6050 export function APIError_channel_unavailable(err: String): number {
6051 if(!isWasmInitialized) {
6052 throw new Error("initializeWasm() must be awaited first!");
6054 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
6055 return nativeResponseValue;
6057 // struct LDKAPIError APIError_monitor_update_failed(void);
6058 export function APIError_monitor_update_failed(): number {
6059 if(!isWasmInitialized) {
6060 throw new Error("initializeWasm() must be awaited first!");
6062 const nativeResponseValue = wasm.APIError_monitor_update_failed();
6063 return nativeResponseValue;
6065 // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
6066 export function sign(msg: Uint8Array, sk: Uint8Array): number {
6067 if(!isWasmInitialized) {
6068 throw new Error("initializeWasm() must be awaited first!");
6070 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
6071 return nativeResponseValue;
6073 // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
6074 export function recover_pk(msg: Uint8Array, sig: String): number {
6075 if(!isWasmInitialized) {
6076 throw new Error("initializeWasm() must be awaited first!");
6078 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
6079 return nativeResponseValue;
6081 // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
6082 export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
6083 if(!isWasmInitialized) {
6084 throw new Error("initializeWasm() must be awaited first!");
6086 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
6087 return nativeResponseValue;
6089 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
6090 export function Level_clone(orig: number): Level {
6091 if(!isWasmInitialized) {
6092 throw new Error("initializeWasm() must be awaited first!");
6094 const nativeResponseValue = wasm.Level_clone(orig);
6095 return nativeResponseValue;
6097 // enum LDKLevel Level_trace(void);
6098 export function Level_trace(): Level {
6099 if(!isWasmInitialized) {
6100 throw new Error("initializeWasm() must be awaited first!");
6102 const nativeResponseValue = wasm.Level_trace();
6103 return nativeResponseValue;
6105 // enum LDKLevel Level_debug(void);
6106 export function Level_debug(): Level {
6107 if(!isWasmInitialized) {
6108 throw new Error("initializeWasm() must be awaited first!");
6110 const nativeResponseValue = wasm.Level_debug();
6111 return nativeResponseValue;
6113 // enum LDKLevel Level_info(void);
6114 export function Level_info(): Level {
6115 if(!isWasmInitialized) {
6116 throw new Error("initializeWasm() must be awaited first!");
6118 const nativeResponseValue = wasm.Level_info();
6119 return nativeResponseValue;
6121 // enum LDKLevel Level_warn(void);
6122 export function Level_warn(): Level {
6123 if(!isWasmInitialized) {
6124 throw new Error("initializeWasm() must be awaited first!");
6126 const nativeResponseValue = wasm.Level_warn();
6127 return nativeResponseValue;
6129 // enum LDKLevel Level_error(void);
6130 export function Level_error(): Level {
6131 if(!isWasmInitialized) {
6132 throw new Error("initializeWasm() must be awaited first!");
6134 const nativeResponseValue = wasm.Level_error();
6135 return nativeResponseValue;
6137 // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
6138 export function Level_eq(a: number, b: number): boolean {
6139 if(!isWasmInitialized) {
6140 throw new Error("initializeWasm() must be awaited first!");
6142 const nativeResponseValue = wasm.Level_eq(a, b);
6143 return nativeResponseValue;
6145 // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
6146 export function Level_hash(o: number): number {
6147 if(!isWasmInitialized) {
6148 throw new Error("initializeWasm() must be awaited first!");
6150 const nativeResponseValue = wasm.Level_hash(o);
6151 return nativeResponseValue;
6153 // MUST_USE_RES enum LDKLevel Level_max(void);
6154 export function Level_max(): Level {
6155 if(!isWasmInitialized) {
6156 throw new Error("initializeWasm() must be awaited first!");
6158 const nativeResponseValue = wasm.Level_max();
6159 return nativeResponseValue;
6161 // void Logger_free(struct LDKLogger this_ptr);
6162 export function Logger_free(this_ptr: number): void {
6163 if(!isWasmInitialized) {
6164 throw new Error("initializeWasm() must be awaited first!");
6166 const nativeResponseValue = wasm.Logger_free(this_ptr);
6167 // debug statements here
6169 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
6170 export function ChannelHandshakeConfig_free(this_obj: number): void {
6171 if(!isWasmInitialized) {
6172 throw new Error("initializeWasm() must be awaited first!");
6174 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
6175 // debug statements here
6177 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6178 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
6179 if(!isWasmInitialized) {
6180 throw new Error("initializeWasm() must be awaited first!");
6182 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
6183 return nativeResponseValue;
6185 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
6186 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
6187 if(!isWasmInitialized) {
6188 throw new Error("initializeWasm() must be awaited first!");
6190 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
6191 // debug statements here
6193 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6194 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
6195 if(!isWasmInitialized) {
6196 throw new Error("initializeWasm() must be awaited first!");
6198 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
6199 return nativeResponseValue;
6201 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
6202 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
6203 if(!isWasmInitialized) {
6204 throw new Error("initializeWasm() must be awaited first!");
6206 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
6207 // debug statements here
6209 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
6210 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
6211 if(!isWasmInitialized) {
6212 throw new Error("initializeWasm() must be awaited first!");
6214 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
6215 return nativeResponseValue;
6217 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
6218 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
6219 if(!isWasmInitialized) {
6220 throw new Error("initializeWasm() must be awaited first!");
6222 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
6223 // debug statements here
6225 // 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);
6226 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
6227 if(!isWasmInitialized) {
6228 throw new Error("initializeWasm() must be awaited first!");
6230 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
6231 return nativeResponseValue;
6233 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
6234 export function ChannelHandshakeConfig_clone(orig: number): number {
6235 if(!isWasmInitialized) {
6236 throw new Error("initializeWasm() must be awaited first!");
6238 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
6239 return nativeResponseValue;
6241 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
6242 export function ChannelHandshakeConfig_default(): number {
6243 if(!isWasmInitialized) {
6244 throw new Error("initializeWasm() must be awaited first!");
6246 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
6247 return nativeResponseValue;
6249 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
6250 export function ChannelHandshakeLimits_free(this_obj: number): void {
6251 if(!isWasmInitialized) {
6252 throw new Error("initializeWasm() must be awaited first!");
6254 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
6255 // debug statements here
6257 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6258 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
6259 if(!isWasmInitialized) {
6260 throw new Error("initializeWasm() must be awaited first!");
6262 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
6263 return nativeResponseValue;
6265 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6266 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
6267 if(!isWasmInitialized) {
6268 throw new Error("initializeWasm() must be awaited first!");
6270 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
6271 // debug statements here
6273 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6274 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
6275 if(!isWasmInitialized) {
6276 throw new Error("initializeWasm() must be awaited first!");
6278 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
6279 return nativeResponseValue;
6281 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6282 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
6283 if(!isWasmInitialized) {
6284 throw new Error("initializeWasm() must be awaited first!");
6286 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
6287 // debug statements here
6289 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6290 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
6291 if(!isWasmInitialized) {
6292 throw new Error("initializeWasm() must be awaited first!");
6294 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
6295 return nativeResponseValue;
6297 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6298 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
6299 if(!isWasmInitialized) {
6300 throw new Error("initializeWasm() must be awaited first!");
6302 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
6303 // debug statements here
6305 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6306 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
6307 if(!isWasmInitialized) {
6308 throw new Error("initializeWasm() must be awaited first!");
6310 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
6311 return nativeResponseValue;
6313 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6314 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
6315 if(!isWasmInitialized) {
6316 throw new Error("initializeWasm() must be awaited first!");
6318 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
6319 // debug statements here
6321 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6322 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
6323 if(!isWasmInitialized) {
6324 throw new Error("initializeWasm() must be awaited first!");
6326 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
6327 return nativeResponseValue;
6329 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6330 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
6331 if(!isWasmInitialized) {
6332 throw new Error("initializeWasm() must be awaited first!");
6334 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
6335 // debug statements here
6337 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6338 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
6339 if(!isWasmInitialized) {
6340 throw new Error("initializeWasm() must be awaited first!");
6342 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
6343 return nativeResponseValue;
6345 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
6346 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
6347 if(!isWasmInitialized) {
6348 throw new Error("initializeWasm() must be awaited first!");
6350 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
6351 // debug statements here
6353 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6354 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
6355 if(!isWasmInitialized) {
6356 throw new Error("initializeWasm() must be awaited first!");
6358 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
6359 return nativeResponseValue;
6361 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
6362 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
6363 if(!isWasmInitialized) {
6364 throw new Error("initializeWasm() must be awaited first!");
6366 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
6367 // debug statements here
6369 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6370 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
6371 if(!isWasmInitialized) {
6372 throw new Error("initializeWasm() must be awaited first!");
6374 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
6375 return nativeResponseValue;
6377 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6378 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
6379 if(!isWasmInitialized) {
6380 throw new Error("initializeWasm() must be awaited first!");
6382 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
6383 // debug statements here
6385 // 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);
6386 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 {
6387 if(!isWasmInitialized) {
6388 throw new Error("initializeWasm() must be awaited first!");
6390 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);
6391 return nativeResponseValue;
6393 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
6394 export function ChannelHandshakeLimits_clone(orig: number): number {
6395 if(!isWasmInitialized) {
6396 throw new Error("initializeWasm() must be awaited first!");
6398 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
6399 return nativeResponseValue;
6401 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
6402 export function ChannelHandshakeLimits_default(): number {
6403 if(!isWasmInitialized) {
6404 throw new Error("initializeWasm() must be awaited first!");
6406 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
6407 return nativeResponseValue;
6409 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
6410 export function ChannelConfig_free(this_obj: number): void {
6411 if(!isWasmInitialized) {
6412 throw new Error("initializeWasm() must be awaited first!");
6414 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
6415 // debug statements here
6417 // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6418 export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
6419 if(!isWasmInitialized) {
6420 throw new Error("initializeWasm() must be awaited first!");
6422 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
6423 return nativeResponseValue;
6425 // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6426 export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
6427 if(!isWasmInitialized) {
6428 throw new Error("initializeWasm() must be awaited first!");
6430 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
6431 // debug statements here
6433 // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6434 export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
6435 if(!isWasmInitialized) {
6436 throw new Error("initializeWasm() must be awaited first!");
6438 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
6439 return nativeResponseValue;
6441 // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6442 export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
6443 if(!isWasmInitialized) {
6444 throw new Error("initializeWasm() must be awaited first!");
6446 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
6447 // debug statements here
6449 // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6450 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
6451 if(!isWasmInitialized) {
6452 throw new Error("initializeWasm() must be awaited first!");
6454 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
6455 return nativeResponseValue;
6457 // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
6458 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6459 if(!isWasmInitialized) {
6460 throw new Error("initializeWasm() must be awaited first!");
6462 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
6463 // debug statements here
6465 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6466 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
6467 if(!isWasmInitialized) {
6468 throw new Error("initializeWasm() must be awaited first!");
6470 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
6471 return nativeResponseValue;
6473 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6474 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
6475 if(!isWasmInitialized) {
6476 throw new Error("initializeWasm() must be awaited first!");
6478 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
6479 // debug statements here
6481 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6482 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
6483 if(!isWasmInitialized) {
6484 throw new Error("initializeWasm() must be awaited first!");
6486 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
6487 return nativeResponseValue;
6489 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6490 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
6491 if(!isWasmInitialized) {
6492 throw new Error("initializeWasm() must be awaited first!");
6494 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
6495 // debug statements here
6497 // 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);
6498 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): number {
6499 if(!isWasmInitialized) {
6500 throw new Error("initializeWasm() must be awaited first!");
6502 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);
6503 return nativeResponseValue;
6505 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
6506 export function ChannelConfig_clone(orig: number): number {
6507 if(!isWasmInitialized) {
6508 throw new Error("initializeWasm() must be awaited first!");
6510 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
6511 return nativeResponseValue;
6513 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
6514 export function ChannelConfig_default(): number {
6515 if(!isWasmInitialized) {
6516 throw new Error("initializeWasm() must be awaited first!");
6518 const nativeResponseValue = wasm.ChannelConfig_default();
6519 return nativeResponseValue;
6521 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
6522 export function ChannelConfig_write(obj: number): Uint8Array {
6523 if(!isWasmInitialized) {
6524 throw new Error("initializeWasm() must be awaited first!");
6526 const nativeResponseValue = wasm.ChannelConfig_write(obj);
6527 return decodeArray(nativeResponseValue);
6529 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
6530 export function ChannelConfig_read(ser: Uint8Array): number {
6531 if(!isWasmInitialized) {
6532 throw new Error("initializeWasm() must be awaited first!");
6534 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
6535 return nativeResponseValue;
6537 // void UserConfig_free(struct LDKUserConfig this_obj);
6538 export function UserConfig_free(this_obj: number): void {
6539 if(!isWasmInitialized) {
6540 throw new Error("initializeWasm() must be awaited first!");
6542 const nativeResponseValue = wasm.UserConfig_free(this_obj);
6543 // debug statements here
6545 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6546 export function UserConfig_get_own_channel_config(this_ptr: number): number {
6547 if(!isWasmInitialized) {
6548 throw new Error("initializeWasm() must be awaited first!");
6550 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
6551 return nativeResponseValue;
6553 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
6554 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
6555 if(!isWasmInitialized) {
6556 throw new Error("initializeWasm() must be awaited first!");
6558 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
6559 // debug statements here
6561 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6562 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
6563 if(!isWasmInitialized) {
6564 throw new Error("initializeWasm() must be awaited first!");
6566 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
6567 return nativeResponseValue;
6569 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
6570 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
6571 if(!isWasmInitialized) {
6572 throw new Error("initializeWasm() must be awaited first!");
6574 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
6575 // debug statements here
6577 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6578 export function UserConfig_get_channel_options(this_ptr: number): number {
6579 if(!isWasmInitialized) {
6580 throw new Error("initializeWasm() must be awaited first!");
6582 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
6583 return nativeResponseValue;
6585 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
6586 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
6587 if(!isWasmInitialized) {
6588 throw new Error("initializeWasm() must be awaited first!");
6590 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
6591 // debug statements here
6593 // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6594 export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
6595 if(!isWasmInitialized) {
6596 throw new Error("initializeWasm() must be awaited first!");
6598 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
6599 return nativeResponseValue;
6601 // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
6602 export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
6603 if(!isWasmInitialized) {
6604 throw new Error("initializeWasm() must be awaited first!");
6606 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
6607 // debug statements here
6609 // 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);
6610 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 {
6611 if(!isWasmInitialized) {
6612 throw new Error("initializeWasm() must be awaited first!");
6614 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
6615 return nativeResponseValue;
6617 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
6618 export function UserConfig_clone(orig: number): number {
6619 if(!isWasmInitialized) {
6620 throw new Error("initializeWasm() must be awaited first!");
6622 const nativeResponseValue = wasm.UserConfig_clone(orig);
6623 return nativeResponseValue;
6625 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
6626 export function UserConfig_default(): number {
6627 if(!isWasmInitialized) {
6628 throw new Error("initializeWasm() must be awaited first!");
6630 const nativeResponseValue = wasm.UserConfig_default();
6631 return nativeResponseValue;
6633 // void BestBlock_free(struct LDKBestBlock this_obj);
6634 export function BestBlock_free(this_obj: number): void {
6635 if(!isWasmInitialized) {
6636 throw new Error("initializeWasm() must be awaited first!");
6638 const nativeResponseValue = wasm.BestBlock_free(this_obj);
6639 // debug statements here
6641 // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
6642 export function BestBlock_clone(orig: number): number {
6643 if(!isWasmInitialized) {
6644 throw new Error("initializeWasm() must be awaited first!");
6646 const nativeResponseValue = wasm.BestBlock_clone(orig);
6647 return nativeResponseValue;
6649 // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
6650 export function BestBlock_from_genesis(network: Network): number {
6651 if(!isWasmInitialized) {
6652 throw new Error("initializeWasm() must be awaited first!");
6654 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
6655 return nativeResponseValue;
6657 // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
6658 export function BestBlock_new(block_hash: Uint8Array, height: number): number {
6659 if(!isWasmInitialized) {
6660 throw new Error("initializeWasm() must be awaited first!");
6662 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
6663 return nativeResponseValue;
6665 // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
6666 export function BestBlock_block_hash(this_arg: number): Uint8Array {
6667 if(!isWasmInitialized) {
6668 throw new Error("initializeWasm() must be awaited first!");
6670 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
6671 return decodeArray(nativeResponseValue);
6673 // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
6674 export function BestBlock_height(this_arg: number): number {
6675 if(!isWasmInitialized) {
6676 throw new Error("initializeWasm() must be awaited first!");
6678 const nativeResponseValue = wasm.BestBlock_height(this_arg);
6679 return nativeResponseValue;
6681 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
6682 export function AccessError_clone(orig: number): AccessError {
6683 if(!isWasmInitialized) {
6684 throw new Error("initializeWasm() must be awaited first!");
6686 const nativeResponseValue = wasm.AccessError_clone(orig);
6687 return nativeResponseValue;
6689 // enum LDKAccessError AccessError_unknown_chain(void);
6690 export function AccessError_unknown_chain(): AccessError {
6691 if(!isWasmInitialized) {
6692 throw new Error("initializeWasm() must be awaited first!");
6694 const nativeResponseValue = wasm.AccessError_unknown_chain();
6695 return nativeResponseValue;
6697 // enum LDKAccessError AccessError_unknown_tx(void);
6698 export function AccessError_unknown_tx(): AccessError {
6699 if(!isWasmInitialized) {
6700 throw new Error("initializeWasm() must be awaited first!");
6702 const nativeResponseValue = wasm.AccessError_unknown_tx();
6703 return nativeResponseValue;
6705 // void Access_free(struct LDKAccess this_ptr);
6706 export function Access_free(this_ptr: number): void {
6707 if(!isWasmInitialized) {
6708 throw new Error("initializeWasm() must be awaited first!");
6710 const nativeResponseValue = wasm.Access_free(this_ptr);
6711 // debug statements here
6713 // void Listen_free(struct LDKListen this_ptr);
6714 export function Listen_free(this_ptr: number): void {
6715 if(!isWasmInitialized) {
6716 throw new Error("initializeWasm() must be awaited first!");
6718 const nativeResponseValue = wasm.Listen_free(this_ptr);
6719 // debug statements here
6721 // void Confirm_free(struct LDKConfirm this_ptr);
6722 export function Confirm_free(this_ptr: number): void {
6723 if(!isWasmInitialized) {
6724 throw new Error("initializeWasm() must be awaited first!");
6726 const nativeResponseValue = wasm.Confirm_free(this_ptr);
6727 // debug statements here
6729 // void Watch_free(struct LDKWatch this_ptr);
6730 export function Watch_free(this_ptr: number): void {
6731 if(!isWasmInitialized) {
6732 throw new Error("initializeWasm() must be awaited first!");
6734 const nativeResponseValue = wasm.Watch_free(this_ptr);
6735 // debug statements here
6737 // void Filter_free(struct LDKFilter this_ptr);
6738 export function Filter_free(this_ptr: number): void {
6739 if(!isWasmInitialized) {
6740 throw new Error("initializeWasm() must be awaited first!");
6742 const nativeResponseValue = wasm.Filter_free(this_ptr);
6743 // debug statements here
6745 // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
6746 export function WatchedOutput_free(this_obj: number): void {
6747 if(!isWasmInitialized) {
6748 throw new Error("initializeWasm() must be awaited first!");
6750 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
6751 // debug statements here
6753 // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6754 export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
6755 if(!isWasmInitialized) {
6756 throw new Error("initializeWasm() must be awaited first!");
6758 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
6759 return decodeArray(nativeResponseValue);
6761 // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6762 export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
6763 if(!isWasmInitialized) {
6764 throw new Error("initializeWasm() must be awaited first!");
6766 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
6767 // debug statements here
6769 // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6770 export function WatchedOutput_get_outpoint(this_ptr: number): number {
6771 if(!isWasmInitialized) {
6772 throw new Error("initializeWasm() must be awaited first!");
6774 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
6775 return nativeResponseValue;
6777 // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6778 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
6779 if(!isWasmInitialized) {
6780 throw new Error("initializeWasm() must be awaited first!");
6782 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
6783 // debug statements here
6785 // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6786 export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
6787 if(!isWasmInitialized) {
6788 throw new Error("initializeWasm() must be awaited first!");
6790 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
6791 return decodeArray(nativeResponseValue);
6793 // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6794 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
6795 if(!isWasmInitialized) {
6796 throw new Error("initializeWasm() must be awaited first!");
6798 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
6799 // debug statements here
6801 // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
6802 export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
6803 if(!isWasmInitialized) {
6804 throw new Error("initializeWasm() must be awaited first!");
6806 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
6807 return nativeResponseValue;
6809 // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
6810 export function WatchedOutput_clone(orig: number): number {
6811 if(!isWasmInitialized) {
6812 throw new Error("initializeWasm() must be awaited first!");
6814 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
6815 return nativeResponseValue;
6817 // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
6818 export function WatchedOutput_hash(o: number): number {
6819 if(!isWasmInitialized) {
6820 throw new Error("initializeWasm() must be awaited first!");
6822 const nativeResponseValue = wasm.WatchedOutput_hash(o);
6823 return nativeResponseValue;
6825 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
6826 export function BroadcasterInterface_free(this_ptr: number): void {
6827 if(!isWasmInitialized) {
6828 throw new Error("initializeWasm() must be awaited first!");
6830 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
6831 // debug statements here
6833 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
6834 export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
6835 if(!isWasmInitialized) {
6836 throw new Error("initializeWasm() must be awaited first!");
6838 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
6839 return nativeResponseValue;
6841 // enum LDKConfirmationTarget ConfirmationTarget_background(void);
6842 export function ConfirmationTarget_background(): ConfirmationTarget {
6843 if(!isWasmInitialized) {
6844 throw new Error("initializeWasm() must be awaited first!");
6846 const nativeResponseValue = wasm.ConfirmationTarget_background();
6847 return nativeResponseValue;
6849 // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
6850 export function ConfirmationTarget_normal(): ConfirmationTarget {
6851 if(!isWasmInitialized) {
6852 throw new Error("initializeWasm() must be awaited first!");
6854 const nativeResponseValue = wasm.ConfirmationTarget_normal();
6855 return nativeResponseValue;
6857 // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
6858 export function ConfirmationTarget_high_priority(): ConfirmationTarget {
6859 if(!isWasmInitialized) {
6860 throw new Error("initializeWasm() must be awaited first!");
6862 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
6863 return nativeResponseValue;
6865 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
6866 export function FeeEstimator_free(this_ptr: number): void {
6867 if(!isWasmInitialized) {
6868 throw new Error("initializeWasm() must be awaited first!");
6870 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
6871 // debug statements here
6873 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
6874 export function ChainMonitor_free(this_obj: number): void {
6875 if(!isWasmInitialized) {
6876 throw new Error("initializeWasm() must be awaited first!");
6878 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
6879 // debug statements here
6881 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
6882 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
6883 if(!isWasmInitialized) {
6884 throw new Error("initializeWasm() must be awaited first!");
6886 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
6887 return nativeResponseValue;
6889 // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6890 export function ChainMonitor_as_Listen(this_arg: number): number {
6891 if(!isWasmInitialized) {
6892 throw new Error("initializeWasm() must be awaited first!");
6894 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
6895 return nativeResponseValue;
6897 // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6898 export function ChainMonitor_as_Confirm(this_arg: number): number {
6899 if(!isWasmInitialized) {
6900 throw new Error("initializeWasm() must be awaited first!");
6902 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
6903 return nativeResponseValue;
6905 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6906 export function ChainMonitor_as_Watch(this_arg: number): number {
6907 if(!isWasmInitialized) {
6908 throw new Error("initializeWasm() must be awaited first!");
6910 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
6911 return nativeResponseValue;
6913 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6914 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
6915 if(!isWasmInitialized) {
6916 throw new Error("initializeWasm() must be awaited first!");
6918 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
6919 return nativeResponseValue;
6921 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
6922 export function ChannelMonitorUpdate_free(this_obj: number): void {
6923 if(!isWasmInitialized) {
6924 throw new Error("initializeWasm() must be awaited first!");
6926 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
6927 // debug statements here
6929 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
6930 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
6931 if(!isWasmInitialized) {
6932 throw new Error("initializeWasm() must be awaited first!");
6934 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
6935 return nativeResponseValue;
6937 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
6938 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
6939 if(!isWasmInitialized) {
6940 throw new Error("initializeWasm() must be awaited first!");
6942 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
6943 // debug statements here
6945 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
6946 export function ChannelMonitorUpdate_clone(orig: number): number {
6947 if(!isWasmInitialized) {
6948 throw new Error("initializeWasm() must be awaited first!");
6950 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
6951 return nativeResponseValue;
6953 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
6954 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
6955 if(!isWasmInitialized) {
6956 throw new Error("initializeWasm() must be awaited first!");
6958 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
6959 return decodeArray(nativeResponseValue);
6961 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
6962 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
6963 if(!isWasmInitialized) {
6964 throw new Error("initializeWasm() must be awaited first!");
6966 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
6967 return nativeResponseValue;
6969 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
6970 export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
6971 if(!isWasmInitialized) {
6972 throw new Error("initializeWasm() must be awaited first!");
6974 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
6975 return nativeResponseValue;
6977 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
6978 export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
6979 if(!isWasmInitialized) {
6980 throw new Error("initializeWasm() must be awaited first!");
6982 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
6983 return nativeResponseValue;
6985 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
6986 export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
6987 if(!isWasmInitialized) {
6988 throw new Error("initializeWasm() must be awaited first!");
6990 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
6991 return nativeResponseValue;
6993 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
6994 export function MonitorUpdateError_free(this_obj: number): void {
6995 if(!isWasmInitialized) {
6996 throw new Error("initializeWasm() must be awaited first!");
6998 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
6999 // debug statements here
7001 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
7002 export function MonitorUpdateError_clone(orig: number): number {
7003 if(!isWasmInitialized) {
7004 throw new Error("initializeWasm() must be awaited first!");
7006 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
7007 return nativeResponseValue;
7009 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
7010 export function MonitorEvent_free(this_ptr: number): void {
7011 if(!isWasmInitialized) {
7012 throw new Error("initializeWasm() must be awaited first!");
7014 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
7015 // debug statements here
7017 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
7018 export function MonitorEvent_clone(orig: number): number {
7019 if(!isWasmInitialized) {
7020 throw new Error("initializeWasm() must be awaited first!");
7022 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
7023 return nativeResponseValue;
7025 // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
7026 export function MonitorEvent_htlcevent(a: number): number {
7027 if(!isWasmInitialized) {
7028 throw new Error("initializeWasm() must be awaited first!");
7030 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
7031 return nativeResponseValue;
7033 // struct LDKMonitorEvent MonitorEvent_commitment_tx_broadcasted(struct LDKOutPoint a);
7034 export function MonitorEvent_commitment_tx_broadcasted(a: number): number {
7035 if(!isWasmInitialized) {
7036 throw new Error("initializeWasm() must be awaited first!");
7038 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_broadcasted(a);
7039 return nativeResponseValue;
7041 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
7042 export function HTLCUpdate_free(this_obj: number): void {
7043 if(!isWasmInitialized) {
7044 throw new Error("initializeWasm() must be awaited first!");
7046 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
7047 // debug statements here
7049 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
7050 export function HTLCUpdate_clone(orig: number): number {
7051 if(!isWasmInitialized) {
7052 throw new Error("initializeWasm() must be awaited first!");
7054 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
7055 return nativeResponseValue;
7057 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
7058 export function HTLCUpdate_write(obj: number): Uint8Array {
7059 if(!isWasmInitialized) {
7060 throw new Error("initializeWasm() must be awaited first!");
7062 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
7063 return decodeArray(nativeResponseValue);
7065 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
7066 export function HTLCUpdate_read(ser: Uint8Array): number {
7067 if(!isWasmInitialized) {
7068 throw new Error("initializeWasm() must be awaited first!");
7070 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
7071 return nativeResponseValue;
7073 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
7074 export function ChannelMonitor_free(this_obj: number): void {
7075 if(!isWasmInitialized) {
7076 throw new Error("initializeWasm() must be awaited first!");
7078 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
7079 // debug statements here
7081 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
7082 export function ChannelMonitor_clone(orig: number): number {
7083 if(!isWasmInitialized) {
7084 throw new Error("initializeWasm() must be awaited first!");
7086 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
7087 return nativeResponseValue;
7089 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
7090 export function ChannelMonitor_write(obj: number): Uint8Array {
7091 if(!isWasmInitialized) {
7092 throw new Error("initializeWasm() must be awaited first!");
7094 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
7095 return decodeArray(nativeResponseValue);
7097 // 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);
7098 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
7099 if(!isWasmInitialized) {
7100 throw new Error("initializeWasm() must be awaited first!");
7102 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
7103 return nativeResponseValue;
7105 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7106 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
7107 if(!isWasmInitialized) {
7108 throw new Error("initializeWasm() must be awaited first!");
7110 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
7111 return nativeResponseValue;
7113 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7114 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
7115 if(!isWasmInitialized) {
7116 throw new Error("initializeWasm() must be awaited first!");
7118 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
7119 return nativeResponseValue;
7121 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7122 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
7123 if(!isWasmInitialized) {
7124 throw new Error("initializeWasm() must be awaited first!");
7126 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
7127 return nativeResponseValue;
7129 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
7130 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
7131 if(!isWasmInitialized) {
7132 throw new Error("initializeWasm() must be awaited first!");
7134 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
7135 // debug statements here
7137 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7138 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
7139 if(!isWasmInitialized) {
7140 throw new Error("initializeWasm() must be awaited first!");
7142 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
7143 return nativeResponseValue;
7145 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7146 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
7147 if(!isWasmInitialized) {
7148 throw new Error("initializeWasm() must be awaited first!");
7150 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
7151 return nativeResponseValue;
7153 // 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);
7154 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
7155 if(!isWasmInitialized) {
7156 throw new Error("initializeWasm() must be awaited first!");
7158 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
7159 return nativeResponseValue;
7161 // 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);
7162 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
7163 if(!isWasmInitialized) {
7164 throw new Error("initializeWasm() must be awaited first!");
7166 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
7167 return nativeResponseValue;
7169 // 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);
7170 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
7171 if(!isWasmInitialized) {
7172 throw new Error("initializeWasm() must be awaited first!");
7174 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
7175 // debug statements here
7177 // 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);
7178 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
7179 if(!isWasmInitialized) {
7180 throw new Error("initializeWasm() must be awaited first!");
7182 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
7183 return nativeResponseValue;
7185 // 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);
7186 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
7187 if(!isWasmInitialized) {
7188 throw new Error("initializeWasm() must be awaited first!");
7190 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
7191 // debug statements here
7193 // 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);
7194 export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
7195 if(!isWasmInitialized) {
7196 throw new Error("initializeWasm() must be awaited first!");
7198 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
7199 return nativeResponseValue;
7201 // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7202 export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
7203 if(!isWasmInitialized) {
7204 throw new Error("initializeWasm() must be awaited first!");
7206 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
7207 return nativeResponseValue;
7209 // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
7210 export function ChannelMonitor_current_best_block(this_arg: number): number {
7211 if(!isWasmInitialized) {
7212 throw new Error("initializeWasm() must be awaited first!");
7214 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
7215 return nativeResponseValue;
7217 // void Persist_free(struct LDKPersist this_ptr);
7218 export function Persist_free(this_ptr: number): void {
7219 if(!isWasmInitialized) {
7220 throw new Error("initializeWasm() must be awaited first!");
7222 const nativeResponseValue = wasm.Persist_free(this_ptr);
7223 // debug statements here
7225 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
7226 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
7227 if(!isWasmInitialized) {
7228 throw new Error("initializeWasm() must be awaited first!");
7230 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
7231 return nativeResponseValue;
7233 // void OutPoint_free(struct LDKOutPoint this_obj);
7234 export function OutPoint_free(this_obj: number): void {
7235 if(!isWasmInitialized) {
7236 throw new Error("initializeWasm() must be awaited first!");
7238 const nativeResponseValue = wasm.OutPoint_free(this_obj);
7239 // debug statements here
7241 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
7242 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
7243 if(!isWasmInitialized) {
7244 throw new Error("initializeWasm() must be awaited first!");
7246 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
7247 return decodeArray(nativeResponseValue);
7249 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7250 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
7251 if(!isWasmInitialized) {
7252 throw new Error("initializeWasm() must be awaited first!");
7254 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
7255 // debug statements here
7257 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
7258 export function OutPoint_get_index(this_ptr: number): number {
7259 if(!isWasmInitialized) {
7260 throw new Error("initializeWasm() must be awaited first!");
7262 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
7263 return nativeResponseValue;
7265 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
7266 export function OutPoint_set_index(this_ptr: number, val: number): void {
7267 if(!isWasmInitialized) {
7268 throw new Error("initializeWasm() must be awaited first!");
7270 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
7271 // debug statements here
7273 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
7274 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
7275 if(!isWasmInitialized) {
7276 throw new Error("initializeWasm() must be awaited first!");
7278 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
7279 return nativeResponseValue;
7281 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
7282 export function OutPoint_clone(orig: number): number {
7283 if(!isWasmInitialized) {
7284 throw new Error("initializeWasm() must be awaited first!");
7286 const nativeResponseValue = wasm.OutPoint_clone(orig);
7287 return nativeResponseValue;
7289 // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
7290 export function OutPoint_eq(a: number, b: number): boolean {
7291 if(!isWasmInitialized) {
7292 throw new Error("initializeWasm() must be awaited first!");
7294 const nativeResponseValue = wasm.OutPoint_eq(a, b);
7295 return nativeResponseValue;
7297 // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
7298 export function OutPoint_hash(o: number): number {
7299 if(!isWasmInitialized) {
7300 throw new Error("initializeWasm() must be awaited first!");
7302 const nativeResponseValue = wasm.OutPoint_hash(o);
7303 return nativeResponseValue;
7305 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
7306 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
7307 if(!isWasmInitialized) {
7308 throw new Error("initializeWasm() must be awaited first!");
7310 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
7311 return decodeArray(nativeResponseValue);
7313 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
7314 export function OutPoint_write(obj: number): Uint8Array {
7315 if(!isWasmInitialized) {
7316 throw new Error("initializeWasm() must be awaited first!");
7318 const nativeResponseValue = wasm.OutPoint_write(obj);
7319 return decodeArray(nativeResponseValue);
7321 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
7322 export function OutPoint_read(ser: Uint8Array): number {
7323 if(!isWasmInitialized) {
7324 throw new Error("initializeWasm() must be awaited first!");
7326 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
7327 return nativeResponseValue;
7329 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
7330 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
7331 if(!isWasmInitialized) {
7332 throw new Error("initializeWasm() must be awaited first!");
7334 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
7335 // debug statements here
7337 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7338 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
7339 if(!isWasmInitialized) {
7340 throw new Error("initializeWasm() must be awaited first!");
7342 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
7343 return nativeResponseValue;
7345 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7346 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
7347 if(!isWasmInitialized) {
7348 throw new Error("initializeWasm() must be awaited first!");
7350 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
7351 // debug statements here
7353 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7354 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
7355 if(!isWasmInitialized) {
7356 throw new Error("initializeWasm() must be awaited first!");
7358 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
7359 return decodeArray(nativeResponseValue);
7361 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7362 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7363 if(!isWasmInitialized) {
7364 throw new Error("initializeWasm() must be awaited first!");
7366 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
7367 // debug statements here
7369 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7370 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
7371 if(!isWasmInitialized) {
7372 throw new Error("initializeWasm() must be awaited first!");
7374 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
7375 return nativeResponseValue;
7377 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
7378 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
7379 if(!isWasmInitialized) {
7380 throw new Error("initializeWasm() must be awaited first!");
7382 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
7383 // debug statements here
7385 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
7386 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
7387 if(!isWasmInitialized) {
7388 throw new Error("initializeWasm() must be awaited first!");
7390 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
7391 // debug statements here
7393 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7394 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
7395 if(!isWasmInitialized) {
7396 throw new Error("initializeWasm() must be awaited first!");
7398 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
7399 return decodeArray(nativeResponseValue);
7401 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7402 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
7403 if(!isWasmInitialized) {
7404 throw new Error("initializeWasm() must be awaited first!");
7406 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
7407 // debug statements here
7409 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
7410 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
7411 if(!isWasmInitialized) {
7412 throw new Error("initializeWasm() must be awaited first!");
7414 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
7415 return decodeArray(nativeResponseValue);
7417 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7418 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
7419 if(!isWasmInitialized) {
7420 throw new Error("initializeWasm() must be awaited first!");
7422 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
7423 // debug statements here
7425 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7426 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
7427 if(!isWasmInitialized) {
7428 throw new Error("initializeWasm() must be awaited first!");
7430 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7431 return nativeResponseValue;
7433 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7434 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7435 if(!isWasmInitialized) {
7436 throw new Error("initializeWasm() must be awaited first!");
7438 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7439 // debug statements here
7441 // 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);
7442 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 {
7443 if(!isWasmInitialized) {
7444 throw new Error("initializeWasm() must be awaited first!");
7446 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);
7447 return nativeResponseValue;
7449 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
7450 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
7451 if(!isWasmInitialized) {
7452 throw new Error("initializeWasm() must be awaited first!");
7454 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
7455 return nativeResponseValue;
7457 // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
7458 export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
7459 if(!isWasmInitialized) {
7460 throw new Error("initializeWasm() must be awaited first!");
7462 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
7463 return decodeArray(nativeResponseValue);
7465 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
7466 export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
7467 if(!isWasmInitialized) {
7468 throw new Error("initializeWasm() must be awaited first!");
7470 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
7471 return nativeResponseValue;
7473 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
7474 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
7475 if(!isWasmInitialized) {
7476 throw new Error("initializeWasm() must be awaited first!");
7478 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
7479 // debug statements here
7481 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7482 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
7483 if(!isWasmInitialized) {
7484 throw new Error("initializeWasm() must be awaited first!");
7486 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
7487 return nativeResponseValue;
7489 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7490 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
7491 if(!isWasmInitialized) {
7492 throw new Error("initializeWasm() must be awaited first!");
7494 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
7495 // debug statements here
7497 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
7498 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
7499 if(!isWasmInitialized) {
7500 throw new Error("initializeWasm() must be awaited first!");
7502 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
7503 // debug statements here
7505 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
7506 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
7507 if(!isWasmInitialized) {
7508 throw new Error("initializeWasm() must be awaited first!");
7510 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
7511 return decodeArray(nativeResponseValue);
7513 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7514 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
7515 if(!isWasmInitialized) {
7516 throw new Error("initializeWasm() must be awaited first!");
7518 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
7519 // debug statements here
7521 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7522 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
7523 if(!isWasmInitialized) {
7524 throw new Error("initializeWasm() must be awaited first!");
7526 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7527 return nativeResponseValue;
7529 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7530 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7531 if(!isWasmInitialized) {
7532 throw new Error("initializeWasm() must be awaited first!");
7534 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7535 // debug statements here
7537 // 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);
7538 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
7539 if(!isWasmInitialized) {
7540 throw new Error("initializeWasm() must be awaited first!");
7542 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
7543 return nativeResponseValue;
7545 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
7546 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
7547 if(!isWasmInitialized) {
7548 throw new Error("initializeWasm() must be awaited first!");
7550 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
7551 return nativeResponseValue;
7553 // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
7554 export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
7555 if(!isWasmInitialized) {
7556 throw new Error("initializeWasm() must be awaited first!");
7558 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
7559 return decodeArray(nativeResponseValue);
7561 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
7562 export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
7563 if(!isWasmInitialized) {
7564 throw new Error("initializeWasm() must be awaited first!");
7566 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
7567 return nativeResponseValue;
7569 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
7570 export function SpendableOutputDescriptor_free(this_ptr: number): void {
7571 if(!isWasmInitialized) {
7572 throw new Error("initializeWasm() must be awaited first!");
7574 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
7575 // debug statements here
7577 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
7578 export function SpendableOutputDescriptor_clone(orig: number): number {
7579 if(!isWasmInitialized) {
7580 throw new Error("initializeWasm() must be awaited first!");
7582 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
7583 return nativeResponseValue;
7585 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
7586 export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
7587 if(!isWasmInitialized) {
7588 throw new Error("initializeWasm() must be awaited first!");
7590 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
7591 return nativeResponseValue;
7593 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
7594 export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
7595 if(!isWasmInitialized) {
7596 throw new Error("initializeWasm() must be awaited first!");
7598 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
7599 return nativeResponseValue;
7601 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
7602 export function SpendableOutputDescriptor_static_payment_output(a: number): number {
7603 if(!isWasmInitialized) {
7604 throw new Error("initializeWasm() must be awaited first!");
7606 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
7607 return nativeResponseValue;
7609 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
7610 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
7611 if(!isWasmInitialized) {
7612 throw new Error("initializeWasm() must be awaited first!");
7614 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
7615 return decodeArray(nativeResponseValue);
7617 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
7618 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
7619 if(!isWasmInitialized) {
7620 throw new Error("initializeWasm() must be awaited first!");
7622 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
7623 return nativeResponseValue;
7625 // void BaseSign_free(struct LDKBaseSign this_ptr);
7626 export function BaseSign_free(this_ptr: number): void {
7627 if(!isWasmInitialized) {
7628 throw new Error("initializeWasm() must be awaited first!");
7630 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
7631 // debug statements here
7633 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
7634 export function Sign_clone(orig: number): number {
7635 if(!isWasmInitialized) {
7636 throw new Error("initializeWasm() must be awaited first!");
7638 const nativeResponseValue = wasm.Sign_clone(orig);
7639 return nativeResponseValue;
7641 // void Sign_free(struct LDKSign this_ptr);
7642 export function Sign_free(this_ptr: number): void {
7643 if(!isWasmInitialized) {
7644 throw new Error("initializeWasm() must be awaited first!");
7646 const nativeResponseValue = wasm.Sign_free(this_ptr);
7647 // debug statements here
7649 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
7650 export function KeysInterface_free(this_ptr: number): void {
7651 if(!isWasmInitialized) {
7652 throw new Error("initializeWasm() must be awaited first!");
7654 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
7655 // debug statements here
7657 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
7658 export function InMemorySigner_free(this_obj: number): void {
7659 if(!isWasmInitialized) {
7660 throw new Error("initializeWasm() must be awaited first!");
7662 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
7663 // debug statements here
7665 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7666 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
7667 if(!isWasmInitialized) {
7668 throw new Error("initializeWasm() must be awaited first!");
7670 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
7671 return decodeArray(nativeResponseValue);
7673 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7674 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
7675 if(!isWasmInitialized) {
7676 throw new Error("initializeWasm() must be awaited first!");
7678 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
7679 // debug statements here
7681 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7682 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
7683 if(!isWasmInitialized) {
7684 throw new Error("initializeWasm() must be awaited first!");
7686 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
7687 return decodeArray(nativeResponseValue);
7689 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7690 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
7691 if(!isWasmInitialized) {
7692 throw new Error("initializeWasm() must be awaited first!");
7694 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
7695 // debug statements here
7697 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7698 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
7699 if(!isWasmInitialized) {
7700 throw new Error("initializeWasm() must be awaited first!");
7702 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
7703 return decodeArray(nativeResponseValue);
7705 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7706 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
7707 if(!isWasmInitialized) {
7708 throw new Error("initializeWasm() must be awaited first!");
7710 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
7711 // debug statements here
7713 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7714 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
7715 if(!isWasmInitialized) {
7716 throw new Error("initializeWasm() must be awaited first!");
7718 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
7719 return decodeArray(nativeResponseValue);
7721 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7722 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
7723 if(!isWasmInitialized) {
7724 throw new Error("initializeWasm() must be awaited first!");
7726 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
7727 // debug statements here
7729 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7730 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
7731 if(!isWasmInitialized) {
7732 throw new Error("initializeWasm() must be awaited first!");
7734 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
7735 return decodeArray(nativeResponseValue);
7737 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7738 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
7739 if(!isWasmInitialized) {
7740 throw new Error("initializeWasm() must be awaited first!");
7742 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
7743 // debug statements here
7745 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7746 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
7747 if(!isWasmInitialized) {
7748 throw new Error("initializeWasm() must be awaited first!");
7750 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
7751 return decodeArray(nativeResponseValue);
7753 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7754 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
7755 if(!isWasmInitialized) {
7756 throw new Error("initializeWasm() must be awaited first!");
7758 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
7759 // debug statements here
7761 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
7762 export function InMemorySigner_clone(orig: number): number {
7763 if(!isWasmInitialized) {
7764 throw new Error("initializeWasm() must be awaited first!");
7766 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
7767 return nativeResponseValue;
7769 // 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);
7770 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 {
7771 if(!isWasmInitialized) {
7772 throw new Error("initializeWasm() must be awaited first!");
7774 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));
7775 return nativeResponseValue;
7777 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7778 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
7779 if(!isWasmInitialized) {
7780 throw new Error("initializeWasm() must be awaited first!");
7782 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
7783 return nativeResponseValue;
7785 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7786 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
7787 if(!isWasmInitialized) {
7788 throw new Error("initializeWasm() must be awaited first!");
7790 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
7791 return nativeResponseValue;
7793 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7794 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
7795 if(!isWasmInitialized) {
7796 throw new Error("initializeWasm() must be awaited first!");
7798 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
7799 return nativeResponseValue;
7801 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7802 export function InMemorySigner_is_outbound(this_arg: number): boolean {
7803 if(!isWasmInitialized) {
7804 throw new Error("initializeWasm() must be awaited first!");
7806 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
7807 return nativeResponseValue;
7809 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7810 export function InMemorySigner_funding_outpoint(this_arg: number): number {
7811 if(!isWasmInitialized) {
7812 throw new Error("initializeWasm() must be awaited first!");
7814 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
7815 return nativeResponseValue;
7817 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7818 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
7819 if(!isWasmInitialized) {
7820 throw new Error("initializeWasm() must be awaited first!");
7822 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
7823 return nativeResponseValue;
7825 // 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);
7826 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7827 if(!isWasmInitialized) {
7828 throw new Error("initializeWasm() must be awaited first!");
7830 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7831 return nativeResponseValue;
7833 // 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);
7834 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7835 if(!isWasmInitialized) {
7836 throw new Error("initializeWasm() must be awaited first!");
7838 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7839 return nativeResponseValue;
7841 // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7842 export function InMemorySigner_as_BaseSign(this_arg: number): number {
7843 if(!isWasmInitialized) {
7844 throw new Error("initializeWasm() must be awaited first!");
7846 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
7847 return nativeResponseValue;
7849 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7850 export function InMemorySigner_as_Sign(this_arg: number): number {
7851 if(!isWasmInitialized) {
7852 throw new Error("initializeWasm() must be awaited first!");
7854 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
7855 return nativeResponseValue;
7857 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
7858 export function InMemorySigner_write(obj: number): Uint8Array {
7859 if(!isWasmInitialized) {
7860 throw new Error("initializeWasm() must be awaited first!");
7862 const nativeResponseValue = wasm.InMemorySigner_write(obj);
7863 return decodeArray(nativeResponseValue);
7865 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
7866 export function InMemorySigner_read(ser: Uint8Array): number {
7867 if(!isWasmInitialized) {
7868 throw new Error("initializeWasm() must be awaited first!");
7870 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
7871 return nativeResponseValue;
7873 // void KeysManager_free(struct LDKKeysManager this_obj);
7874 export function KeysManager_free(this_obj: number): void {
7875 if(!isWasmInitialized) {
7876 throw new Error("initializeWasm() must be awaited first!");
7878 const nativeResponseValue = wasm.KeysManager_free(this_obj);
7879 // debug statements here
7881 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
7882 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
7883 if(!isWasmInitialized) {
7884 throw new Error("initializeWasm() must be awaited first!");
7886 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
7887 return nativeResponseValue;
7889 // 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]);
7890 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
7891 if(!isWasmInitialized) {
7892 throw new Error("initializeWasm() must be awaited first!");
7894 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
7895 return nativeResponseValue;
7897 // 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);
7898 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
7899 if(!isWasmInitialized) {
7900 throw new Error("initializeWasm() must be awaited first!");
7902 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
7903 return nativeResponseValue;
7905 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
7906 export function KeysManager_as_KeysInterface(this_arg: number): number {
7907 if(!isWasmInitialized) {
7908 throw new Error("initializeWasm() must be awaited first!");
7910 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
7911 return nativeResponseValue;
7913 // void ChannelManager_free(struct LDKChannelManager this_obj);
7914 export function ChannelManager_free(this_obj: number): void {
7915 if(!isWasmInitialized) {
7916 throw new Error("initializeWasm() must be awaited first!");
7918 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
7919 // debug statements here
7921 // void ChainParameters_free(struct LDKChainParameters this_obj);
7922 export function ChainParameters_free(this_obj: number): void {
7923 if(!isWasmInitialized) {
7924 throw new Error("initializeWasm() must be awaited first!");
7926 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
7927 // debug statements here
7929 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7930 export function ChainParameters_get_network(this_ptr: number): Network {
7931 if(!isWasmInitialized) {
7932 throw new Error("initializeWasm() must be awaited first!");
7934 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
7935 return nativeResponseValue;
7937 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
7938 export function ChainParameters_set_network(this_ptr: number, val: Network): void {
7939 if(!isWasmInitialized) {
7940 throw new Error("initializeWasm() must be awaited first!");
7942 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
7943 // debug statements here
7945 // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7946 export function ChainParameters_get_best_block(this_ptr: number): number {
7947 if(!isWasmInitialized) {
7948 throw new Error("initializeWasm() must be awaited first!");
7950 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
7951 return nativeResponseValue;
7953 // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
7954 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
7955 if(!isWasmInitialized) {
7956 throw new Error("initializeWasm() must be awaited first!");
7958 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
7959 // debug statements here
7961 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
7962 export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
7963 if(!isWasmInitialized) {
7964 throw new Error("initializeWasm() must be awaited first!");
7966 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
7967 return nativeResponseValue;
7969 // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
7970 export function ChainParameters_clone(orig: number): number {
7971 if(!isWasmInitialized) {
7972 throw new Error("initializeWasm() must be awaited first!");
7974 const nativeResponseValue = wasm.ChainParameters_clone(orig);
7975 return nativeResponseValue;
7977 // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
7978 export function ChannelCounterparty_free(this_obj: number): void {
7979 if(!isWasmInitialized) {
7980 throw new Error("initializeWasm() must be awaited first!");
7982 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
7983 // debug statements here
7985 // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
7986 export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
7987 if(!isWasmInitialized) {
7988 throw new Error("initializeWasm() must be awaited first!");
7990 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
7991 return decodeArray(nativeResponseValue);
7993 // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7994 export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
7995 if(!isWasmInitialized) {
7996 throw new Error("initializeWasm() must be awaited first!");
7998 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
7999 // debug statements here
8001 // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8002 export function ChannelCounterparty_get_features(this_ptr: number): number {
8003 if(!isWasmInitialized) {
8004 throw new Error("initializeWasm() must be awaited first!");
8006 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
8007 return nativeResponseValue;
8009 // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8010 export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
8011 if(!isWasmInitialized) {
8012 throw new Error("initializeWasm() must be awaited first!");
8014 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
8015 // debug statements here
8017 // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
8018 export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
8019 if(!isWasmInitialized) {
8020 throw new Error("initializeWasm() must be awaited first!");
8022 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
8023 return nativeResponseValue;
8025 // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
8026 export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
8027 if(!isWasmInitialized) {
8028 throw new Error("initializeWasm() must be awaited first!");
8030 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
8031 // debug statements here
8033 // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
8034 export function ChannelCounterparty_clone(orig: number): number {
8035 if(!isWasmInitialized) {
8036 throw new Error("initializeWasm() must be awaited first!");
8038 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
8039 return nativeResponseValue;
8041 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
8042 export function ChannelDetails_free(this_obj: number): void {
8043 if(!isWasmInitialized) {
8044 throw new Error("initializeWasm() must be awaited first!");
8046 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
8047 // debug statements here
8049 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
8050 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
8051 if(!isWasmInitialized) {
8052 throw new Error("initializeWasm() must be awaited first!");
8054 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
8055 return decodeArray(nativeResponseValue);
8057 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8058 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
8059 if(!isWasmInitialized) {
8060 throw new Error("initializeWasm() must be awaited first!");
8062 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
8063 // debug statements here
8065 // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8066 export function ChannelDetails_get_counterparty(this_ptr: number): number {
8067 if(!isWasmInitialized) {
8068 throw new Error("initializeWasm() must be awaited first!");
8070 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
8071 return nativeResponseValue;
8073 // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
8074 export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
8075 if(!isWasmInitialized) {
8076 throw new Error("initializeWasm() must be awaited first!");
8078 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
8079 // debug statements here
8081 // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8082 export function ChannelDetails_get_funding_txo(this_ptr: number): number {
8083 if(!isWasmInitialized) {
8084 throw new Error("initializeWasm() must be awaited first!");
8086 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
8087 return nativeResponseValue;
8089 // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8090 export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
8091 if(!isWasmInitialized) {
8092 throw new Error("initializeWasm() must be awaited first!");
8094 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
8095 // debug statements here
8097 // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8098 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
8099 if(!isWasmInitialized) {
8100 throw new Error("initializeWasm() must be awaited first!");
8102 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
8103 return nativeResponseValue;
8105 // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
8106 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
8107 if(!isWasmInitialized) {
8108 throw new Error("initializeWasm() must be awaited first!");
8110 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
8111 // debug statements here
8113 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8114 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
8115 if(!isWasmInitialized) {
8116 throw new Error("initializeWasm() must be awaited first!");
8118 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
8119 return nativeResponseValue;
8121 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8122 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
8123 if(!isWasmInitialized) {
8124 throw new Error("initializeWasm() must be awaited first!");
8126 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
8127 // debug statements here
8129 // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8130 export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
8131 if(!isWasmInitialized) {
8132 throw new Error("initializeWasm() must be awaited first!");
8134 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
8135 return nativeResponseValue;
8137 // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
8138 export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
8139 if(!isWasmInitialized) {
8140 throw new Error("initializeWasm() must be awaited first!");
8142 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
8143 // debug statements here
8145 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8146 export function ChannelDetails_get_user_id(this_ptr: number): number {
8147 if(!isWasmInitialized) {
8148 throw new Error("initializeWasm() must be awaited first!");
8150 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
8151 return nativeResponseValue;
8153 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8154 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
8155 if(!isWasmInitialized) {
8156 throw new Error("initializeWasm() must be awaited first!");
8158 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
8159 // debug statements here
8161 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8162 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
8163 if(!isWasmInitialized) {
8164 throw new Error("initializeWasm() must be awaited first!");
8166 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
8167 return nativeResponseValue;
8169 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8170 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
8171 if(!isWasmInitialized) {
8172 throw new Error("initializeWasm() must be awaited first!");
8174 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
8175 // debug statements here
8177 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8178 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
8179 if(!isWasmInitialized) {
8180 throw new Error("initializeWasm() must be awaited first!");
8182 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
8183 return nativeResponseValue;
8185 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
8186 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
8187 if(!isWasmInitialized) {
8188 throw new Error("initializeWasm() must be awaited first!");
8190 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
8191 // debug statements here
8193 // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8194 export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
8195 if(!isWasmInitialized) {
8196 throw new Error("initializeWasm() must be awaited first!");
8198 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
8199 return nativeResponseValue;
8201 // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
8202 export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
8203 if(!isWasmInitialized) {
8204 throw new Error("initializeWasm() must be awaited first!");
8206 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
8207 // debug statements here
8209 // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8210 export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
8211 if(!isWasmInitialized) {
8212 throw new Error("initializeWasm() must be awaited first!");
8214 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
8215 return nativeResponseValue;
8217 // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
8218 export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
8219 if(!isWasmInitialized) {
8220 throw new Error("initializeWasm() must be awaited first!");
8222 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
8223 // debug statements here
8225 // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8226 export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
8227 if(!isWasmInitialized) {
8228 throw new Error("initializeWasm() must be awaited first!");
8230 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
8231 return nativeResponseValue;
8233 // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8234 export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
8235 if(!isWasmInitialized) {
8236 throw new Error("initializeWasm() must be awaited first!");
8238 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
8239 // debug statements here
8241 // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8242 export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
8243 if(!isWasmInitialized) {
8244 throw new Error("initializeWasm() must be awaited first!");
8246 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
8247 return nativeResponseValue;
8249 // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8250 export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
8251 if(!isWasmInitialized) {
8252 throw new Error("initializeWasm() must be awaited first!");
8254 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
8255 // debug statements here
8257 // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8258 export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
8259 if(!isWasmInitialized) {
8260 throw new Error("initializeWasm() must be awaited first!");
8262 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
8263 return nativeResponseValue;
8265 // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8266 export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
8267 if(!isWasmInitialized) {
8268 throw new Error("initializeWasm() must be awaited first!");
8270 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
8271 // debug statements here
8273 // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
8274 export function ChannelDetails_get_is_public(this_ptr: number): boolean {
8275 if(!isWasmInitialized) {
8276 throw new Error("initializeWasm() must be awaited first!");
8278 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
8279 return nativeResponseValue;
8281 // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
8282 export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
8283 if(!isWasmInitialized) {
8284 throw new Error("initializeWasm() must be awaited first!");
8286 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
8287 // debug statements here
8289 // 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_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);
8290 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_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 {
8291 if(!isWasmInitialized) {
8292 throw new Error("initializeWasm() must be awaited first!");
8294 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_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);
8295 return nativeResponseValue;
8297 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
8298 export function ChannelDetails_clone(orig: number): number {
8299 if(!isWasmInitialized) {
8300 throw new Error("initializeWasm() must be awaited first!");
8302 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
8303 return nativeResponseValue;
8305 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
8306 export function PaymentSendFailure_free(this_ptr: number): void {
8307 if(!isWasmInitialized) {
8308 throw new Error("initializeWasm() must be awaited first!");
8310 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
8311 // debug statements here
8313 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
8314 export function PaymentSendFailure_clone(orig: number): number {
8315 if(!isWasmInitialized) {
8316 throw new Error("initializeWasm() must be awaited first!");
8318 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
8319 return nativeResponseValue;
8321 // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
8322 export function PaymentSendFailure_parameter_error(a: number): number {
8323 if(!isWasmInitialized) {
8324 throw new Error("initializeWasm() must be awaited first!");
8326 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
8327 return nativeResponseValue;
8329 // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
8330 export function PaymentSendFailure_path_parameter_error(a: number[]): number {
8331 if(!isWasmInitialized) {
8332 throw new Error("initializeWasm() must be awaited first!");
8334 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
8335 return nativeResponseValue;
8337 // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
8338 export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
8339 if(!isWasmInitialized) {
8340 throw new Error("initializeWasm() must be awaited first!");
8342 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
8343 return nativeResponseValue;
8345 // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
8346 export function PaymentSendFailure_partial_failure(a: number[]): number {
8347 if(!isWasmInitialized) {
8348 throw new Error("initializeWasm() must be awaited first!");
8350 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
8351 return nativeResponseValue;
8353 // 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);
8354 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
8355 if(!isWasmInitialized) {
8356 throw new Error("initializeWasm() must be awaited first!");
8358 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
8359 return nativeResponseValue;
8361 // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
8362 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
8363 if(!isWasmInitialized) {
8364 throw new Error("initializeWasm() must be awaited first!");
8366 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
8367 return nativeResponseValue;
8369 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ 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_id, struct LDKUserConfig override_config);
8370 export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_id: number, override_config: number): number {
8371 if(!isWasmInitialized) {
8372 throw new Error("initializeWasm() must be awaited first!");
8374 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
8375 return nativeResponseValue;
8377 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
8378 export function ChannelManager_list_channels(this_arg: number): number[] {
8379 if(!isWasmInitialized) {
8380 throw new Error("initializeWasm() must be awaited first!");
8382 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
8383 return nativeResponseValue;
8385 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
8386 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
8387 if(!isWasmInitialized) {
8388 throw new Error("initializeWasm() must be awaited first!");
8390 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
8391 return nativeResponseValue;
8393 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
8394 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
8395 if(!isWasmInitialized) {
8396 throw new Error("initializeWasm() must be awaited first!");
8398 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
8399 return nativeResponseValue;
8401 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
8402 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
8403 if(!isWasmInitialized) {
8404 throw new Error("initializeWasm() must be awaited first!");
8406 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
8407 return nativeResponseValue;
8409 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
8410 export function ChannelManager_force_close_all_channels(this_arg: number): void {
8411 if(!isWasmInitialized) {
8412 throw new Error("initializeWasm() must be awaited first!");
8414 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
8415 // debug statements here
8417 // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
8418 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
8419 if(!isWasmInitialized) {
8420 throw new Error("initializeWasm() must be awaited first!");
8422 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
8423 return nativeResponseValue;
8425 // 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);
8426 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
8427 if(!isWasmInitialized) {
8428 throw new Error("initializeWasm() must be awaited first!");
8430 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
8431 return nativeResponseValue;
8433 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
8434 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
8435 if(!isWasmInitialized) {
8436 throw new Error("initializeWasm() must be awaited first!");
8438 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
8439 // debug statements here
8441 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
8442 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
8443 if(!isWasmInitialized) {
8444 throw new Error("initializeWasm() must be awaited first!");
8446 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
8447 // debug statements here
8449 // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
8450 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
8451 if(!isWasmInitialized) {
8452 throw new Error("initializeWasm() must be awaited first!");
8454 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
8455 // debug statements here
8457 // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
8458 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
8459 if(!isWasmInitialized) {
8460 throw new Error("initializeWasm() must be awaited first!");
8462 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
8463 return nativeResponseValue;
8465 // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
8466 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
8467 if(!isWasmInitialized) {
8468 throw new Error("initializeWasm() must be awaited first!");
8470 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
8471 return nativeResponseValue;
8473 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
8474 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
8475 if(!isWasmInitialized) {
8476 throw new Error("initializeWasm() must be awaited first!");
8478 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
8479 return decodeArray(nativeResponseValue);
8481 // void ChannelManager_channel_monitor_updated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR funding_txo, uint64_t highest_applied_update_id);
8482 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
8483 if(!isWasmInitialized) {
8484 throw new Error("initializeWasm() must be awaited first!");
8486 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
8487 // debug statements here
8489 // 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);
8490 export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
8491 if(!isWasmInitialized) {
8492 throw new Error("initializeWasm() must be awaited first!");
8494 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
8495 return nativeResponseValue;
8497 // 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);
8498 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 {
8499 if(!isWasmInitialized) {
8500 throw new Error("initializeWasm() must be awaited first!");
8502 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
8503 return nativeResponseValue;
8505 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
8506 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
8507 if(!isWasmInitialized) {
8508 throw new Error("initializeWasm() must be awaited first!");
8510 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
8511 return nativeResponseValue;
8513 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
8514 export function ChannelManager_as_EventsProvider(this_arg: number): number {
8515 if(!isWasmInitialized) {
8516 throw new Error("initializeWasm() must be awaited first!");
8518 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
8519 return nativeResponseValue;
8521 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
8522 export function ChannelManager_as_Listen(this_arg: number): number {
8523 if(!isWasmInitialized) {
8524 throw new Error("initializeWasm() must be awaited first!");
8526 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
8527 return nativeResponseValue;
8529 // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
8530 export function ChannelManager_as_Confirm(this_arg: number): number {
8531 if(!isWasmInitialized) {
8532 throw new Error("initializeWasm() must be awaited first!");
8534 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
8535 return nativeResponseValue;
8537 // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
8538 export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
8539 if(!isWasmInitialized) {
8540 throw new Error("initializeWasm() must be awaited first!");
8542 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
8543 return nativeResponseValue;
8545 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
8546 export function ChannelManager_await_persistable_update(this_arg: number): void {
8547 if(!isWasmInitialized) {
8548 throw new Error("initializeWasm() must be awaited first!");
8550 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
8551 // debug statements here
8553 // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
8554 export function ChannelManager_current_best_block(this_arg: number): number {
8555 if(!isWasmInitialized) {
8556 throw new Error("initializeWasm() must be awaited first!");
8558 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
8559 return nativeResponseValue;
8561 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
8562 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
8563 if(!isWasmInitialized) {
8564 throw new Error("initializeWasm() must be awaited first!");
8566 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
8567 return nativeResponseValue;
8569 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
8570 export function ChannelManager_write(obj: number): Uint8Array {
8571 if(!isWasmInitialized) {
8572 throw new Error("initializeWasm() must be awaited first!");
8574 const nativeResponseValue = wasm.ChannelManager_write(obj);
8575 return decodeArray(nativeResponseValue);
8577 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
8578 export function ChannelManagerReadArgs_free(this_obj: number): void {
8579 if(!isWasmInitialized) {
8580 throw new Error("initializeWasm() must be awaited first!");
8582 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
8583 // debug statements here
8585 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8586 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
8587 if(!isWasmInitialized) {
8588 throw new Error("initializeWasm() must be awaited first!");
8590 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
8591 return nativeResponseValue;
8593 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
8594 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
8595 if(!isWasmInitialized) {
8596 throw new Error("initializeWasm() must be awaited first!");
8598 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
8599 // debug statements here
8601 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8602 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
8603 if(!isWasmInitialized) {
8604 throw new Error("initializeWasm() must be awaited first!");
8606 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
8607 return nativeResponseValue;
8609 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
8610 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
8611 if(!isWasmInitialized) {
8612 throw new Error("initializeWasm() must be awaited first!");
8614 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
8615 // debug statements here
8617 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8618 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
8619 if(!isWasmInitialized) {
8620 throw new Error("initializeWasm() must be awaited first!");
8622 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
8623 return nativeResponseValue;
8625 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
8626 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
8627 if(!isWasmInitialized) {
8628 throw new Error("initializeWasm() must be awaited first!");
8630 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
8631 // debug statements here
8633 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8634 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
8635 if(!isWasmInitialized) {
8636 throw new Error("initializeWasm() must be awaited first!");
8638 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
8639 return nativeResponseValue;
8641 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
8642 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
8643 if(!isWasmInitialized) {
8644 throw new Error("initializeWasm() must be awaited first!");
8646 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
8647 // debug statements here
8649 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8650 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
8651 if(!isWasmInitialized) {
8652 throw new Error("initializeWasm() must be awaited first!");
8654 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
8655 return nativeResponseValue;
8657 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
8658 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
8659 if(!isWasmInitialized) {
8660 throw new Error("initializeWasm() must be awaited first!");
8662 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
8663 // debug statements here
8665 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8666 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
8667 if(!isWasmInitialized) {
8668 throw new Error("initializeWasm() must be awaited first!");
8670 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
8671 return nativeResponseValue;
8673 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
8674 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
8675 if(!isWasmInitialized) {
8676 throw new Error("initializeWasm() must be awaited first!");
8678 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
8679 // debug statements here
8681 // 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);
8682 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 {
8683 if(!isWasmInitialized) {
8684 throw new Error("initializeWasm() must be awaited first!");
8686 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
8687 return nativeResponseValue;
8689 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
8690 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
8691 if(!isWasmInitialized) {
8692 throw new Error("initializeWasm() must be awaited first!");
8694 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
8695 return nativeResponseValue;
8697 // void DecodeError_free(struct LDKDecodeError this_obj);
8698 export function DecodeError_free(this_obj: number): void {
8699 if(!isWasmInitialized) {
8700 throw new Error("initializeWasm() must be awaited first!");
8702 const nativeResponseValue = wasm.DecodeError_free(this_obj);
8703 // debug statements here
8705 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
8706 export function DecodeError_clone(orig: number): number {
8707 if(!isWasmInitialized) {
8708 throw new Error("initializeWasm() must be awaited first!");
8710 const nativeResponseValue = wasm.DecodeError_clone(orig);
8711 return nativeResponseValue;
8713 // void Init_free(struct LDKInit this_obj);
8714 export function Init_free(this_obj: number): void {
8715 if(!isWasmInitialized) {
8716 throw new Error("initializeWasm() must be awaited first!");
8718 const nativeResponseValue = wasm.Init_free(this_obj);
8719 // debug statements here
8721 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
8722 export function Init_get_features(this_ptr: number): number {
8723 if(!isWasmInitialized) {
8724 throw new Error("initializeWasm() must be awaited first!");
8726 const nativeResponseValue = wasm.Init_get_features(this_ptr);
8727 return nativeResponseValue;
8729 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8730 export function Init_set_features(this_ptr: number, val: number): void {
8731 if(!isWasmInitialized) {
8732 throw new Error("initializeWasm() must be awaited first!");
8734 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
8735 // debug statements here
8737 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
8738 export function Init_new(features_arg: number): number {
8739 if(!isWasmInitialized) {
8740 throw new Error("initializeWasm() must be awaited first!");
8742 const nativeResponseValue = wasm.Init_new(features_arg);
8743 return nativeResponseValue;
8745 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
8746 export function Init_clone(orig: number): number {
8747 if(!isWasmInitialized) {
8748 throw new Error("initializeWasm() must be awaited first!");
8750 const nativeResponseValue = wasm.Init_clone(orig);
8751 return nativeResponseValue;
8753 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
8754 export function ErrorMessage_free(this_obj: number): void {
8755 if(!isWasmInitialized) {
8756 throw new Error("initializeWasm() must be awaited first!");
8758 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
8759 // debug statements here
8761 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
8762 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
8763 if(!isWasmInitialized) {
8764 throw new Error("initializeWasm() must be awaited first!");
8766 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
8767 return decodeArray(nativeResponseValue);
8769 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8770 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
8771 if(!isWasmInitialized) {
8772 throw new Error("initializeWasm() must be awaited first!");
8774 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
8775 // debug statements here
8777 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
8778 export function ErrorMessage_get_data(this_ptr: number): String {
8779 if(!isWasmInitialized) {
8780 throw new Error("initializeWasm() must be awaited first!");
8782 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
8783 return nativeResponseValue;
8785 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
8786 export function ErrorMessage_set_data(this_ptr: number, val: String): void {
8787 if(!isWasmInitialized) {
8788 throw new Error("initializeWasm() must be awaited first!");
8790 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
8791 // debug statements here
8793 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
8794 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
8795 if(!isWasmInitialized) {
8796 throw new Error("initializeWasm() must be awaited first!");
8798 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
8799 return nativeResponseValue;
8801 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
8802 export function ErrorMessage_clone(orig: number): number {
8803 if(!isWasmInitialized) {
8804 throw new Error("initializeWasm() must be awaited first!");
8806 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
8807 return nativeResponseValue;
8809 // void Ping_free(struct LDKPing this_obj);
8810 export function Ping_free(this_obj: number): void {
8811 if(!isWasmInitialized) {
8812 throw new Error("initializeWasm() must be awaited first!");
8814 const nativeResponseValue = wasm.Ping_free(this_obj);
8815 // debug statements here
8817 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
8818 export function Ping_get_ponglen(this_ptr: number): number {
8819 if(!isWasmInitialized) {
8820 throw new Error("initializeWasm() must be awaited first!");
8822 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
8823 return nativeResponseValue;
8825 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8826 export function Ping_set_ponglen(this_ptr: number, val: number): void {
8827 if(!isWasmInitialized) {
8828 throw new Error("initializeWasm() must be awaited first!");
8830 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
8831 // debug statements here
8833 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
8834 export function Ping_get_byteslen(this_ptr: number): number {
8835 if(!isWasmInitialized) {
8836 throw new Error("initializeWasm() must be awaited first!");
8838 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
8839 return nativeResponseValue;
8841 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8842 export function Ping_set_byteslen(this_ptr: number, val: number): void {
8843 if(!isWasmInitialized) {
8844 throw new Error("initializeWasm() must be awaited first!");
8846 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
8847 // debug statements here
8849 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
8850 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
8851 if(!isWasmInitialized) {
8852 throw new Error("initializeWasm() must be awaited first!");
8854 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
8855 return nativeResponseValue;
8857 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
8858 export function Ping_clone(orig: number): number {
8859 if(!isWasmInitialized) {
8860 throw new Error("initializeWasm() must be awaited first!");
8862 const nativeResponseValue = wasm.Ping_clone(orig);
8863 return nativeResponseValue;
8865 // void Pong_free(struct LDKPong this_obj);
8866 export function Pong_free(this_obj: number): void {
8867 if(!isWasmInitialized) {
8868 throw new Error("initializeWasm() must be awaited first!");
8870 const nativeResponseValue = wasm.Pong_free(this_obj);
8871 // debug statements here
8873 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
8874 export function Pong_get_byteslen(this_ptr: number): number {
8875 if(!isWasmInitialized) {
8876 throw new Error("initializeWasm() must be awaited first!");
8878 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
8879 return nativeResponseValue;
8881 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
8882 export function Pong_set_byteslen(this_ptr: number, val: number): void {
8883 if(!isWasmInitialized) {
8884 throw new Error("initializeWasm() must be awaited first!");
8886 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
8887 // debug statements here
8889 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
8890 export function Pong_new(byteslen_arg: number): number {
8891 if(!isWasmInitialized) {
8892 throw new Error("initializeWasm() must be awaited first!");
8894 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
8895 return nativeResponseValue;
8897 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
8898 export function Pong_clone(orig: number): number {
8899 if(!isWasmInitialized) {
8900 throw new Error("initializeWasm() must be awaited first!");
8902 const nativeResponseValue = wasm.Pong_clone(orig);
8903 return nativeResponseValue;
8905 // void OpenChannel_free(struct LDKOpenChannel this_obj);
8906 export function OpenChannel_free(this_obj: number): void {
8907 if(!isWasmInitialized) {
8908 throw new Error("initializeWasm() must be awaited first!");
8910 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
8911 // debug statements here
8913 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8914 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
8915 if(!isWasmInitialized) {
8916 throw new Error("initializeWasm() must be awaited first!");
8918 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
8919 return decodeArray(nativeResponseValue);
8921 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8922 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8923 if(!isWasmInitialized) {
8924 throw new Error("initializeWasm() must be awaited first!");
8926 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
8927 // debug statements here
8929 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8930 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8931 if(!isWasmInitialized) {
8932 throw new Error("initializeWasm() must be awaited first!");
8934 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
8935 return decodeArray(nativeResponseValue);
8937 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8938 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8939 if(!isWasmInitialized) {
8940 throw new Error("initializeWasm() must be awaited first!");
8942 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8943 // debug statements here
8945 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8946 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
8947 if(!isWasmInitialized) {
8948 throw new Error("initializeWasm() must be awaited first!");
8950 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
8951 return nativeResponseValue;
8953 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8954 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
8955 if(!isWasmInitialized) {
8956 throw new Error("initializeWasm() must be awaited first!");
8958 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
8959 // debug statements here
8961 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8962 export function OpenChannel_get_push_msat(this_ptr: number): number {
8963 if(!isWasmInitialized) {
8964 throw new Error("initializeWasm() must be awaited first!");
8966 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
8967 return nativeResponseValue;
8969 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8970 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
8971 if(!isWasmInitialized) {
8972 throw new Error("initializeWasm() must be awaited first!");
8974 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
8975 // debug statements here
8977 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8978 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
8979 if(!isWasmInitialized) {
8980 throw new Error("initializeWasm() must be awaited first!");
8982 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
8983 return nativeResponseValue;
8985 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8986 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8987 if(!isWasmInitialized) {
8988 throw new Error("initializeWasm() must be awaited first!");
8990 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
8991 // debug statements here
8993 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8994 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8995 if(!isWasmInitialized) {
8996 throw new Error("initializeWasm() must be awaited first!");
8998 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8999 return nativeResponseValue;
9001 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9002 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
9003 if(!isWasmInitialized) {
9004 throw new Error("initializeWasm() must be awaited first!");
9006 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
9007 // debug statements here
9009 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9010 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
9011 if(!isWasmInitialized) {
9012 throw new Error("initializeWasm() must be awaited first!");
9014 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
9015 return nativeResponseValue;
9017 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9018 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
9019 if(!isWasmInitialized) {
9020 throw new Error("initializeWasm() must be awaited first!");
9022 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
9023 // debug statements here
9025 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9026 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
9027 if(!isWasmInitialized) {
9028 throw new Error("initializeWasm() must be awaited first!");
9030 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
9031 return nativeResponseValue;
9033 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
9034 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9035 if(!isWasmInitialized) {
9036 throw new Error("initializeWasm() must be awaited first!");
9038 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
9039 // debug statements here
9041 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9042 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
9043 if(!isWasmInitialized) {
9044 throw new Error("initializeWasm() must be awaited first!");
9046 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
9047 return nativeResponseValue;
9049 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
9050 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
9051 if(!isWasmInitialized) {
9052 throw new Error("initializeWasm() must be awaited first!");
9054 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
9055 // debug statements here
9057 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9058 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
9059 if(!isWasmInitialized) {
9060 throw new Error("initializeWasm() must be awaited first!");
9062 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
9063 return nativeResponseValue;
9065 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
9066 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
9067 if(!isWasmInitialized) {
9068 throw new Error("initializeWasm() must be awaited first!");
9070 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
9071 // debug statements here
9073 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9074 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
9075 if(!isWasmInitialized) {
9076 throw new Error("initializeWasm() must be awaited first!");
9078 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
9079 return nativeResponseValue;
9081 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
9082 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
9083 if(!isWasmInitialized) {
9084 throw new Error("initializeWasm() must be awaited first!");
9086 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
9087 // debug statements here
9089 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9090 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
9091 if(!isWasmInitialized) {
9092 throw new Error("initializeWasm() must be awaited first!");
9094 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
9095 return decodeArray(nativeResponseValue);
9097 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9098 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
9099 if(!isWasmInitialized) {
9100 throw new Error("initializeWasm() must be awaited first!");
9102 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
9103 // debug statements here
9105 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9106 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
9107 if(!isWasmInitialized) {
9108 throw new Error("initializeWasm() must be awaited first!");
9110 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
9111 return decodeArray(nativeResponseValue);
9113 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9114 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
9115 if(!isWasmInitialized) {
9116 throw new Error("initializeWasm() must be awaited first!");
9118 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
9119 // debug statements here
9121 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9122 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
9123 if(!isWasmInitialized) {
9124 throw new Error("initializeWasm() must be awaited first!");
9126 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
9127 return decodeArray(nativeResponseValue);
9129 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9130 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
9131 if(!isWasmInitialized) {
9132 throw new Error("initializeWasm() must be awaited first!");
9134 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
9135 // debug statements here
9137 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9138 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
9139 if(!isWasmInitialized) {
9140 throw new Error("initializeWasm() must be awaited first!");
9142 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
9143 return decodeArray(nativeResponseValue);
9145 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9146 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
9147 if(!isWasmInitialized) {
9148 throw new Error("initializeWasm() must be awaited first!");
9150 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
9151 // debug statements here
9153 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9154 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
9155 if(!isWasmInitialized) {
9156 throw new Error("initializeWasm() must be awaited first!");
9158 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
9159 return decodeArray(nativeResponseValue);
9161 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9162 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
9163 if(!isWasmInitialized) {
9164 throw new Error("initializeWasm() must be awaited first!");
9166 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
9167 // debug statements here
9169 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9170 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
9171 if(!isWasmInitialized) {
9172 throw new Error("initializeWasm() must be awaited first!");
9174 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
9175 return decodeArray(nativeResponseValue);
9177 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9178 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9179 if(!isWasmInitialized) {
9180 throw new Error("initializeWasm() must be awaited first!");
9182 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
9183 // debug statements here
9185 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
9186 export function OpenChannel_get_channel_flags(this_ptr: number): number {
9187 if(!isWasmInitialized) {
9188 throw new Error("initializeWasm() must be awaited first!");
9190 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
9191 return nativeResponseValue;
9193 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
9194 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
9195 if(!isWasmInitialized) {
9196 throw new Error("initializeWasm() must be awaited first!");
9198 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
9199 // debug statements here
9201 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
9202 export function OpenChannel_clone(orig: number): number {
9203 if(!isWasmInitialized) {
9204 throw new Error("initializeWasm() must be awaited first!");
9206 const nativeResponseValue = wasm.OpenChannel_clone(orig);
9207 return nativeResponseValue;
9209 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
9210 export function AcceptChannel_free(this_obj: number): void {
9211 if(!isWasmInitialized) {
9212 throw new Error("initializeWasm() must be awaited first!");
9214 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
9215 // debug statements here
9217 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
9218 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
9219 if(!isWasmInitialized) {
9220 throw new Error("initializeWasm() must be awaited first!");
9222 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
9223 return decodeArray(nativeResponseValue);
9225 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9226 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9227 if(!isWasmInitialized) {
9228 throw new Error("initializeWasm() must be awaited first!");
9230 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
9231 // debug statements here
9233 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9234 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
9235 if(!isWasmInitialized) {
9236 throw new Error("initializeWasm() must be awaited first!");
9238 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
9239 return nativeResponseValue;
9241 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9242 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
9243 if(!isWasmInitialized) {
9244 throw new Error("initializeWasm() must be awaited first!");
9246 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
9247 // debug statements here
9249 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9250 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
9251 if(!isWasmInitialized) {
9252 throw new Error("initializeWasm() must be awaited first!");
9254 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
9255 return nativeResponseValue;
9257 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9258 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
9259 if(!isWasmInitialized) {
9260 throw new Error("initializeWasm() must be awaited first!");
9262 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
9263 // debug statements here
9265 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9266 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
9267 if(!isWasmInitialized) {
9268 throw new Error("initializeWasm() must be awaited first!");
9270 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
9271 return nativeResponseValue;
9273 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9274 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
9275 if(!isWasmInitialized) {
9276 throw new Error("initializeWasm() must be awaited first!");
9278 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
9279 // debug statements here
9281 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9282 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
9283 if(!isWasmInitialized) {
9284 throw new Error("initializeWasm() must be awaited first!");
9286 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
9287 return nativeResponseValue;
9289 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
9290 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9291 if(!isWasmInitialized) {
9292 throw new Error("initializeWasm() must be awaited first!");
9294 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
9295 // debug statements here
9297 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9298 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
9299 if(!isWasmInitialized) {
9300 throw new Error("initializeWasm() must be awaited first!");
9302 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
9303 return nativeResponseValue;
9305 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
9306 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
9307 if(!isWasmInitialized) {
9308 throw new Error("initializeWasm() must be awaited first!");
9310 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
9311 // debug statements here
9313 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9314 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
9315 if(!isWasmInitialized) {
9316 throw new Error("initializeWasm() must be awaited first!");
9318 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
9319 return nativeResponseValue;
9321 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
9322 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
9323 if(!isWasmInitialized) {
9324 throw new Error("initializeWasm() must be awaited first!");
9326 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
9327 // debug statements here
9329 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9330 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
9331 if(!isWasmInitialized) {
9332 throw new Error("initializeWasm() must be awaited first!");
9334 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
9335 return nativeResponseValue;
9337 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
9338 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
9339 if(!isWasmInitialized) {
9340 throw new Error("initializeWasm() must be awaited first!");
9342 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
9343 // debug statements here
9345 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9346 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
9347 if(!isWasmInitialized) {
9348 throw new Error("initializeWasm() must be awaited first!");
9350 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
9351 return decodeArray(nativeResponseValue);
9353 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9354 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
9355 if(!isWasmInitialized) {
9356 throw new Error("initializeWasm() must be awaited first!");
9358 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
9359 // debug statements here
9361 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9362 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
9363 if(!isWasmInitialized) {
9364 throw new Error("initializeWasm() must be awaited first!");
9366 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
9367 return decodeArray(nativeResponseValue);
9369 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9370 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
9371 if(!isWasmInitialized) {
9372 throw new Error("initializeWasm() must be awaited first!");
9374 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
9375 // debug statements here
9377 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9378 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
9379 if(!isWasmInitialized) {
9380 throw new Error("initializeWasm() must be awaited first!");
9382 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
9383 return decodeArray(nativeResponseValue);
9385 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9386 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
9387 if(!isWasmInitialized) {
9388 throw new Error("initializeWasm() must be awaited first!");
9390 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
9391 // debug statements here
9393 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9394 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
9395 if(!isWasmInitialized) {
9396 throw new Error("initializeWasm() must be awaited first!");
9398 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
9399 return decodeArray(nativeResponseValue);
9401 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9402 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
9403 if(!isWasmInitialized) {
9404 throw new Error("initializeWasm() must be awaited first!");
9406 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
9407 // debug statements here
9409 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9410 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
9411 if(!isWasmInitialized) {
9412 throw new Error("initializeWasm() must be awaited first!");
9414 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
9415 return decodeArray(nativeResponseValue);
9417 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9418 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
9419 if(!isWasmInitialized) {
9420 throw new Error("initializeWasm() must be awaited first!");
9422 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
9423 // debug statements here
9425 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
9426 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
9427 if(!isWasmInitialized) {
9428 throw new Error("initializeWasm() must be awaited first!");
9430 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
9431 return decodeArray(nativeResponseValue);
9433 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9434 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9435 if(!isWasmInitialized) {
9436 throw new Error("initializeWasm() must be awaited first!");
9438 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
9439 // debug statements here
9441 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
9442 export function AcceptChannel_clone(orig: number): number {
9443 if(!isWasmInitialized) {
9444 throw new Error("initializeWasm() must be awaited first!");
9446 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
9447 return nativeResponseValue;
9449 // void FundingCreated_free(struct LDKFundingCreated this_obj);
9450 export function FundingCreated_free(this_obj: number): void {
9451 if(!isWasmInitialized) {
9452 throw new Error("initializeWasm() must be awaited first!");
9454 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
9455 // debug statements here
9457 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
9458 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
9459 if(!isWasmInitialized) {
9460 throw new Error("initializeWasm() must be awaited first!");
9462 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
9463 return decodeArray(nativeResponseValue);
9465 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9466 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9467 if(!isWasmInitialized) {
9468 throw new Error("initializeWasm() must be awaited first!");
9470 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
9471 // debug statements here
9473 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
9474 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
9475 if(!isWasmInitialized) {
9476 throw new Error("initializeWasm() must be awaited first!");
9478 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
9479 return decodeArray(nativeResponseValue);
9481 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9482 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
9483 if(!isWasmInitialized) {
9484 throw new Error("initializeWasm() must be awaited first!");
9486 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
9487 // debug statements here
9489 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
9490 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
9491 if(!isWasmInitialized) {
9492 throw new Error("initializeWasm() must be awaited first!");
9494 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
9495 return nativeResponseValue;
9497 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
9498 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
9499 if(!isWasmInitialized) {
9500 throw new Error("initializeWasm() must be awaited first!");
9502 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
9503 // debug statements here
9505 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
9506 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
9507 if(!isWasmInitialized) {
9508 throw new Error("initializeWasm() must be awaited first!");
9510 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
9511 return decodeArray(nativeResponseValue);
9513 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
9514 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
9515 if(!isWasmInitialized) {
9516 throw new Error("initializeWasm() must be awaited first!");
9518 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
9519 // debug statements here
9521 // 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);
9522 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
9523 if(!isWasmInitialized) {
9524 throw new Error("initializeWasm() must be awaited first!");
9526 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
9527 return nativeResponseValue;
9529 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
9530 export function FundingCreated_clone(orig: number): number {
9531 if(!isWasmInitialized) {
9532 throw new Error("initializeWasm() must be awaited first!");
9534 const nativeResponseValue = wasm.FundingCreated_clone(orig);
9535 return nativeResponseValue;
9537 // void FundingSigned_free(struct LDKFundingSigned this_obj);
9538 export function FundingSigned_free(this_obj: number): void {
9539 if(!isWasmInitialized) {
9540 throw new Error("initializeWasm() must be awaited first!");
9542 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
9543 // debug statements here
9545 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
9546 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
9547 if(!isWasmInitialized) {
9548 throw new Error("initializeWasm() must be awaited first!");
9550 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
9551 return decodeArray(nativeResponseValue);
9553 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9554 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9555 if(!isWasmInitialized) {
9556 throw new Error("initializeWasm() must be awaited first!");
9558 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
9559 // debug statements here
9561 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
9562 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
9563 if(!isWasmInitialized) {
9564 throw new Error("initializeWasm() must be awaited first!");
9566 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
9567 return decodeArray(nativeResponseValue);
9569 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9570 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9571 if(!isWasmInitialized) {
9572 throw new Error("initializeWasm() must be awaited first!");
9574 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
9575 // debug statements here
9577 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
9578 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
9579 if(!isWasmInitialized) {
9580 throw new Error("initializeWasm() must be awaited first!");
9582 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
9583 return nativeResponseValue;
9585 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
9586 export function FundingSigned_clone(orig: number): number {
9587 if(!isWasmInitialized) {
9588 throw new Error("initializeWasm() must be awaited first!");
9590 const nativeResponseValue = wasm.FundingSigned_clone(orig);
9591 return nativeResponseValue;
9593 // void FundingLocked_free(struct LDKFundingLocked this_obj);
9594 export function FundingLocked_free(this_obj: number): void {
9595 if(!isWasmInitialized) {
9596 throw new Error("initializeWasm() must be awaited first!");
9598 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
9599 // debug statements here
9601 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
9602 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
9603 if(!isWasmInitialized) {
9604 throw new Error("initializeWasm() must be awaited first!");
9606 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
9607 return decodeArray(nativeResponseValue);
9609 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9610 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
9611 if(!isWasmInitialized) {
9612 throw new Error("initializeWasm() must be awaited first!");
9614 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
9615 // debug statements here
9617 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
9618 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
9619 if(!isWasmInitialized) {
9620 throw new Error("initializeWasm() must be awaited first!");
9622 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
9623 return decodeArray(nativeResponseValue);
9625 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9626 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9627 if(!isWasmInitialized) {
9628 throw new Error("initializeWasm() must be awaited first!");
9630 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
9631 // debug statements here
9633 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
9634 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
9635 if(!isWasmInitialized) {
9636 throw new Error("initializeWasm() must be awaited first!");
9638 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
9639 return nativeResponseValue;
9641 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
9642 export function FundingLocked_clone(orig: number): number {
9643 if(!isWasmInitialized) {
9644 throw new Error("initializeWasm() must be awaited first!");
9646 const nativeResponseValue = wasm.FundingLocked_clone(orig);
9647 return nativeResponseValue;
9649 // void Shutdown_free(struct LDKShutdown this_obj);
9650 export function Shutdown_free(this_obj: number): void {
9651 if(!isWasmInitialized) {
9652 throw new Error("initializeWasm() must be awaited first!");
9654 const nativeResponseValue = wasm.Shutdown_free(this_obj);
9655 // debug statements here
9657 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
9658 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
9659 if(!isWasmInitialized) {
9660 throw new Error("initializeWasm() must be awaited first!");
9662 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
9663 return decodeArray(nativeResponseValue);
9665 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9666 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
9667 if(!isWasmInitialized) {
9668 throw new Error("initializeWasm() must be awaited first!");
9670 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
9671 // debug statements here
9673 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
9674 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
9675 if(!isWasmInitialized) {
9676 throw new Error("initializeWasm() must be awaited first!");
9678 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
9679 return decodeArray(nativeResponseValue);
9681 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9682 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
9683 if(!isWasmInitialized) {
9684 throw new Error("initializeWasm() must be awaited first!");
9686 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
9687 // debug statements here
9689 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
9690 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
9691 if(!isWasmInitialized) {
9692 throw new Error("initializeWasm() must be awaited first!");
9694 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
9695 return nativeResponseValue;
9697 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
9698 export function Shutdown_clone(orig: number): number {
9699 if(!isWasmInitialized) {
9700 throw new Error("initializeWasm() must be awaited first!");
9702 const nativeResponseValue = wasm.Shutdown_clone(orig);
9703 return nativeResponseValue;
9705 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
9706 export function ClosingSigned_free(this_obj: number): void {
9707 if(!isWasmInitialized) {
9708 throw new Error("initializeWasm() must be awaited first!");
9710 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
9711 // debug statements here
9713 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
9714 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
9715 if(!isWasmInitialized) {
9716 throw new Error("initializeWasm() must be awaited first!");
9718 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
9719 return decodeArray(nativeResponseValue);
9721 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9722 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9723 if(!isWasmInitialized) {
9724 throw new Error("initializeWasm() must be awaited first!");
9726 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
9727 // debug statements here
9729 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9730 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
9731 if(!isWasmInitialized) {
9732 throw new Error("initializeWasm() must be awaited first!");
9734 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
9735 return nativeResponseValue;
9737 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
9738 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
9739 if(!isWasmInitialized) {
9740 throw new Error("initializeWasm() must be awaited first!");
9742 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
9743 // debug statements here
9745 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9746 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
9747 if(!isWasmInitialized) {
9748 throw new Error("initializeWasm() must be awaited first!");
9750 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
9751 return decodeArray(nativeResponseValue);
9753 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9754 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9755 if(!isWasmInitialized) {
9756 throw new Error("initializeWasm() must be awaited first!");
9758 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
9759 // debug statements here
9761 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
9762 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
9763 if(!isWasmInitialized) {
9764 throw new Error("initializeWasm() must be awaited first!");
9766 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
9767 return nativeResponseValue;
9769 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
9770 export function ClosingSigned_clone(orig: number): number {
9771 if(!isWasmInitialized) {
9772 throw new Error("initializeWasm() must be awaited first!");
9774 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
9775 return nativeResponseValue;
9777 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
9778 export function UpdateAddHTLC_free(this_obj: number): void {
9779 if(!isWasmInitialized) {
9780 throw new Error("initializeWasm() must be awaited first!");
9782 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
9783 // debug statements here
9785 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9786 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
9787 if(!isWasmInitialized) {
9788 throw new Error("initializeWasm() must be awaited first!");
9790 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
9791 return decodeArray(nativeResponseValue);
9793 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9794 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9795 if(!isWasmInitialized) {
9796 throw new Error("initializeWasm() must be awaited first!");
9798 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
9799 // debug statements here
9801 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9802 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
9803 if(!isWasmInitialized) {
9804 throw new Error("initializeWasm() must be awaited first!");
9806 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
9807 return nativeResponseValue;
9809 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9810 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
9811 if(!isWasmInitialized) {
9812 throw new Error("initializeWasm() must be awaited first!");
9814 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
9815 // debug statements here
9817 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9818 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
9819 if(!isWasmInitialized) {
9820 throw new Error("initializeWasm() must be awaited first!");
9822 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
9823 return nativeResponseValue;
9825 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9826 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
9827 if(!isWasmInitialized) {
9828 throw new Error("initializeWasm() must be awaited first!");
9830 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
9831 // debug statements here
9833 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9834 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
9835 if(!isWasmInitialized) {
9836 throw new Error("initializeWasm() must be awaited first!");
9838 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
9839 return decodeArray(nativeResponseValue);
9841 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9842 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
9843 if(!isWasmInitialized) {
9844 throw new Error("initializeWasm() must be awaited first!");
9846 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
9847 // debug statements here
9849 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9850 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
9851 if(!isWasmInitialized) {
9852 throw new Error("initializeWasm() must be awaited first!");
9854 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
9855 return nativeResponseValue;
9857 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
9858 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
9859 if(!isWasmInitialized) {
9860 throw new Error("initializeWasm() must be awaited first!");
9862 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
9863 // debug statements here
9865 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
9866 export function UpdateAddHTLC_clone(orig: number): number {
9867 if(!isWasmInitialized) {
9868 throw new Error("initializeWasm() must be awaited first!");
9870 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
9871 return nativeResponseValue;
9873 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
9874 export function UpdateFulfillHTLC_free(this_obj: number): void {
9875 if(!isWasmInitialized) {
9876 throw new Error("initializeWasm() must be awaited first!");
9878 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
9879 // debug statements here
9881 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9882 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
9883 if(!isWasmInitialized) {
9884 throw new Error("initializeWasm() must be awaited first!");
9886 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
9887 return decodeArray(nativeResponseValue);
9889 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9890 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9891 if(!isWasmInitialized) {
9892 throw new Error("initializeWasm() must be awaited first!");
9894 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
9895 // debug statements here
9897 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
9898 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
9899 if(!isWasmInitialized) {
9900 throw new Error("initializeWasm() must be awaited first!");
9902 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
9903 return nativeResponseValue;
9905 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
9906 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
9907 if(!isWasmInitialized) {
9908 throw new Error("initializeWasm() must be awaited first!");
9910 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
9911 // debug statements here
9913 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9914 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
9915 if(!isWasmInitialized) {
9916 throw new Error("initializeWasm() must be awaited first!");
9918 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
9919 return decodeArray(nativeResponseValue);
9921 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9922 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
9923 if(!isWasmInitialized) {
9924 throw new Error("initializeWasm() must be awaited first!");
9926 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
9927 // debug statements here
9929 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
9930 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
9931 if(!isWasmInitialized) {
9932 throw new Error("initializeWasm() must be awaited first!");
9934 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
9935 return nativeResponseValue;
9937 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
9938 export function UpdateFulfillHTLC_clone(orig: number): number {
9939 if(!isWasmInitialized) {
9940 throw new Error("initializeWasm() must be awaited first!");
9942 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
9943 return nativeResponseValue;
9945 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
9946 export function UpdateFailHTLC_free(this_obj: number): void {
9947 if(!isWasmInitialized) {
9948 throw new Error("initializeWasm() must be awaited first!");
9950 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
9951 // debug statements here
9953 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
9954 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
9955 if(!isWasmInitialized) {
9956 throw new Error("initializeWasm() must be awaited first!");
9958 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
9959 return decodeArray(nativeResponseValue);
9961 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9962 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9963 if(!isWasmInitialized) {
9964 throw new Error("initializeWasm() must be awaited first!");
9966 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
9967 // debug statements here
9969 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
9970 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
9971 if(!isWasmInitialized) {
9972 throw new Error("initializeWasm() must be awaited first!");
9974 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
9975 return nativeResponseValue;
9977 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
9978 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
9979 if(!isWasmInitialized) {
9980 throw new Error("initializeWasm() must be awaited first!");
9982 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
9983 // debug statements here
9985 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
9986 export function UpdateFailHTLC_clone(orig: number): number {
9987 if(!isWasmInitialized) {
9988 throw new Error("initializeWasm() must be awaited first!");
9990 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
9991 return nativeResponseValue;
9993 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
9994 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
9995 if(!isWasmInitialized) {
9996 throw new Error("initializeWasm() must be awaited first!");
9998 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
9999 // debug statements here
10001 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
10002 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
10003 if(!isWasmInitialized) {
10004 throw new Error("initializeWasm() must be awaited first!");
10006 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
10007 return decodeArray(nativeResponseValue);
10009 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10010 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
10011 if(!isWasmInitialized) {
10012 throw new Error("initializeWasm() must be awaited first!");
10014 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
10015 // debug statements here
10017 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
10018 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
10019 if(!isWasmInitialized) {
10020 throw new Error("initializeWasm() must be awaited first!");
10022 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
10023 return nativeResponseValue;
10025 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
10026 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
10027 if(!isWasmInitialized) {
10028 throw new Error("initializeWasm() must be awaited first!");
10030 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
10031 // debug statements here
10033 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
10034 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
10035 if(!isWasmInitialized) {
10036 throw new Error("initializeWasm() must be awaited first!");
10038 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
10039 return nativeResponseValue;
10041 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
10042 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
10043 if(!isWasmInitialized) {
10044 throw new Error("initializeWasm() must be awaited first!");
10046 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
10047 // debug statements here
10049 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
10050 export function UpdateFailMalformedHTLC_clone(orig: number): number {
10051 if(!isWasmInitialized) {
10052 throw new Error("initializeWasm() must be awaited first!");
10054 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
10055 return nativeResponseValue;
10057 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
10058 export function CommitmentSigned_free(this_obj: number): void {
10059 if(!isWasmInitialized) {
10060 throw new Error("initializeWasm() must be awaited first!");
10062 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
10063 // debug statements here
10065 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
10066 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
10067 if(!isWasmInitialized) {
10068 throw new Error("initializeWasm() must be awaited first!");
10070 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
10071 return decodeArray(nativeResponseValue);
10073 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10074 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10075 if(!isWasmInitialized) {
10076 throw new Error("initializeWasm() must be awaited first!");
10078 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
10079 // debug statements here
10081 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
10082 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
10083 if(!isWasmInitialized) {
10084 throw new Error("initializeWasm() must be awaited first!");
10086 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
10087 return decodeArray(nativeResponseValue);
10089 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
10090 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
10091 if(!isWasmInitialized) {
10092 throw new Error("initializeWasm() must be awaited first!");
10094 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
10095 // debug statements here
10097 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
10098 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
10099 if(!isWasmInitialized) {
10100 throw new Error("initializeWasm() must be awaited first!");
10102 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
10103 // debug statements here
10105 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
10106 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
10107 if(!isWasmInitialized) {
10108 throw new Error("initializeWasm() must be awaited first!");
10110 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
10111 return nativeResponseValue;
10113 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
10114 export function CommitmentSigned_clone(orig: number): number {
10115 if(!isWasmInitialized) {
10116 throw new Error("initializeWasm() must be awaited first!");
10118 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
10119 return nativeResponseValue;
10121 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
10122 export function RevokeAndACK_free(this_obj: number): void {
10123 if(!isWasmInitialized) {
10124 throw new Error("initializeWasm() must be awaited first!");
10126 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
10127 // debug statements here
10129 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
10130 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
10131 if(!isWasmInitialized) {
10132 throw new Error("initializeWasm() must be awaited first!");
10134 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
10135 return decodeArray(nativeResponseValue);
10137 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10138 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
10139 if(!isWasmInitialized) {
10140 throw new Error("initializeWasm() must be awaited first!");
10142 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
10143 // debug statements here
10145 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
10146 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
10147 if(!isWasmInitialized) {
10148 throw new Error("initializeWasm() must be awaited first!");
10150 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
10151 return decodeArray(nativeResponseValue);
10153 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10154 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
10155 if(!isWasmInitialized) {
10156 throw new Error("initializeWasm() must be awaited first!");
10158 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
10159 // debug statements here
10161 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
10162 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
10163 if(!isWasmInitialized) {
10164 throw new Error("initializeWasm() must be awaited first!");
10166 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
10167 return decodeArray(nativeResponseValue);
10169 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10170 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10171 if(!isWasmInitialized) {
10172 throw new Error("initializeWasm() must be awaited first!");
10174 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
10175 // debug statements here
10177 // 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);
10178 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
10179 if(!isWasmInitialized) {
10180 throw new Error("initializeWasm() must be awaited first!");
10182 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
10183 return nativeResponseValue;
10185 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
10186 export function RevokeAndACK_clone(orig: number): number {
10187 if(!isWasmInitialized) {
10188 throw new Error("initializeWasm() must be awaited first!");
10190 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
10191 return nativeResponseValue;
10193 // void UpdateFee_free(struct LDKUpdateFee this_obj);
10194 export function UpdateFee_free(this_obj: number): void {
10195 if(!isWasmInitialized) {
10196 throw new Error("initializeWasm() must be awaited first!");
10198 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
10199 // debug statements here
10201 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
10202 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
10203 if(!isWasmInitialized) {
10204 throw new Error("initializeWasm() must be awaited first!");
10206 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
10207 return decodeArray(nativeResponseValue);
10209 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10210 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
10211 if(!isWasmInitialized) {
10212 throw new Error("initializeWasm() must be awaited first!");
10214 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
10215 // debug statements here
10217 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
10218 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
10219 if(!isWasmInitialized) {
10220 throw new Error("initializeWasm() must be awaited first!");
10222 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
10223 return nativeResponseValue;
10225 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
10226 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
10227 if(!isWasmInitialized) {
10228 throw new Error("initializeWasm() must be awaited first!");
10230 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
10231 // debug statements here
10233 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
10234 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
10235 if(!isWasmInitialized) {
10236 throw new Error("initializeWasm() must be awaited first!");
10238 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
10239 return nativeResponseValue;
10241 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
10242 export function UpdateFee_clone(orig: number): number {
10243 if(!isWasmInitialized) {
10244 throw new Error("initializeWasm() must be awaited first!");
10246 const nativeResponseValue = wasm.UpdateFee_clone(orig);
10247 return nativeResponseValue;
10249 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
10250 export function DataLossProtect_free(this_obj: number): void {
10251 if(!isWasmInitialized) {
10252 throw new Error("initializeWasm() must be awaited first!");
10254 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
10255 // debug statements here
10257 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
10258 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
10259 if(!isWasmInitialized) {
10260 throw new Error("initializeWasm() must be awaited first!");
10262 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
10263 return decodeArray(nativeResponseValue);
10265 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10266 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
10267 if(!isWasmInitialized) {
10268 throw new Error("initializeWasm() must be awaited first!");
10270 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
10271 // debug statements here
10273 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
10274 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
10275 if(!isWasmInitialized) {
10276 throw new Error("initializeWasm() must be awaited first!");
10278 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
10279 return decodeArray(nativeResponseValue);
10281 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10282 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10283 if(!isWasmInitialized) {
10284 throw new Error("initializeWasm() must be awaited first!");
10286 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
10287 // debug statements here
10289 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
10290 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
10291 if(!isWasmInitialized) {
10292 throw new Error("initializeWasm() must be awaited first!");
10294 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
10295 return nativeResponseValue;
10297 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
10298 export function DataLossProtect_clone(orig: number): number {
10299 if(!isWasmInitialized) {
10300 throw new Error("initializeWasm() must be awaited first!");
10302 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
10303 return nativeResponseValue;
10305 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
10306 export function ChannelReestablish_free(this_obj: number): void {
10307 if(!isWasmInitialized) {
10308 throw new Error("initializeWasm() must be awaited first!");
10310 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
10311 // debug statements here
10313 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
10314 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
10315 if(!isWasmInitialized) {
10316 throw new Error("initializeWasm() must be awaited first!");
10318 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
10319 return decodeArray(nativeResponseValue);
10321 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10322 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
10323 if(!isWasmInitialized) {
10324 throw new Error("initializeWasm() must be awaited first!");
10326 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
10327 // debug statements here
10329 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
10330 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
10331 if(!isWasmInitialized) {
10332 throw new Error("initializeWasm() must be awaited first!");
10334 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
10335 return nativeResponseValue;
10337 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
10338 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
10339 if(!isWasmInitialized) {
10340 throw new Error("initializeWasm() must be awaited first!");
10342 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
10343 // debug statements here
10345 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
10346 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
10347 if(!isWasmInitialized) {
10348 throw new Error("initializeWasm() must be awaited first!");
10350 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
10351 return nativeResponseValue;
10353 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
10354 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
10355 if(!isWasmInitialized) {
10356 throw new Error("initializeWasm() must be awaited first!");
10358 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
10359 // debug statements here
10361 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
10362 export function ChannelReestablish_clone(orig: number): number {
10363 if(!isWasmInitialized) {
10364 throw new Error("initializeWasm() must be awaited first!");
10366 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
10367 return nativeResponseValue;
10369 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
10370 export function AnnouncementSignatures_free(this_obj: number): void {
10371 if(!isWasmInitialized) {
10372 throw new Error("initializeWasm() must be awaited first!");
10374 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
10375 // debug statements here
10377 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
10378 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
10379 if(!isWasmInitialized) {
10380 throw new Error("initializeWasm() must be awaited first!");
10382 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
10383 return decodeArray(nativeResponseValue);
10385 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10386 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
10387 if(!isWasmInitialized) {
10388 throw new Error("initializeWasm() must be awaited first!");
10390 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
10391 // debug statements here
10393 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
10394 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
10395 if(!isWasmInitialized) {
10396 throw new Error("initializeWasm() must be awaited first!");
10398 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
10399 return nativeResponseValue;
10401 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
10402 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
10403 if(!isWasmInitialized) {
10404 throw new Error("initializeWasm() must be awaited first!");
10406 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
10407 // debug statements here
10409 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
10410 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
10411 if(!isWasmInitialized) {
10412 throw new Error("initializeWasm() must be awaited first!");
10414 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
10415 return decodeArray(nativeResponseValue);
10417 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
10418 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
10419 if(!isWasmInitialized) {
10420 throw new Error("initializeWasm() must be awaited first!");
10422 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
10423 // debug statements here
10425 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
10426 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
10427 if(!isWasmInitialized) {
10428 throw new Error("initializeWasm() must be awaited first!");
10430 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
10431 return decodeArray(nativeResponseValue);
10433 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
10434 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
10435 if(!isWasmInitialized) {
10436 throw new Error("initializeWasm() must be awaited first!");
10438 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
10439 // debug statements here
10441 // 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);
10442 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
10443 if(!isWasmInitialized) {
10444 throw new Error("initializeWasm() must be awaited first!");
10446 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
10447 return nativeResponseValue;
10449 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
10450 export function AnnouncementSignatures_clone(orig: number): number {
10451 if(!isWasmInitialized) {
10452 throw new Error("initializeWasm() must be awaited first!");
10454 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
10455 return nativeResponseValue;
10457 // void NetAddress_free(struct LDKNetAddress this_ptr);
10458 export function NetAddress_free(this_ptr: number): void {
10459 if(!isWasmInitialized) {
10460 throw new Error("initializeWasm() must be awaited first!");
10462 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
10463 // debug statements here
10465 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
10466 export function NetAddress_clone(orig: number): number {
10467 if(!isWasmInitialized) {
10468 throw new Error("initializeWasm() must be awaited first!");
10470 const nativeResponseValue = wasm.NetAddress_clone(orig);
10471 return nativeResponseValue;
10473 // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
10474 export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
10475 if(!isWasmInitialized) {
10476 throw new Error("initializeWasm() must be awaited first!");
10478 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
10479 return nativeResponseValue;
10481 // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
10482 export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
10483 if(!isWasmInitialized) {
10484 throw new Error("initializeWasm() must be awaited first!");
10486 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
10487 return nativeResponseValue;
10489 // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
10490 export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
10491 if(!isWasmInitialized) {
10492 throw new Error("initializeWasm() must be awaited first!");
10494 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
10495 return nativeResponseValue;
10497 // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
10498 export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
10499 if(!isWasmInitialized) {
10500 throw new Error("initializeWasm() must be awaited first!");
10502 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
10503 return nativeResponseValue;
10505 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
10506 export function NetAddress_write(obj: number): Uint8Array {
10507 if(!isWasmInitialized) {
10508 throw new Error("initializeWasm() must be awaited first!");
10510 const nativeResponseValue = wasm.NetAddress_write(obj);
10511 return decodeArray(nativeResponseValue);
10513 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
10514 export function Result_read(ser: Uint8Array): number {
10515 if(!isWasmInitialized) {
10516 throw new Error("initializeWasm() must be awaited first!");
10518 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
10519 return nativeResponseValue;
10521 // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
10522 export function NetAddress_read(ser: Uint8Array): number {
10523 if(!isWasmInitialized) {
10524 throw new Error("initializeWasm() must be awaited first!");
10526 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
10527 return nativeResponseValue;
10529 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
10530 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
10531 if(!isWasmInitialized) {
10532 throw new Error("initializeWasm() must be awaited first!");
10534 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
10535 // debug statements here
10537 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10538 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
10539 if(!isWasmInitialized) {
10540 throw new Error("initializeWasm() must be awaited first!");
10542 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
10543 return nativeResponseValue;
10545 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
10546 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
10547 if(!isWasmInitialized) {
10548 throw new Error("initializeWasm() must be awaited first!");
10550 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
10551 // debug statements here
10553 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10554 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
10555 if(!isWasmInitialized) {
10556 throw new Error("initializeWasm() must be awaited first!");
10558 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
10559 return nativeResponseValue;
10561 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
10562 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
10563 if(!isWasmInitialized) {
10564 throw new Error("initializeWasm() must be awaited first!");
10566 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
10567 // debug statements here
10569 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10570 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
10571 if(!isWasmInitialized) {
10572 throw new Error("initializeWasm() must be awaited first!");
10574 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
10575 return decodeArray(nativeResponseValue);
10577 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10578 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
10579 if(!isWasmInitialized) {
10580 throw new Error("initializeWasm() must be awaited first!");
10582 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
10583 // debug statements here
10585 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
10586 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
10587 if(!isWasmInitialized) {
10588 throw new Error("initializeWasm() must be awaited first!");
10590 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
10591 return decodeArray(nativeResponseValue);
10593 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
10594 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
10595 if(!isWasmInitialized) {
10596 throw new Error("initializeWasm() must be awaited first!");
10598 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
10599 // debug statements here
10601 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
10602 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
10603 if(!isWasmInitialized) {
10604 throw new Error("initializeWasm() must be awaited first!");
10606 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
10607 return decodeArray(nativeResponseValue);
10609 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10610 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
10611 if(!isWasmInitialized) {
10612 throw new Error("initializeWasm() must be awaited first!");
10614 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
10615 // debug statements here
10617 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
10618 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
10619 if(!isWasmInitialized) {
10620 throw new Error("initializeWasm() must be awaited first!");
10622 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
10623 // debug statements here
10625 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
10626 export function UnsignedNodeAnnouncement_clone(orig: number): number {
10627 if(!isWasmInitialized) {
10628 throw new Error("initializeWasm() must be awaited first!");
10630 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
10631 return nativeResponseValue;
10633 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
10634 export function NodeAnnouncement_free(this_obj: number): void {
10635 if(!isWasmInitialized) {
10636 throw new Error("initializeWasm() must be awaited first!");
10638 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
10639 // debug statements here
10641 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
10642 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
10643 if(!isWasmInitialized) {
10644 throw new Error("initializeWasm() must be awaited first!");
10646 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
10647 return decodeArray(nativeResponseValue);
10649 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10650 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
10651 if(!isWasmInitialized) {
10652 throw new Error("initializeWasm() must be awaited first!");
10654 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
10655 // debug statements here
10657 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
10658 export function NodeAnnouncement_get_contents(this_ptr: number): number {
10659 if(!isWasmInitialized) {
10660 throw new Error("initializeWasm() must be awaited first!");
10662 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
10663 return nativeResponseValue;
10665 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
10666 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
10667 if(!isWasmInitialized) {
10668 throw new Error("initializeWasm() must be awaited first!");
10670 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
10671 // debug statements here
10673 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
10674 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
10675 if(!isWasmInitialized) {
10676 throw new Error("initializeWasm() must be awaited first!");
10678 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
10679 return nativeResponseValue;
10681 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
10682 export function NodeAnnouncement_clone(orig: number): number {
10683 if(!isWasmInitialized) {
10684 throw new Error("initializeWasm() must be awaited first!");
10686 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
10687 return nativeResponseValue;
10689 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
10690 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
10691 if(!isWasmInitialized) {
10692 throw new Error("initializeWasm() must be awaited first!");
10694 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
10695 // debug statements here
10697 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10698 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
10699 if(!isWasmInitialized) {
10700 throw new Error("initializeWasm() must be awaited first!");
10702 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
10703 return nativeResponseValue;
10705 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
10706 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
10707 if(!isWasmInitialized) {
10708 throw new Error("initializeWasm() must be awaited first!");
10710 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
10711 // debug statements here
10713 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
10714 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
10715 if(!isWasmInitialized) {
10716 throw new Error("initializeWasm() must be awaited first!");
10718 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
10719 return decodeArray(nativeResponseValue);
10721 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10722 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10723 if(!isWasmInitialized) {
10724 throw new Error("initializeWasm() must be awaited first!");
10726 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
10727 // debug statements here
10729 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10730 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
10731 if(!isWasmInitialized) {
10732 throw new Error("initializeWasm() must be awaited first!");
10734 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
10735 return nativeResponseValue;
10737 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
10738 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
10739 if(!isWasmInitialized) {
10740 throw new Error("initializeWasm() must be awaited first!");
10742 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
10743 // debug statements here
10745 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10746 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
10747 if(!isWasmInitialized) {
10748 throw new Error("initializeWasm() must be awaited first!");
10750 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
10751 return decodeArray(nativeResponseValue);
10753 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10754 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
10755 if(!isWasmInitialized) {
10756 throw new Error("initializeWasm() must be awaited first!");
10758 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
10759 // debug statements here
10761 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10762 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
10763 if(!isWasmInitialized) {
10764 throw new Error("initializeWasm() must be awaited first!");
10766 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
10767 return decodeArray(nativeResponseValue);
10769 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10770 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
10771 if(!isWasmInitialized) {
10772 throw new Error("initializeWasm() must be awaited first!");
10774 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
10775 // debug statements here
10777 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10778 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
10779 if(!isWasmInitialized) {
10780 throw new Error("initializeWasm() must be awaited first!");
10782 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
10783 return decodeArray(nativeResponseValue);
10785 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10786 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
10787 if(!isWasmInitialized) {
10788 throw new Error("initializeWasm() must be awaited first!");
10790 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
10791 // debug statements here
10793 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10794 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
10795 if(!isWasmInitialized) {
10796 throw new Error("initializeWasm() must be awaited first!");
10798 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
10799 return decodeArray(nativeResponseValue);
10801 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10802 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
10803 if(!isWasmInitialized) {
10804 throw new Error("initializeWasm() must be awaited first!");
10806 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
10807 // debug statements here
10809 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
10810 export function UnsignedChannelAnnouncement_clone(orig: number): number {
10811 if(!isWasmInitialized) {
10812 throw new Error("initializeWasm() must be awaited first!");
10814 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
10815 return nativeResponseValue;
10817 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
10818 export function ChannelAnnouncement_free(this_obj: number): void {
10819 if(!isWasmInitialized) {
10820 throw new Error("initializeWasm() must be awaited first!");
10822 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
10823 // debug statements here
10825 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10826 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
10827 if(!isWasmInitialized) {
10828 throw new Error("initializeWasm() must be awaited first!");
10830 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
10831 return decodeArray(nativeResponseValue);
10833 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10834 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
10835 if(!isWasmInitialized) {
10836 throw new Error("initializeWasm() must be awaited first!");
10838 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
10839 // debug statements here
10841 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10842 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
10843 if(!isWasmInitialized) {
10844 throw new Error("initializeWasm() must be awaited first!");
10846 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
10847 return decodeArray(nativeResponseValue);
10849 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10850 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
10851 if(!isWasmInitialized) {
10852 throw new Error("initializeWasm() must be awaited first!");
10854 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
10855 // debug statements here
10857 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10858 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
10859 if(!isWasmInitialized) {
10860 throw new Error("initializeWasm() must be awaited first!");
10862 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
10863 return decodeArray(nativeResponseValue);
10865 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10866 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
10867 if(!isWasmInitialized) {
10868 throw new Error("initializeWasm() must be awaited first!");
10870 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
10871 // debug statements here
10873 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10874 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
10875 if(!isWasmInitialized) {
10876 throw new Error("initializeWasm() must be awaited first!");
10878 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
10879 return decodeArray(nativeResponseValue);
10881 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10882 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
10883 if(!isWasmInitialized) {
10884 throw new Error("initializeWasm() must be awaited first!");
10886 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
10887 // debug statements here
10889 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10890 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
10891 if(!isWasmInitialized) {
10892 throw new Error("initializeWasm() must be awaited first!");
10894 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
10895 return nativeResponseValue;
10897 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
10898 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
10899 if(!isWasmInitialized) {
10900 throw new Error("initializeWasm() must be awaited first!");
10902 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
10903 // debug statements here
10905 // 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);
10906 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 {
10907 if(!isWasmInitialized) {
10908 throw new Error("initializeWasm() must be awaited first!");
10910 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);
10911 return nativeResponseValue;
10913 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
10914 export function ChannelAnnouncement_clone(orig: number): number {
10915 if(!isWasmInitialized) {
10916 throw new Error("initializeWasm() must be awaited first!");
10918 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
10919 return nativeResponseValue;
10921 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
10922 export function UnsignedChannelUpdate_free(this_obj: number): void {
10923 if(!isWasmInitialized) {
10924 throw new Error("initializeWasm() must be awaited first!");
10926 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
10927 // debug statements here
10929 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
10930 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
10931 if(!isWasmInitialized) {
10932 throw new Error("initializeWasm() must be awaited first!");
10934 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
10935 return decodeArray(nativeResponseValue);
10937 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10938 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10939 if(!isWasmInitialized) {
10940 throw new Error("initializeWasm() must be awaited first!");
10942 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
10943 // debug statements here
10945 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10946 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
10947 if(!isWasmInitialized) {
10948 throw new Error("initializeWasm() must be awaited first!");
10950 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
10951 return nativeResponseValue;
10953 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10954 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
10955 if(!isWasmInitialized) {
10956 throw new Error("initializeWasm() must be awaited first!");
10958 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
10959 // debug statements here
10961 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10962 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
10963 if(!isWasmInitialized) {
10964 throw new Error("initializeWasm() must be awaited first!");
10966 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
10967 return nativeResponseValue;
10969 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10970 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
10971 if(!isWasmInitialized) {
10972 throw new Error("initializeWasm() must be awaited first!");
10974 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
10975 // debug statements here
10977 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10978 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
10979 if(!isWasmInitialized) {
10980 throw new Error("initializeWasm() must be awaited first!");
10982 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
10983 return nativeResponseValue;
10985 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
10986 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
10987 if(!isWasmInitialized) {
10988 throw new Error("initializeWasm() must be awaited first!");
10990 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
10991 // debug statements here
10993 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10994 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
10995 if(!isWasmInitialized) {
10996 throw new Error("initializeWasm() must be awaited first!");
10998 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
10999 return nativeResponseValue;
11001 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
11002 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11003 if(!isWasmInitialized) {
11004 throw new Error("initializeWasm() must be awaited first!");
11006 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
11007 // debug statements here
11009 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11010 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
11011 if(!isWasmInitialized) {
11012 throw new Error("initializeWasm() must be awaited first!");
11014 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
11015 return nativeResponseValue;
11017 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
11018 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11019 if(!isWasmInitialized) {
11020 throw new Error("initializeWasm() must be awaited first!");
11022 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
11023 // debug statements here
11025 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11026 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
11027 if(!isWasmInitialized) {
11028 throw new Error("initializeWasm() must be awaited first!");
11030 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
11031 return nativeResponseValue;
11033 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
11034 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
11035 if(!isWasmInitialized) {
11036 throw new Error("initializeWasm() must be awaited first!");
11038 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
11039 // debug statements here
11041 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
11042 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
11043 if(!isWasmInitialized) {
11044 throw new Error("initializeWasm() must be awaited first!");
11046 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
11047 return nativeResponseValue;
11049 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
11050 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
11051 if(!isWasmInitialized) {
11052 throw new Error("initializeWasm() must be awaited first!");
11054 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
11055 // debug statements here
11057 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
11058 export function UnsignedChannelUpdate_clone(orig: number): number {
11059 if(!isWasmInitialized) {
11060 throw new Error("initializeWasm() must be awaited first!");
11062 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
11063 return nativeResponseValue;
11065 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
11066 export function ChannelUpdate_free(this_obj: number): void {
11067 if(!isWasmInitialized) {
11068 throw new Error("initializeWasm() must be awaited first!");
11070 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
11071 // debug statements here
11073 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
11074 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
11075 if(!isWasmInitialized) {
11076 throw new Error("initializeWasm() must be awaited first!");
11078 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
11079 return decodeArray(nativeResponseValue);
11081 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
11082 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
11083 if(!isWasmInitialized) {
11084 throw new Error("initializeWasm() must be awaited first!");
11086 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
11087 // debug statements here
11089 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
11090 export function ChannelUpdate_get_contents(this_ptr: number): number {
11091 if(!isWasmInitialized) {
11092 throw new Error("initializeWasm() must be awaited first!");
11094 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
11095 return nativeResponseValue;
11097 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
11098 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
11099 if(!isWasmInitialized) {
11100 throw new Error("initializeWasm() must be awaited first!");
11102 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
11103 // debug statements here
11105 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
11106 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
11107 if(!isWasmInitialized) {
11108 throw new Error("initializeWasm() must be awaited first!");
11110 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
11111 return nativeResponseValue;
11113 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
11114 export function ChannelUpdate_clone(orig: number): number {
11115 if(!isWasmInitialized) {
11116 throw new Error("initializeWasm() must be awaited first!");
11118 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
11119 return nativeResponseValue;
11121 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
11122 export function QueryChannelRange_free(this_obj: number): void {
11123 if(!isWasmInitialized) {
11124 throw new Error("initializeWasm() must be awaited first!");
11126 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
11127 // debug statements here
11129 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
11130 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
11131 if(!isWasmInitialized) {
11132 throw new Error("initializeWasm() must be awaited first!");
11134 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
11135 return decodeArray(nativeResponseValue);
11137 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11138 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11139 if(!isWasmInitialized) {
11140 throw new Error("initializeWasm() must be awaited first!");
11142 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
11143 // debug statements here
11145 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
11146 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
11147 if(!isWasmInitialized) {
11148 throw new Error("initializeWasm() must be awaited first!");
11150 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
11151 return nativeResponseValue;
11153 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11154 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
11155 if(!isWasmInitialized) {
11156 throw new Error("initializeWasm() must be awaited first!");
11158 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
11159 // debug statements here
11161 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
11162 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
11163 if(!isWasmInitialized) {
11164 throw new Error("initializeWasm() must be awaited first!");
11166 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
11167 return nativeResponseValue;
11169 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11170 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
11171 if(!isWasmInitialized) {
11172 throw new Error("initializeWasm() must be awaited first!");
11174 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
11175 // debug statements here
11177 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
11178 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
11179 if(!isWasmInitialized) {
11180 throw new Error("initializeWasm() must be awaited first!");
11182 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
11183 return nativeResponseValue;
11185 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
11186 export function QueryChannelRange_clone(orig: number): number {
11187 if(!isWasmInitialized) {
11188 throw new Error("initializeWasm() must be awaited first!");
11190 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
11191 return nativeResponseValue;
11193 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
11194 export function ReplyChannelRange_free(this_obj: number): void {
11195 if(!isWasmInitialized) {
11196 throw new Error("initializeWasm() must be awaited first!");
11198 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
11199 // debug statements here
11201 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
11202 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
11203 if(!isWasmInitialized) {
11204 throw new Error("initializeWasm() must be awaited first!");
11206 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
11207 return decodeArray(nativeResponseValue);
11209 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11210 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11211 if(!isWasmInitialized) {
11212 throw new Error("initializeWasm() must be awaited first!");
11214 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
11215 // debug statements here
11217 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
11218 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
11219 if(!isWasmInitialized) {
11220 throw new Error("initializeWasm() must be awaited first!");
11222 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
11223 return nativeResponseValue;
11225 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11226 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
11227 if(!isWasmInitialized) {
11228 throw new Error("initializeWasm() must be awaited first!");
11230 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
11231 // debug statements here
11233 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
11234 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
11235 if(!isWasmInitialized) {
11236 throw new Error("initializeWasm() must be awaited first!");
11238 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
11239 return nativeResponseValue;
11241 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
11242 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
11243 if(!isWasmInitialized) {
11244 throw new Error("initializeWasm() must be awaited first!");
11246 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
11247 // debug statements here
11249 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
11250 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
11251 if(!isWasmInitialized) {
11252 throw new Error("initializeWasm() must be awaited first!");
11254 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
11255 return nativeResponseValue;
11257 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
11258 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
11259 if(!isWasmInitialized) {
11260 throw new Error("initializeWasm() must be awaited first!");
11262 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
11263 // debug statements here
11265 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
11266 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
11267 if(!isWasmInitialized) {
11268 throw new Error("initializeWasm() must be awaited first!");
11270 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
11271 // debug statements here
11273 // 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);
11274 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 {
11275 if(!isWasmInitialized) {
11276 throw new Error("initializeWasm() must be awaited first!");
11278 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
11279 return nativeResponseValue;
11281 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
11282 export function ReplyChannelRange_clone(orig: number): number {
11283 if(!isWasmInitialized) {
11284 throw new Error("initializeWasm() must be awaited first!");
11286 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
11287 return nativeResponseValue;
11289 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
11290 export function QueryShortChannelIds_free(this_obj: number): void {
11291 if(!isWasmInitialized) {
11292 throw new Error("initializeWasm() must be awaited first!");
11294 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
11295 // debug statements here
11297 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
11298 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
11299 if(!isWasmInitialized) {
11300 throw new Error("initializeWasm() must be awaited first!");
11302 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
11303 return decodeArray(nativeResponseValue);
11305 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11306 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11307 if(!isWasmInitialized) {
11308 throw new Error("initializeWasm() must be awaited first!");
11310 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
11311 // debug statements here
11313 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
11314 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
11315 if(!isWasmInitialized) {
11316 throw new Error("initializeWasm() must be awaited first!");
11318 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
11319 // debug statements here
11321 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
11322 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
11323 if(!isWasmInitialized) {
11324 throw new Error("initializeWasm() must be awaited first!");
11326 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
11327 return nativeResponseValue;
11329 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
11330 export function QueryShortChannelIds_clone(orig: number): number {
11331 if(!isWasmInitialized) {
11332 throw new Error("initializeWasm() must be awaited first!");
11334 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
11335 return nativeResponseValue;
11337 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
11338 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
11339 if(!isWasmInitialized) {
11340 throw new Error("initializeWasm() must be awaited first!");
11342 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
11343 // debug statements here
11345 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
11346 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
11347 if(!isWasmInitialized) {
11348 throw new Error("initializeWasm() must be awaited first!");
11350 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
11351 return decodeArray(nativeResponseValue);
11353 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11354 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11355 if(!isWasmInitialized) {
11356 throw new Error("initializeWasm() must be awaited first!");
11358 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
11359 // debug statements here
11361 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
11362 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
11363 if(!isWasmInitialized) {
11364 throw new Error("initializeWasm() must be awaited first!");
11366 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
11367 return nativeResponseValue;
11369 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
11370 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
11371 if(!isWasmInitialized) {
11372 throw new Error("initializeWasm() must be awaited first!");
11374 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
11375 // debug statements here
11377 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
11378 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
11379 if(!isWasmInitialized) {
11380 throw new Error("initializeWasm() must be awaited first!");
11382 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
11383 return nativeResponseValue;
11385 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
11386 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
11387 if(!isWasmInitialized) {
11388 throw new Error("initializeWasm() must be awaited first!");
11390 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
11391 return nativeResponseValue;
11393 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
11394 export function GossipTimestampFilter_free(this_obj: number): void {
11395 if(!isWasmInitialized) {
11396 throw new Error("initializeWasm() must be awaited first!");
11398 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
11399 // debug statements here
11401 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
11402 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
11403 if(!isWasmInitialized) {
11404 throw new Error("initializeWasm() must be awaited first!");
11406 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
11407 return decodeArray(nativeResponseValue);
11409 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11410 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11411 if(!isWasmInitialized) {
11412 throw new Error("initializeWasm() must be awaited first!");
11414 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
11415 // debug statements here
11417 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
11418 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
11419 if(!isWasmInitialized) {
11420 throw new Error("initializeWasm() must be awaited first!");
11422 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
11423 return nativeResponseValue;
11425 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
11426 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
11427 if(!isWasmInitialized) {
11428 throw new Error("initializeWasm() must be awaited first!");
11430 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
11431 // debug statements here
11433 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
11434 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
11435 if(!isWasmInitialized) {
11436 throw new Error("initializeWasm() must be awaited first!");
11438 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
11439 return nativeResponseValue;
11441 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
11442 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
11443 if(!isWasmInitialized) {
11444 throw new Error("initializeWasm() must be awaited first!");
11446 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
11447 // debug statements here
11449 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
11450 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
11451 if(!isWasmInitialized) {
11452 throw new Error("initializeWasm() must be awaited first!");
11454 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
11455 return nativeResponseValue;
11457 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
11458 export function GossipTimestampFilter_clone(orig: number): number {
11459 if(!isWasmInitialized) {
11460 throw new Error("initializeWasm() must be awaited first!");
11462 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
11463 return nativeResponseValue;
11465 // void ErrorAction_free(struct LDKErrorAction this_ptr);
11466 export function ErrorAction_free(this_ptr: number): void {
11467 if(!isWasmInitialized) {
11468 throw new Error("initializeWasm() must be awaited first!");
11470 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
11471 // debug statements here
11473 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
11474 export function ErrorAction_clone(orig: number): number {
11475 if(!isWasmInitialized) {
11476 throw new Error("initializeWasm() must be awaited first!");
11478 const nativeResponseValue = wasm.ErrorAction_clone(orig);
11479 return nativeResponseValue;
11481 // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
11482 export function ErrorAction_disconnect_peer(msg: number): number {
11483 if(!isWasmInitialized) {
11484 throw new Error("initializeWasm() must be awaited first!");
11486 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
11487 return nativeResponseValue;
11489 // struct LDKErrorAction ErrorAction_ignore_error(void);
11490 export function ErrorAction_ignore_error(): number {
11491 if(!isWasmInitialized) {
11492 throw new Error("initializeWasm() must be awaited first!");
11494 const nativeResponseValue = wasm.ErrorAction_ignore_error();
11495 return nativeResponseValue;
11497 // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
11498 export function ErrorAction_ignore_and_log(a: Level): number {
11499 if(!isWasmInitialized) {
11500 throw new Error("initializeWasm() must be awaited first!");
11502 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
11503 return nativeResponseValue;
11505 // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
11506 export function ErrorAction_send_error_message(msg: number): number {
11507 if(!isWasmInitialized) {
11508 throw new Error("initializeWasm() must be awaited first!");
11510 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
11511 return nativeResponseValue;
11513 // void LightningError_free(struct LDKLightningError this_obj);
11514 export function LightningError_free(this_obj: number): void {
11515 if(!isWasmInitialized) {
11516 throw new Error("initializeWasm() must be awaited first!");
11518 const nativeResponseValue = wasm.LightningError_free(this_obj);
11519 // debug statements here
11521 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
11522 export function LightningError_get_err(this_ptr: number): String {
11523 if(!isWasmInitialized) {
11524 throw new Error("initializeWasm() must be awaited first!");
11526 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
11527 return nativeResponseValue;
11529 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
11530 export function LightningError_set_err(this_ptr: number, val: String): void {
11531 if(!isWasmInitialized) {
11532 throw new Error("initializeWasm() must be awaited first!");
11534 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
11535 // debug statements here
11537 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
11538 export function LightningError_get_action(this_ptr: number): number {
11539 if(!isWasmInitialized) {
11540 throw new Error("initializeWasm() must be awaited first!");
11542 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
11543 return nativeResponseValue;
11545 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
11546 export function LightningError_set_action(this_ptr: number, val: number): void {
11547 if(!isWasmInitialized) {
11548 throw new Error("initializeWasm() must be awaited first!");
11550 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
11551 // debug statements here
11553 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
11554 export function LightningError_new(err_arg: String, action_arg: number): number {
11555 if(!isWasmInitialized) {
11556 throw new Error("initializeWasm() must be awaited first!");
11558 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
11559 return nativeResponseValue;
11561 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
11562 export function LightningError_clone(orig: number): number {
11563 if(!isWasmInitialized) {
11564 throw new Error("initializeWasm() must be awaited first!");
11566 const nativeResponseValue = wasm.LightningError_clone(orig);
11567 return nativeResponseValue;
11569 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
11570 export function CommitmentUpdate_free(this_obj: number): void {
11571 if(!isWasmInitialized) {
11572 throw new Error("initializeWasm() must be awaited first!");
11574 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
11575 // debug statements here
11577 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
11578 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
11579 if(!isWasmInitialized) {
11580 throw new Error("initializeWasm() must be awaited first!");
11582 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
11583 // debug statements here
11585 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
11586 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
11587 if(!isWasmInitialized) {
11588 throw new Error("initializeWasm() must be awaited first!");
11590 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
11591 // debug statements here
11593 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
11594 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
11595 if(!isWasmInitialized) {
11596 throw new Error("initializeWasm() must be awaited first!");
11598 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
11599 // debug statements here
11601 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
11602 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
11603 if(!isWasmInitialized) {
11604 throw new Error("initializeWasm() must be awaited first!");
11606 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
11607 // debug statements here
11609 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
11610 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
11611 if(!isWasmInitialized) {
11612 throw new Error("initializeWasm() must be awaited first!");
11614 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
11615 return nativeResponseValue;
11617 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
11618 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
11619 if(!isWasmInitialized) {
11620 throw new Error("initializeWasm() must be awaited first!");
11622 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
11623 // debug statements here
11625 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
11626 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
11627 if(!isWasmInitialized) {
11628 throw new Error("initializeWasm() must be awaited first!");
11630 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
11631 return nativeResponseValue;
11633 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
11634 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
11635 if(!isWasmInitialized) {
11636 throw new Error("initializeWasm() must be awaited first!");
11638 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
11639 // debug statements here
11641 // 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);
11642 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 {
11643 if(!isWasmInitialized) {
11644 throw new Error("initializeWasm() must be awaited first!");
11646 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);
11647 return nativeResponseValue;
11649 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
11650 export function CommitmentUpdate_clone(orig: number): number {
11651 if(!isWasmInitialized) {
11652 throw new Error("initializeWasm() must be awaited first!");
11654 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
11655 return nativeResponseValue;
11657 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
11658 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
11659 if(!isWasmInitialized) {
11660 throw new Error("initializeWasm() must be awaited first!");
11662 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
11663 // debug statements here
11665 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
11666 export function HTLCFailChannelUpdate_clone(orig: number): number {
11667 if(!isWasmInitialized) {
11668 throw new Error("initializeWasm() must be awaited first!");
11670 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
11671 return nativeResponseValue;
11673 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_update_message(struct LDKChannelUpdate msg);
11674 export function HTLCFailChannelUpdate_channel_update_message(msg: number): number {
11675 if(!isWasmInitialized) {
11676 throw new Error("initializeWasm() must be awaited first!");
11678 const nativeResponseValue = wasm.HTLCFailChannelUpdate_channel_update_message(msg);
11679 return nativeResponseValue;
11681 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
11682 export function HTLCFailChannelUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
11683 if(!isWasmInitialized) {
11684 throw new Error("initializeWasm() must be awaited first!");
11686 const nativeResponseValue = wasm.HTLCFailChannelUpdate_channel_closed(short_channel_id, is_permanent);
11687 return nativeResponseValue;
11689 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
11690 export function HTLCFailChannelUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
11691 if(!isWasmInitialized) {
11692 throw new Error("initializeWasm() must be awaited first!");
11694 const nativeResponseValue = wasm.HTLCFailChannelUpdate_node_failure(encodeArray(node_id), is_permanent);
11695 return nativeResponseValue;
11697 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
11698 export function ChannelMessageHandler_free(this_ptr: number): void {
11699 if(!isWasmInitialized) {
11700 throw new Error("initializeWasm() must be awaited first!");
11702 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
11703 // debug statements here
11705 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
11706 export function RoutingMessageHandler_free(this_ptr: number): void {
11707 if(!isWasmInitialized) {
11708 throw new Error("initializeWasm() must be awaited first!");
11710 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
11711 // debug statements here
11713 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
11714 export function AcceptChannel_write(obj: number): Uint8Array {
11715 if(!isWasmInitialized) {
11716 throw new Error("initializeWasm() must be awaited first!");
11718 const nativeResponseValue = wasm.AcceptChannel_write(obj);
11719 return decodeArray(nativeResponseValue);
11721 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
11722 export function AcceptChannel_read(ser: Uint8Array): number {
11723 if(!isWasmInitialized) {
11724 throw new Error("initializeWasm() must be awaited first!");
11726 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
11727 return nativeResponseValue;
11729 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
11730 export function AnnouncementSignatures_write(obj: number): Uint8Array {
11731 if(!isWasmInitialized) {
11732 throw new Error("initializeWasm() must be awaited first!");
11734 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
11735 return decodeArray(nativeResponseValue);
11737 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
11738 export function AnnouncementSignatures_read(ser: Uint8Array): number {
11739 if(!isWasmInitialized) {
11740 throw new Error("initializeWasm() must be awaited first!");
11742 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
11743 return nativeResponseValue;
11745 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
11746 export function ChannelReestablish_write(obj: number): Uint8Array {
11747 if(!isWasmInitialized) {
11748 throw new Error("initializeWasm() must be awaited first!");
11750 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
11751 return decodeArray(nativeResponseValue);
11753 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
11754 export function ChannelReestablish_read(ser: Uint8Array): number {
11755 if(!isWasmInitialized) {
11756 throw new Error("initializeWasm() must be awaited first!");
11758 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
11759 return nativeResponseValue;
11761 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
11762 export function ClosingSigned_write(obj: number): Uint8Array {
11763 if(!isWasmInitialized) {
11764 throw new Error("initializeWasm() must be awaited first!");
11766 const nativeResponseValue = wasm.ClosingSigned_write(obj);
11767 return decodeArray(nativeResponseValue);
11769 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
11770 export function ClosingSigned_read(ser: Uint8Array): number {
11771 if(!isWasmInitialized) {
11772 throw new Error("initializeWasm() must be awaited first!");
11774 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
11775 return nativeResponseValue;
11777 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
11778 export function CommitmentSigned_write(obj: number): Uint8Array {
11779 if(!isWasmInitialized) {
11780 throw new Error("initializeWasm() must be awaited first!");
11782 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
11783 return decodeArray(nativeResponseValue);
11785 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
11786 export function CommitmentSigned_read(ser: Uint8Array): number {
11787 if(!isWasmInitialized) {
11788 throw new Error("initializeWasm() must be awaited first!");
11790 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
11791 return nativeResponseValue;
11793 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
11794 export function FundingCreated_write(obj: number): Uint8Array {
11795 if(!isWasmInitialized) {
11796 throw new Error("initializeWasm() must be awaited first!");
11798 const nativeResponseValue = wasm.FundingCreated_write(obj);
11799 return decodeArray(nativeResponseValue);
11801 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
11802 export function FundingCreated_read(ser: Uint8Array): number {
11803 if(!isWasmInitialized) {
11804 throw new Error("initializeWasm() must be awaited first!");
11806 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
11807 return nativeResponseValue;
11809 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
11810 export function FundingSigned_write(obj: number): Uint8Array {
11811 if(!isWasmInitialized) {
11812 throw new Error("initializeWasm() must be awaited first!");
11814 const nativeResponseValue = wasm.FundingSigned_write(obj);
11815 return decodeArray(nativeResponseValue);
11817 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
11818 export function FundingSigned_read(ser: Uint8Array): number {
11819 if(!isWasmInitialized) {
11820 throw new Error("initializeWasm() must be awaited first!");
11822 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
11823 return nativeResponseValue;
11825 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
11826 export function FundingLocked_write(obj: number): Uint8Array {
11827 if(!isWasmInitialized) {
11828 throw new Error("initializeWasm() must be awaited first!");
11830 const nativeResponseValue = wasm.FundingLocked_write(obj);
11831 return decodeArray(nativeResponseValue);
11833 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
11834 export function FundingLocked_read(ser: Uint8Array): number {
11835 if(!isWasmInitialized) {
11836 throw new Error("initializeWasm() must be awaited first!");
11838 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
11839 return nativeResponseValue;
11841 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
11842 export function Init_write(obj: number): Uint8Array {
11843 if(!isWasmInitialized) {
11844 throw new Error("initializeWasm() must be awaited first!");
11846 const nativeResponseValue = wasm.Init_write(obj);
11847 return decodeArray(nativeResponseValue);
11849 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
11850 export function Init_read(ser: Uint8Array): number {
11851 if(!isWasmInitialized) {
11852 throw new Error("initializeWasm() must be awaited first!");
11854 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
11855 return nativeResponseValue;
11857 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
11858 export function OpenChannel_write(obj: number): Uint8Array {
11859 if(!isWasmInitialized) {
11860 throw new Error("initializeWasm() must be awaited first!");
11862 const nativeResponseValue = wasm.OpenChannel_write(obj);
11863 return decodeArray(nativeResponseValue);
11865 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
11866 export function OpenChannel_read(ser: Uint8Array): number {
11867 if(!isWasmInitialized) {
11868 throw new Error("initializeWasm() must be awaited first!");
11870 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
11871 return nativeResponseValue;
11873 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
11874 export function RevokeAndACK_write(obj: number): Uint8Array {
11875 if(!isWasmInitialized) {
11876 throw new Error("initializeWasm() must be awaited first!");
11878 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
11879 return decodeArray(nativeResponseValue);
11881 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
11882 export function RevokeAndACK_read(ser: Uint8Array): number {
11883 if(!isWasmInitialized) {
11884 throw new Error("initializeWasm() must be awaited first!");
11886 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
11887 return nativeResponseValue;
11889 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
11890 export function Shutdown_write(obj: number): Uint8Array {
11891 if(!isWasmInitialized) {
11892 throw new Error("initializeWasm() must be awaited first!");
11894 const nativeResponseValue = wasm.Shutdown_write(obj);
11895 return decodeArray(nativeResponseValue);
11897 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
11898 export function Shutdown_read(ser: Uint8Array): number {
11899 if(!isWasmInitialized) {
11900 throw new Error("initializeWasm() must be awaited first!");
11902 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
11903 return nativeResponseValue;
11905 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
11906 export function UpdateFailHTLC_write(obj: number): Uint8Array {
11907 if(!isWasmInitialized) {
11908 throw new Error("initializeWasm() must be awaited first!");
11910 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
11911 return decodeArray(nativeResponseValue);
11913 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
11914 export function UpdateFailHTLC_read(ser: Uint8Array): number {
11915 if(!isWasmInitialized) {
11916 throw new Error("initializeWasm() must be awaited first!");
11918 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
11919 return nativeResponseValue;
11921 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
11922 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
11923 if(!isWasmInitialized) {
11924 throw new Error("initializeWasm() must be awaited first!");
11926 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
11927 return decodeArray(nativeResponseValue);
11929 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
11930 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
11931 if(!isWasmInitialized) {
11932 throw new Error("initializeWasm() must be awaited first!");
11934 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
11935 return nativeResponseValue;
11937 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
11938 export function UpdateFee_write(obj: number): Uint8Array {
11939 if(!isWasmInitialized) {
11940 throw new Error("initializeWasm() must be awaited first!");
11942 const nativeResponseValue = wasm.UpdateFee_write(obj);
11943 return decodeArray(nativeResponseValue);
11945 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
11946 export function UpdateFee_read(ser: Uint8Array): number {
11947 if(!isWasmInitialized) {
11948 throw new Error("initializeWasm() must be awaited first!");
11950 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
11951 return nativeResponseValue;
11953 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
11954 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
11955 if(!isWasmInitialized) {
11956 throw new Error("initializeWasm() must be awaited first!");
11958 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
11959 return decodeArray(nativeResponseValue);
11961 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
11962 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
11963 if(!isWasmInitialized) {
11964 throw new Error("initializeWasm() must be awaited first!");
11966 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
11967 return nativeResponseValue;
11969 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
11970 export function UpdateAddHTLC_write(obj: number): Uint8Array {
11971 if(!isWasmInitialized) {
11972 throw new Error("initializeWasm() must be awaited first!");
11974 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
11975 return decodeArray(nativeResponseValue);
11977 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
11978 export function UpdateAddHTLC_read(ser: Uint8Array): number {
11979 if(!isWasmInitialized) {
11980 throw new Error("initializeWasm() must be awaited first!");
11982 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
11983 return nativeResponseValue;
11985 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
11986 export function Ping_write(obj: number): Uint8Array {
11987 if(!isWasmInitialized) {
11988 throw new Error("initializeWasm() must be awaited first!");
11990 const nativeResponseValue = wasm.Ping_write(obj);
11991 return decodeArray(nativeResponseValue);
11993 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
11994 export function Ping_read(ser: Uint8Array): number {
11995 if(!isWasmInitialized) {
11996 throw new Error("initializeWasm() must be awaited first!");
11998 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
11999 return nativeResponseValue;
12001 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
12002 export function Pong_write(obj: number): Uint8Array {
12003 if(!isWasmInitialized) {
12004 throw new Error("initializeWasm() must be awaited first!");
12006 const nativeResponseValue = wasm.Pong_write(obj);
12007 return decodeArray(nativeResponseValue);
12009 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
12010 export function Pong_read(ser: Uint8Array): number {
12011 if(!isWasmInitialized) {
12012 throw new Error("initializeWasm() must be awaited first!");
12014 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
12015 return nativeResponseValue;
12017 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
12018 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
12019 if(!isWasmInitialized) {
12020 throw new Error("initializeWasm() must be awaited first!");
12022 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
12023 return decodeArray(nativeResponseValue);
12025 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
12026 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
12027 if(!isWasmInitialized) {
12028 throw new Error("initializeWasm() must be awaited first!");
12030 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
12031 return nativeResponseValue;
12033 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
12034 export function ChannelAnnouncement_write(obj: number): Uint8Array {
12035 if(!isWasmInitialized) {
12036 throw new Error("initializeWasm() must be awaited first!");
12038 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
12039 return decodeArray(nativeResponseValue);
12041 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
12042 export function ChannelAnnouncement_read(ser: Uint8Array): number {
12043 if(!isWasmInitialized) {
12044 throw new Error("initializeWasm() must be awaited first!");
12046 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
12047 return nativeResponseValue;
12049 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
12050 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
12051 if(!isWasmInitialized) {
12052 throw new Error("initializeWasm() must be awaited first!");
12054 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
12055 return decodeArray(nativeResponseValue);
12057 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
12058 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
12059 if(!isWasmInitialized) {
12060 throw new Error("initializeWasm() must be awaited first!");
12062 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
12063 return nativeResponseValue;
12065 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
12066 export function ChannelUpdate_write(obj: number): Uint8Array {
12067 if(!isWasmInitialized) {
12068 throw new Error("initializeWasm() must be awaited first!");
12070 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
12071 return decodeArray(nativeResponseValue);
12073 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
12074 export function ChannelUpdate_read(ser: Uint8Array): number {
12075 if(!isWasmInitialized) {
12076 throw new Error("initializeWasm() must be awaited first!");
12078 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
12079 return nativeResponseValue;
12081 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
12082 export function ErrorMessage_write(obj: number): Uint8Array {
12083 if(!isWasmInitialized) {
12084 throw new Error("initializeWasm() must be awaited first!");
12086 const nativeResponseValue = wasm.ErrorMessage_write(obj);
12087 return decodeArray(nativeResponseValue);
12089 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
12090 export function ErrorMessage_read(ser: Uint8Array): number {
12091 if(!isWasmInitialized) {
12092 throw new Error("initializeWasm() must be awaited first!");
12094 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
12095 return nativeResponseValue;
12097 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
12098 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
12099 if(!isWasmInitialized) {
12100 throw new Error("initializeWasm() must be awaited first!");
12102 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
12103 return decodeArray(nativeResponseValue);
12105 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
12106 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
12107 if(!isWasmInitialized) {
12108 throw new Error("initializeWasm() must be awaited first!");
12110 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
12111 return nativeResponseValue;
12113 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
12114 export function NodeAnnouncement_write(obj: number): Uint8Array {
12115 if(!isWasmInitialized) {
12116 throw new Error("initializeWasm() must be awaited first!");
12118 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
12119 return decodeArray(nativeResponseValue);
12121 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
12122 export function NodeAnnouncement_read(ser: Uint8Array): number {
12123 if(!isWasmInitialized) {
12124 throw new Error("initializeWasm() must be awaited first!");
12126 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
12127 return nativeResponseValue;
12129 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
12130 export function QueryShortChannelIds_read(ser: Uint8Array): number {
12131 if(!isWasmInitialized) {
12132 throw new Error("initializeWasm() must be awaited first!");
12134 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
12135 return nativeResponseValue;
12137 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
12138 export function QueryShortChannelIds_write(obj: number): Uint8Array {
12139 if(!isWasmInitialized) {
12140 throw new Error("initializeWasm() must be awaited first!");
12142 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
12143 return decodeArray(nativeResponseValue);
12145 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
12146 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
12147 if(!isWasmInitialized) {
12148 throw new Error("initializeWasm() must be awaited first!");
12150 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
12151 return nativeResponseValue;
12153 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
12154 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
12155 if(!isWasmInitialized) {
12156 throw new Error("initializeWasm() must be awaited first!");
12158 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
12159 return decodeArray(nativeResponseValue);
12161 // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
12162 export function QueryChannelRange_end_blocknum(this_arg: number): number {
12163 if(!isWasmInitialized) {
12164 throw new Error("initializeWasm() must be awaited first!");
12166 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
12167 return nativeResponseValue;
12169 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
12170 export function QueryChannelRange_read(ser: Uint8Array): number {
12171 if(!isWasmInitialized) {
12172 throw new Error("initializeWasm() must be awaited first!");
12174 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
12175 return nativeResponseValue;
12177 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
12178 export function QueryChannelRange_write(obj: number): Uint8Array {
12179 if(!isWasmInitialized) {
12180 throw new Error("initializeWasm() must be awaited first!");
12182 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
12183 return decodeArray(nativeResponseValue);
12185 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
12186 export function ReplyChannelRange_read(ser: Uint8Array): number {
12187 if(!isWasmInitialized) {
12188 throw new Error("initializeWasm() must be awaited first!");
12190 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
12191 return nativeResponseValue;
12193 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
12194 export function ReplyChannelRange_write(obj: number): Uint8Array {
12195 if(!isWasmInitialized) {
12196 throw new Error("initializeWasm() must be awaited first!");
12198 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
12199 return decodeArray(nativeResponseValue);
12201 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
12202 export function GossipTimestampFilter_read(ser: Uint8Array): number {
12203 if(!isWasmInitialized) {
12204 throw new Error("initializeWasm() must be awaited first!");
12206 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
12207 return nativeResponseValue;
12209 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
12210 export function GossipTimestampFilter_write(obj: number): Uint8Array {
12211 if(!isWasmInitialized) {
12212 throw new Error("initializeWasm() must be awaited first!");
12214 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
12215 return decodeArray(nativeResponseValue);
12217 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
12218 export function IgnoringMessageHandler_free(this_obj: number): void {
12219 if(!isWasmInitialized) {
12220 throw new Error("initializeWasm() must be awaited first!");
12222 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
12223 // debug statements here
12225 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
12226 export function IgnoringMessageHandler_new(): number {
12227 if(!isWasmInitialized) {
12228 throw new Error("initializeWasm() must be awaited first!");
12230 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
12231 return nativeResponseValue;
12233 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
12234 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
12235 if(!isWasmInitialized) {
12236 throw new Error("initializeWasm() must be awaited first!");
12238 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
12239 return nativeResponseValue;
12241 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
12242 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
12243 if(!isWasmInitialized) {
12244 throw new Error("initializeWasm() must be awaited first!");
12246 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
12247 return nativeResponseValue;
12249 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
12250 export function ErroringMessageHandler_free(this_obj: number): void {
12251 if(!isWasmInitialized) {
12252 throw new Error("initializeWasm() must be awaited first!");
12254 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
12255 // debug statements here
12257 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
12258 export function ErroringMessageHandler_new(): number {
12259 if(!isWasmInitialized) {
12260 throw new Error("initializeWasm() must be awaited first!");
12262 const nativeResponseValue = wasm.ErroringMessageHandler_new();
12263 return nativeResponseValue;
12265 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
12266 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
12267 if(!isWasmInitialized) {
12268 throw new Error("initializeWasm() must be awaited first!");
12270 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
12271 return nativeResponseValue;
12273 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
12274 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
12275 if(!isWasmInitialized) {
12276 throw new Error("initializeWasm() must be awaited first!");
12278 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
12279 return nativeResponseValue;
12281 // void MessageHandler_free(struct LDKMessageHandler this_obj);
12282 export function MessageHandler_free(this_obj: number): void {
12283 if(!isWasmInitialized) {
12284 throw new Error("initializeWasm() must be awaited first!");
12286 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
12287 // debug statements here
12289 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
12290 export function MessageHandler_get_chan_handler(this_ptr: number): number {
12291 if(!isWasmInitialized) {
12292 throw new Error("initializeWasm() must be awaited first!");
12294 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
12295 return nativeResponseValue;
12297 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
12298 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
12299 if(!isWasmInitialized) {
12300 throw new Error("initializeWasm() must be awaited first!");
12302 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
12303 // debug statements here
12305 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
12306 export function MessageHandler_get_route_handler(this_ptr: number): number {
12307 if(!isWasmInitialized) {
12308 throw new Error("initializeWasm() must be awaited first!");
12310 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
12311 return nativeResponseValue;
12313 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
12314 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
12315 if(!isWasmInitialized) {
12316 throw new Error("initializeWasm() must be awaited first!");
12318 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
12319 // debug statements here
12321 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
12322 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
12323 if(!isWasmInitialized) {
12324 throw new Error("initializeWasm() must be awaited first!");
12326 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
12327 return nativeResponseValue;
12329 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
12330 export function SocketDescriptor_clone(orig: number): number {
12331 if(!isWasmInitialized) {
12332 throw new Error("initializeWasm() must be awaited first!");
12334 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
12335 return nativeResponseValue;
12337 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
12338 export function SocketDescriptor_free(this_ptr: number): void {
12339 if(!isWasmInitialized) {
12340 throw new Error("initializeWasm() must be awaited first!");
12342 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
12343 // debug statements here
12345 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
12346 export function PeerHandleError_free(this_obj: number): void {
12347 if(!isWasmInitialized) {
12348 throw new Error("initializeWasm() must be awaited first!");
12350 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
12351 // debug statements here
12353 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
12354 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
12355 if(!isWasmInitialized) {
12356 throw new Error("initializeWasm() must be awaited first!");
12358 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
12359 return nativeResponseValue;
12361 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
12362 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
12363 if(!isWasmInitialized) {
12364 throw new Error("initializeWasm() must be awaited first!");
12366 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
12367 // debug statements here
12369 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
12370 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
12371 if(!isWasmInitialized) {
12372 throw new Error("initializeWasm() must be awaited first!");
12374 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
12375 return nativeResponseValue;
12377 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
12378 export function PeerHandleError_clone(orig: number): number {
12379 if(!isWasmInitialized) {
12380 throw new Error("initializeWasm() must be awaited first!");
12382 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
12383 return nativeResponseValue;
12385 // void PeerManager_free(struct LDKPeerManager this_obj);
12386 export function PeerManager_free(this_obj: number): void {
12387 if(!isWasmInitialized) {
12388 throw new Error("initializeWasm() must be awaited first!");
12390 const nativeResponseValue = wasm.PeerManager_free(this_obj);
12391 // debug statements here
12393 // 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);
12394 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
12395 if(!isWasmInitialized) {
12396 throw new Error("initializeWasm() must be awaited first!");
12398 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
12399 return nativeResponseValue;
12401 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
12402 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
12403 if(!isWasmInitialized) {
12404 throw new Error("initializeWasm() must be awaited first!");
12406 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
12407 return nativeResponseValue;
12409 // 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);
12410 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
12411 if(!isWasmInitialized) {
12412 throw new Error("initializeWasm() must be awaited first!");
12414 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
12415 return nativeResponseValue;
12417 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
12418 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
12419 if(!isWasmInitialized) {
12420 throw new Error("initializeWasm() must be awaited first!");
12422 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
12423 return nativeResponseValue;
12425 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
12426 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
12427 if(!isWasmInitialized) {
12428 throw new Error("initializeWasm() must be awaited first!");
12430 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
12431 return nativeResponseValue;
12433 // 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);
12434 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
12435 if(!isWasmInitialized) {
12436 throw new Error("initializeWasm() must be awaited first!");
12438 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
12439 return nativeResponseValue;
12441 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
12442 export function PeerManager_process_events(this_arg: number): void {
12443 if(!isWasmInitialized) {
12444 throw new Error("initializeWasm() must be awaited first!");
12446 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
12447 // debug statements here
12449 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
12450 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
12451 if(!isWasmInitialized) {
12452 throw new Error("initializeWasm() must be awaited first!");
12454 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
12455 // debug statements here
12457 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
12458 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
12459 if(!isWasmInitialized) {
12460 throw new Error("initializeWasm() must be awaited first!");
12462 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
12463 // debug statements here
12465 // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
12466 export function PeerManager_timer_tick_occurred(this_arg: number): void {
12467 if(!isWasmInitialized) {
12468 throw new Error("initializeWasm() must be awaited first!");
12470 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
12471 // debug statements here
12473 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
12474 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
12475 if(!isWasmInitialized) {
12476 throw new Error("initializeWasm() must be awaited first!");
12478 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
12479 return decodeArray(nativeResponseValue);
12481 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
12482 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
12483 if(!isWasmInitialized) {
12484 throw new Error("initializeWasm() must be awaited first!");
12486 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
12487 return nativeResponseValue;
12489 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
12490 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
12491 if(!isWasmInitialized) {
12492 throw new Error("initializeWasm() must be awaited first!");
12494 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
12495 return nativeResponseValue;
12497 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
12498 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
12499 if(!isWasmInitialized) {
12500 throw new Error("initializeWasm() must be awaited first!");
12502 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
12503 return nativeResponseValue;
12505 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
12506 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
12507 if(!isWasmInitialized) {
12508 throw new Error("initializeWasm() must be awaited first!");
12510 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
12511 return nativeResponseValue;
12513 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
12514 export function TxCreationKeys_free(this_obj: number): void {
12515 if(!isWasmInitialized) {
12516 throw new Error("initializeWasm() must be awaited first!");
12518 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
12519 // debug statements here
12521 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12522 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
12523 if(!isWasmInitialized) {
12524 throw new Error("initializeWasm() must be awaited first!");
12526 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
12527 return decodeArray(nativeResponseValue);
12529 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12530 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12531 if(!isWasmInitialized) {
12532 throw new Error("initializeWasm() must be awaited first!");
12534 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
12535 // debug statements here
12537 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12538 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
12539 if(!isWasmInitialized) {
12540 throw new Error("initializeWasm() must be awaited first!");
12542 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
12543 return decodeArray(nativeResponseValue);
12545 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12546 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
12547 if(!isWasmInitialized) {
12548 throw new Error("initializeWasm() must be awaited first!");
12550 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
12551 // debug statements here
12553 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12554 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
12555 if(!isWasmInitialized) {
12556 throw new Error("initializeWasm() must be awaited first!");
12558 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
12559 return decodeArray(nativeResponseValue);
12561 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12562 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
12563 if(!isWasmInitialized) {
12564 throw new Error("initializeWasm() must be awaited first!");
12566 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
12567 // debug statements here
12569 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12570 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
12571 if(!isWasmInitialized) {
12572 throw new Error("initializeWasm() must be awaited first!");
12574 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
12575 return decodeArray(nativeResponseValue);
12577 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12578 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
12579 if(!isWasmInitialized) {
12580 throw new Error("initializeWasm() must be awaited first!");
12582 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
12583 // debug statements here
12585 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12586 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
12587 if(!isWasmInitialized) {
12588 throw new Error("initializeWasm() must be awaited first!");
12590 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
12591 return decodeArray(nativeResponseValue);
12593 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12594 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
12595 if(!isWasmInitialized) {
12596 throw new Error("initializeWasm() must be awaited first!");
12598 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
12599 // debug statements here
12601 // 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);
12602 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 {
12603 if(!isWasmInitialized) {
12604 throw new Error("initializeWasm() must be awaited first!");
12606 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));
12607 return nativeResponseValue;
12609 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
12610 export function TxCreationKeys_clone(orig: number): number {
12611 if(!isWasmInitialized) {
12612 throw new Error("initializeWasm() must be awaited first!");
12614 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
12615 return nativeResponseValue;
12617 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
12618 export function TxCreationKeys_write(obj: number): Uint8Array {
12619 if(!isWasmInitialized) {
12620 throw new Error("initializeWasm() must be awaited first!");
12622 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
12623 return decodeArray(nativeResponseValue);
12625 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
12626 export function TxCreationKeys_read(ser: Uint8Array): number {
12627 if(!isWasmInitialized) {
12628 throw new Error("initializeWasm() must be awaited first!");
12630 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
12631 return nativeResponseValue;
12633 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
12634 export function ChannelPublicKeys_free(this_obj: number): void {
12635 if(!isWasmInitialized) {
12636 throw new Error("initializeWasm() must be awaited first!");
12638 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
12639 // debug statements here
12641 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12642 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
12643 if(!isWasmInitialized) {
12644 throw new Error("initializeWasm() must be awaited first!");
12646 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
12647 return decodeArray(nativeResponseValue);
12649 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12650 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
12651 if(!isWasmInitialized) {
12652 throw new Error("initializeWasm() must be awaited first!");
12654 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
12655 // debug statements here
12657 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12658 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
12659 if(!isWasmInitialized) {
12660 throw new Error("initializeWasm() must be awaited first!");
12662 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
12663 return decodeArray(nativeResponseValue);
12665 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12666 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
12667 if(!isWasmInitialized) {
12668 throw new Error("initializeWasm() must be awaited first!");
12670 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
12671 // debug statements here
12673 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12674 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
12675 if(!isWasmInitialized) {
12676 throw new Error("initializeWasm() must be awaited first!");
12678 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
12679 return decodeArray(nativeResponseValue);
12681 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12682 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
12683 if(!isWasmInitialized) {
12684 throw new Error("initializeWasm() must be awaited first!");
12686 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
12687 // debug statements here
12689 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12690 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
12691 if(!isWasmInitialized) {
12692 throw new Error("initializeWasm() must be awaited first!");
12694 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
12695 return decodeArray(nativeResponseValue);
12697 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12698 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
12699 if(!isWasmInitialized) {
12700 throw new Error("initializeWasm() must be awaited first!");
12702 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
12703 // debug statements here
12705 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12706 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
12707 if(!isWasmInitialized) {
12708 throw new Error("initializeWasm() must be awaited first!");
12710 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
12711 return decodeArray(nativeResponseValue);
12713 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12714 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
12715 if(!isWasmInitialized) {
12716 throw new Error("initializeWasm() must be awaited first!");
12718 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
12719 // debug statements here
12721 // 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);
12722 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 {
12723 if(!isWasmInitialized) {
12724 throw new Error("initializeWasm() must be awaited first!");
12726 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));
12727 return nativeResponseValue;
12729 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
12730 export function ChannelPublicKeys_clone(orig: number): number {
12731 if(!isWasmInitialized) {
12732 throw new Error("initializeWasm() must be awaited first!");
12734 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
12735 return nativeResponseValue;
12737 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
12738 export function ChannelPublicKeys_write(obj: number): Uint8Array {
12739 if(!isWasmInitialized) {
12740 throw new Error("initializeWasm() must be awaited first!");
12742 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
12743 return decodeArray(nativeResponseValue);
12745 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
12746 export function ChannelPublicKeys_read(ser: Uint8Array): number {
12747 if(!isWasmInitialized) {
12748 throw new Error("initializeWasm() must be awaited first!");
12750 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
12751 return nativeResponseValue;
12753 // 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);
12754 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 {
12755 if(!isWasmInitialized) {
12756 throw new Error("initializeWasm() must be awaited first!");
12758 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));
12759 return nativeResponseValue;
12761 // 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);
12762 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
12763 if(!isWasmInitialized) {
12764 throw new Error("initializeWasm() must be awaited first!");
12766 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
12767 return nativeResponseValue;
12769 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
12770 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
12771 if(!isWasmInitialized) {
12772 throw new Error("initializeWasm() must be awaited first!");
12774 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
12775 return decodeArray(nativeResponseValue);
12777 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
12778 export function HTLCOutputInCommitment_free(this_obj: number): void {
12779 if(!isWasmInitialized) {
12780 throw new Error("initializeWasm() must be awaited first!");
12782 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
12783 // debug statements here
12785 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12786 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
12787 if(!isWasmInitialized) {
12788 throw new Error("initializeWasm() must be awaited first!");
12790 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
12791 return nativeResponseValue;
12793 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
12794 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
12795 if(!isWasmInitialized) {
12796 throw new Error("initializeWasm() must be awaited first!");
12798 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
12799 // debug statements here
12801 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12802 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
12803 if(!isWasmInitialized) {
12804 throw new Error("initializeWasm() must be awaited first!");
12806 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
12807 return nativeResponseValue;
12809 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
12810 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
12811 if(!isWasmInitialized) {
12812 throw new Error("initializeWasm() must be awaited first!");
12814 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
12815 // debug statements here
12817 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12818 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
12819 if(!isWasmInitialized) {
12820 throw new Error("initializeWasm() must be awaited first!");
12822 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
12823 return nativeResponseValue;
12825 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
12826 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
12827 if(!isWasmInitialized) {
12828 throw new Error("initializeWasm() must be awaited first!");
12830 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
12831 // debug statements here
12833 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
12834 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
12835 if(!isWasmInitialized) {
12836 throw new Error("initializeWasm() must be awaited first!");
12838 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
12839 return decodeArray(nativeResponseValue);
12841 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12842 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
12843 if(!isWasmInitialized) {
12844 throw new Error("initializeWasm() must be awaited first!");
12846 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
12847 // debug statements here
12849 // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12850 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
12851 if(!isWasmInitialized) {
12852 throw new Error("initializeWasm() must be awaited first!");
12854 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
12855 return nativeResponseValue;
12857 // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
12858 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
12859 if(!isWasmInitialized) {
12860 throw new Error("initializeWasm() must be awaited first!");
12862 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
12863 // debug statements here
12865 // 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);
12866 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 {
12867 if(!isWasmInitialized) {
12868 throw new Error("initializeWasm() must be awaited first!");
12870 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
12871 return nativeResponseValue;
12873 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
12874 export function HTLCOutputInCommitment_clone(orig: number): number {
12875 if(!isWasmInitialized) {
12876 throw new Error("initializeWasm() must be awaited first!");
12878 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
12879 return nativeResponseValue;
12881 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
12882 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
12883 if(!isWasmInitialized) {
12884 throw new Error("initializeWasm() must be awaited first!");
12886 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
12887 return decodeArray(nativeResponseValue);
12889 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
12890 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
12891 if(!isWasmInitialized) {
12892 throw new Error("initializeWasm() must be awaited first!");
12894 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
12895 return nativeResponseValue;
12897 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
12898 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
12899 if(!isWasmInitialized) {
12900 throw new Error("initializeWasm() must be awaited first!");
12902 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
12903 return decodeArray(nativeResponseValue);
12905 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
12906 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
12907 if(!isWasmInitialized) {
12908 throw new Error("initializeWasm() must be awaited first!");
12910 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
12911 return decodeArray(nativeResponseValue);
12913 // 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);
12914 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 {
12915 if(!isWasmInitialized) {
12916 throw new Error("initializeWasm() must be awaited first!");
12918 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
12919 return decodeArray(nativeResponseValue);
12921 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
12922 export function ChannelTransactionParameters_free(this_obj: number): void {
12923 if(!isWasmInitialized) {
12924 throw new Error("initializeWasm() must be awaited first!");
12926 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
12927 // debug statements here
12929 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12930 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
12931 if(!isWasmInitialized) {
12932 throw new Error("initializeWasm() must be awaited first!");
12934 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
12935 return nativeResponseValue;
12937 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12938 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
12939 if(!isWasmInitialized) {
12940 throw new Error("initializeWasm() must be awaited first!");
12942 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
12943 // debug statements here
12945 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12946 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
12947 if(!isWasmInitialized) {
12948 throw new Error("initializeWasm() must be awaited first!");
12950 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
12951 return nativeResponseValue;
12953 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12954 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
12955 if(!isWasmInitialized) {
12956 throw new Error("initializeWasm() must be awaited first!");
12958 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
12959 // debug statements here
12961 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12962 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
12963 if(!isWasmInitialized) {
12964 throw new Error("initializeWasm() must be awaited first!");
12966 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
12967 return nativeResponseValue;
12969 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
12970 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
12971 if(!isWasmInitialized) {
12972 throw new Error("initializeWasm() must be awaited first!");
12974 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
12975 // debug statements here
12977 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12978 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
12979 if(!isWasmInitialized) {
12980 throw new Error("initializeWasm() must be awaited first!");
12982 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
12983 return nativeResponseValue;
12985 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
12986 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
12987 if(!isWasmInitialized) {
12988 throw new Error("initializeWasm() must be awaited first!");
12990 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
12991 // debug statements here
12993 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12994 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
12995 if(!isWasmInitialized) {
12996 throw new Error("initializeWasm() must be awaited first!");
12998 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
12999 return nativeResponseValue;
13001 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
13002 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
13003 if(!isWasmInitialized) {
13004 throw new Error("initializeWasm() must be awaited first!");
13006 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
13007 // debug statements here
13009 // 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);
13010 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 {
13011 if(!isWasmInitialized) {
13012 throw new Error("initializeWasm() must be awaited first!");
13014 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
13015 return nativeResponseValue;
13017 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
13018 export function ChannelTransactionParameters_clone(orig: number): number {
13019 if(!isWasmInitialized) {
13020 throw new Error("initializeWasm() must be awaited first!");
13022 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
13023 return nativeResponseValue;
13025 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
13026 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
13027 if(!isWasmInitialized) {
13028 throw new Error("initializeWasm() must be awaited first!");
13030 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
13031 // debug statements here
13033 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
13034 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
13035 if(!isWasmInitialized) {
13036 throw new Error("initializeWasm() must be awaited first!");
13038 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
13039 return nativeResponseValue;
13041 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
13042 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
13043 if(!isWasmInitialized) {
13044 throw new Error("initializeWasm() must be awaited first!");
13046 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
13047 // debug statements here
13049 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
13050 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
13051 if(!isWasmInitialized) {
13052 throw new Error("initializeWasm() must be awaited first!");
13054 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
13055 return nativeResponseValue;
13057 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
13058 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
13059 if(!isWasmInitialized) {
13060 throw new Error("initializeWasm() must be awaited first!");
13062 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
13063 // debug statements here
13065 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
13066 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
13067 if(!isWasmInitialized) {
13068 throw new Error("initializeWasm() must be awaited first!");
13070 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
13071 return nativeResponseValue;
13073 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
13074 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
13075 if(!isWasmInitialized) {
13076 throw new Error("initializeWasm() must be awaited first!");
13078 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
13079 return nativeResponseValue;
13081 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
13082 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
13083 if(!isWasmInitialized) {
13084 throw new Error("initializeWasm() must be awaited first!");
13086 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
13087 return nativeResponseValue;
13089 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
13090 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
13091 if(!isWasmInitialized) {
13092 throw new Error("initializeWasm() must be awaited first!");
13094 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
13095 return nativeResponseValue;
13097 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
13098 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
13099 if(!isWasmInitialized) {
13100 throw new Error("initializeWasm() must be awaited first!");
13102 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
13103 return nativeResponseValue;
13105 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
13106 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
13107 if(!isWasmInitialized) {
13108 throw new Error("initializeWasm() must be awaited first!");
13110 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
13111 return decodeArray(nativeResponseValue);
13113 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
13114 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
13115 if(!isWasmInitialized) {
13116 throw new Error("initializeWasm() must be awaited first!");
13118 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
13119 return nativeResponseValue;
13121 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
13122 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
13123 if(!isWasmInitialized) {
13124 throw new Error("initializeWasm() must be awaited first!");
13126 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
13127 return decodeArray(nativeResponseValue);
13129 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
13130 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
13131 if(!isWasmInitialized) {
13132 throw new Error("initializeWasm() must be awaited first!");
13134 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
13135 return nativeResponseValue;
13137 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
13138 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
13139 if(!isWasmInitialized) {
13140 throw new Error("initializeWasm() must be awaited first!");
13142 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
13143 // debug statements here
13145 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13146 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
13147 if(!isWasmInitialized) {
13148 throw new Error("initializeWasm() must be awaited first!");
13150 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
13151 return nativeResponseValue;
13153 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13154 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
13155 if(!isWasmInitialized) {
13156 throw new Error("initializeWasm() must be awaited first!");
13158 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
13159 return nativeResponseValue;
13161 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13162 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
13163 if(!isWasmInitialized) {
13164 throw new Error("initializeWasm() must be awaited first!");
13166 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
13167 return nativeResponseValue;
13169 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13170 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
13171 if(!isWasmInitialized) {
13172 throw new Error("initializeWasm() must be awaited first!");
13174 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
13175 return nativeResponseValue;
13177 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
13178 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
13179 if(!isWasmInitialized) {
13180 throw new Error("initializeWasm() must be awaited first!");
13182 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
13183 return nativeResponseValue;
13185 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
13186 export function HolderCommitmentTransaction_free(this_obj: number): void {
13187 if(!isWasmInitialized) {
13188 throw new Error("initializeWasm() must be awaited first!");
13190 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
13191 // debug statements here
13193 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
13194 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
13195 if(!isWasmInitialized) {
13196 throw new Error("initializeWasm() must be awaited first!");
13198 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
13199 return decodeArray(nativeResponseValue);
13201 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
13202 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
13203 if(!isWasmInitialized) {
13204 throw new Error("initializeWasm() must be awaited first!");
13206 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
13207 // debug statements here
13209 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
13210 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
13211 if(!isWasmInitialized) {
13212 throw new Error("initializeWasm() must be awaited first!");
13214 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
13215 // debug statements here
13217 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
13218 export function HolderCommitmentTransaction_clone(orig: number): number {
13219 if(!isWasmInitialized) {
13220 throw new Error("initializeWasm() must be awaited first!");
13222 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
13223 return nativeResponseValue;
13225 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
13226 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
13227 if(!isWasmInitialized) {
13228 throw new Error("initializeWasm() must be awaited first!");
13230 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
13231 return decodeArray(nativeResponseValue);
13233 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
13234 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
13235 if(!isWasmInitialized) {
13236 throw new Error("initializeWasm() must be awaited first!");
13238 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
13239 return nativeResponseValue;
13241 // 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);
13242 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
13243 if(!isWasmInitialized) {
13244 throw new Error("initializeWasm() must be awaited first!");
13246 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
13247 return nativeResponseValue;
13249 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
13250 export function BuiltCommitmentTransaction_free(this_obj: number): void {
13251 if(!isWasmInitialized) {
13252 throw new Error("initializeWasm() must be awaited first!");
13254 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
13255 // debug statements here
13257 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
13258 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
13259 if(!isWasmInitialized) {
13260 throw new Error("initializeWasm() must be awaited first!");
13262 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
13263 return decodeArray(nativeResponseValue);
13265 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
13266 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
13267 if(!isWasmInitialized) {
13268 throw new Error("initializeWasm() must be awaited first!");
13270 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
13271 // debug statements here
13273 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
13274 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
13275 if(!isWasmInitialized) {
13276 throw new Error("initializeWasm() must be awaited first!");
13278 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
13279 return decodeArray(nativeResponseValue);
13281 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13282 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
13283 if(!isWasmInitialized) {
13284 throw new Error("initializeWasm() must be awaited first!");
13286 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
13287 // debug statements here
13289 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
13290 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
13291 if(!isWasmInitialized) {
13292 throw new Error("initializeWasm() must be awaited first!");
13294 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
13295 return nativeResponseValue;
13297 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
13298 export function BuiltCommitmentTransaction_clone(orig: number): number {
13299 if(!isWasmInitialized) {
13300 throw new Error("initializeWasm() must be awaited first!");
13302 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
13303 return nativeResponseValue;
13305 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
13306 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
13307 if(!isWasmInitialized) {
13308 throw new Error("initializeWasm() must be awaited first!");
13310 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
13311 return decodeArray(nativeResponseValue);
13313 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
13314 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
13315 if(!isWasmInitialized) {
13316 throw new Error("initializeWasm() must be awaited first!");
13318 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
13319 return nativeResponseValue;
13321 // 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);
13322 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
13323 if(!isWasmInitialized) {
13324 throw new Error("initializeWasm() must be awaited first!");
13326 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
13327 return decodeArray(nativeResponseValue);
13329 // 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);
13330 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
13331 if(!isWasmInitialized) {
13332 throw new Error("initializeWasm() must be awaited first!");
13334 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
13335 return decodeArray(nativeResponseValue);
13337 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
13338 export function CommitmentTransaction_free(this_obj: number): void {
13339 if(!isWasmInitialized) {
13340 throw new Error("initializeWasm() must be awaited first!");
13342 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
13343 // debug statements here
13345 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
13346 export function CommitmentTransaction_clone(orig: number): number {
13347 if(!isWasmInitialized) {
13348 throw new Error("initializeWasm() must be awaited first!");
13350 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
13351 return nativeResponseValue;
13353 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
13354 export function CommitmentTransaction_write(obj: number): Uint8Array {
13355 if(!isWasmInitialized) {
13356 throw new Error("initializeWasm() must be awaited first!");
13358 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
13359 return decodeArray(nativeResponseValue);
13361 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
13362 export function CommitmentTransaction_read(ser: Uint8Array): number {
13363 if(!isWasmInitialized) {
13364 throw new Error("initializeWasm() must be awaited first!");
13366 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
13367 return nativeResponseValue;
13369 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13370 export function CommitmentTransaction_commitment_number(this_arg: number): number {
13371 if(!isWasmInitialized) {
13372 throw new Error("initializeWasm() must be awaited first!");
13374 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
13375 return nativeResponseValue;
13377 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13378 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
13379 if(!isWasmInitialized) {
13380 throw new Error("initializeWasm() must be awaited first!");
13382 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
13383 return nativeResponseValue;
13385 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13386 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
13387 if(!isWasmInitialized) {
13388 throw new Error("initializeWasm() must be awaited first!");
13390 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
13391 return nativeResponseValue;
13393 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13394 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
13395 if(!isWasmInitialized) {
13396 throw new Error("initializeWasm() must be awaited first!");
13398 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
13399 return nativeResponseValue;
13401 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
13402 export function CommitmentTransaction_trust(this_arg: number): number {
13403 if(!isWasmInitialized) {
13404 throw new Error("initializeWasm() must be awaited first!");
13406 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
13407 return nativeResponseValue;
13409 // 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);
13410 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
13411 if(!isWasmInitialized) {
13412 throw new Error("initializeWasm() must be awaited first!");
13414 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
13415 return nativeResponseValue;
13417 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
13418 export function TrustedCommitmentTransaction_free(this_obj: number): void {
13419 if(!isWasmInitialized) {
13420 throw new Error("initializeWasm() must be awaited first!");
13422 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
13423 // debug statements here
13425 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
13426 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
13427 if(!isWasmInitialized) {
13428 throw new Error("initializeWasm() must be awaited first!");
13430 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
13431 return decodeArray(nativeResponseValue);
13433 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
13434 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
13435 if(!isWasmInitialized) {
13436 throw new Error("initializeWasm() must be awaited first!");
13438 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
13439 return nativeResponseValue;
13441 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
13442 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
13443 if(!isWasmInitialized) {
13444 throw new Error("initializeWasm() must be awaited first!");
13446 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
13447 return nativeResponseValue;
13449 // 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);
13450 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
13451 if(!isWasmInitialized) {
13452 throw new Error("initializeWasm() must be awaited first!");
13454 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
13455 return nativeResponseValue;
13457 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
13458 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
13459 if(!isWasmInitialized) {
13460 throw new Error("initializeWasm() must be awaited first!");
13462 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
13463 return nativeResponseValue;
13465 // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
13466 export function InitFeatures_eq(a: number, b: number): boolean {
13467 if(!isWasmInitialized) {
13468 throw new Error("initializeWasm() must be awaited first!");
13470 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
13471 return nativeResponseValue;
13473 // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
13474 export function NodeFeatures_eq(a: number, b: number): boolean {
13475 if(!isWasmInitialized) {
13476 throw new Error("initializeWasm() must be awaited first!");
13478 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
13479 return nativeResponseValue;
13481 // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
13482 export function ChannelFeatures_eq(a: number, b: number): boolean {
13483 if(!isWasmInitialized) {
13484 throw new Error("initializeWasm() must be awaited first!");
13486 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
13487 return nativeResponseValue;
13489 // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
13490 export function InvoiceFeatures_eq(a: number, b: number): boolean {
13491 if(!isWasmInitialized) {
13492 throw new Error("initializeWasm() must be awaited first!");
13494 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
13495 return nativeResponseValue;
13497 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
13498 export function InitFeatures_clone(orig: number): number {
13499 if(!isWasmInitialized) {
13500 throw new Error("initializeWasm() must be awaited first!");
13502 const nativeResponseValue = wasm.InitFeatures_clone(orig);
13503 return nativeResponseValue;
13505 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
13506 export function NodeFeatures_clone(orig: number): number {
13507 if(!isWasmInitialized) {
13508 throw new Error("initializeWasm() must be awaited first!");
13510 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
13511 return nativeResponseValue;
13513 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
13514 export function ChannelFeatures_clone(orig: number): number {
13515 if(!isWasmInitialized) {
13516 throw new Error("initializeWasm() must be awaited first!");
13518 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
13519 return nativeResponseValue;
13521 // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
13522 export function InvoiceFeatures_clone(orig: number): number {
13523 if(!isWasmInitialized) {
13524 throw new Error("initializeWasm() must be awaited first!");
13526 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
13527 return nativeResponseValue;
13529 // void InitFeatures_free(struct LDKInitFeatures this_obj);
13530 export function InitFeatures_free(this_obj: number): void {
13531 if(!isWasmInitialized) {
13532 throw new Error("initializeWasm() must be awaited first!");
13534 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
13535 // debug statements here
13537 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
13538 export function NodeFeatures_free(this_obj: number): void {
13539 if(!isWasmInitialized) {
13540 throw new Error("initializeWasm() must be awaited first!");
13542 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
13543 // debug statements here
13545 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
13546 export function ChannelFeatures_free(this_obj: number): void {
13547 if(!isWasmInitialized) {
13548 throw new Error("initializeWasm() must be awaited first!");
13550 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
13551 // debug statements here
13553 // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
13554 export function InvoiceFeatures_free(this_obj: number): void {
13555 if(!isWasmInitialized) {
13556 throw new Error("initializeWasm() must be awaited first!");
13558 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
13559 // debug statements here
13561 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
13562 export function InitFeatures_empty(): number {
13563 if(!isWasmInitialized) {
13564 throw new Error("initializeWasm() must be awaited first!");
13566 const nativeResponseValue = wasm.InitFeatures_empty();
13567 return nativeResponseValue;
13569 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
13570 export function InitFeatures_known(): number {
13571 if(!isWasmInitialized) {
13572 throw new Error("initializeWasm() must be awaited first!");
13574 const nativeResponseValue = wasm.InitFeatures_known();
13575 return nativeResponseValue;
13577 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
13578 export function NodeFeatures_empty(): number {
13579 if(!isWasmInitialized) {
13580 throw new Error("initializeWasm() must be awaited first!");
13582 const nativeResponseValue = wasm.NodeFeatures_empty();
13583 return nativeResponseValue;
13585 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
13586 export function NodeFeatures_known(): number {
13587 if(!isWasmInitialized) {
13588 throw new Error("initializeWasm() must be awaited first!");
13590 const nativeResponseValue = wasm.NodeFeatures_known();
13591 return nativeResponseValue;
13593 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
13594 export function ChannelFeatures_empty(): number {
13595 if(!isWasmInitialized) {
13596 throw new Error("initializeWasm() must be awaited first!");
13598 const nativeResponseValue = wasm.ChannelFeatures_empty();
13599 return nativeResponseValue;
13601 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
13602 export function ChannelFeatures_known(): number {
13603 if(!isWasmInitialized) {
13604 throw new Error("initializeWasm() must be awaited first!");
13606 const nativeResponseValue = wasm.ChannelFeatures_known();
13607 return nativeResponseValue;
13609 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
13610 export function InvoiceFeatures_empty(): number {
13611 if(!isWasmInitialized) {
13612 throw new Error("initializeWasm() must be awaited first!");
13614 const nativeResponseValue = wasm.InvoiceFeatures_empty();
13615 return nativeResponseValue;
13617 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
13618 export function InvoiceFeatures_known(): number {
13619 if(!isWasmInitialized) {
13620 throw new Error("initializeWasm() must be awaited first!");
13622 const nativeResponseValue = wasm.InvoiceFeatures_known();
13623 return nativeResponseValue;
13625 // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
13626 export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
13627 if(!isWasmInitialized) {
13628 throw new Error("initializeWasm() must be awaited first!");
13630 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
13631 return nativeResponseValue;
13633 // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
13634 export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
13635 if(!isWasmInitialized) {
13636 throw new Error("initializeWasm() must be awaited first!");
13638 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
13639 return nativeResponseValue;
13641 // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
13642 export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
13643 if(!isWasmInitialized) {
13644 throw new Error("initializeWasm() must be awaited first!");
13646 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
13647 return nativeResponseValue;
13649 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
13650 export function InitFeatures_write(obj: number): Uint8Array {
13651 if(!isWasmInitialized) {
13652 throw new Error("initializeWasm() must be awaited first!");
13654 const nativeResponseValue = wasm.InitFeatures_write(obj);
13655 return decodeArray(nativeResponseValue);
13657 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
13658 export function NodeFeatures_write(obj: number): Uint8Array {
13659 if(!isWasmInitialized) {
13660 throw new Error("initializeWasm() must be awaited first!");
13662 const nativeResponseValue = wasm.NodeFeatures_write(obj);
13663 return decodeArray(nativeResponseValue);
13665 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
13666 export function ChannelFeatures_write(obj: number): Uint8Array {
13667 if(!isWasmInitialized) {
13668 throw new Error("initializeWasm() must be awaited first!");
13670 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
13671 return decodeArray(nativeResponseValue);
13673 // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
13674 export function InvoiceFeatures_write(obj: number): Uint8Array {
13675 if(!isWasmInitialized) {
13676 throw new Error("initializeWasm() must be awaited first!");
13678 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
13679 return decodeArray(nativeResponseValue);
13681 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
13682 export function InitFeatures_read(ser: Uint8Array): number {
13683 if(!isWasmInitialized) {
13684 throw new Error("initializeWasm() must be awaited first!");
13686 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
13687 return nativeResponseValue;
13689 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
13690 export function NodeFeatures_read(ser: Uint8Array): number {
13691 if(!isWasmInitialized) {
13692 throw new Error("initializeWasm() must be awaited first!");
13694 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
13695 return nativeResponseValue;
13697 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
13698 export function ChannelFeatures_read(ser: Uint8Array): number {
13699 if(!isWasmInitialized) {
13700 throw new Error("initializeWasm() must be awaited first!");
13702 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
13703 return nativeResponseValue;
13705 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
13706 export function InvoiceFeatures_read(ser: Uint8Array): number {
13707 if(!isWasmInitialized) {
13708 throw new Error("initializeWasm() must be awaited first!");
13710 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
13711 return nativeResponseValue;
13713 // void RouteHop_free(struct LDKRouteHop this_obj);
13714 export function RouteHop_free(this_obj: number): void {
13715 if(!isWasmInitialized) {
13716 throw new Error("initializeWasm() must be awaited first!");
13718 const nativeResponseValue = wasm.RouteHop_free(this_obj);
13719 // debug statements here
13721 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13722 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
13723 if(!isWasmInitialized) {
13724 throw new Error("initializeWasm() must be awaited first!");
13726 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
13727 return decodeArray(nativeResponseValue);
13729 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13730 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
13731 if(!isWasmInitialized) {
13732 throw new Error("initializeWasm() must be awaited first!");
13734 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
13735 // debug statements here
13737 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13738 export function RouteHop_get_node_features(this_ptr: number): number {
13739 if(!isWasmInitialized) {
13740 throw new Error("initializeWasm() must be awaited first!");
13742 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
13743 return nativeResponseValue;
13745 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
13746 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
13747 if(!isWasmInitialized) {
13748 throw new Error("initializeWasm() must be awaited first!");
13750 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
13751 // debug statements here
13753 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13754 export function RouteHop_get_short_channel_id(this_ptr: number): number {
13755 if(!isWasmInitialized) {
13756 throw new Error("initializeWasm() must be awaited first!");
13758 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
13759 return nativeResponseValue;
13761 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13762 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
13763 if(!isWasmInitialized) {
13764 throw new Error("initializeWasm() must be awaited first!");
13766 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
13767 // debug statements here
13769 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13770 export function RouteHop_get_channel_features(this_ptr: number): number {
13771 if(!isWasmInitialized) {
13772 throw new Error("initializeWasm() must be awaited first!");
13774 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
13775 return nativeResponseValue;
13777 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13778 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
13779 if(!isWasmInitialized) {
13780 throw new Error("initializeWasm() must be awaited first!");
13782 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
13783 // debug statements here
13785 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13786 export function RouteHop_get_fee_msat(this_ptr: number): number {
13787 if(!isWasmInitialized) {
13788 throw new Error("initializeWasm() must be awaited first!");
13790 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
13791 return nativeResponseValue;
13793 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13794 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
13795 if(!isWasmInitialized) {
13796 throw new Error("initializeWasm() must be awaited first!");
13798 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
13799 // debug statements here
13801 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13802 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
13803 if(!isWasmInitialized) {
13804 throw new Error("initializeWasm() must be awaited first!");
13806 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
13807 return nativeResponseValue;
13809 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
13810 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13811 if(!isWasmInitialized) {
13812 throw new Error("initializeWasm() must be awaited first!");
13814 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
13815 // debug statements here
13817 // 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);
13818 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 {
13819 if(!isWasmInitialized) {
13820 throw new Error("initializeWasm() must be awaited first!");
13822 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);
13823 return nativeResponseValue;
13825 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
13826 export function RouteHop_clone(orig: number): number {
13827 if(!isWasmInitialized) {
13828 throw new Error("initializeWasm() must be awaited first!");
13830 const nativeResponseValue = wasm.RouteHop_clone(orig);
13831 return nativeResponseValue;
13833 // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
13834 export function RouteHop_write(obj: number): Uint8Array {
13835 if(!isWasmInitialized) {
13836 throw new Error("initializeWasm() must be awaited first!");
13838 const nativeResponseValue = wasm.RouteHop_write(obj);
13839 return decodeArray(nativeResponseValue);
13841 // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
13842 export function RouteHop_read(ser: Uint8Array): number {
13843 if(!isWasmInitialized) {
13844 throw new Error("initializeWasm() must be awaited first!");
13846 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
13847 return nativeResponseValue;
13849 // void Route_free(struct LDKRoute this_obj);
13850 export function Route_free(this_obj: number): void {
13851 if(!isWasmInitialized) {
13852 throw new Error("initializeWasm() must be awaited first!");
13854 const nativeResponseValue = wasm.Route_free(this_obj);
13855 // debug statements here
13857 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
13858 export function Route_set_paths(this_ptr: number, val: number[][]): void {
13859 if(!isWasmInitialized) {
13860 throw new Error("initializeWasm() must be awaited first!");
13862 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
13863 // debug statements here
13865 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
13866 export function Route_new(paths_arg: number[][]): number {
13867 if(!isWasmInitialized) {
13868 throw new Error("initializeWasm() must be awaited first!");
13870 const nativeResponseValue = wasm.Route_new(paths_arg);
13871 return nativeResponseValue;
13873 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
13874 export function Route_clone(orig: number): number {
13875 if(!isWasmInitialized) {
13876 throw new Error("initializeWasm() must be awaited first!");
13878 const nativeResponseValue = wasm.Route_clone(orig);
13879 return nativeResponseValue;
13881 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
13882 export function Route_write(obj: number): Uint8Array {
13883 if(!isWasmInitialized) {
13884 throw new Error("initializeWasm() must be awaited first!");
13886 const nativeResponseValue = wasm.Route_write(obj);
13887 return decodeArray(nativeResponseValue);
13889 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
13890 export function Route_read(ser: Uint8Array): number {
13891 if(!isWasmInitialized) {
13892 throw new Error("initializeWasm() must be awaited first!");
13894 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
13895 return nativeResponseValue;
13897 // void RouteHint_free(struct LDKRouteHint this_obj);
13898 export function RouteHint_free(this_obj: number): void {
13899 if(!isWasmInitialized) {
13900 throw new Error("initializeWasm() must be awaited first!");
13902 const nativeResponseValue = wasm.RouteHint_free(this_obj);
13903 // debug statements here
13905 // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
13906 export function RouteHint_eq(a: number, b: number): boolean {
13907 if(!isWasmInitialized) {
13908 throw new Error("initializeWasm() must be awaited first!");
13910 const nativeResponseValue = wasm.RouteHint_eq(a, b);
13911 return nativeResponseValue;
13913 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
13914 export function RouteHint_clone(orig: number): number {
13915 if(!isWasmInitialized) {
13916 throw new Error("initializeWasm() must be awaited first!");
13918 const nativeResponseValue = wasm.RouteHint_clone(orig);
13919 return nativeResponseValue;
13921 // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
13922 export function RouteHintHop_free(this_obj: number): void {
13923 if(!isWasmInitialized) {
13924 throw new Error("initializeWasm() must be awaited first!");
13926 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
13927 // debug statements here
13929 // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13930 export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
13931 if(!isWasmInitialized) {
13932 throw new Error("initializeWasm() must be awaited first!");
13934 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
13935 return decodeArray(nativeResponseValue);
13937 // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13938 export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
13939 if(!isWasmInitialized) {
13940 throw new Error("initializeWasm() must be awaited first!");
13942 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
13943 // debug statements here
13945 // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13946 export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
13947 if(!isWasmInitialized) {
13948 throw new Error("initializeWasm() must be awaited first!");
13950 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
13951 return nativeResponseValue;
13953 // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
13954 export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
13955 if(!isWasmInitialized) {
13956 throw new Error("initializeWasm() must be awaited first!");
13958 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
13959 // debug statements here
13961 // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13962 export function RouteHintHop_get_fees(this_ptr: number): number {
13963 if(!isWasmInitialized) {
13964 throw new Error("initializeWasm() must be awaited first!");
13966 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
13967 return nativeResponseValue;
13969 // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13970 export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
13971 if(!isWasmInitialized) {
13972 throw new Error("initializeWasm() must be awaited first!");
13974 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
13975 // debug statements here
13977 // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13978 export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
13979 if(!isWasmInitialized) {
13980 throw new Error("initializeWasm() must be awaited first!");
13982 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
13983 return nativeResponseValue;
13985 // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
13986 export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13987 if(!isWasmInitialized) {
13988 throw new Error("initializeWasm() must be awaited first!");
13990 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
13991 // debug statements here
13993 // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13994 export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
13995 if(!isWasmInitialized) {
13996 throw new Error("initializeWasm() must be awaited first!");
13998 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
13999 return nativeResponseValue;
14001 // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14002 export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14003 if(!isWasmInitialized) {
14004 throw new Error("initializeWasm() must be awaited first!");
14006 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
14007 // debug statements here
14009 // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
14010 export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
14011 if(!isWasmInitialized) {
14012 throw new Error("initializeWasm() must be awaited first!");
14014 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
14015 return nativeResponseValue;
14017 // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14018 export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
14019 if(!isWasmInitialized) {
14020 throw new Error("initializeWasm() must be awaited first!");
14022 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
14023 // debug statements here
14025 // 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);
14026 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 {
14027 if(!isWasmInitialized) {
14028 throw new Error("initializeWasm() must be awaited first!");
14030 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);
14031 return nativeResponseValue;
14033 // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
14034 export function RouteHintHop_eq(a: number, b: number): boolean {
14035 if(!isWasmInitialized) {
14036 throw new Error("initializeWasm() must be awaited first!");
14038 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
14039 return nativeResponseValue;
14041 // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
14042 export function RouteHintHop_clone(orig: number): number {
14043 if(!isWasmInitialized) {
14044 throw new Error("initializeWasm() must be awaited first!");
14046 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
14047 return nativeResponseValue;
14049 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
14050 export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
14051 if(!isWasmInitialized) {
14052 throw new Error("initializeWasm() must be awaited first!");
14054 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
14055 return nativeResponseValue;
14057 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
14058 export function NetworkGraph_free(this_obj: number): void {
14059 if(!isWasmInitialized) {
14060 throw new Error("initializeWasm() must be awaited first!");
14062 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
14063 // debug statements here
14065 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
14066 export function NetworkGraph_clone(orig: number): number {
14067 if(!isWasmInitialized) {
14068 throw new Error("initializeWasm() must be awaited first!");
14070 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
14071 return nativeResponseValue;
14073 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
14074 export function LockedNetworkGraph_free(this_obj: number): void {
14075 if(!isWasmInitialized) {
14076 throw new Error("initializeWasm() must be awaited first!");
14078 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
14079 // debug statements here
14081 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
14082 export function NetGraphMsgHandler_free(this_obj: number): void {
14083 if(!isWasmInitialized) {
14084 throw new Error("initializeWasm() must be awaited first!");
14086 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
14087 // debug statements here
14089 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
14090 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
14091 if(!isWasmInitialized) {
14092 throw new Error("initializeWasm() must be awaited first!");
14094 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
14095 return nativeResponseValue;
14097 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
14098 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
14099 if(!isWasmInitialized) {
14100 throw new Error("initializeWasm() must be awaited first!");
14102 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
14103 return nativeResponseValue;
14105 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
14106 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
14107 if(!isWasmInitialized) {
14108 throw new Error("initializeWasm() must be awaited first!");
14110 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
14111 // debug statements here
14113 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
14114 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
14115 if(!isWasmInitialized) {
14116 throw new Error("initializeWasm() must be awaited first!");
14118 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
14119 return nativeResponseValue;
14121 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
14122 export function LockedNetworkGraph_graph(this_arg: number): number {
14123 if(!isWasmInitialized) {
14124 throw new Error("initializeWasm() must be awaited first!");
14126 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
14127 return nativeResponseValue;
14129 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
14130 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
14131 if(!isWasmInitialized) {
14132 throw new Error("initializeWasm() must be awaited first!");
14134 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
14135 return nativeResponseValue;
14137 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
14138 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
14139 if(!isWasmInitialized) {
14140 throw new Error("initializeWasm() must be awaited first!");
14142 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
14143 return nativeResponseValue;
14145 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
14146 export function DirectionalChannelInfo_free(this_obj: number): void {
14147 if(!isWasmInitialized) {
14148 throw new Error("initializeWasm() must be awaited first!");
14150 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
14151 // debug statements here
14153 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14154 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
14155 if(!isWasmInitialized) {
14156 throw new Error("initializeWasm() must be awaited first!");
14158 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
14159 return nativeResponseValue;
14161 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
14162 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
14163 if(!isWasmInitialized) {
14164 throw new Error("initializeWasm() must be awaited first!");
14166 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
14167 // debug statements here
14169 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14170 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
14171 if(!isWasmInitialized) {
14172 throw new Error("initializeWasm() must be awaited first!");
14174 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
14175 return nativeResponseValue;
14177 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
14178 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
14179 if(!isWasmInitialized) {
14180 throw new Error("initializeWasm() must be awaited first!");
14182 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
14183 // debug statements here
14185 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14186 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
14187 if(!isWasmInitialized) {
14188 throw new Error("initializeWasm() must be awaited first!");
14190 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
14191 return nativeResponseValue;
14193 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
14194 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
14195 if(!isWasmInitialized) {
14196 throw new Error("initializeWasm() must be awaited first!");
14198 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
14199 // debug statements here
14201 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14202 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
14203 if(!isWasmInitialized) {
14204 throw new Error("initializeWasm() must be awaited first!");
14206 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
14207 return nativeResponseValue;
14209 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
14210 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
14211 if(!isWasmInitialized) {
14212 throw new Error("initializeWasm() must be awaited first!");
14214 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
14215 // debug statements here
14217 // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14218 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
14219 if(!isWasmInitialized) {
14220 throw new Error("initializeWasm() must be awaited first!");
14222 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
14223 return nativeResponseValue;
14225 // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14226 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
14227 if(!isWasmInitialized) {
14228 throw new Error("initializeWasm() must be awaited first!");
14230 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
14231 // debug statements here
14233 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14234 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
14235 if(!isWasmInitialized) {
14236 throw new Error("initializeWasm() must be awaited first!");
14238 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
14239 return nativeResponseValue;
14241 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
14242 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
14243 if(!isWasmInitialized) {
14244 throw new Error("initializeWasm() must be awaited first!");
14246 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
14247 // debug statements here
14249 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
14250 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
14251 if(!isWasmInitialized) {
14252 throw new Error("initializeWasm() must be awaited first!");
14254 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
14255 return nativeResponseValue;
14257 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
14258 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
14259 if(!isWasmInitialized) {
14260 throw new Error("initializeWasm() must be awaited first!");
14262 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
14263 // debug statements here
14265 // 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);
14266 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 {
14267 if(!isWasmInitialized) {
14268 throw new Error("initializeWasm() must be awaited first!");
14270 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);
14271 return nativeResponseValue;
14273 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
14274 export function DirectionalChannelInfo_clone(orig: number): number {
14275 if(!isWasmInitialized) {
14276 throw new Error("initializeWasm() must be awaited first!");
14278 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
14279 return nativeResponseValue;
14281 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
14282 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
14283 if(!isWasmInitialized) {
14284 throw new Error("initializeWasm() must be awaited first!");
14286 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
14287 return decodeArray(nativeResponseValue);
14289 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
14290 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
14291 if(!isWasmInitialized) {
14292 throw new Error("initializeWasm() must be awaited first!");
14294 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
14295 return nativeResponseValue;
14297 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
14298 export function ChannelInfo_free(this_obj: number): void {
14299 if(!isWasmInitialized) {
14300 throw new Error("initializeWasm() must be awaited first!");
14302 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
14303 // debug statements here
14305 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14306 export function ChannelInfo_get_features(this_ptr: number): number {
14307 if(!isWasmInitialized) {
14308 throw new Error("initializeWasm() must be awaited first!");
14310 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
14311 return nativeResponseValue;
14313 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
14314 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
14315 if(!isWasmInitialized) {
14316 throw new Error("initializeWasm() must be awaited first!");
14318 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
14319 // debug statements here
14321 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14322 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
14323 if(!isWasmInitialized) {
14324 throw new Error("initializeWasm() must be awaited first!");
14326 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
14327 return decodeArray(nativeResponseValue);
14329 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14330 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
14331 if(!isWasmInitialized) {
14332 throw new Error("initializeWasm() must be awaited first!");
14334 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
14335 // debug statements here
14337 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14338 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
14339 if(!isWasmInitialized) {
14340 throw new Error("initializeWasm() must be awaited first!");
14342 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
14343 return nativeResponseValue;
14345 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
14346 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
14347 if(!isWasmInitialized) {
14348 throw new Error("initializeWasm() must be awaited first!");
14350 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
14351 // debug statements here
14353 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14354 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
14355 if(!isWasmInitialized) {
14356 throw new Error("initializeWasm() must be awaited first!");
14358 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
14359 return decodeArray(nativeResponseValue);
14361 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14362 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
14363 if(!isWasmInitialized) {
14364 throw new Error("initializeWasm() must be awaited first!");
14366 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
14367 // debug statements here
14369 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14370 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
14371 if(!isWasmInitialized) {
14372 throw new Error("initializeWasm() must be awaited first!");
14374 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
14375 return nativeResponseValue;
14377 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
14378 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
14379 if(!isWasmInitialized) {
14380 throw new Error("initializeWasm() must be awaited first!");
14382 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
14383 // debug statements here
14385 // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14386 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
14387 if(!isWasmInitialized) {
14388 throw new Error("initializeWasm() must be awaited first!");
14390 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
14391 return nativeResponseValue;
14393 // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
14394 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
14395 if(!isWasmInitialized) {
14396 throw new Error("initializeWasm() must be awaited first!");
14398 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
14399 // debug statements here
14401 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
14402 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
14403 if(!isWasmInitialized) {
14404 throw new Error("initializeWasm() must be awaited first!");
14406 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
14407 return nativeResponseValue;
14409 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
14410 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
14411 if(!isWasmInitialized) {
14412 throw new Error("initializeWasm() must be awaited first!");
14414 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
14415 // debug statements here
14417 // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
14418 export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
14419 if(!isWasmInitialized) {
14420 throw new Error("initializeWasm() must be awaited first!");
14422 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
14423 return nativeResponseValue;
14425 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
14426 export function ChannelInfo_clone(orig: number): number {
14427 if(!isWasmInitialized) {
14428 throw new Error("initializeWasm() must be awaited first!");
14430 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
14431 return nativeResponseValue;
14433 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
14434 export function ChannelInfo_write(obj: number): Uint8Array {
14435 if(!isWasmInitialized) {
14436 throw new Error("initializeWasm() must be awaited first!");
14438 const nativeResponseValue = wasm.ChannelInfo_write(obj);
14439 return decodeArray(nativeResponseValue);
14441 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
14442 export function ChannelInfo_read(ser: Uint8Array): number {
14443 if(!isWasmInitialized) {
14444 throw new Error("initializeWasm() must be awaited first!");
14446 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
14447 return nativeResponseValue;
14449 // void RoutingFees_free(struct LDKRoutingFees this_obj);
14450 export function RoutingFees_free(this_obj: number): void {
14451 if(!isWasmInitialized) {
14452 throw new Error("initializeWasm() must be awaited first!");
14454 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
14455 // debug statements here
14457 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
14458 export function RoutingFees_get_base_msat(this_ptr: number): number {
14459 if(!isWasmInitialized) {
14460 throw new Error("initializeWasm() must be awaited first!");
14462 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
14463 return nativeResponseValue;
14465 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
14466 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
14467 if(!isWasmInitialized) {
14468 throw new Error("initializeWasm() must be awaited first!");
14470 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
14471 // debug statements here
14473 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
14474 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
14475 if(!isWasmInitialized) {
14476 throw new Error("initializeWasm() must be awaited first!");
14478 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
14479 return nativeResponseValue;
14481 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
14482 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
14483 if(!isWasmInitialized) {
14484 throw new Error("initializeWasm() must be awaited first!");
14486 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
14487 // debug statements here
14489 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
14490 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
14491 if(!isWasmInitialized) {
14492 throw new Error("initializeWasm() must be awaited first!");
14494 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
14495 return nativeResponseValue;
14497 // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
14498 export function RoutingFees_eq(a: number, b: number): boolean {
14499 if(!isWasmInitialized) {
14500 throw new Error("initializeWasm() must be awaited first!");
14502 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
14503 return nativeResponseValue;
14505 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
14506 export function RoutingFees_clone(orig: number): number {
14507 if(!isWasmInitialized) {
14508 throw new Error("initializeWasm() must be awaited first!");
14510 const nativeResponseValue = wasm.RoutingFees_clone(orig);
14511 return nativeResponseValue;
14513 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
14514 export function RoutingFees_write(obj: number): Uint8Array {
14515 if(!isWasmInitialized) {
14516 throw new Error("initializeWasm() must be awaited first!");
14518 const nativeResponseValue = wasm.RoutingFees_write(obj);
14519 return decodeArray(nativeResponseValue);
14521 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
14522 export function RoutingFees_read(ser: Uint8Array): number {
14523 if(!isWasmInitialized) {
14524 throw new Error("initializeWasm() must be awaited first!");
14526 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
14527 return nativeResponseValue;
14529 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
14530 export function NodeAnnouncementInfo_free(this_obj: number): void {
14531 if(!isWasmInitialized) {
14532 throw new Error("initializeWasm() must be awaited first!");
14534 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
14535 // debug statements here
14537 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
14538 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
14539 if(!isWasmInitialized) {
14540 throw new Error("initializeWasm() must be awaited first!");
14542 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
14543 return nativeResponseValue;
14545 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
14546 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
14547 if(!isWasmInitialized) {
14548 throw new Error("initializeWasm() must be awaited first!");
14550 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
14551 // debug statements here
14553 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
14554 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
14555 if(!isWasmInitialized) {
14556 throw new Error("initializeWasm() must be awaited first!");
14558 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
14559 return nativeResponseValue;
14561 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
14562 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
14563 if(!isWasmInitialized) {
14564 throw new Error("initializeWasm() must be awaited first!");
14566 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
14567 // debug statements here
14569 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
14570 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
14571 if(!isWasmInitialized) {
14572 throw new Error("initializeWasm() must be awaited first!");
14574 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
14575 return decodeArray(nativeResponseValue);
14577 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
14578 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
14579 if(!isWasmInitialized) {
14580 throw new Error("initializeWasm() must be awaited first!");
14582 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
14583 // debug statements here
14585 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
14586 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
14587 if(!isWasmInitialized) {
14588 throw new Error("initializeWasm() must be awaited first!");
14590 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
14591 return decodeArray(nativeResponseValue);
14593 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14594 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
14595 if(!isWasmInitialized) {
14596 throw new Error("initializeWasm() must be awaited first!");
14598 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
14599 // debug statements here
14601 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
14602 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
14603 if(!isWasmInitialized) {
14604 throw new Error("initializeWasm() must be awaited first!");
14606 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
14607 // debug statements here
14609 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
14610 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
14611 if(!isWasmInitialized) {
14612 throw new Error("initializeWasm() must be awaited first!");
14614 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
14615 return nativeResponseValue;
14617 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
14618 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
14619 if(!isWasmInitialized) {
14620 throw new Error("initializeWasm() must be awaited first!");
14622 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
14623 // debug statements here
14625 // 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);
14626 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 {
14627 if(!isWasmInitialized) {
14628 throw new Error("initializeWasm() must be awaited first!");
14630 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
14631 return nativeResponseValue;
14633 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
14634 export function NodeAnnouncementInfo_clone(orig: number): number {
14635 if(!isWasmInitialized) {
14636 throw new Error("initializeWasm() must be awaited first!");
14638 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
14639 return nativeResponseValue;
14641 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
14642 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
14643 if(!isWasmInitialized) {
14644 throw new Error("initializeWasm() must be awaited first!");
14646 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
14647 return decodeArray(nativeResponseValue);
14649 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
14650 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
14651 if(!isWasmInitialized) {
14652 throw new Error("initializeWasm() must be awaited first!");
14654 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
14655 return nativeResponseValue;
14657 // void NodeInfo_free(struct LDKNodeInfo this_obj);
14658 export function NodeInfo_free(this_obj: number): void {
14659 if(!isWasmInitialized) {
14660 throw new Error("initializeWasm() must be awaited first!");
14662 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
14663 // debug statements here
14665 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
14666 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
14667 if(!isWasmInitialized) {
14668 throw new Error("initializeWasm() must be awaited first!");
14670 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
14671 // debug statements here
14673 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
14674 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
14675 if(!isWasmInitialized) {
14676 throw new Error("initializeWasm() must be awaited first!");
14678 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
14679 return nativeResponseValue;
14681 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
14682 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
14683 if(!isWasmInitialized) {
14684 throw new Error("initializeWasm() must be awaited first!");
14686 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
14687 // debug statements here
14689 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
14690 export function NodeInfo_get_announcement_info(this_ptr: number): number {
14691 if(!isWasmInitialized) {
14692 throw new Error("initializeWasm() must be awaited first!");
14694 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
14695 return nativeResponseValue;
14697 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
14698 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
14699 if(!isWasmInitialized) {
14700 throw new Error("initializeWasm() must be awaited first!");
14702 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
14703 // debug statements here
14705 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
14706 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
14707 if(!isWasmInitialized) {
14708 throw new Error("initializeWasm() must be awaited first!");
14710 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
14711 return nativeResponseValue;
14713 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
14714 export function NodeInfo_clone(orig: number): number {
14715 if(!isWasmInitialized) {
14716 throw new Error("initializeWasm() must be awaited first!");
14718 const nativeResponseValue = wasm.NodeInfo_clone(orig);
14719 return nativeResponseValue;
14721 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
14722 export function NodeInfo_write(obj: number): Uint8Array {
14723 if(!isWasmInitialized) {
14724 throw new Error("initializeWasm() must be awaited first!");
14726 const nativeResponseValue = wasm.NodeInfo_write(obj);
14727 return decodeArray(nativeResponseValue);
14729 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
14730 export function NodeInfo_read(ser: Uint8Array): number {
14731 if(!isWasmInitialized) {
14732 throw new Error("initializeWasm() must be awaited first!");
14734 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
14735 return nativeResponseValue;
14737 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
14738 export function NetworkGraph_write(obj: number): Uint8Array {
14739 if(!isWasmInitialized) {
14740 throw new Error("initializeWasm() must be awaited first!");
14742 const nativeResponseValue = wasm.NetworkGraph_write(obj);
14743 return decodeArray(nativeResponseValue);
14745 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
14746 export function NetworkGraph_read(ser: Uint8Array): number {
14747 if(!isWasmInitialized) {
14748 throw new Error("initializeWasm() must be awaited first!");
14750 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
14751 return nativeResponseValue;
14753 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
14754 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
14755 if(!isWasmInitialized) {
14756 throw new Error("initializeWasm() must be awaited first!");
14758 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
14759 return nativeResponseValue;
14761 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
14762 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
14763 if(!isWasmInitialized) {
14764 throw new Error("initializeWasm() must be awaited first!");
14766 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
14767 return nativeResponseValue;
14769 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
14770 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
14771 if(!isWasmInitialized) {
14772 throw new Error("initializeWasm() must be awaited first!");
14774 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
14775 return nativeResponseValue;
14777 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
14778 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
14779 if(!isWasmInitialized) {
14780 throw new Error("initializeWasm() must be awaited first!");
14782 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
14783 return nativeResponseValue;
14785 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
14786 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
14787 if(!isWasmInitialized) {
14788 throw new Error("initializeWasm() must be awaited first!");
14790 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
14791 return nativeResponseValue;
14793 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
14794 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
14795 if(!isWasmInitialized) {
14796 throw new Error("initializeWasm() must be awaited first!");
14798 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
14799 // debug statements here
14801 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
14802 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
14803 if(!isWasmInitialized) {
14804 throw new Error("initializeWasm() must be awaited first!");
14806 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
14807 return nativeResponseValue;
14809 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
14810 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
14811 if(!isWasmInitialized) {
14812 throw new Error("initializeWasm() must be awaited first!");
14814 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
14815 return nativeResponseValue;
14817 // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
14818 export function FilesystemPersister_free(this_obj: number): void {
14819 if(!isWasmInitialized) {
14820 throw new Error("initializeWasm() must be awaited first!");
14822 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
14823 // debug statements here
14825 // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
14826 export function FilesystemPersister_new(path_to_channel_data: String): number {
14827 if(!isWasmInitialized) {
14828 throw new Error("initializeWasm() must be awaited first!");
14830 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
14831 return nativeResponseValue;
14833 // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14834 export function FilesystemPersister_get_data_dir(this_arg: number): String {
14835 if(!isWasmInitialized) {
14836 throw new Error("initializeWasm() must be awaited first!");
14838 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
14839 return nativeResponseValue;
14841 // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
14842 export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
14843 if(!isWasmInitialized) {
14844 throw new Error("initializeWasm() must be awaited first!");
14846 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
14847 return nativeResponseValue;
14849 // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
14850 export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
14851 if(!isWasmInitialized) {
14852 throw new Error("initializeWasm() must be awaited first!");
14854 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
14855 return nativeResponseValue;
14857 // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14858 export function FilesystemPersister_as_Persist(this_arg: number): number {
14859 if(!isWasmInitialized) {
14860 throw new Error("initializeWasm() must be awaited first!");
14862 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
14863 return nativeResponseValue;
14865 // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
14866 export function BackgroundProcessor_free(this_obj: number): void {
14867 if(!isWasmInitialized) {
14868 throw new Error("initializeWasm() must be awaited first!");
14870 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
14871 // debug statements here
14873 // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
14874 export function ChannelManagerPersister_free(this_ptr: number): void {
14875 if(!isWasmInitialized) {
14876 throw new Error("initializeWasm() must be awaited first!");
14878 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
14879 // debug statements here
14881 // 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, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
14882 export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, peer_manager: number, logger: number): number {
14883 if(!isWasmInitialized) {
14884 throw new Error("initializeWasm() must be awaited first!");
14886 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, peer_manager, logger);
14887 return nativeResponseValue;
14889 // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
14890 export function BackgroundProcessor_stop(this_arg: number): number {
14891 if(!isWasmInitialized) {
14892 throw new Error("initializeWasm() must be awaited first!");
14894 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
14895 return nativeResponseValue;
14897 // void check_platform(void);
14898 export function check_platform(): void {
14899 if(!isWasmInitialized) {
14900 throw new Error("initializeWasm() must be awaited first!");
14902 const nativeResponseValue = wasm.check_platform();
14903 // debug statements here
14905 // void Invoice_free(struct LDKInvoice this_obj);
14906 export function Invoice_free(this_obj: number): void {
14907 if(!isWasmInitialized) {
14908 throw new Error("initializeWasm() must be awaited first!");
14910 const nativeResponseValue = wasm.Invoice_free(this_obj);
14911 // debug statements here
14913 // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
14914 export function Invoice_eq(a: number, b: number): boolean {
14915 if(!isWasmInitialized) {
14916 throw new Error("initializeWasm() must be awaited first!");
14918 const nativeResponseValue = wasm.Invoice_eq(a, b);
14919 return nativeResponseValue;
14921 // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
14922 export function Invoice_clone(orig: number): number {
14923 if(!isWasmInitialized) {
14924 throw new Error("initializeWasm() must be awaited first!");
14926 const nativeResponseValue = wasm.Invoice_clone(orig);
14927 return nativeResponseValue;
14929 // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
14930 export function SignedRawInvoice_free(this_obj: number): void {
14931 if(!isWasmInitialized) {
14932 throw new Error("initializeWasm() must be awaited first!");
14934 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
14935 // debug statements here
14937 // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
14938 export function SignedRawInvoice_eq(a: number, b: number): boolean {
14939 if(!isWasmInitialized) {
14940 throw new Error("initializeWasm() must be awaited first!");
14942 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
14943 return nativeResponseValue;
14945 // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
14946 export function SignedRawInvoice_clone(orig: number): number {
14947 if(!isWasmInitialized) {
14948 throw new Error("initializeWasm() must be awaited first!");
14950 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
14951 return nativeResponseValue;
14953 // void RawInvoice_free(struct LDKRawInvoice this_obj);
14954 export function RawInvoice_free(this_obj: number): void {
14955 if(!isWasmInitialized) {
14956 throw new Error("initializeWasm() must be awaited first!");
14958 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
14959 // debug statements here
14961 // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
14962 export function RawInvoice_get_data(this_ptr: number): number {
14963 if(!isWasmInitialized) {
14964 throw new Error("initializeWasm() must be awaited first!");
14966 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
14967 return nativeResponseValue;
14969 // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
14970 export function RawInvoice_set_data(this_ptr: number, val: number): void {
14971 if(!isWasmInitialized) {
14972 throw new Error("initializeWasm() must be awaited first!");
14974 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
14975 // debug statements here
14977 // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
14978 export function RawInvoice_eq(a: number, b: number): boolean {
14979 if(!isWasmInitialized) {
14980 throw new Error("initializeWasm() must be awaited first!");
14982 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
14983 return nativeResponseValue;
14985 // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
14986 export function RawInvoice_clone(orig: number): number {
14987 if(!isWasmInitialized) {
14988 throw new Error("initializeWasm() must be awaited first!");
14990 const nativeResponseValue = wasm.RawInvoice_clone(orig);
14991 return nativeResponseValue;
14993 // void RawDataPart_free(struct LDKRawDataPart this_obj);
14994 export function RawDataPart_free(this_obj: number): void {
14995 if(!isWasmInitialized) {
14996 throw new Error("initializeWasm() must be awaited first!");
14998 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
14999 // debug statements here
15001 // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
15002 export function RawDataPart_get_timestamp(this_ptr: number): number {
15003 if(!isWasmInitialized) {
15004 throw new Error("initializeWasm() must be awaited first!");
15006 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
15007 return nativeResponseValue;
15009 // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
15010 export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
15011 if(!isWasmInitialized) {
15012 throw new Error("initializeWasm() must be awaited first!");
15014 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
15015 // debug statements here
15017 // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
15018 export function RawDataPart_eq(a: number, b: number): boolean {
15019 if(!isWasmInitialized) {
15020 throw new Error("initializeWasm() must be awaited first!");
15022 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
15023 return nativeResponseValue;
15025 // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
15026 export function RawDataPart_clone(orig: number): number {
15027 if(!isWasmInitialized) {
15028 throw new Error("initializeWasm() must be awaited first!");
15030 const nativeResponseValue = wasm.RawDataPart_clone(orig);
15031 return nativeResponseValue;
15033 // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
15034 export function PositiveTimestamp_free(this_obj: number): void {
15035 if(!isWasmInitialized) {
15036 throw new Error("initializeWasm() must be awaited first!");
15038 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
15039 // debug statements here
15041 // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
15042 export function PositiveTimestamp_eq(a: number, b: number): boolean {
15043 if(!isWasmInitialized) {
15044 throw new Error("initializeWasm() must be awaited first!");
15046 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
15047 return nativeResponseValue;
15049 // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
15050 export function PositiveTimestamp_clone(orig: number): number {
15051 if(!isWasmInitialized) {
15052 throw new Error("initializeWasm() must be awaited first!");
15054 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
15055 return nativeResponseValue;
15057 // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
15058 export function SiPrefix_clone(orig: number): SiPrefix {
15059 if(!isWasmInitialized) {
15060 throw new Error("initializeWasm() must be awaited first!");
15062 const nativeResponseValue = wasm.SiPrefix_clone(orig);
15063 return nativeResponseValue;
15065 // enum LDKSiPrefix SiPrefix_milli(void);
15066 export function SiPrefix_milli(): SiPrefix {
15067 if(!isWasmInitialized) {
15068 throw new Error("initializeWasm() must be awaited first!");
15070 const nativeResponseValue = wasm.SiPrefix_milli();
15071 return nativeResponseValue;
15073 // enum LDKSiPrefix SiPrefix_micro(void);
15074 export function SiPrefix_micro(): SiPrefix {
15075 if(!isWasmInitialized) {
15076 throw new Error("initializeWasm() must be awaited first!");
15078 const nativeResponseValue = wasm.SiPrefix_micro();
15079 return nativeResponseValue;
15081 // enum LDKSiPrefix SiPrefix_nano(void);
15082 export function SiPrefix_nano(): SiPrefix {
15083 if(!isWasmInitialized) {
15084 throw new Error("initializeWasm() must be awaited first!");
15086 const nativeResponseValue = wasm.SiPrefix_nano();
15087 return nativeResponseValue;
15089 // enum LDKSiPrefix SiPrefix_pico(void);
15090 export function SiPrefix_pico(): SiPrefix {
15091 if(!isWasmInitialized) {
15092 throw new Error("initializeWasm() must be awaited first!");
15094 const nativeResponseValue = wasm.SiPrefix_pico();
15095 return nativeResponseValue;
15097 // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
15098 export function SiPrefix_eq(a: number, b: number): boolean {
15099 if(!isWasmInitialized) {
15100 throw new Error("initializeWasm() must be awaited first!");
15102 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
15103 return nativeResponseValue;
15105 // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
15106 export function SiPrefix_multiplier(this_arg: number): number {
15107 if(!isWasmInitialized) {
15108 throw new Error("initializeWasm() must be awaited first!");
15110 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
15111 return nativeResponseValue;
15113 // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
15114 export function Currency_clone(orig: number): Currency {
15115 if(!isWasmInitialized) {
15116 throw new Error("initializeWasm() must be awaited first!");
15118 const nativeResponseValue = wasm.Currency_clone(orig);
15119 return nativeResponseValue;
15121 // enum LDKCurrency Currency_bitcoin(void);
15122 export function Currency_bitcoin(): Currency {
15123 if(!isWasmInitialized) {
15124 throw new Error("initializeWasm() must be awaited first!");
15126 const nativeResponseValue = wasm.Currency_bitcoin();
15127 return nativeResponseValue;
15129 // enum LDKCurrency Currency_bitcoin_testnet(void);
15130 export function Currency_bitcoin_testnet(): Currency {
15131 if(!isWasmInitialized) {
15132 throw new Error("initializeWasm() must be awaited first!");
15134 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
15135 return nativeResponseValue;
15137 // enum LDKCurrency Currency_regtest(void);
15138 export function Currency_regtest(): Currency {
15139 if(!isWasmInitialized) {
15140 throw new Error("initializeWasm() must be awaited first!");
15142 const nativeResponseValue = wasm.Currency_regtest();
15143 return nativeResponseValue;
15145 // enum LDKCurrency Currency_simnet(void);
15146 export function Currency_simnet(): Currency {
15147 if(!isWasmInitialized) {
15148 throw new Error("initializeWasm() must be awaited first!");
15150 const nativeResponseValue = wasm.Currency_simnet();
15151 return nativeResponseValue;
15153 // enum LDKCurrency Currency_signet(void);
15154 export function Currency_signet(): Currency {
15155 if(!isWasmInitialized) {
15156 throw new Error("initializeWasm() must be awaited first!");
15158 const nativeResponseValue = wasm.Currency_signet();
15159 return nativeResponseValue;
15161 // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
15162 export function Currency_eq(a: number, b: number): boolean {
15163 if(!isWasmInitialized) {
15164 throw new Error("initializeWasm() must be awaited first!");
15166 const nativeResponseValue = wasm.Currency_eq(a, b);
15167 return nativeResponseValue;
15169 // void Sha256_free(struct LDKSha256 this_obj);
15170 export function Sha256_free(this_obj: number): void {
15171 if(!isWasmInitialized) {
15172 throw new Error("initializeWasm() must be awaited first!");
15174 const nativeResponseValue = wasm.Sha256_free(this_obj);
15175 // debug statements here
15177 // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
15178 export function Sha256_eq(a: number, b: number): boolean {
15179 if(!isWasmInitialized) {
15180 throw new Error("initializeWasm() must be awaited first!");
15182 const nativeResponseValue = wasm.Sha256_eq(a, b);
15183 return nativeResponseValue;
15185 // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
15186 export function Sha256_clone(orig: number): number {
15187 if(!isWasmInitialized) {
15188 throw new Error("initializeWasm() must be awaited first!");
15190 const nativeResponseValue = wasm.Sha256_clone(orig);
15191 return nativeResponseValue;
15193 // void Description_free(struct LDKDescription this_obj);
15194 export function Description_free(this_obj: number): void {
15195 if(!isWasmInitialized) {
15196 throw new Error("initializeWasm() must be awaited first!");
15198 const nativeResponseValue = wasm.Description_free(this_obj);
15199 // debug statements here
15201 // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
15202 export function Description_eq(a: number, b: number): boolean {
15203 if(!isWasmInitialized) {
15204 throw new Error("initializeWasm() must be awaited first!");
15206 const nativeResponseValue = wasm.Description_eq(a, b);
15207 return nativeResponseValue;
15209 // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
15210 export function Description_clone(orig: number): number {
15211 if(!isWasmInitialized) {
15212 throw new Error("initializeWasm() must be awaited first!");
15214 const nativeResponseValue = wasm.Description_clone(orig);
15215 return nativeResponseValue;
15217 // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
15218 export function PayeePubKey_free(this_obj: number): void {
15219 if(!isWasmInitialized) {
15220 throw new Error("initializeWasm() must be awaited first!");
15222 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
15223 // debug statements here
15225 // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
15226 export function PayeePubKey_eq(a: number, b: number): boolean {
15227 if(!isWasmInitialized) {
15228 throw new Error("initializeWasm() must be awaited first!");
15230 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
15231 return nativeResponseValue;
15233 // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
15234 export function PayeePubKey_clone(orig: number): number {
15235 if(!isWasmInitialized) {
15236 throw new Error("initializeWasm() must be awaited first!");
15238 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
15239 return nativeResponseValue;
15241 // void ExpiryTime_free(struct LDKExpiryTime this_obj);
15242 export function ExpiryTime_free(this_obj: number): void {
15243 if(!isWasmInitialized) {
15244 throw new Error("initializeWasm() must be awaited first!");
15246 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
15247 // debug statements here
15249 // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
15250 export function ExpiryTime_eq(a: number, b: number): boolean {
15251 if(!isWasmInitialized) {
15252 throw new Error("initializeWasm() must be awaited first!");
15254 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
15255 return nativeResponseValue;
15257 // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
15258 export function ExpiryTime_clone(orig: number): number {
15259 if(!isWasmInitialized) {
15260 throw new Error("initializeWasm() must be awaited first!");
15262 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
15263 return nativeResponseValue;
15265 // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
15266 export function MinFinalCltvExpiry_free(this_obj: number): void {
15267 if(!isWasmInitialized) {
15268 throw new Error("initializeWasm() must be awaited first!");
15270 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
15271 // debug statements here
15273 // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
15274 export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
15275 if(!isWasmInitialized) {
15276 throw new Error("initializeWasm() must be awaited first!");
15278 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
15279 return nativeResponseValue;
15281 // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
15282 export function MinFinalCltvExpiry_clone(orig: number): number {
15283 if(!isWasmInitialized) {
15284 throw new Error("initializeWasm() must be awaited first!");
15286 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
15287 return nativeResponseValue;
15289 // void Fallback_free(struct LDKFallback this_ptr);
15290 export function Fallback_free(this_ptr: number): void {
15291 if(!isWasmInitialized) {
15292 throw new Error("initializeWasm() must be awaited first!");
15294 const nativeResponseValue = wasm.Fallback_free(this_ptr);
15295 // debug statements here
15297 // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
15298 export function Fallback_clone(orig: number): number {
15299 if(!isWasmInitialized) {
15300 throw new Error("initializeWasm() must be awaited first!");
15302 const nativeResponseValue = wasm.Fallback_clone(orig);
15303 return nativeResponseValue;
15305 // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
15306 export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
15307 if(!isWasmInitialized) {
15308 throw new Error("initializeWasm() must be awaited first!");
15310 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
15311 return nativeResponseValue;
15313 // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
15314 export function Fallback_pub_key_hash(a: Uint8Array): number {
15315 if(!isWasmInitialized) {
15316 throw new Error("initializeWasm() must be awaited first!");
15318 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
15319 return nativeResponseValue;
15321 // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
15322 export function Fallback_script_hash(a: Uint8Array): number {
15323 if(!isWasmInitialized) {
15324 throw new Error("initializeWasm() must be awaited first!");
15326 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
15327 return nativeResponseValue;
15329 // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
15330 export function Fallback_eq(a: number, b: number): boolean {
15331 if(!isWasmInitialized) {
15332 throw new Error("initializeWasm() must be awaited first!");
15334 const nativeResponseValue = wasm.Fallback_eq(a, b);
15335 return nativeResponseValue;
15337 // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
15338 export function InvoiceSignature_free(this_obj: number): void {
15339 if(!isWasmInitialized) {
15340 throw new Error("initializeWasm() must be awaited first!");
15342 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
15343 // debug statements here
15345 // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
15346 export function InvoiceSignature_eq(a: number, b: number): boolean {
15347 if(!isWasmInitialized) {
15348 throw new Error("initializeWasm() must be awaited first!");
15350 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
15351 return nativeResponseValue;
15353 // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
15354 export function InvoiceSignature_clone(orig: number): number {
15355 if(!isWasmInitialized) {
15356 throw new Error("initializeWasm() must be awaited first!");
15358 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
15359 return nativeResponseValue;
15361 // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
15362 export function PrivateRoute_free(this_obj: number): void {
15363 if(!isWasmInitialized) {
15364 throw new Error("initializeWasm() must be awaited first!");
15366 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
15367 // debug statements here
15369 // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
15370 export function PrivateRoute_eq(a: number, b: number): boolean {
15371 if(!isWasmInitialized) {
15372 throw new Error("initializeWasm() must be awaited first!");
15374 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
15375 return nativeResponseValue;
15377 // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
15378 export function PrivateRoute_clone(orig: number): number {
15379 if(!isWasmInitialized) {
15380 throw new Error("initializeWasm() must be awaited first!");
15382 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
15383 return nativeResponseValue;
15385 // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
15386 export function SignedRawInvoice_into_parts(this_arg: number): number {
15387 if(!isWasmInitialized) {
15388 throw new Error("initializeWasm() must be awaited first!");
15390 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
15391 return nativeResponseValue;
15393 // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15394 export function SignedRawInvoice_raw_invoice(this_arg: number): number {
15395 if(!isWasmInitialized) {
15396 throw new Error("initializeWasm() must be awaited first!");
15398 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
15399 return nativeResponseValue;
15401 // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
15402 export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
15403 if(!isWasmInitialized) {
15404 throw new Error("initializeWasm() must be awaited first!");
15406 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
15407 return decodeArray(nativeResponseValue);
15409 // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15410 export function SignedRawInvoice_signature(this_arg: number): number {
15411 if(!isWasmInitialized) {
15412 throw new Error("initializeWasm() must be awaited first!");
15414 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
15415 return nativeResponseValue;
15417 // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15418 export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
15419 if(!isWasmInitialized) {
15420 throw new Error("initializeWasm() must be awaited first!");
15422 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
15423 return nativeResponseValue;
15425 // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
15426 export function SignedRawInvoice_check_signature(this_arg: number): boolean {
15427 if(!isWasmInitialized) {
15428 throw new Error("initializeWasm() must be awaited first!");
15430 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
15431 return nativeResponseValue;
15433 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15434 export function RawInvoice_hash(this_arg: number): Uint8Array {
15435 if(!isWasmInitialized) {
15436 throw new Error("initializeWasm() must be awaited first!");
15438 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
15439 return decodeArray(nativeResponseValue);
15441 // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15442 export function RawInvoice_payment_hash(this_arg: number): number {
15443 if(!isWasmInitialized) {
15444 throw new Error("initializeWasm() must be awaited first!");
15446 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
15447 return nativeResponseValue;
15449 // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15450 export function RawInvoice_description(this_arg: number): number {
15451 if(!isWasmInitialized) {
15452 throw new Error("initializeWasm() must be awaited first!");
15454 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
15455 return nativeResponseValue;
15457 // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15458 export function RawInvoice_payee_pub_key(this_arg: number): number {
15459 if(!isWasmInitialized) {
15460 throw new Error("initializeWasm() must be awaited first!");
15462 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
15463 return nativeResponseValue;
15465 // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15466 export function RawInvoice_description_hash(this_arg: number): number {
15467 if(!isWasmInitialized) {
15468 throw new Error("initializeWasm() must be awaited first!");
15470 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
15471 return nativeResponseValue;
15473 // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15474 export function RawInvoice_expiry_time(this_arg: number): number {
15475 if(!isWasmInitialized) {
15476 throw new Error("initializeWasm() must be awaited first!");
15478 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
15479 return nativeResponseValue;
15481 // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15482 export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
15483 if(!isWasmInitialized) {
15484 throw new Error("initializeWasm() must be awaited first!");
15486 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
15487 return nativeResponseValue;
15489 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15490 export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
15491 if(!isWasmInitialized) {
15492 throw new Error("initializeWasm() must be awaited first!");
15494 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
15495 return decodeArray(nativeResponseValue);
15497 // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15498 export function RawInvoice_features(this_arg: number): number {
15499 if(!isWasmInitialized) {
15500 throw new Error("initializeWasm() must be awaited first!");
15502 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
15503 return nativeResponseValue;
15505 // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15506 export function RawInvoice_private_routes(this_arg: number): number[] {
15507 if(!isWasmInitialized) {
15508 throw new Error("initializeWasm() must be awaited first!");
15510 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
15511 return nativeResponseValue;
15513 // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15514 export function RawInvoice_amount_pico_btc(this_arg: number): number {
15515 if(!isWasmInitialized) {
15516 throw new Error("initializeWasm() must be awaited first!");
15518 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
15519 return nativeResponseValue;
15521 // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
15522 export function RawInvoice_currency(this_arg: number): Currency {
15523 if(!isWasmInitialized) {
15524 throw new Error("initializeWasm() must be awaited first!");
15526 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
15527 return nativeResponseValue;
15529 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
15530 export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
15531 if(!isWasmInitialized) {
15532 throw new Error("initializeWasm() must be awaited first!");
15534 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
15535 return nativeResponseValue;
15537 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
15538 export function PositiveTimestamp_from_system_time(time: number): number {
15539 if(!isWasmInitialized) {
15540 throw new Error("initializeWasm() must be awaited first!");
15542 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
15543 return nativeResponseValue;
15545 // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
15546 export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
15547 if(!isWasmInitialized) {
15548 throw new Error("initializeWasm() must be awaited first!");
15550 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
15551 return nativeResponseValue;
15553 // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
15554 export function PositiveTimestamp_as_time(this_arg: number): number {
15555 if(!isWasmInitialized) {
15556 throw new Error("initializeWasm() must be awaited first!");
15558 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
15559 return nativeResponseValue;
15561 // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
15562 export function Invoice_into_signed_raw(this_arg: number): number {
15563 if(!isWasmInitialized) {
15564 throw new Error("initializeWasm() must be awaited first!");
15566 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
15567 return nativeResponseValue;
15569 // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
15570 export function Invoice_check_signature(this_arg: number): number {
15571 if(!isWasmInitialized) {
15572 throw new Error("initializeWasm() must be awaited first!");
15574 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
15575 return nativeResponseValue;
15577 // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
15578 export function Invoice_from_signed(signed_invoice: number): number {
15579 if(!isWasmInitialized) {
15580 throw new Error("initializeWasm() must be awaited first!");
15582 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
15583 return nativeResponseValue;
15585 // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
15586 export function Invoice_timestamp(this_arg: number): number {
15587 if(!isWasmInitialized) {
15588 throw new Error("initializeWasm() must be awaited first!");
15590 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
15591 return nativeResponseValue;
15593 // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
15594 export function Invoice_payment_hash(this_arg: number): Uint8Array {
15595 if(!isWasmInitialized) {
15596 throw new Error("initializeWasm() must be awaited first!");
15598 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
15599 return decodeArray(nativeResponseValue);
15601 // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
15602 export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
15603 if(!isWasmInitialized) {
15604 throw new Error("initializeWasm() must be awaited first!");
15606 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
15607 return decodeArray(nativeResponseValue);
15609 // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
15610 export function Invoice_payment_secret(this_arg: number): Uint8Array {
15611 if(!isWasmInitialized) {
15612 throw new Error("initializeWasm() must be awaited first!");
15614 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
15615 return decodeArray(nativeResponseValue);
15617 // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
15618 export function Invoice_features(this_arg: number): number {
15619 if(!isWasmInitialized) {
15620 throw new Error("initializeWasm() must be awaited first!");
15622 const nativeResponseValue = wasm.Invoice_features(this_arg);
15623 return nativeResponseValue;
15625 // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
15626 export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
15627 if(!isWasmInitialized) {
15628 throw new Error("initializeWasm() must be awaited first!");
15630 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
15631 return decodeArray(nativeResponseValue);
15633 // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
15634 export function Invoice_expiry_time(this_arg: number): number {
15635 if(!isWasmInitialized) {
15636 throw new Error("initializeWasm() must be awaited first!");
15638 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
15639 return nativeResponseValue;
15641 // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
15642 export function Invoice_min_final_cltv_expiry(this_arg: number): number {
15643 if(!isWasmInitialized) {
15644 throw new Error("initializeWasm() must be awaited first!");
15646 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
15647 return nativeResponseValue;
15649 // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
15650 export function Invoice_private_routes(this_arg: number): number[] {
15651 if(!isWasmInitialized) {
15652 throw new Error("initializeWasm() must be awaited first!");
15654 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
15655 return nativeResponseValue;
15657 // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
15658 export function Invoice_route_hints(this_arg: number): number[] {
15659 if(!isWasmInitialized) {
15660 throw new Error("initializeWasm() must be awaited first!");
15662 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
15663 return nativeResponseValue;
15665 // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
15666 export function Invoice_currency(this_arg: number): Currency {
15667 if(!isWasmInitialized) {
15668 throw new Error("initializeWasm() must be awaited first!");
15670 const nativeResponseValue = wasm.Invoice_currency(this_arg);
15671 return nativeResponseValue;
15673 // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
15674 export function Invoice_amount_pico_btc(this_arg: number): number {
15675 if(!isWasmInitialized) {
15676 throw new Error("initializeWasm() must be awaited first!");
15678 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
15679 return nativeResponseValue;
15681 // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
15682 export function Description_new(description: String): number {
15683 if(!isWasmInitialized) {
15684 throw new Error("initializeWasm() must be awaited first!");
15686 const nativeResponseValue = wasm.Description_new(description);
15687 return nativeResponseValue;
15689 // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
15690 export function Description_into_inner(this_arg: number): String {
15691 if(!isWasmInitialized) {
15692 throw new Error("initializeWasm() must be awaited first!");
15694 const nativeResponseValue = wasm.Description_into_inner(this_arg);
15695 return nativeResponseValue;
15697 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
15698 export function ExpiryTime_from_seconds(seconds: number): number {
15699 if(!isWasmInitialized) {
15700 throw new Error("initializeWasm() must be awaited first!");
15702 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
15703 return nativeResponseValue;
15705 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
15706 export function ExpiryTime_from_duration(duration: number): number {
15707 if(!isWasmInitialized) {
15708 throw new Error("initializeWasm() must be awaited first!");
15710 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
15711 return nativeResponseValue;
15713 // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
15714 export function ExpiryTime_as_seconds(this_arg: number): number {
15715 if(!isWasmInitialized) {
15716 throw new Error("initializeWasm() must be awaited first!");
15718 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
15719 return nativeResponseValue;
15721 // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
15722 export function ExpiryTime_as_duration(this_arg: number): number {
15723 if(!isWasmInitialized) {
15724 throw new Error("initializeWasm() must be awaited first!");
15726 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
15727 return nativeResponseValue;
15729 // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
15730 export function PrivateRoute_new(hops: number): number {
15731 if(!isWasmInitialized) {
15732 throw new Error("initializeWasm() must be awaited first!");
15734 const nativeResponseValue = wasm.PrivateRoute_new(hops);
15735 return nativeResponseValue;
15737 // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
15738 export function PrivateRoute_into_inner(this_arg: number): number {
15739 if(!isWasmInitialized) {
15740 throw new Error("initializeWasm() must be awaited first!");
15742 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
15743 return nativeResponseValue;
15745 // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
15746 export function CreationError_clone(orig: number): CreationError {
15747 if(!isWasmInitialized) {
15748 throw new Error("initializeWasm() must be awaited first!");
15750 const nativeResponseValue = wasm.CreationError_clone(orig);
15751 return nativeResponseValue;
15753 // enum LDKCreationError CreationError_description_too_long(void);
15754 export function CreationError_description_too_long(): CreationError {
15755 if(!isWasmInitialized) {
15756 throw new Error("initializeWasm() must be awaited first!");
15758 const nativeResponseValue = wasm.CreationError_description_too_long();
15759 return nativeResponseValue;
15761 // enum LDKCreationError CreationError_route_too_long(void);
15762 export function CreationError_route_too_long(): CreationError {
15763 if(!isWasmInitialized) {
15764 throw new Error("initializeWasm() must be awaited first!");
15766 const nativeResponseValue = wasm.CreationError_route_too_long();
15767 return nativeResponseValue;
15769 // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
15770 export function CreationError_timestamp_out_of_bounds(): CreationError {
15771 if(!isWasmInitialized) {
15772 throw new Error("initializeWasm() must be awaited first!");
15774 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
15775 return nativeResponseValue;
15777 // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
15778 export function CreationError_expiry_time_out_of_bounds(): CreationError {
15779 if(!isWasmInitialized) {
15780 throw new Error("initializeWasm() must be awaited first!");
15782 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
15783 return nativeResponseValue;
15785 // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
15786 export function CreationError_eq(a: number, b: number): boolean {
15787 if(!isWasmInitialized) {
15788 throw new Error("initializeWasm() must be awaited first!");
15790 const nativeResponseValue = wasm.CreationError_eq(a, b);
15791 return nativeResponseValue;
15793 // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
15794 export function CreationError_to_str(o: number): String {
15795 if(!isWasmInitialized) {
15796 throw new Error("initializeWasm() must be awaited first!");
15798 const nativeResponseValue = wasm.CreationError_to_str(o);
15799 return nativeResponseValue;
15801 // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
15802 export function SemanticError_clone(orig: number): SemanticError {
15803 if(!isWasmInitialized) {
15804 throw new Error("initializeWasm() must be awaited first!");
15806 const nativeResponseValue = wasm.SemanticError_clone(orig);
15807 return nativeResponseValue;
15809 // enum LDKSemanticError SemanticError_no_payment_hash(void);
15810 export function SemanticError_no_payment_hash(): SemanticError {
15811 if(!isWasmInitialized) {
15812 throw new Error("initializeWasm() must be awaited first!");
15814 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
15815 return nativeResponseValue;
15817 // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
15818 export function SemanticError_multiple_payment_hashes(): SemanticError {
15819 if(!isWasmInitialized) {
15820 throw new Error("initializeWasm() must be awaited first!");
15822 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
15823 return nativeResponseValue;
15825 // enum LDKSemanticError SemanticError_no_description(void);
15826 export function SemanticError_no_description(): SemanticError {
15827 if(!isWasmInitialized) {
15828 throw new Error("initializeWasm() must be awaited first!");
15830 const nativeResponseValue = wasm.SemanticError_no_description();
15831 return nativeResponseValue;
15833 // enum LDKSemanticError SemanticError_multiple_descriptions(void);
15834 export function SemanticError_multiple_descriptions(): SemanticError {
15835 if(!isWasmInitialized) {
15836 throw new Error("initializeWasm() must be awaited first!");
15838 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
15839 return nativeResponseValue;
15841 // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
15842 export function SemanticError_multiple_payment_secrets(): SemanticError {
15843 if(!isWasmInitialized) {
15844 throw new Error("initializeWasm() must be awaited first!");
15846 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
15847 return nativeResponseValue;
15849 // enum LDKSemanticError SemanticError_invalid_features(void);
15850 export function SemanticError_invalid_features(): SemanticError {
15851 if(!isWasmInitialized) {
15852 throw new Error("initializeWasm() must be awaited first!");
15854 const nativeResponseValue = wasm.SemanticError_invalid_features();
15855 return nativeResponseValue;
15857 // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
15858 export function SemanticError_invalid_recovery_id(): SemanticError {
15859 if(!isWasmInitialized) {
15860 throw new Error("initializeWasm() must be awaited first!");
15862 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
15863 return nativeResponseValue;
15865 // enum LDKSemanticError SemanticError_invalid_signature(void);
15866 export function SemanticError_invalid_signature(): SemanticError {
15867 if(!isWasmInitialized) {
15868 throw new Error("initializeWasm() must be awaited first!");
15870 const nativeResponseValue = wasm.SemanticError_invalid_signature();
15871 return nativeResponseValue;
15873 // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
15874 export function SemanticError_eq(a: number, b: number): boolean {
15875 if(!isWasmInitialized) {
15876 throw new Error("initializeWasm() must be awaited first!");
15878 const nativeResponseValue = wasm.SemanticError_eq(a, b);
15879 return nativeResponseValue;
15881 // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
15882 export function SemanticError_to_str(o: number): String {
15883 if(!isWasmInitialized) {
15884 throw new Error("initializeWasm() must be awaited first!");
15886 const nativeResponseValue = wasm.SemanticError_to_str(o);
15887 return nativeResponseValue;
15889 // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
15890 export function SignOrCreationError_free(this_ptr: number): void {
15891 if(!isWasmInitialized) {
15892 throw new Error("initializeWasm() must be awaited first!");
15894 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
15895 // debug statements here
15897 // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
15898 export function SignOrCreationError_clone(orig: number): number {
15899 if(!isWasmInitialized) {
15900 throw new Error("initializeWasm() must be awaited first!");
15902 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
15903 return nativeResponseValue;
15905 // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
15906 export function SignOrCreationError_sign_error(): number {
15907 if(!isWasmInitialized) {
15908 throw new Error("initializeWasm() must be awaited first!");
15910 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
15911 return nativeResponseValue;
15913 // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
15914 export function SignOrCreationError_creation_error(a: CreationError): number {
15915 if(!isWasmInitialized) {
15916 throw new Error("initializeWasm() must be awaited first!");
15918 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
15919 return nativeResponseValue;
15921 // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
15922 export function SignOrCreationError_eq(a: number, b: number): boolean {
15923 if(!isWasmInitialized) {
15924 throw new Error("initializeWasm() must be awaited first!");
15926 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
15927 return nativeResponseValue;
15929 // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
15930 export function SignOrCreationError_to_str(o: number): String {
15931 if(!isWasmInitialized) {
15932 throw new Error("initializeWasm() must be awaited first!");
15934 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
15935 return nativeResponseValue;
15937 // 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);
15938 export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
15939 if(!isWasmInitialized) {
15940 throw new Error("initializeWasm() must be awaited first!");
15942 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
15943 return nativeResponseValue;
15945 // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
15946 export function SiPrefix_from_str(s: String): number {
15947 if(!isWasmInitialized) {
15948 throw new Error("initializeWasm() must be awaited first!");
15950 const nativeResponseValue = wasm.SiPrefix_from_str(s);
15951 return nativeResponseValue;
15953 // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
15954 export function Invoice_from_str(s: String): number {
15955 if(!isWasmInitialized) {
15956 throw new Error("initializeWasm() must be awaited first!");
15958 const nativeResponseValue = wasm.Invoice_from_str(s);
15959 return nativeResponseValue;
15961 // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
15962 export function SignedRawInvoice_from_str(s: String): number {
15963 if(!isWasmInitialized) {
15964 throw new Error("initializeWasm() must be awaited first!");
15966 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
15967 return nativeResponseValue;
15969 // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
15970 export function Invoice_to_str(o: number): String {
15971 if(!isWasmInitialized) {
15972 throw new Error("initializeWasm() must be awaited first!");
15974 const nativeResponseValue = wasm.Invoice_to_str(o);
15975 return nativeResponseValue;
15977 // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
15978 export function SignedRawInvoice_to_str(o: number): String {
15979 if(!isWasmInitialized) {
15980 throw new Error("initializeWasm() must be awaited first!");
15982 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
15983 return nativeResponseValue;
15985 // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
15986 export function Currency_to_str(o: number): String {
15987 if(!isWasmInitialized) {
15988 throw new Error("initializeWasm() must be awaited first!");
15990 const nativeResponseValue = wasm.Currency_to_str(o);
15991 return nativeResponseValue;
15993 // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
15994 export function SiPrefix_to_str(o: number): String {
15995 if(!isWasmInitialized) {
15996 throw new Error("initializeWasm() must be awaited first!");
15998 const nativeResponseValue = wasm.SiPrefix_to_str(o);
15999 return nativeResponseValue;
16002 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
16003 if(isWasmInitialized && !allowDoubleInitialization) {
16006 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
16007 wasm = wasmInstance.exports;
16008 isWasmInitialized = true;