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 public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
156 public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
157 public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
158 public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
159 public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
160 public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
161 public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
162 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
163 public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
164 public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
165 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
166 public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
167 public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
168 public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
169 public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
170 public static class LDKCOption_u32Z {
171 private LDKCOption_u32Z() {}
172 export class Some extends LDKCOption_u32Z {
174 Some(number some) { this.some = some; }
176 export class None extends LDKCOption_u32Z {
179 static native void init();
181 static { LDKCOption_u32Z.init(); }
182 public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
183 public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
184 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
185 public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
186 public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
187 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
188 public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
189 public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
190 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
191 public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
192 public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
193 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
194 public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
195 public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
196 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
197 public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
198 public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
199 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
200 public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
201 public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
202 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
203 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
204 public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
205 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
206 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
207 public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
208 public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
209 public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
210 public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
211 public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
212 public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
213 public static native long LDKCVec_RouteHopZ_new(number[] elems);
214 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
215 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
216 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
217 public static class LDKCOption_u64Z {
218 private LDKCOption_u64Z() {}
219 export class Some extends LDKCOption_u64Z {
221 Some(number some) { this.some = some; }
223 export class None extends LDKCOption_u64Z {
226 static native void init();
228 static { LDKCOption_u64Z.init(); }
229 public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
230 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
231 public static native long LDKCVec_RouteHintZ_new(number[] elems);
232 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
233 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
234 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
235 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
236 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
237 public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
238 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
239 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
240 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
241 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
242 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
243 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
244 public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
245 public static class LDKMonitorEvent {
246 private LDKMonitorEvent() {}
247 export class HTLCEvent extends LDKMonitorEvent {
248 public number htlc_event;
249 HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
251 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
252 public number commitment_tx_broadcasted;
253 CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
255 static native void init();
257 static { LDKMonitorEvent.init(); }
258 public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
259 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
260 public static class LDKCOption_C2Tuple_usizeTransactionZZ {
261 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
262 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
264 Some(number some) { this.some = some; }
266 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
269 static native void init();
271 static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
272 public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
273 public static class LDKSpendableOutputDescriptor {
274 private LDKSpendableOutputDescriptor() {}
275 export class StaticOutput extends LDKSpendableOutputDescriptor {
276 public number outpoint;
277 public number output;
278 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
280 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
281 public number delayed_payment_output;
282 DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
284 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
285 public number static_payment_output;
286 StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
288 static native void init();
290 static { LDKSpendableOutputDescriptor.init(); }
291 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
292 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
293 public static class LDKErrorAction {
294 private LDKErrorAction() {}
295 export class DisconnectPeer extends LDKErrorAction {
297 DisconnectPeer(number msg) { this.msg = msg; }
299 export class IgnoreError extends LDKErrorAction {
302 export class IgnoreAndLog extends LDKErrorAction {
303 public Level ignore_and_log;
304 IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
306 export class SendErrorMessage extends LDKErrorAction {
308 SendErrorMessage(number msg) { this.msg = msg; }
310 static native void init();
312 static { LDKErrorAction.init(); }
313 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
314 public static class LDKHTLCFailChannelUpdate {
315 private LDKHTLCFailChannelUpdate() {}
316 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
318 ChannelUpdateMessage(number msg) { this.msg = msg; }
320 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
321 public number short_channel_id;
322 public boolean is_permanent;
323 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
325 export class NodeFailure extends LDKHTLCFailChannelUpdate {
326 public Uint8Array node_id;
327 public boolean is_permanent;
328 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
330 static native void init();
332 static { LDKHTLCFailChannelUpdate.init(); }
333 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
334 public static class LDKMessageSendEvent {
335 private LDKMessageSendEvent() {}
336 export class SendAcceptChannel extends LDKMessageSendEvent {
337 public Uint8Array node_id;
339 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
341 export class SendOpenChannel extends LDKMessageSendEvent {
342 public Uint8Array node_id;
344 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
346 export class SendFundingCreated extends LDKMessageSendEvent {
347 public Uint8Array node_id;
349 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
351 export class SendFundingSigned extends LDKMessageSendEvent {
352 public Uint8Array node_id;
354 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
356 export class SendFundingLocked extends LDKMessageSendEvent {
357 public Uint8Array node_id;
359 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
361 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
362 public Uint8Array node_id;
364 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
366 export class UpdateHTLCs extends LDKMessageSendEvent {
367 public Uint8Array node_id;
368 public number updates;
369 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
371 export class SendRevokeAndACK extends LDKMessageSendEvent {
372 public Uint8Array node_id;
374 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
376 export class SendClosingSigned extends LDKMessageSendEvent {
377 public Uint8Array node_id;
379 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
381 export class SendShutdown extends LDKMessageSendEvent {
382 public Uint8Array node_id;
384 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
386 export class SendChannelReestablish extends LDKMessageSendEvent {
387 public Uint8Array node_id;
389 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
391 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
393 public number update_msg;
394 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
396 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
398 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
400 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
402 BroadcastChannelUpdate(number msg) { this.msg = msg; }
404 export class SendChannelUpdate extends LDKMessageSendEvent {
405 public Uint8Array node_id;
407 SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
409 export class HandleError extends LDKMessageSendEvent {
410 public Uint8Array node_id;
411 public number action;
412 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
414 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
415 public number update;
416 PaymentFailureNetworkUpdate(number update) { this.update = update; }
418 export class SendChannelRangeQuery extends LDKMessageSendEvent {
419 public Uint8Array node_id;
421 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
423 export class SendShortIdsQuery extends LDKMessageSendEvent {
424 public Uint8Array node_id;
426 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
428 export class SendReplyChannelRange extends LDKMessageSendEvent {
429 public Uint8Array node_id;
431 SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
433 static native void init();
435 static { LDKMessageSendEvent.init(); }
436 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
437 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
438 public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
439 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
440 public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
441 public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
442 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
443 public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
444 public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
445 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
446 public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
447 public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
448 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
449 public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
450 public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
451 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
452 public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
453 public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
454 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
455 public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
456 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
457 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
458 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
459 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
460 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
461 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
462 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
463 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
464 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
465 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
466 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
467 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
471 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
473 export interface LDKBaseSign {
474 get_per_commitment_point (idx: number): Uint8Array;
475 release_commitment_secret (idx: number): Uint8Array;
476 channel_keys_id (): Uint8Array;
477 sign_counterparty_commitment (commitment_tx: number): number;
478 sign_holder_commitment_and_htlcs (commitment_tx: number): number;
479 sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
480 sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
481 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
482 sign_closing_transaction (closing_tx: Uint8Array): number;
483 sign_channel_announcement (msg: number): number;
484 ready_channel (channel_parameters: number): void;
487 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
488 throw new Error('unimplemented'); // TODO: bind to WASM
491 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
494 // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
495 export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
496 if(!isWasmInitialized) {
497 throw new Error("initializeWasm() must be awaited first!");
499 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
500 return decodeArray(nativeResponseValue);
502 // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
503 export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
504 if(!isWasmInitialized) {
505 throw new Error("initializeWasm() must be awaited first!");
507 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
508 return decodeArray(nativeResponseValue);
510 // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
511 export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
512 if(!isWasmInitialized) {
513 throw new Error("initializeWasm() must be awaited first!");
515 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
516 return decodeArray(nativeResponseValue);
518 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
519 export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
520 if(!isWasmInitialized) {
521 throw new Error("initializeWasm() must be awaited first!");
523 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
524 return nativeResponseValue;
526 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
527 export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
528 if(!isWasmInitialized) {
529 throw new Error("initializeWasm() must be awaited first!");
531 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
532 return nativeResponseValue;
534 // 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]
535 export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
536 if(!isWasmInitialized) {
537 throw new Error("initializeWasm() must be awaited first!");
539 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
540 return nativeResponseValue;
542 // 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
543 export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
544 if(!isWasmInitialized) {
545 throw new Error("initializeWasm() must be awaited first!");
547 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
548 return nativeResponseValue;
550 // 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
551 export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
552 if(!isWasmInitialized) {
553 throw new Error("initializeWasm() must be awaited first!");
555 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
556 return nativeResponseValue;
558 // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
559 export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
560 if(!isWasmInitialized) {
561 throw new Error("initializeWasm() must be awaited first!");
563 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
564 return nativeResponseValue;
566 // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
567 export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
568 if(!isWasmInitialized) {
569 throw new Error("initializeWasm() must be awaited first!");
571 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
572 return nativeResponseValue;
574 // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
575 export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
576 if(!isWasmInitialized) {
577 throw new Error("initializeWasm() must be awaited first!");
579 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
580 // debug statements here
582 // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
583 export function BaseSign_get_pubkeys(this_arg: number): number {
584 if(!isWasmInitialized) {
585 throw new Error("initializeWasm() must be awaited first!");
587 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
588 return nativeResponseValue;
593 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
595 export interface LDKSign {
596 write (): Uint8Array;
599 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
600 throw new Error('unimplemented'); // TODO: bind to WASM
603 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
606 // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
607 export function Sign_write(this_arg: number): Uint8Array {
608 if(!isWasmInitialized) {
609 throw new Error("initializeWasm() must be awaited first!");
611 const nativeResponseValue = wasm.Sign_write(this_arg);
612 return decodeArray(nativeResponseValue);
614 public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
615 public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
616 public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
617 public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
618 public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
619 public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
620 public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
621 public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
622 public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
623 public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
624 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
625 public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
626 public static native long LDKCVec_TxOutZ_new(number[] elems);
627 public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
628 public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
629 public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
630 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
631 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
632 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
633 public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
634 public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
635 public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
636 public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
637 public static class LDKCOption_u16Z {
638 private LDKCOption_u16Z() {}
639 export class Some extends LDKCOption_u16Z {
641 Some(number some) { this.some = some; }
643 export class None extends LDKCOption_u16Z {
646 static native void init();
648 static { LDKCOption_u16Z.init(); }
649 public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
650 public static class LDKAPIError {
651 private LDKAPIError() {}
652 export class APIMisuseError extends LDKAPIError {
654 APIMisuseError(String err) { this.err = err; }
656 export class FeeRateTooHigh extends LDKAPIError {
658 public number feerate;
659 FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
661 export class RouteError extends LDKAPIError {
663 RouteError(String err) { this.err = err; }
665 export class ChannelUnavailable extends LDKAPIError {
667 ChannelUnavailable(String err) { this.err = err; }
669 export class MonitorUpdateFailed extends LDKAPIError {
670 MonitorUpdateFailed() { }
672 static native void init();
674 static { LDKAPIError.init(); }
675 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
676 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
677 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
678 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
679 public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
680 public static native long LDKCVec_APIErrorZ_new(number[] elems);
681 public static class LDKPaymentSendFailure {
682 private LDKPaymentSendFailure() {}
683 export class ParameterError extends LDKPaymentSendFailure {
684 public number parameter_error;
685 ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
687 export class PathParameterError extends LDKPaymentSendFailure {
688 public number[] path_parameter_error;
689 PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
691 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
692 public number[] all_failed_retry_safe;
693 AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
695 export class PartialFailure extends LDKPaymentSendFailure {
696 public number[] partial_failure;
697 PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
699 static native void init();
701 static { LDKPaymentSendFailure.init(); }
702 public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
703 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
704 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
705 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
706 public static class LDKNetAddress {
707 private LDKNetAddress() {}
708 export class IPv4 extends LDKNetAddress {
709 public Uint8Array addr;
711 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
713 export class IPv6 extends LDKNetAddress {
714 public Uint8Array addr;
716 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
718 export class OnionV2 extends LDKNetAddress {
719 public Uint8Array addr;
721 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
723 export class OnionV3 extends LDKNetAddress {
724 public Uint8Array ed25519_pubkey;
725 public number checksum;
726 public number version;
728 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
730 static native void init();
732 static { LDKNetAddress.init(); }
733 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
734 public static native long LDKCVec_NetAddressZ_new(number[] elems);
735 public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
736 public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_a(long ptr);
737 public static native Uint8Array LDKC2Tuple_PaymentHashPaymentSecretZ_get_b(long ptr);
738 public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
739 public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
740 public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
741 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
745 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
747 export interface LDKWatch {
748 watch_channel (funding_txo: number, monitor: number): number;
749 update_channel (funding_txo: number, update: number): number;
750 release_pending_monitor_events (): number[];
753 export function LDKWatch_new(impl: LDKWatch): number {
754 throw new Error('unimplemented'); // TODO: bind to WASM
757 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
760 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
761 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
762 if(!isWasmInitialized) {
763 throw new Error("initializeWasm() must be awaited first!");
765 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
766 return nativeResponseValue;
768 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
769 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
770 if(!isWasmInitialized) {
771 throw new Error("initializeWasm() must be awaited first!");
773 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
774 return nativeResponseValue;
776 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
777 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
778 if(!isWasmInitialized) {
779 throw new Error("initializeWasm() must be awaited first!");
781 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
782 return nativeResponseValue;
787 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
789 export interface LDKBroadcasterInterface {
790 broadcast_transaction (tx: Uint8Array): void;
793 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
794 throw new Error('unimplemented'); // TODO: bind to WASM
797 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
800 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
801 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
802 if(!isWasmInitialized) {
803 throw new Error("initializeWasm() must be awaited first!");
805 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
806 // debug statements here
811 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
813 export interface LDKKeysInterface {
814 get_node_secret (): Uint8Array;
815 get_destination_script (): Uint8Array;
816 get_shutdown_pubkey (): Uint8Array;
817 get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
818 get_secure_random_bytes (): Uint8Array;
819 read_chan_signer (reader: Uint8Array): number;
820 sign_invoice (invoice_preimage: Uint8Array): number;
823 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
824 throw new Error('unimplemented'); // TODO: bind to WASM
827 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
830 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
831 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
832 if(!isWasmInitialized) {
833 throw new Error("initializeWasm() must be awaited first!");
835 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
836 return decodeArray(nativeResponseValue);
838 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
839 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
840 if(!isWasmInitialized) {
841 throw new Error("initializeWasm() must be awaited first!");
843 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
844 return decodeArray(nativeResponseValue);
846 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
847 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
848 if(!isWasmInitialized) {
849 throw new Error("initializeWasm() must be awaited first!");
851 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
852 return decodeArray(nativeResponseValue);
854 // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
855 export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
856 if(!isWasmInitialized) {
857 throw new Error("initializeWasm() must be awaited first!");
859 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
860 return nativeResponseValue;
862 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
863 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
864 if(!isWasmInitialized) {
865 throw new Error("initializeWasm() must be awaited first!");
867 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
868 return decodeArray(nativeResponseValue);
870 // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
871 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
872 if(!isWasmInitialized) {
873 throw new Error("initializeWasm() must be awaited first!");
875 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
876 return nativeResponseValue;
878 // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
879 export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
880 if(!isWasmInitialized) {
881 throw new Error("initializeWasm() must be awaited first!");
883 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
884 return nativeResponseValue;
889 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
891 export interface LDKFeeEstimator {
892 get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
895 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
896 throw new Error('unimplemented'); // TODO: bind to WASM
899 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
902 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
903 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
904 if(!isWasmInitialized) {
905 throw new Error("initializeWasm() must be awaited first!");
907 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
908 return nativeResponseValue;
913 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
915 export interface LDKLogger {
916 log (record: String): void;
919 export function LDKLogger_new(impl: LDKLogger): number {
920 throw new Error('unimplemented'); // TODO: bind to WASM
923 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
926 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
927 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
928 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
929 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
930 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
931 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
932 public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
933 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
934 public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
935 public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
936 public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
937 public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
938 public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
939 public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
940 public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
941 public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
942 public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
943 public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
944 public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
945 public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
946 public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
947 public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
948 public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long ptr);
949 public static native Uint8Array LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long ptr);
950 public static native number LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long ptr);
951 public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
952 public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
953 public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
954 public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
955 public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
956 public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
957 public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
958 public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
959 public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
960 public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
961 public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
962 public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
963 public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
964 public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
965 public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
966 public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
967 public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
968 public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
969 public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
970 public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
971 public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
972 public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
973 public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
974 public static native String LDKCResult_StringErrorZ_get_ok(long arg);
975 public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
976 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
977 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
978 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
979 public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
980 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
981 public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
982 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
983 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
984 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
985 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
986 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
987 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
988 public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
989 public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
990 public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
991 public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
992 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
993 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
994 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
995 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
996 public static class LDKEvent {
997 private LDKEvent() {}
998 export class FundingGenerationReady extends LDKEvent {
999 public Uint8Array temporary_channel_id;
1000 public number channel_value_satoshis;
1001 public Uint8Array output_script;
1002 public number user_channel_id;
1003 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; }
1005 export class PaymentReceived extends LDKEvent {
1006 public Uint8Array payment_hash;
1007 public Uint8Array payment_preimage;
1008 public Uint8Array payment_secret;
1010 public number user_payment_id;
1011 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; }
1013 export class PaymentSent extends LDKEvent {
1014 public Uint8Array payment_preimage;
1015 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
1017 export class PaymentFailed extends LDKEvent {
1018 public Uint8Array payment_hash;
1019 public boolean rejected_by_dest;
1020 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
1022 export class PendingHTLCsForwardable extends LDKEvent {
1023 public number time_forwardable;
1024 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1026 export class SpendableOutputs extends LDKEvent {
1027 public number[] outputs;
1028 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1030 static native void init();
1032 static { LDKEvent.init(); }
1033 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1034 public static native long LDKCVec_EventZ_new(number[] elems);
1035 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1036 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
1037 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
1038 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1039 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1040 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
1041 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
1042 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1043 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1044 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1045 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1046 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1047 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1048 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1049 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1050 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
1051 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
1052 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
1053 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1054 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1055 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1056 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1057 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1058 public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1059 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1060 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1061 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1062 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1063 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1064 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1065 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1066 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1067 public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1068 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1069 public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1070 public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1071 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1072 public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1073 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1074 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1075 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1076 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1077 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1078 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1079 public static native long LDKCVec_u64Z_new(number[] elems);
1080 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1081 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1082 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1083 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1084 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1085 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1086 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1087 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1088 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1089 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1090 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1091 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1092 public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1093 public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1094 public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1095 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1096 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1097 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1098 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1099 public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1100 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1101 public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1102 public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1103 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1104 public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1105 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1106 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1107 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1108 public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1109 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1110 public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1111 public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1112 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1113 public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1114 public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1115 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1116 public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1117 public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1118 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1119 public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1120 public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1121 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1122 public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1123 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1124 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1125 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1126 public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1127 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1128 public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1129 public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1130 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1131 public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1132 public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1133 public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1134 public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1135 public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1136 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1137 public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1138 public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1139 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1140 public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1141 public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1142 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1143 public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1144 public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1145 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1146 public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1147 public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1148 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1149 public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1150 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1151 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1152 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1153 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1154 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1155 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1156 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1157 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1158 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1159 public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1160 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1161 public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1162 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1163 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1164 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1165 public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1166 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1167 public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1168 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1169 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1170 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1171 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1172 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1173 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1174 public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1175 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1176 public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1177 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1178 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1179 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1180 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1181 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1182 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1183 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1184 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1185 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1186 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1187 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1188 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1189 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1190 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1191 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1192 public static class LDKSignOrCreationError {
1193 private LDKSignOrCreationError() {}
1194 export class SignError extends LDKSignOrCreationError {
1197 export class CreationError extends LDKSignOrCreationError {
1198 public CreationError creation_error;
1199 CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1201 static native void init();
1203 static { LDKSignOrCreationError.init(); }
1204 public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1205 public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1206 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1207 public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1211 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1213 export interface LDKMessageSendEventsProvider {
1214 get_and_clear_pending_msg_events (): number[];
1217 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1218 throw new Error('unimplemented'); // TODO: bind to WASM
1221 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1224 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1225 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1226 if(!isWasmInitialized) {
1227 throw new Error("initializeWasm() must be awaited first!");
1229 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1230 return nativeResponseValue;
1235 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1237 export interface LDKEventHandler {
1238 handle_event (event: number): void;
1241 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1242 throw new Error('unimplemented'); // TODO: bind to WASM
1245 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1248 // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, struct LDKEvent event
1249 export function EventHandler_handle_event(this_arg: number, event: number): void {
1250 if(!isWasmInitialized) {
1251 throw new Error("initializeWasm() must be awaited first!");
1253 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1254 // debug statements here
1259 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1261 export interface LDKEventsProvider {
1262 process_pending_events (handler: number): void;
1265 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1266 throw new Error('unimplemented'); // TODO: bind to WASM
1269 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1272 // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1273 export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1274 if(!isWasmInitialized) {
1275 throw new Error("initializeWasm() must be awaited first!");
1277 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1278 // debug statements here
1283 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1285 export interface LDKAccess {
1286 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1289 export function LDKAccess_new(impl: LDKAccess): number {
1290 throw new Error('unimplemented'); // TODO: bind to WASM
1293 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1296 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1297 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1298 if(!isWasmInitialized) {
1299 throw new Error("initializeWasm() must be awaited first!");
1301 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1302 return nativeResponseValue;
1307 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1309 export interface LDKListen {
1310 block_connected (block: Uint8Array, height: number): void;
1311 block_disconnected (header: Uint8Array, height: number): void;
1314 export function LDKListen_new(impl: LDKListen): number {
1315 throw new Error('unimplemented'); // TODO: bind to WASM
1318 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1321 // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1322 export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1323 if(!isWasmInitialized) {
1324 throw new Error("initializeWasm() must be awaited first!");
1326 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1327 // debug statements here
1329 // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1330 export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1331 if(!isWasmInitialized) {
1332 throw new Error("initializeWasm() must be awaited first!");
1334 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1335 // debug statements here
1340 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1342 export interface LDKConfirm {
1343 transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1344 transaction_unconfirmed (txid: Uint8Array): void;
1345 best_block_updated (header: Uint8Array, height: number): void;
1346 get_relevant_txids (): Uint8Array[];
1349 export function LDKConfirm_new(impl: LDKConfirm): number {
1350 throw new Error('unimplemented'); // TODO: bind to WASM
1353 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1356 // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1357 export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1358 if(!isWasmInitialized) {
1359 throw new Error("initializeWasm() must be awaited first!");
1361 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1362 // debug statements here
1364 // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1365 export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1366 if(!isWasmInitialized) {
1367 throw new Error("initializeWasm() must be awaited first!");
1369 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1370 // debug statements here
1372 // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1373 export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1374 if(!isWasmInitialized) {
1375 throw new Error("initializeWasm() must be awaited first!");
1377 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1378 // debug statements here
1380 // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1381 export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1382 if(!isWasmInitialized) {
1383 throw new Error("initializeWasm() must be awaited first!");
1385 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1386 return nativeResponseValue;
1391 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1393 export interface LDKFilter {
1394 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1395 register_output (output: number): number;
1398 export function LDKFilter_new(impl: LDKFilter): number {
1399 throw new Error('unimplemented'); // TODO: bind to WASM
1402 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1405 // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1406 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1407 if(!isWasmInitialized) {
1408 throw new Error("initializeWasm() must be awaited first!");
1410 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1411 // debug statements here
1413 // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1414 export function Filter_register_output(this_arg: number, output: number): number {
1415 if(!isWasmInitialized) {
1416 throw new Error("initializeWasm() must be awaited first!");
1418 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1419 return nativeResponseValue;
1424 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1426 export interface LDKPersist {
1427 persist_new_channel (id: number, data: number): number;
1428 update_persisted_channel (id: number, update: number, data: number): number;
1431 export function LDKPersist_new(impl: LDKPersist): number {
1432 throw new Error('unimplemented'); // TODO: bind to WASM
1435 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1438 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1439 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1440 if(!isWasmInitialized) {
1441 throw new Error("initializeWasm() must be awaited first!");
1443 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1444 return nativeResponseValue;
1446 // 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
1447 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1448 if(!isWasmInitialized) {
1449 throw new Error("initializeWasm() must be awaited first!");
1451 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1452 return nativeResponseValue;
1457 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1459 export interface LDKChannelMessageHandler {
1460 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1461 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1462 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1463 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1464 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1465 handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1466 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1467 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1468 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1469 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1470 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1471 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1472 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1473 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1474 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1475 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1476 peer_connected (their_node_id: Uint8Array, msg: number): void;
1477 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1478 handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1479 handle_error (their_node_id: Uint8Array, msg: number): void;
1482 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1483 throw new Error('unimplemented'); // TODO: bind to WASM
1486 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1489 // 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
1490 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1491 if(!isWasmInitialized) {
1492 throw new Error("initializeWasm() must be awaited first!");
1494 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1495 // debug statements here
1497 // 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
1498 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1499 if(!isWasmInitialized) {
1500 throw new Error("initializeWasm() must be awaited first!");
1502 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1503 // debug statements here
1505 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1506 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1507 if(!isWasmInitialized) {
1508 throw new Error("initializeWasm() must be awaited first!");
1510 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1511 // debug statements here
1513 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1514 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1515 if(!isWasmInitialized) {
1516 throw new Error("initializeWasm() must be awaited first!");
1518 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1519 // debug statements here
1521 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1522 export function ChannelMessageHandler_handle_funding_locked(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_locked(this_arg, encodeArray(their_node_id), msg);
1527 // debug statements here
1529 // 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
1530 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1531 if(!isWasmInitialized) {
1532 throw new Error("initializeWasm() must be awaited first!");
1534 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1535 // debug statements here
1537 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1538 export function ChannelMessageHandler_handle_closing_signed(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_closing_signed(this_arg, encodeArray(their_node_id), msg);
1543 // debug statements here
1545 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1546 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1547 if(!isWasmInitialized) {
1548 throw new Error("initializeWasm() must be awaited first!");
1550 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1551 // debug statements here
1553 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1554 export function ChannelMessageHandler_handle_update_fulfill_htlc(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_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1559 // debug statements here
1561 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1562 export function ChannelMessageHandler_handle_update_fail_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_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1567 // debug statements here
1569 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1570 export function ChannelMessageHandler_handle_update_fail_malformed_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_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1575 // debug statements here
1577 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1578 export function ChannelMessageHandler_handle_commitment_signed(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_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1583 // debug statements here
1585 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1586 export function ChannelMessageHandler_handle_revoke_and_ack(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_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1591 // debug statements here
1593 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1594 export function ChannelMessageHandler_handle_update_fee(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_update_fee(this_arg, encodeArray(their_node_id), msg);
1599 // debug statements here
1601 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1602 export function ChannelMessageHandler_handle_announcement_signatures(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_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1607 // debug statements here
1609 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1610 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1611 if(!isWasmInitialized) {
1612 throw new Error("initializeWasm() must be awaited first!");
1614 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1615 // debug statements here
1617 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1618 export function ChannelMessageHandler_peer_connected(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_peer_connected(this_arg, encodeArray(their_node_id), msg);
1623 // debug statements here
1625 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1626 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1627 if(!isWasmInitialized) {
1628 throw new Error("initializeWasm() must be awaited first!");
1630 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1631 // debug statements here
1633 // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1634 export function ChannelMessageHandler_handle_channel_update(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_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1639 // debug statements here
1641 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1642 export function ChannelMessageHandler_handle_error(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_error(this_arg, encodeArray(their_node_id), msg);
1647 // debug statements here
1652 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1654 export interface LDKRoutingMessageHandler {
1655 handle_node_announcement (msg: number): number;
1656 handle_channel_announcement (msg: number): number;
1657 handle_channel_update (msg: number): number;
1658 handle_htlc_fail_channel_update (update: number): void;
1659 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1660 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1661 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1662 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1663 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1664 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1665 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1668 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1669 throw new Error('unimplemented'); // TODO: bind to WASM
1672 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1675 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1676 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1677 if(!isWasmInitialized) {
1678 throw new Error("initializeWasm() must be awaited first!");
1680 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1681 return nativeResponseValue;
1683 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1684 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1685 if(!isWasmInitialized) {
1686 throw new Error("initializeWasm() must be awaited first!");
1688 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1689 return nativeResponseValue;
1691 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1692 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1693 if(!isWasmInitialized) {
1694 throw new Error("initializeWasm() must be awaited first!");
1696 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1697 return nativeResponseValue;
1699 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1700 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1701 if(!isWasmInitialized) {
1702 throw new Error("initializeWasm() must be awaited first!");
1704 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1705 // debug statements here
1707 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1708 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1709 if(!isWasmInitialized) {
1710 throw new Error("initializeWasm() must be awaited first!");
1712 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1713 return nativeResponseValue;
1715 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1716 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1717 if(!isWasmInitialized) {
1718 throw new Error("initializeWasm() must be awaited first!");
1720 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1721 return nativeResponseValue;
1723 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1724 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1725 if(!isWasmInitialized) {
1726 throw new Error("initializeWasm() must be awaited first!");
1728 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1729 // debug statements here
1731 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1732 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1733 if(!isWasmInitialized) {
1734 throw new Error("initializeWasm() must be awaited first!");
1736 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1737 return nativeResponseValue;
1739 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1740 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1741 if(!isWasmInitialized) {
1742 throw new Error("initializeWasm() must be awaited first!");
1744 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1745 return nativeResponseValue;
1747 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1748 export function RoutingMessageHandler_handle_query_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_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1753 return nativeResponseValue;
1755 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1756 export function RoutingMessageHandler_handle_query_short_channel_ids(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_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1761 return nativeResponseValue;
1766 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1768 export interface LDKSocketDescriptor {
1769 send_data (data: Uint8Array, resume_read: boolean): number;
1770 disconnect_socket (): void;
1771 eq (other_arg: number): boolean;
1775 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1776 throw new Error('unimplemented'); // TODO: bind to WASM
1779 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1782 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1783 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1784 if(!isWasmInitialized) {
1785 throw new Error("initializeWasm() must be awaited first!");
1787 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1788 return nativeResponseValue;
1790 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1791 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1792 if(!isWasmInitialized) {
1793 throw new Error("initializeWasm() must be awaited first!");
1795 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1796 // debug statements here
1798 // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1799 export function SocketDescriptor_hash(this_arg: number): number {
1800 if(!isWasmInitialized) {
1801 throw new Error("initializeWasm() must be awaited first!");
1803 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1804 return nativeResponseValue;
1809 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1811 export interface LDKChannelManagerPersister {
1812 persist_manager (channel_manager: number): number;
1815 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
1816 throw new Error('unimplemented'); // TODO: bind to WASM
1819 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1822 // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1823 export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
1824 if(!isWasmInitialized) {
1825 throw new Error("initializeWasm() must be awaited first!");
1827 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
1828 return nativeResponseValue;
1830 public static class LDKFallback {
1831 private LDKFallback() {}
1832 export class SegWitProgram extends LDKFallback {
1833 public number version;
1834 public Uint8Array program;
1835 SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
1837 export class PubKeyHash extends LDKFallback {
1838 public Uint8Array pub_key_hash;
1839 PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1841 export class ScriptHash extends LDKFallback {
1842 public Uint8Array script_hash;
1843 ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
1845 static native void init();
1847 static { LDKFallback.init(); }
1848 public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1849 // struct LDKStr _ldk_get_compiled_version(void);
1850 export function _ldk_get_compiled_version(): String {
1851 if(!isWasmInitialized) {
1852 throw new Error("initializeWasm() must be awaited first!");
1854 const nativeResponseValue = wasm._ldk_get_compiled_version();
1855 return nativeResponseValue;
1857 // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1858 export function _ldk_c_bindings_get_compiled_version(): String {
1859 if(!isWasmInitialized) {
1860 throw new Error("initializeWasm() must be awaited first!");
1862 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
1863 return nativeResponseValue;
1865 // void Transaction_free(struct LDKTransaction _res);
1866 export function Transaction_free(_res: Uint8Array): void {
1867 if(!isWasmInitialized) {
1868 throw new Error("initializeWasm() must be awaited first!");
1870 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1871 // debug statements here
1873 // void TxOut_free(struct LDKTxOut _res);
1874 export function TxOut_free(_res: number): void {
1875 if(!isWasmInitialized) {
1876 throw new Error("initializeWasm() must be awaited first!");
1878 const nativeResponseValue = wasm.TxOut_free(_res);
1879 // debug statements here
1881 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1882 export function TxOut_clone(orig: number): number {
1883 if(!isWasmInitialized) {
1884 throw new Error("initializeWasm() must be awaited first!");
1886 const nativeResponseValue = wasm.TxOut_clone(orig);
1887 return nativeResponseValue;
1889 // void Str_free(struct LDKStr _res);
1890 export function Str_free(_res: String): void {
1891 if(!isWasmInitialized) {
1892 throw new Error("initializeWasm() must be awaited first!");
1894 const nativeResponseValue = wasm.Str_free(_res);
1895 // debug statements here
1897 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1898 export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1899 if(!isWasmInitialized) {
1900 throw new Error("initializeWasm() must be awaited first!");
1902 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1903 return nativeResponseValue;
1905 // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1906 export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
1907 if(!isWasmInitialized) {
1908 throw new Error("initializeWasm() must be awaited first!");
1910 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1911 return nativeResponseValue;
1913 // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1914 export function CResult_SecretKeyErrorZ_free(_res: number): void {
1915 if(!isWasmInitialized) {
1916 throw new Error("initializeWasm() must be awaited first!");
1918 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1919 // debug statements here
1921 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1922 export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1923 if(!isWasmInitialized) {
1924 throw new Error("initializeWasm() must be awaited first!");
1926 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1927 return nativeResponseValue;
1929 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1930 export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
1931 if(!isWasmInitialized) {
1932 throw new Error("initializeWasm() must be awaited first!");
1934 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1935 return nativeResponseValue;
1937 // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1938 export function CResult_PublicKeyErrorZ_free(_res: number): void {
1939 if(!isWasmInitialized) {
1940 throw new Error("initializeWasm() must be awaited first!");
1942 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1943 // debug statements here
1945 // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
1946 export function CResult_PublicKeyErrorZ_clone(orig: number): number {
1947 if(!isWasmInitialized) {
1948 throw new Error("initializeWasm() must be awaited first!");
1950 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
1951 return nativeResponseValue;
1953 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1954 export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1955 if(!isWasmInitialized) {
1956 throw new Error("initializeWasm() must be awaited first!");
1958 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1959 return nativeResponseValue;
1961 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1962 export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1963 if(!isWasmInitialized) {
1964 throw new Error("initializeWasm() must be awaited first!");
1966 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1967 return nativeResponseValue;
1969 // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1970 export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1971 if(!isWasmInitialized) {
1972 throw new Error("initializeWasm() must be awaited first!");
1974 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1975 // debug statements here
1977 // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1978 export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1979 if(!isWasmInitialized) {
1980 throw new Error("initializeWasm() must be awaited first!");
1982 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1983 return nativeResponseValue;
1985 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1986 export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1987 if(!isWasmInitialized) {
1988 throw new Error("initializeWasm() must be awaited first!");
1990 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1991 return nativeResponseValue;
1993 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1994 export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1995 if(!isWasmInitialized) {
1996 throw new Error("initializeWasm() must be awaited first!");
1998 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1999 return nativeResponseValue;
2001 // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2002 export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2003 if(!isWasmInitialized) {
2004 throw new Error("initializeWasm() must be awaited first!");
2006 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2007 // debug statements here
2009 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2010 export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2011 if(!isWasmInitialized) {
2012 throw new Error("initializeWasm() must be awaited first!");
2014 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2015 return nativeResponseValue;
2017 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2018 export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2019 if(!isWasmInitialized) {
2020 throw new Error("initializeWasm() must be awaited first!");
2022 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2023 return nativeResponseValue;
2025 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2026 export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2027 if(!isWasmInitialized) {
2028 throw new Error("initializeWasm() must be awaited first!");
2030 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2031 return nativeResponseValue;
2033 // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2034 export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2035 if(!isWasmInitialized) {
2036 throw new Error("initializeWasm() must be awaited first!");
2038 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2039 // debug statements here
2041 // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2042 export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2043 if(!isWasmInitialized) {
2044 throw new Error("initializeWasm() must be awaited first!");
2046 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2047 return nativeResponseValue;
2049 // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2050 export function COption_u32Z_some(o: number): number {
2051 if(!isWasmInitialized) {
2052 throw new Error("initializeWasm() must be awaited first!");
2054 const nativeResponseValue = wasm.COption_u32Z_some(o);
2055 return nativeResponseValue;
2057 // struct LDKCOption_u32Z COption_u32Z_none(void);
2058 export function COption_u32Z_none(): number {
2059 if(!isWasmInitialized) {
2060 throw new Error("initializeWasm() must be awaited first!");
2062 const nativeResponseValue = wasm.COption_u32Z_none();
2063 return nativeResponseValue;
2065 // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2066 export function COption_u32Z_free(_res: number): void {
2067 if(!isWasmInitialized) {
2068 throw new Error("initializeWasm() must be awaited first!");
2070 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2071 // debug statements here
2073 // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2074 export function COption_u32Z_clone(orig: number): number {
2075 if(!isWasmInitialized) {
2076 throw new Error("initializeWasm() must be awaited first!");
2078 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2079 return nativeResponseValue;
2081 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2082 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2083 if(!isWasmInitialized) {
2084 throw new Error("initializeWasm() must be awaited first!");
2086 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2087 return nativeResponseValue;
2089 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2090 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2091 if(!isWasmInitialized) {
2092 throw new Error("initializeWasm() must be awaited first!");
2094 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2095 return nativeResponseValue;
2097 // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2098 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2099 if(!isWasmInitialized) {
2100 throw new Error("initializeWasm() must be awaited first!");
2102 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2103 // debug statements here
2105 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2106 export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2107 if(!isWasmInitialized) {
2108 throw new Error("initializeWasm() must be awaited first!");
2110 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2111 return nativeResponseValue;
2113 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2114 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2115 if(!isWasmInitialized) {
2116 throw new Error("initializeWasm() must be awaited first!");
2118 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2119 return nativeResponseValue;
2121 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2122 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2123 if(!isWasmInitialized) {
2124 throw new Error("initializeWasm() must be awaited first!");
2126 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2127 return nativeResponseValue;
2129 // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2130 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2131 if(!isWasmInitialized) {
2132 throw new Error("initializeWasm() must be awaited first!");
2134 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2135 // debug statements here
2137 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2138 export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2139 if(!isWasmInitialized) {
2140 throw new Error("initializeWasm() must be awaited first!");
2142 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2143 return nativeResponseValue;
2145 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2146 export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2147 if(!isWasmInitialized) {
2148 throw new Error("initializeWasm() must be awaited first!");
2150 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2151 return nativeResponseValue;
2153 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2154 export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2155 if(!isWasmInitialized) {
2156 throw new Error("initializeWasm() must be awaited first!");
2158 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2159 return nativeResponseValue;
2161 // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2162 export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2163 if(!isWasmInitialized) {
2164 throw new Error("initializeWasm() must be awaited first!");
2166 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2167 // debug statements here
2169 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2170 export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2171 if(!isWasmInitialized) {
2172 throw new Error("initializeWasm() must be awaited first!");
2174 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2175 return nativeResponseValue;
2177 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2178 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2179 if(!isWasmInitialized) {
2180 throw new Error("initializeWasm() must be awaited first!");
2182 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2183 // debug statements here
2185 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2186 export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2187 if(!isWasmInitialized) {
2188 throw new Error("initializeWasm() must be awaited first!");
2190 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2191 return nativeResponseValue;
2193 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2194 export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2195 if(!isWasmInitialized) {
2196 throw new Error("initializeWasm() must be awaited first!");
2198 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2199 return nativeResponseValue;
2201 // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2202 export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2203 if(!isWasmInitialized) {
2204 throw new Error("initializeWasm() must be awaited first!");
2206 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2207 // debug statements here
2209 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2210 export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2211 if(!isWasmInitialized) {
2212 throw new Error("initializeWasm() must be awaited first!");
2214 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2215 return nativeResponseValue;
2217 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2218 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2219 if(!isWasmInitialized) {
2220 throw new Error("initializeWasm() must be awaited first!");
2222 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2223 return nativeResponseValue;
2225 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2226 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2227 if(!isWasmInitialized) {
2228 throw new Error("initializeWasm() must be awaited first!");
2230 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2231 return nativeResponseValue;
2233 // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2234 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2235 if(!isWasmInitialized) {
2236 throw new Error("initializeWasm() must be awaited first!");
2238 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2239 // debug statements here
2241 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2242 export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2243 if(!isWasmInitialized) {
2244 throw new Error("initializeWasm() must be awaited first!");
2246 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2247 return nativeResponseValue;
2249 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2250 export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2251 if(!isWasmInitialized) {
2252 throw new Error("initializeWasm() must be awaited first!");
2254 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2255 return nativeResponseValue;
2257 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2258 export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2259 if(!isWasmInitialized) {
2260 throw new Error("initializeWasm() must be awaited first!");
2262 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2263 return nativeResponseValue;
2265 // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2266 export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2267 if(!isWasmInitialized) {
2268 throw new Error("initializeWasm() must be awaited first!");
2270 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2271 // debug statements here
2273 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2274 export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2275 if(!isWasmInitialized) {
2276 throw new Error("initializeWasm() must be awaited first!");
2278 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2279 return nativeResponseValue;
2281 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2282 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2283 if(!isWasmInitialized) {
2284 throw new Error("initializeWasm() must be awaited first!");
2286 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2287 return nativeResponseValue;
2289 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2290 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2291 if(!isWasmInitialized) {
2292 throw new Error("initializeWasm() must be awaited first!");
2294 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2295 return nativeResponseValue;
2297 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2298 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2299 if(!isWasmInitialized) {
2300 throw new Error("initializeWasm() must be awaited first!");
2302 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2303 // debug statements here
2305 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2306 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2307 if(!isWasmInitialized) {
2308 throw new Error("initializeWasm() must be awaited first!");
2310 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2311 return nativeResponseValue;
2313 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2314 export function CResult_CVec_SignatureZNoneZ_err(): number {
2315 if(!isWasmInitialized) {
2316 throw new Error("initializeWasm() must be awaited first!");
2318 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2319 return nativeResponseValue;
2321 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2322 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2323 if(!isWasmInitialized) {
2324 throw new Error("initializeWasm() must be awaited first!");
2326 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2327 // debug statements here
2329 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2330 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2331 if(!isWasmInitialized) {
2332 throw new Error("initializeWasm() must be awaited first!");
2334 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2335 return nativeResponseValue;
2337 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2338 export function CResult_NoneErrorZ_ok(): number {
2339 if(!isWasmInitialized) {
2340 throw new Error("initializeWasm() must be awaited first!");
2342 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2343 return nativeResponseValue;
2345 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2346 export function CResult_NoneErrorZ_err(e: IOError): number {
2347 if(!isWasmInitialized) {
2348 throw new Error("initializeWasm() must be awaited first!");
2350 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2351 return nativeResponseValue;
2353 // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2354 export function CResult_NoneErrorZ_free(_res: number): void {
2355 if(!isWasmInitialized) {
2356 throw new Error("initializeWasm() must be awaited first!");
2358 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2359 // debug statements here
2361 // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2362 export function CResult_NoneErrorZ_clone(orig: number): number {
2363 if(!isWasmInitialized) {
2364 throw new Error("initializeWasm() must be awaited first!");
2366 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2367 return nativeResponseValue;
2369 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2370 export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2371 if(!isWasmInitialized) {
2372 throw new Error("initializeWasm() must be awaited first!");
2374 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2375 return nativeResponseValue;
2377 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2378 export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2379 if(!isWasmInitialized) {
2380 throw new Error("initializeWasm() must be awaited first!");
2382 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2383 return nativeResponseValue;
2385 // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2386 export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2387 if(!isWasmInitialized) {
2388 throw new Error("initializeWasm() must be awaited first!");
2390 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2391 // debug statements here
2393 // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2394 export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2395 if(!isWasmInitialized) {
2396 throw new Error("initializeWasm() must be awaited first!");
2398 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2399 return nativeResponseValue;
2401 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2402 export function CVec_RouteHopZ_free(_res: number[]): void {
2403 if(!isWasmInitialized) {
2404 throw new Error("initializeWasm() must be awaited first!");
2406 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2407 // debug statements here
2409 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2410 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2411 if(!isWasmInitialized) {
2412 throw new Error("initializeWasm() must be awaited first!");
2414 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2415 // debug statements here
2417 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2418 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2419 if(!isWasmInitialized) {
2420 throw new Error("initializeWasm() must be awaited first!");
2422 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2423 return nativeResponseValue;
2425 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2426 export function CResult_RouteDecodeErrorZ_err(e: number): number {
2427 if(!isWasmInitialized) {
2428 throw new Error("initializeWasm() must be awaited first!");
2430 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2431 return nativeResponseValue;
2433 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2434 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2435 if(!isWasmInitialized) {
2436 throw new Error("initializeWasm() must be awaited first!");
2438 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2439 // debug statements here
2441 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
2442 export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
2443 if(!isWasmInitialized) {
2444 throw new Error("initializeWasm() must be awaited first!");
2446 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
2447 return nativeResponseValue;
2449 // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2450 export function COption_u64Z_some(o: number): number {
2451 if(!isWasmInitialized) {
2452 throw new Error("initializeWasm() must be awaited first!");
2454 const nativeResponseValue = wasm.COption_u64Z_some(o);
2455 return nativeResponseValue;
2457 // struct LDKCOption_u64Z COption_u64Z_none(void);
2458 export function COption_u64Z_none(): number {
2459 if(!isWasmInitialized) {
2460 throw new Error("initializeWasm() must be awaited first!");
2462 const nativeResponseValue = wasm.COption_u64Z_none();
2463 return nativeResponseValue;
2465 // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2466 export function COption_u64Z_free(_res: number): void {
2467 if(!isWasmInitialized) {
2468 throw new Error("initializeWasm() must be awaited first!");
2470 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2471 // debug statements here
2473 // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2474 export function COption_u64Z_clone(orig: number): number {
2475 if(!isWasmInitialized) {
2476 throw new Error("initializeWasm() must be awaited first!");
2478 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2479 return nativeResponseValue;
2481 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
2482 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
2483 if(!isWasmInitialized) {
2484 throw new Error("initializeWasm() must be awaited first!");
2486 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
2487 // debug statements here
2489 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2490 export function CVec_RouteHintZ_free(_res: number[]): void {
2491 if(!isWasmInitialized) {
2492 throw new Error("initializeWasm() must be awaited first!");
2494 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2495 // debug statements here
2497 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2498 export function CResult_RouteLightningErrorZ_ok(o: number): number {
2499 if(!isWasmInitialized) {
2500 throw new Error("initializeWasm() must be awaited first!");
2502 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2503 return nativeResponseValue;
2505 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2506 export function CResult_RouteLightningErrorZ_err(e: number): number {
2507 if(!isWasmInitialized) {
2508 throw new Error("initializeWasm() must be awaited first!");
2510 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2511 return nativeResponseValue;
2513 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2514 export function CResult_RouteLightningErrorZ_free(_res: number): void {
2515 if(!isWasmInitialized) {
2516 throw new Error("initializeWasm() must be awaited first!");
2518 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2519 // debug statements here
2521 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
2522 export function CResult_RouteLightningErrorZ_clone(orig: number): number {
2523 if(!isWasmInitialized) {
2524 throw new Error("initializeWasm() must be awaited first!");
2526 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
2527 return nativeResponseValue;
2529 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
2530 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
2531 if(!isWasmInitialized) {
2532 throw new Error("initializeWasm() must be awaited first!");
2534 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
2535 return nativeResponseValue;
2537 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
2538 export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
2539 if(!isWasmInitialized) {
2540 throw new Error("initializeWasm() must be awaited first!");
2542 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
2543 return nativeResponseValue;
2545 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
2546 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
2547 if(!isWasmInitialized) {
2548 throw new Error("initializeWasm() must be awaited first!");
2550 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
2551 // debug statements here
2553 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
2554 export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
2555 if(!isWasmInitialized) {
2556 throw new Error("initializeWasm() must be awaited first!");
2558 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
2559 return nativeResponseValue;
2561 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
2562 export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
2563 if(!isWasmInitialized) {
2564 throw new Error("initializeWasm() must be awaited first!");
2566 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
2567 return nativeResponseValue;
2569 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2570 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2571 if(!isWasmInitialized) {
2572 throw new Error("initializeWasm() must be awaited first!");
2574 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2575 return nativeResponseValue;
2577 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2578 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2579 if(!isWasmInitialized) {
2580 throw new Error("initializeWasm() must be awaited first!");
2582 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2583 // debug statements here
2585 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2586 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2587 if(!isWasmInitialized) {
2588 throw new Error("initializeWasm() must be awaited first!");
2590 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2591 // debug statements here
2593 // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
2594 export function CVec_TxidZ_free(_res: Uint8Array[]): void {
2595 if(!isWasmInitialized) {
2596 throw new Error("initializeWasm() must be awaited first!");
2598 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
2599 // debug statements here
2601 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2602 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2603 if(!isWasmInitialized) {
2604 throw new Error("initializeWasm() must be awaited first!");
2606 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2607 return nativeResponseValue;
2609 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2610 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
2611 if(!isWasmInitialized) {
2612 throw new Error("initializeWasm() must be awaited first!");
2614 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2615 return nativeResponseValue;
2617 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2618 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2619 if(!isWasmInitialized) {
2620 throw new Error("initializeWasm() must be awaited first!");
2622 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2623 // debug statements here
2625 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2626 export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2627 if(!isWasmInitialized) {
2628 throw new Error("initializeWasm() must be awaited first!");
2630 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2631 return nativeResponseValue;
2633 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2634 export function CVec_MonitorEventZ_free(_res: number[]): void {
2635 if(!isWasmInitialized) {
2636 throw new Error("initializeWasm() must be awaited first!");
2638 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2639 // debug statements here
2641 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
2642 export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
2643 if(!isWasmInitialized) {
2644 throw new Error("initializeWasm() must be awaited first!");
2646 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
2647 return nativeResponseValue;
2649 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
2650 export function COption_C2Tuple_usizeTransactionZZ_none(): number {
2651 if(!isWasmInitialized) {
2652 throw new Error("initializeWasm() must be awaited first!");
2654 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
2655 return nativeResponseValue;
2657 // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
2658 export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
2659 if(!isWasmInitialized) {
2660 throw new Error("initializeWasm() must be awaited first!");
2662 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
2663 // debug statements here
2665 // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
2666 export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
2667 if(!isWasmInitialized) {
2668 throw new Error("initializeWasm() must be awaited first!");
2670 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
2671 return nativeResponseValue;
2673 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2674 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
2675 if(!isWasmInitialized) {
2676 throw new Error("initializeWasm() must be awaited first!");
2678 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
2679 // debug statements here
2681 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2682 export function CVec_MessageSendEventZ_free(_res: number[]): void {
2683 if(!isWasmInitialized) {
2684 throw new Error("initializeWasm() must be awaited first!");
2686 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2687 // debug statements here
2689 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2690 export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2691 if(!isWasmInitialized) {
2692 throw new Error("initializeWasm() must be awaited first!");
2694 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2695 return nativeResponseValue;
2697 // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2698 export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2699 if(!isWasmInitialized) {
2700 throw new Error("initializeWasm() must be awaited first!");
2702 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2703 return nativeResponseValue;
2705 // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2706 export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2707 if(!isWasmInitialized) {
2708 throw new Error("initializeWasm() must be awaited first!");
2710 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2711 // debug statements here
2713 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2714 export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2715 if(!isWasmInitialized) {
2716 throw new Error("initializeWasm() must be awaited first!");
2718 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2719 return nativeResponseValue;
2721 // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2722 export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2723 if(!isWasmInitialized) {
2724 throw new Error("initializeWasm() must be awaited first!");
2726 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2727 return nativeResponseValue;
2729 // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2730 export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2731 if(!isWasmInitialized) {
2732 throw new Error("initializeWasm() must be awaited first!");
2734 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2735 // debug statements here
2737 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2738 export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2739 if(!isWasmInitialized) {
2740 throw new Error("initializeWasm() must be awaited first!");
2742 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2743 return nativeResponseValue;
2745 // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2746 export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2747 if(!isWasmInitialized) {
2748 throw new Error("initializeWasm() must be awaited first!");
2750 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2751 return nativeResponseValue;
2753 // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2754 export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2755 if(!isWasmInitialized) {
2756 throw new Error("initializeWasm() must be awaited first!");
2758 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2759 // debug statements here
2761 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2762 export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2763 if(!isWasmInitialized) {
2764 throw new Error("initializeWasm() must be awaited first!");
2766 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2767 return nativeResponseValue;
2769 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2770 export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2771 if(!isWasmInitialized) {
2772 throw new Error("initializeWasm() must be awaited first!");
2774 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2775 return nativeResponseValue;
2777 // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2778 export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2779 if(!isWasmInitialized) {
2780 throw new Error("initializeWasm() must be awaited first!");
2782 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2783 // debug statements here
2785 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
2786 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2787 if(!isWasmInitialized) {
2788 throw new Error("initializeWasm() must be awaited first!");
2790 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
2791 return nativeResponseValue;
2793 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2794 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2795 if(!isWasmInitialized) {
2796 throw new Error("initializeWasm() must be awaited first!");
2798 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
2799 return nativeResponseValue;
2801 // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
2802 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2803 if(!isWasmInitialized) {
2804 throw new Error("initializeWasm() must be awaited first!");
2806 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
2807 // debug statements here
2809 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2810 export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2811 if(!isWasmInitialized) {
2812 throw new Error("initializeWasm() must be awaited first!");
2814 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2815 return nativeResponseValue;
2817 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
2818 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
2819 if(!isWasmInitialized) {
2820 throw new Error("initializeWasm() must be awaited first!");
2822 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
2823 return nativeResponseValue;
2825 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2826 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
2827 if(!isWasmInitialized) {
2828 throw new Error("initializeWasm() must be awaited first!");
2830 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
2831 return nativeResponseValue;
2833 // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
2834 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
2835 if(!isWasmInitialized) {
2836 throw new Error("initializeWasm() must be awaited first!");
2838 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
2839 // debug statements here
2841 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2842 export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2843 if(!isWasmInitialized) {
2844 throw new Error("initializeWasm() must be awaited first!");
2846 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
2847 return nativeResponseValue;
2849 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2850 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
2851 if(!isWasmInitialized) {
2852 throw new Error("initializeWasm() must be awaited first!");
2854 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
2855 return nativeResponseValue;
2857 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2858 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
2859 if(!isWasmInitialized) {
2860 throw new Error("initializeWasm() must be awaited first!");
2862 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
2863 return nativeResponseValue;
2865 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2866 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
2867 if(!isWasmInitialized) {
2868 throw new Error("initializeWasm() must be awaited first!");
2870 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
2871 // debug statements here
2873 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2874 export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
2875 if(!isWasmInitialized) {
2876 throw new Error("initializeWasm() must be awaited first!");
2878 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
2879 return nativeResponseValue;
2881 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2882 export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
2883 if(!isWasmInitialized) {
2884 throw new Error("initializeWasm() must be awaited first!");
2886 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
2887 return nativeResponseValue;
2889 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
2890 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
2891 if(!isWasmInitialized) {
2892 throw new Error("initializeWasm() must be awaited first!");
2894 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
2895 return nativeResponseValue;
2897 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
2898 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
2899 if(!isWasmInitialized) {
2900 throw new Error("initializeWasm() must be awaited first!");
2902 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
2903 // debug statements here
2905 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
2906 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
2907 if(!isWasmInitialized) {
2908 throw new Error("initializeWasm() must be awaited first!");
2910 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
2911 return nativeResponseValue;
2913 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
2914 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
2915 if(!isWasmInitialized) {
2916 throw new Error("initializeWasm() must be awaited first!");
2918 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
2919 return nativeResponseValue;
2921 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
2922 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
2923 if(!isWasmInitialized) {
2924 throw new Error("initializeWasm() must be awaited first!");
2926 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
2927 // debug statements here
2929 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
2930 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
2931 if(!isWasmInitialized) {
2932 throw new Error("initializeWasm() must be awaited first!");
2934 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
2935 return nativeResponseValue;
2937 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
2938 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
2939 if(!isWasmInitialized) {
2940 throw new Error("initializeWasm() must be awaited first!");
2942 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
2943 return nativeResponseValue;
2945 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
2946 export function CResult_SignatureNoneZ_err(): number {
2947 if(!isWasmInitialized) {
2948 throw new Error("initializeWasm() must be awaited first!");
2950 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
2951 return nativeResponseValue;
2953 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
2954 export function CResult_SignatureNoneZ_free(_res: number): void {
2955 if(!isWasmInitialized) {
2956 throw new Error("initializeWasm() must be awaited first!");
2958 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
2959 // debug statements here
2961 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
2962 export function CResult_SignatureNoneZ_clone(orig: number): number {
2963 if(!isWasmInitialized) {
2964 throw new Error("initializeWasm() must be awaited first!");
2966 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
2967 return nativeResponseValue;
2969 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
2970 export function CResult_SignDecodeErrorZ_ok(o: number): number {
2971 if(!isWasmInitialized) {
2972 throw new Error("initializeWasm() must be awaited first!");
2974 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
2975 return nativeResponseValue;
2977 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
2978 export function CResult_SignDecodeErrorZ_err(e: number): number {
2979 if(!isWasmInitialized) {
2980 throw new Error("initializeWasm() must be awaited first!");
2982 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
2983 return nativeResponseValue;
2985 // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
2986 export function CResult_SignDecodeErrorZ_free(_res: number): void {
2987 if(!isWasmInitialized) {
2988 throw new Error("initializeWasm() must be awaited first!");
2990 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
2991 // debug statements here
2993 // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
2994 export function CResult_SignDecodeErrorZ_clone(orig: number): number {
2995 if(!isWasmInitialized) {
2996 throw new Error("initializeWasm() must be awaited first!");
2998 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
2999 return nativeResponseValue;
3001 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3002 export function CVec_u8Z_free(_res: Uint8Array): void {
3003 if(!isWasmInitialized) {
3004 throw new Error("initializeWasm() must be awaited first!");
3006 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3007 // debug statements here
3009 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3010 export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3011 if(!isWasmInitialized) {
3012 throw new Error("initializeWasm() must be awaited first!");
3014 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3015 return nativeResponseValue;
3017 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3018 export function CResult_RecoverableSignatureNoneZ_err(): number {
3019 if(!isWasmInitialized) {
3020 throw new Error("initializeWasm() must be awaited first!");
3022 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3023 return nativeResponseValue;
3025 // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3026 export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3027 if(!isWasmInitialized) {
3028 throw new Error("initializeWasm() must be awaited first!");
3030 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3031 // debug statements here
3033 // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3034 export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3035 if(!isWasmInitialized) {
3036 throw new Error("initializeWasm() must be awaited first!");
3038 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3039 return nativeResponseValue;
3041 // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3042 export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3043 if(!isWasmInitialized) {
3044 throw new Error("initializeWasm() must be awaited first!");
3046 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3047 // debug statements here
3049 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3050 export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3051 if(!isWasmInitialized) {
3052 throw new Error("initializeWasm() must be awaited first!");
3054 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3055 return nativeResponseValue;
3057 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3058 export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3059 if(!isWasmInitialized) {
3060 throw new Error("initializeWasm() must be awaited first!");
3062 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3063 return nativeResponseValue;
3065 // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3066 export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3067 if(!isWasmInitialized) {
3068 throw new Error("initializeWasm() must be awaited first!");
3070 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3071 // debug statements here
3073 // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3074 export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3075 if(!isWasmInitialized) {
3076 throw new Error("initializeWasm() must be awaited first!");
3078 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3079 return nativeResponseValue;
3081 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3082 export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3083 if(!isWasmInitialized) {
3084 throw new Error("initializeWasm() must be awaited first!");
3086 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3087 return nativeResponseValue;
3089 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3090 export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3091 if(!isWasmInitialized) {
3092 throw new Error("initializeWasm() must be awaited first!");
3094 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3095 return nativeResponseValue;
3097 // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3098 export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3099 if(!isWasmInitialized) {
3100 throw new Error("initializeWasm() must be awaited first!");
3102 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3103 // debug statements here
3105 // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3106 export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3107 if(!isWasmInitialized) {
3108 throw new Error("initializeWasm() must be awaited first!");
3110 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3111 return nativeResponseValue;
3113 // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3114 export function CVec_TxOutZ_free(_res: number[]): void {
3115 if(!isWasmInitialized) {
3116 throw new Error("initializeWasm() must be awaited first!");
3118 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3119 // debug statements here
3121 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3122 export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3123 if(!isWasmInitialized) {
3124 throw new Error("initializeWasm() must be awaited first!");
3126 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3127 return nativeResponseValue;
3129 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3130 export function CResult_TransactionNoneZ_err(): number {
3131 if(!isWasmInitialized) {
3132 throw new Error("initializeWasm() must be awaited first!");
3134 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3135 return nativeResponseValue;
3137 // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3138 export function CResult_TransactionNoneZ_free(_res: number): void {
3139 if(!isWasmInitialized) {
3140 throw new Error("initializeWasm() must be awaited first!");
3142 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3143 // debug statements here
3145 // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3146 export function CResult_TransactionNoneZ_clone(orig: number): number {
3147 if(!isWasmInitialized) {
3148 throw new Error("initializeWasm() must be awaited first!");
3150 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3151 return nativeResponseValue;
3153 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3154 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3155 if(!isWasmInitialized) {
3156 throw new Error("initializeWasm() must be awaited first!");
3158 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3159 return nativeResponseValue;
3161 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3162 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3163 if(!isWasmInitialized) {
3164 throw new Error("initializeWasm() must be awaited first!");
3166 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3167 // debug statements here
3169 // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3170 export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3171 if(!isWasmInitialized) {
3172 throw new Error("initializeWasm() must be awaited first!");
3174 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3175 // debug statements here
3177 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3178 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3179 if(!isWasmInitialized) {
3180 throw new Error("initializeWasm() must be awaited first!");
3182 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3183 return nativeResponseValue;
3185 // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3186 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3187 if(!isWasmInitialized) {
3188 throw new Error("initializeWasm() must be awaited first!");
3190 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3191 return nativeResponseValue;
3193 // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3194 export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3195 if(!isWasmInitialized) {
3196 throw new Error("initializeWasm() must be awaited first!");
3198 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3199 // debug statements here
3201 // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3202 export function COption_u16Z_some(o: number): number {
3203 if(!isWasmInitialized) {
3204 throw new Error("initializeWasm() must be awaited first!");
3206 const nativeResponseValue = wasm.COption_u16Z_some(o);
3207 return nativeResponseValue;
3209 // struct LDKCOption_u16Z COption_u16Z_none(void);
3210 export function COption_u16Z_none(): number {
3211 if(!isWasmInitialized) {
3212 throw new Error("initializeWasm() must be awaited first!");
3214 const nativeResponseValue = wasm.COption_u16Z_none();
3215 return nativeResponseValue;
3217 // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3218 export function COption_u16Z_free(_res: number): void {
3219 if(!isWasmInitialized) {
3220 throw new Error("initializeWasm() must be awaited first!");
3222 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3223 // debug statements here
3225 // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3226 export function COption_u16Z_clone(orig: number): number {
3227 if(!isWasmInitialized) {
3228 throw new Error("initializeWasm() must be awaited first!");
3230 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3231 return nativeResponseValue;
3233 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3234 export function CResult_NoneAPIErrorZ_ok(): number {
3235 if(!isWasmInitialized) {
3236 throw new Error("initializeWasm() must be awaited first!");
3238 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3239 return nativeResponseValue;
3241 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3242 export function CResult_NoneAPIErrorZ_err(e: number): number {
3243 if(!isWasmInitialized) {
3244 throw new Error("initializeWasm() must be awaited first!");
3246 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3247 return nativeResponseValue;
3249 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3250 export function CResult_NoneAPIErrorZ_free(_res: number): void {
3251 if(!isWasmInitialized) {
3252 throw new Error("initializeWasm() must be awaited first!");
3254 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3255 // debug statements here
3257 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3258 export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3259 if(!isWasmInitialized) {
3260 throw new Error("initializeWasm() must be awaited first!");
3262 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3263 return nativeResponseValue;
3265 // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3266 export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3267 if(!isWasmInitialized) {
3268 throw new Error("initializeWasm() must be awaited first!");
3270 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3271 // debug statements here
3273 // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3274 export function CVec_APIErrorZ_free(_res: number[]): void {
3275 if(!isWasmInitialized) {
3276 throw new Error("initializeWasm() must be awaited first!");
3278 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3279 // debug statements here
3281 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3282 export function CResult_NonePaymentSendFailureZ_ok(): number {
3283 if(!isWasmInitialized) {
3284 throw new Error("initializeWasm() must be awaited first!");
3286 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3287 return nativeResponseValue;
3289 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3290 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3291 if(!isWasmInitialized) {
3292 throw new Error("initializeWasm() must be awaited first!");
3294 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3295 return nativeResponseValue;
3297 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3298 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3299 if(!isWasmInitialized) {
3300 throw new Error("initializeWasm() must be awaited first!");
3302 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3303 // debug statements here
3305 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3306 export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3307 if(!isWasmInitialized) {
3308 throw new Error("initializeWasm() must be awaited first!");
3310 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3311 return nativeResponseValue;
3313 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3314 export function CVec_NetAddressZ_free(_res: number[]): void {
3315 if(!isWasmInitialized) {
3316 throw new Error("initializeWasm() must be awaited first!");
3318 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3319 // debug statements here
3321 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
3322 export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
3323 if(!isWasmInitialized) {
3324 throw new Error("initializeWasm() must be awaited first!");
3326 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
3327 return nativeResponseValue;
3329 // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
3330 export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
3331 if(!isWasmInitialized) {
3332 throw new Error("initializeWasm() must be awaited first!");
3334 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
3335 return nativeResponseValue;
3337 // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
3338 export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
3339 if(!isWasmInitialized) {
3340 throw new Error("initializeWasm() must be awaited first!");
3342 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
3343 // debug statements here
3345 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
3346 export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
3347 if(!isWasmInitialized) {
3348 throw new Error("initializeWasm() must be awaited first!");
3350 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
3351 return nativeResponseValue;
3353 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
3354 export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
3355 if(!isWasmInitialized) {
3356 throw new Error("initializeWasm() must be awaited first!");
3358 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
3359 return nativeResponseValue;
3361 // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
3362 export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
3363 if(!isWasmInitialized) {
3364 throw new Error("initializeWasm() must be awaited first!");
3366 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
3367 // debug statements here
3369 // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
3370 export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
3371 if(!isWasmInitialized) {
3372 throw new Error("initializeWasm() must be awaited first!");
3374 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
3375 return nativeResponseValue;
3377 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3378 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3379 if(!isWasmInitialized) {
3380 throw new Error("initializeWasm() must be awaited first!");
3382 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3383 // debug statements here
3385 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3386 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3387 if(!isWasmInitialized) {
3388 throw new Error("initializeWasm() must be awaited first!");
3390 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3391 return nativeResponseValue;
3393 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3394 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3395 if(!isWasmInitialized) {
3396 throw new Error("initializeWasm() must be awaited first!");
3398 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3399 // debug statements here
3401 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3402 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3403 if(!isWasmInitialized) {
3404 throw new Error("initializeWasm() must be awaited first!");
3406 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3407 return nativeResponseValue;
3409 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3410 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3411 if(!isWasmInitialized) {
3412 throw new Error("initializeWasm() must be awaited first!");
3414 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3415 return nativeResponseValue;
3417 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3418 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3419 if(!isWasmInitialized) {
3420 throw new Error("initializeWasm() must be awaited first!");
3422 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3423 // debug statements here
3425 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
3426 export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
3427 if(!isWasmInitialized) {
3428 throw new Error("initializeWasm() must be awaited first!");
3430 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
3431 return nativeResponseValue;
3433 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
3434 export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
3435 if(!isWasmInitialized) {
3436 throw new Error("initializeWasm() must be awaited first!");
3438 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
3439 return nativeResponseValue;
3441 // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
3442 export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
3443 if(!isWasmInitialized) {
3444 throw new Error("initializeWasm() must be awaited first!");
3446 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
3447 // debug statements here
3449 // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
3450 export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
3451 if(!isWasmInitialized) {
3452 throw new Error("initializeWasm() must be awaited first!");
3454 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
3455 return nativeResponseValue;
3457 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
3458 export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
3459 if(!isWasmInitialized) {
3460 throw new Error("initializeWasm() must be awaited first!");
3462 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
3463 return nativeResponseValue;
3465 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
3466 export function CResult_OutPointDecodeErrorZ_err(e: number): number {
3467 if(!isWasmInitialized) {
3468 throw new Error("initializeWasm() must be awaited first!");
3470 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
3471 return nativeResponseValue;
3473 // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
3474 export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
3475 if(!isWasmInitialized) {
3476 throw new Error("initializeWasm() must be awaited first!");
3478 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
3479 // debug statements here
3481 // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
3482 export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
3483 if(!isWasmInitialized) {
3484 throw new Error("initializeWasm() must be awaited first!");
3486 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
3487 return nativeResponseValue;
3489 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
3490 export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
3491 if(!isWasmInitialized) {
3492 throw new Error("initializeWasm() must be awaited first!");
3494 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
3495 return nativeResponseValue;
3497 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
3498 export function CResult_SiPrefixNoneZ_err(): number {
3499 if(!isWasmInitialized) {
3500 throw new Error("initializeWasm() must be awaited first!");
3502 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
3503 return nativeResponseValue;
3505 // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
3506 export function CResult_SiPrefixNoneZ_free(_res: number): void {
3507 if(!isWasmInitialized) {
3508 throw new Error("initializeWasm() must be awaited first!");
3510 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
3511 // debug statements here
3513 // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
3514 export function CResult_SiPrefixNoneZ_clone(orig: number): number {
3515 if(!isWasmInitialized) {
3516 throw new Error("initializeWasm() must be awaited first!");
3518 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
3519 return nativeResponseValue;
3521 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
3522 export function CResult_InvoiceNoneZ_ok(o: number): number {
3523 if(!isWasmInitialized) {
3524 throw new Error("initializeWasm() must be awaited first!");
3526 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
3527 return nativeResponseValue;
3529 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
3530 export function CResult_InvoiceNoneZ_err(): number {
3531 if(!isWasmInitialized) {
3532 throw new Error("initializeWasm() must be awaited first!");
3534 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
3535 return nativeResponseValue;
3537 // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
3538 export function CResult_InvoiceNoneZ_free(_res: number): void {
3539 if(!isWasmInitialized) {
3540 throw new Error("initializeWasm() must be awaited first!");
3542 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
3543 // debug statements here
3545 // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
3546 export function CResult_InvoiceNoneZ_clone(orig: number): number {
3547 if(!isWasmInitialized) {
3548 throw new Error("initializeWasm() must be awaited first!");
3550 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
3551 return nativeResponseValue;
3553 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
3554 export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
3555 if(!isWasmInitialized) {
3556 throw new Error("initializeWasm() must be awaited first!");
3558 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
3559 return nativeResponseValue;
3561 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
3562 export function CResult_SignedRawInvoiceNoneZ_err(): number {
3563 if(!isWasmInitialized) {
3564 throw new Error("initializeWasm() must be awaited first!");
3566 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
3567 return nativeResponseValue;
3569 // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
3570 export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
3571 if(!isWasmInitialized) {
3572 throw new Error("initializeWasm() must be awaited first!");
3574 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
3575 // debug statements here
3577 // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
3578 export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
3579 if(!isWasmInitialized) {
3580 throw new Error("initializeWasm() must be awaited first!");
3582 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
3583 return nativeResponseValue;
3585 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
3586 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
3587 if(!isWasmInitialized) {
3588 throw new Error("initializeWasm() must be awaited first!");
3590 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
3591 return nativeResponseValue;
3593 // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
3594 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
3595 if(!isWasmInitialized) {
3596 throw new Error("initializeWasm() must be awaited first!");
3598 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
3599 return nativeResponseValue;
3601 // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
3602 export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
3603 if(!isWasmInitialized) {
3604 throw new Error("initializeWasm() must be awaited first!");
3606 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
3607 // debug statements here
3609 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
3610 export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
3611 if(!isWasmInitialized) {
3612 throw new Error("initializeWasm() must be awaited first!");
3614 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
3615 return nativeResponseValue;
3617 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
3618 export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
3619 if(!isWasmInitialized) {
3620 throw new Error("initializeWasm() must be awaited first!");
3622 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
3623 return nativeResponseValue;
3625 // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
3626 export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
3627 if(!isWasmInitialized) {
3628 throw new Error("initializeWasm() must be awaited first!");
3630 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
3631 // debug statements here
3633 // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
3634 export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
3635 if(!isWasmInitialized) {
3636 throw new Error("initializeWasm() must be awaited first!");
3638 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
3639 return nativeResponseValue;
3641 // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
3642 export function CVec_PrivateRouteZ_free(_res: number[]): void {
3643 if(!isWasmInitialized) {
3644 throw new Error("initializeWasm() must be awaited first!");
3646 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
3647 // debug statements here
3649 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
3650 export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
3651 if(!isWasmInitialized) {
3652 throw new Error("initializeWasm() must be awaited first!");
3654 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
3655 return nativeResponseValue;
3657 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
3658 export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
3659 if(!isWasmInitialized) {
3660 throw new Error("initializeWasm() must be awaited first!");
3662 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
3663 return nativeResponseValue;
3665 // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
3666 export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
3667 if(!isWasmInitialized) {
3668 throw new Error("initializeWasm() must be awaited first!");
3670 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
3671 // debug statements here
3673 // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
3674 export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
3675 if(!isWasmInitialized) {
3676 throw new Error("initializeWasm() must be awaited first!");
3678 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
3679 return nativeResponseValue;
3681 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
3682 export function CResult_NoneSemanticErrorZ_ok(): number {
3683 if(!isWasmInitialized) {
3684 throw new Error("initializeWasm() must be awaited first!");
3686 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
3687 return nativeResponseValue;
3689 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
3690 export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
3691 if(!isWasmInitialized) {
3692 throw new Error("initializeWasm() must be awaited first!");
3694 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
3695 return nativeResponseValue;
3697 // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
3698 export function CResult_NoneSemanticErrorZ_free(_res: number): void {
3699 if(!isWasmInitialized) {
3700 throw new Error("initializeWasm() must be awaited first!");
3702 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
3703 // debug statements here
3705 // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
3706 export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
3707 if(!isWasmInitialized) {
3708 throw new Error("initializeWasm() must be awaited first!");
3710 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
3711 return nativeResponseValue;
3713 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
3714 export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
3715 if(!isWasmInitialized) {
3716 throw new Error("initializeWasm() must be awaited first!");
3718 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
3719 return nativeResponseValue;
3721 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
3722 export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
3723 if(!isWasmInitialized) {
3724 throw new Error("initializeWasm() must be awaited first!");
3726 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
3727 return nativeResponseValue;
3729 // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
3730 export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
3731 if(!isWasmInitialized) {
3732 throw new Error("initializeWasm() must be awaited first!");
3734 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
3735 // debug statements here
3737 // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
3738 export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
3739 if(!isWasmInitialized) {
3740 throw new Error("initializeWasm() must be awaited first!");
3742 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
3743 return nativeResponseValue;
3745 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
3746 export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
3747 if(!isWasmInitialized) {
3748 throw new Error("initializeWasm() must be awaited first!");
3750 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
3751 return nativeResponseValue;
3753 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
3754 export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
3755 if(!isWasmInitialized) {
3756 throw new Error("initializeWasm() must be awaited first!");
3758 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
3759 return nativeResponseValue;
3761 // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
3762 export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
3763 if(!isWasmInitialized) {
3764 throw new Error("initializeWasm() must be awaited first!");
3766 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
3767 // debug statements here
3769 // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
3770 export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
3771 if(!isWasmInitialized) {
3772 throw new Error("initializeWasm() must be awaited first!");
3774 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
3775 return nativeResponseValue;
3777 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
3778 export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
3779 if(!isWasmInitialized) {
3780 throw new Error("initializeWasm() must be awaited first!");
3782 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
3783 return nativeResponseValue;
3785 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
3786 export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
3787 if(!isWasmInitialized) {
3788 throw new Error("initializeWasm() must be awaited first!");
3790 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
3791 return nativeResponseValue;
3793 // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
3794 export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
3795 if(!isWasmInitialized) {
3796 throw new Error("initializeWasm() must be awaited first!");
3798 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
3799 // debug statements here
3801 // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
3802 export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
3803 if(!isWasmInitialized) {
3804 throw new Error("initializeWasm() must be awaited first!");
3806 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
3807 return nativeResponseValue;
3809 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
3810 export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
3811 if(!isWasmInitialized) {
3812 throw new Error("initializeWasm() must be awaited first!");
3814 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
3815 return nativeResponseValue;
3817 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
3818 export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
3819 if(!isWasmInitialized) {
3820 throw new Error("initializeWasm() must be awaited first!");
3822 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
3823 return nativeResponseValue;
3825 // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
3826 export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
3827 if(!isWasmInitialized) {
3828 throw new Error("initializeWasm() must be awaited first!");
3830 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
3831 // debug statements here
3833 // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
3834 export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
3835 if(!isWasmInitialized) {
3836 throw new Error("initializeWasm() must be awaited first!");
3838 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
3839 return nativeResponseValue;
3841 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
3842 export function CResult_StringErrorZ_ok(o: String): number {
3843 if(!isWasmInitialized) {
3844 throw new Error("initializeWasm() must be awaited first!");
3846 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
3847 return nativeResponseValue;
3849 // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
3850 export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
3851 if(!isWasmInitialized) {
3852 throw new Error("initializeWasm() must be awaited first!");
3854 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
3855 return nativeResponseValue;
3857 // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
3858 export function CResult_StringErrorZ_free(_res: number): void {
3859 if(!isWasmInitialized) {
3860 throw new Error("initializeWasm() must be awaited first!");
3862 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
3863 // debug statements here
3865 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
3866 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
3867 if(!isWasmInitialized) {
3868 throw new Error("initializeWasm() must be awaited first!");
3870 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
3871 return nativeResponseValue;
3873 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3874 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
3875 if(!isWasmInitialized) {
3876 throw new Error("initializeWasm() must be awaited first!");
3878 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
3879 return nativeResponseValue;
3881 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
3882 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
3883 if(!isWasmInitialized) {
3884 throw new Error("initializeWasm() must be awaited first!");
3886 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
3887 // debug statements here
3889 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
3890 export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
3891 if(!isWasmInitialized) {
3892 throw new Error("initializeWasm() must be awaited first!");
3894 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
3895 return nativeResponseValue;
3897 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
3898 export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
3899 if(!isWasmInitialized) {
3900 throw new Error("initializeWasm() must be awaited first!");
3902 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
3903 return nativeResponseValue;
3905 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3906 export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
3907 if(!isWasmInitialized) {
3908 throw new Error("initializeWasm() must be awaited first!");
3910 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
3911 return nativeResponseValue;
3913 // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
3914 export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
3915 if(!isWasmInitialized) {
3916 throw new Error("initializeWasm() must be awaited first!");
3918 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
3919 // debug statements here
3921 // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
3922 export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
3923 if(!isWasmInitialized) {
3924 throw new Error("initializeWasm() must be awaited first!");
3926 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
3927 return nativeResponseValue;
3929 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
3930 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
3931 if(!isWasmInitialized) {
3932 throw new Error("initializeWasm() must be awaited first!");
3934 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
3935 return nativeResponseValue;
3937 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
3938 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
3939 if(!isWasmInitialized) {
3940 throw new Error("initializeWasm() must be awaited first!");
3942 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
3943 return nativeResponseValue;
3945 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
3946 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
3947 if(!isWasmInitialized) {
3948 throw new Error("initializeWasm() must be awaited first!");
3950 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
3951 // debug statements here
3953 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
3954 export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
3955 if(!isWasmInitialized) {
3956 throw new Error("initializeWasm() must be awaited first!");
3958 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
3959 return nativeResponseValue;
3961 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
3962 export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
3963 if(!isWasmInitialized) {
3964 throw new Error("initializeWasm() must be awaited first!");
3966 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
3967 return nativeResponseValue;
3969 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
3970 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
3971 if(!isWasmInitialized) {
3972 throw new Error("initializeWasm() must be awaited first!");
3974 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
3975 return nativeResponseValue;
3977 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
3978 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
3979 if(!isWasmInitialized) {
3980 throw new Error("initializeWasm() must be awaited first!");
3982 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
3983 // debug statements here
3985 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
3986 export function C2Tuple_u32ScriptZ_clone(orig: number): number {
3987 if(!isWasmInitialized) {
3988 throw new Error("initializeWasm() must be awaited first!");
3990 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
3991 return nativeResponseValue;
3993 // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
3994 export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
3995 if(!isWasmInitialized) {
3996 throw new Error("initializeWasm() must be awaited first!");
3998 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
3999 return nativeResponseValue;
4001 // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4002 export function C2Tuple_u32ScriptZ_free(_res: number): void {
4003 if(!isWasmInitialized) {
4004 throw new Error("initializeWasm() must be awaited first!");
4006 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4007 // debug statements here
4009 // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4010 export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4011 if(!isWasmInitialized) {
4012 throw new Error("initializeWasm() must be awaited first!");
4014 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4015 // debug statements here
4017 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4018 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4019 if(!isWasmInitialized) {
4020 throw new Error("initializeWasm() must be awaited first!");
4022 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4023 return nativeResponseValue;
4025 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4026 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4027 if(!isWasmInitialized) {
4028 throw new Error("initializeWasm() must be awaited first!");
4030 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4031 return nativeResponseValue;
4033 // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4034 export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4035 if(!isWasmInitialized) {
4036 throw new Error("initializeWasm() must be awaited first!");
4038 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4039 // debug statements here
4041 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4042 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4043 if(!isWasmInitialized) {
4044 throw new Error("initializeWasm() must be awaited first!");
4046 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4047 // debug statements here
4049 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4050 export function CVec_EventZ_free(_res: number[]): void {
4051 if(!isWasmInitialized) {
4052 throw new Error("initializeWasm() must be awaited first!");
4054 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4055 // debug statements here
4057 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4058 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4059 if(!isWasmInitialized) {
4060 throw new Error("initializeWasm() must be awaited first!");
4062 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4063 // debug statements here
4065 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4066 export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4067 if(!isWasmInitialized) {
4068 throw new Error("initializeWasm() must be awaited first!");
4070 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4071 return nativeResponseValue;
4073 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4074 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4075 if(!isWasmInitialized) {
4076 throw new Error("initializeWasm() must be awaited first!");
4078 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4079 return nativeResponseValue;
4081 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4082 export function C2Tuple_u32TxOutZ_free(_res: number): void {
4083 if(!isWasmInitialized) {
4084 throw new Error("initializeWasm() must be awaited first!");
4086 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4087 // debug statements here
4089 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4090 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4091 if(!isWasmInitialized) {
4092 throw new Error("initializeWasm() must be awaited first!");
4094 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4095 // debug statements here
4097 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4098 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4099 if(!isWasmInitialized) {
4100 throw new Error("initializeWasm() must be awaited first!");
4102 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4103 return nativeResponseValue;
4105 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4106 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4107 if(!isWasmInitialized) {
4108 throw new Error("initializeWasm() must be awaited first!");
4110 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4111 return nativeResponseValue;
4113 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4114 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4115 if(!isWasmInitialized) {
4116 throw new Error("initializeWasm() must be awaited first!");
4118 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4119 // debug statements here
4121 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4122 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4123 if(!isWasmInitialized) {
4124 throw new Error("initializeWasm() must be awaited first!");
4126 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4127 // debug statements here
4129 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4130 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4131 if(!isWasmInitialized) {
4132 throw new Error("initializeWasm() must be awaited first!");
4134 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4135 return nativeResponseValue;
4137 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4138 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4139 if(!isWasmInitialized) {
4140 throw new Error("initializeWasm() must be awaited first!");
4142 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4143 return nativeResponseValue;
4145 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4146 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4147 if(!isWasmInitialized) {
4148 throw new Error("initializeWasm() must be awaited first!");
4150 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4151 // debug statements here
4153 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4154 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4155 if(!isWasmInitialized) {
4156 throw new Error("initializeWasm() must be awaited first!");
4158 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4159 return nativeResponseValue;
4161 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4162 export function CResult_boolLightningErrorZ_err(e: number): number {
4163 if(!isWasmInitialized) {
4164 throw new Error("initializeWasm() must be awaited first!");
4166 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4167 return nativeResponseValue;
4169 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4170 export function CResult_boolLightningErrorZ_free(_res: number): void {
4171 if(!isWasmInitialized) {
4172 throw new Error("initializeWasm() must be awaited first!");
4174 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4175 // debug statements here
4177 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
4178 export function CResult_boolLightningErrorZ_clone(orig: number): number {
4179 if(!isWasmInitialized) {
4180 throw new Error("initializeWasm() must be awaited first!");
4182 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
4183 return nativeResponseValue;
4185 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
4186 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
4187 if(!isWasmInitialized) {
4188 throw new Error("initializeWasm() must be awaited first!");
4190 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
4191 return nativeResponseValue;
4193 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
4194 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
4195 if(!isWasmInitialized) {
4196 throw new Error("initializeWasm() must be awaited first!");
4198 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
4199 return nativeResponseValue;
4201 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
4202 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
4203 if(!isWasmInitialized) {
4204 throw new Error("initializeWasm() must be awaited first!");
4206 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
4207 // debug statements here
4209 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
4210 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
4211 if(!isWasmInitialized) {
4212 throw new Error("initializeWasm() must be awaited first!");
4214 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
4215 // debug statements here
4217 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
4218 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
4219 if(!isWasmInitialized) {
4220 throw new Error("initializeWasm() must be awaited first!");
4222 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
4223 // debug statements here
4225 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4226 export function CResult_NoneLightningErrorZ_ok(): number {
4227 if(!isWasmInitialized) {
4228 throw new Error("initializeWasm() must be awaited first!");
4230 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4231 return nativeResponseValue;
4233 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4234 export function CResult_NoneLightningErrorZ_err(e: number): number {
4235 if(!isWasmInitialized) {
4236 throw new Error("initializeWasm() must be awaited first!");
4238 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4239 return nativeResponseValue;
4241 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4242 export function CResult_NoneLightningErrorZ_free(_res: number): void {
4243 if(!isWasmInitialized) {
4244 throw new Error("initializeWasm() must be awaited first!");
4246 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4247 // debug statements here
4249 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4250 export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4251 if(!isWasmInitialized) {
4252 throw new Error("initializeWasm() must be awaited first!");
4254 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4255 return nativeResponseValue;
4257 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
4258 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
4259 if(!isWasmInitialized) {
4260 throw new Error("initializeWasm() must be awaited first!");
4262 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
4263 // debug statements here
4265 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
4266 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
4267 if(!isWasmInitialized) {
4268 throw new Error("initializeWasm() must be awaited first!");
4270 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
4271 return nativeResponseValue;
4273 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4274 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
4275 if(!isWasmInitialized) {
4276 throw new Error("initializeWasm() must be awaited first!");
4278 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
4279 return nativeResponseValue;
4281 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
4282 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
4283 if(!isWasmInitialized) {
4284 throw new Error("initializeWasm() must be awaited first!");
4286 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
4287 // debug statements here
4289 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
4290 export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
4291 if(!isWasmInitialized) {
4292 throw new Error("initializeWasm() must be awaited first!");
4294 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
4295 return nativeResponseValue;
4297 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
4298 export function CResult_NonePeerHandleErrorZ_ok(): number {
4299 if(!isWasmInitialized) {
4300 throw new Error("initializeWasm() must be awaited first!");
4302 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
4303 return nativeResponseValue;
4305 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
4306 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
4307 if(!isWasmInitialized) {
4308 throw new Error("initializeWasm() must be awaited first!");
4310 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
4311 return nativeResponseValue;
4313 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
4314 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
4315 if(!isWasmInitialized) {
4316 throw new Error("initializeWasm() must be awaited first!");
4318 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
4319 // debug statements here
4321 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
4322 export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
4323 if(!isWasmInitialized) {
4324 throw new Error("initializeWasm() must be awaited first!");
4326 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
4327 return nativeResponseValue;
4329 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
4330 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
4331 if(!isWasmInitialized) {
4332 throw new Error("initializeWasm() must be awaited first!");
4334 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
4335 return nativeResponseValue;
4337 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
4338 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
4339 if(!isWasmInitialized) {
4340 throw new Error("initializeWasm() must be awaited first!");
4342 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
4343 return nativeResponseValue;
4345 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
4346 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
4347 if(!isWasmInitialized) {
4348 throw new Error("initializeWasm() must be awaited first!");
4350 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
4351 // debug statements here
4353 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
4354 export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
4355 if(!isWasmInitialized) {
4356 throw new Error("initializeWasm() must be awaited first!");
4358 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
4359 return nativeResponseValue;
4361 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
4362 export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
4363 if(!isWasmInitialized) {
4364 throw new Error("initializeWasm() must be awaited first!");
4366 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
4367 return nativeResponseValue;
4369 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4370 export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
4371 if(!isWasmInitialized) {
4372 throw new Error("initializeWasm() must be awaited first!");
4374 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
4375 return nativeResponseValue;
4377 // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
4378 export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
4379 if(!isWasmInitialized) {
4380 throw new Error("initializeWasm() must be awaited first!");
4382 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
4383 // debug statements here
4385 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4386 export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
4387 if(!isWasmInitialized) {
4388 throw new Error("initializeWasm() must be awaited first!");
4390 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
4391 return nativeResponseValue;
4393 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
4394 export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
4395 if(!isWasmInitialized) {
4396 throw new Error("initializeWasm() must be awaited first!");
4398 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
4399 return nativeResponseValue;
4401 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
4402 export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
4403 if(!isWasmInitialized) {
4404 throw new Error("initializeWasm() must be awaited first!");
4406 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
4407 return nativeResponseValue;
4409 // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
4410 export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
4411 if(!isWasmInitialized) {
4412 throw new Error("initializeWasm() must be awaited first!");
4414 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
4415 // debug statements here
4417 // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
4418 export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
4419 if(!isWasmInitialized) {
4420 throw new Error("initializeWasm() must be awaited first!");
4422 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
4423 return nativeResponseValue;
4425 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
4426 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
4427 if(!isWasmInitialized) {
4428 throw new Error("initializeWasm() must be awaited first!");
4430 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
4431 return nativeResponseValue;
4433 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
4434 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
4435 if(!isWasmInitialized) {
4436 throw new Error("initializeWasm() must be awaited first!");
4438 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
4439 return nativeResponseValue;
4441 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
4442 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
4443 if(!isWasmInitialized) {
4444 throw new Error("initializeWasm() must be awaited first!");
4446 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
4447 // debug statements here
4449 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
4450 export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
4451 if(!isWasmInitialized) {
4452 throw new Error("initializeWasm() must be awaited first!");
4454 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
4455 return nativeResponseValue;
4457 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
4458 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
4459 if(!isWasmInitialized) {
4460 throw new Error("initializeWasm() must be awaited first!");
4462 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
4463 return nativeResponseValue;
4465 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
4466 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
4467 if(!isWasmInitialized) {
4468 throw new Error("initializeWasm() must be awaited first!");
4470 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
4471 return nativeResponseValue;
4473 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
4474 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
4475 if(!isWasmInitialized) {
4476 throw new Error("initializeWasm() must be awaited first!");
4478 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
4479 // debug statements here
4481 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
4482 export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
4483 if(!isWasmInitialized) {
4484 throw new Error("initializeWasm() must be awaited first!");
4486 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
4487 return nativeResponseValue;
4489 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
4490 export function CVec_u64Z_free(_res: number[]): void {
4491 if(!isWasmInitialized) {
4492 throw new Error("initializeWasm() must be awaited first!");
4494 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
4495 // debug statements here
4497 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
4498 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
4499 if(!isWasmInitialized) {
4500 throw new Error("initializeWasm() must be awaited first!");
4502 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
4503 return nativeResponseValue;
4505 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
4506 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
4507 if(!isWasmInitialized) {
4508 throw new Error("initializeWasm() must be awaited first!");
4510 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
4511 return nativeResponseValue;
4513 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
4514 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
4515 if(!isWasmInitialized) {
4516 throw new Error("initializeWasm() must be awaited first!");
4518 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
4519 // debug statements here
4521 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
4522 export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
4523 if(!isWasmInitialized) {
4524 throw new Error("initializeWasm() must be awaited first!");
4526 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
4527 return nativeResponseValue;
4529 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
4530 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
4531 if(!isWasmInitialized) {
4532 throw new Error("initializeWasm() must be awaited first!");
4534 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
4535 return nativeResponseValue;
4537 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
4538 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
4539 if(!isWasmInitialized) {
4540 throw new Error("initializeWasm() must be awaited first!");
4542 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
4543 return nativeResponseValue;
4545 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
4546 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
4547 if(!isWasmInitialized) {
4548 throw new Error("initializeWasm() must be awaited first!");
4550 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
4551 // debug statements here
4553 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
4554 export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
4555 if(!isWasmInitialized) {
4556 throw new Error("initializeWasm() must be awaited first!");
4558 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
4559 return nativeResponseValue;
4561 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
4562 export function CResult_NetAddressu8Z_ok(o: number): number {
4563 if(!isWasmInitialized) {
4564 throw new Error("initializeWasm() must be awaited first!");
4566 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
4567 return nativeResponseValue;
4569 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
4570 export function CResult_NetAddressu8Z_err(e: number): number {
4571 if(!isWasmInitialized) {
4572 throw new Error("initializeWasm() must be awaited first!");
4574 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
4575 return nativeResponseValue;
4577 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
4578 export function CResult_NetAddressu8Z_free(_res: number): void {
4579 if(!isWasmInitialized) {
4580 throw new Error("initializeWasm() must be awaited first!");
4582 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
4583 // debug statements here
4585 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
4586 export function CResult_NetAddressu8Z_clone(orig: number): number {
4587 if(!isWasmInitialized) {
4588 throw new Error("initializeWasm() must be awaited first!");
4590 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
4591 return nativeResponseValue;
4593 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
4594 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
4595 if(!isWasmInitialized) {
4596 throw new Error("initializeWasm() must be awaited first!");
4598 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
4599 return nativeResponseValue;
4601 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
4602 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
4603 if(!isWasmInitialized) {
4604 throw new Error("initializeWasm() must be awaited first!");
4606 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
4607 return nativeResponseValue;
4609 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
4610 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
4611 if(!isWasmInitialized) {
4612 throw new Error("initializeWasm() must be awaited first!");
4614 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
4615 // debug statements here
4617 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
4618 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
4619 if(!isWasmInitialized) {
4620 throw new Error("initializeWasm() must be awaited first!");
4622 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
4623 return nativeResponseValue;
4625 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
4626 export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
4627 if(!isWasmInitialized) {
4628 throw new Error("initializeWasm() must be awaited first!");
4630 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
4631 return nativeResponseValue;
4633 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
4634 export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
4635 if(!isWasmInitialized) {
4636 throw new Error("initializeWasm() must be awaited first!");
4638 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
4639 return nativeResponseValue;
4641 // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
4642 export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
4643 if(!isWasmInitialized) {
4644 throw new Error("initializeWasm() must be awaited first!");
4646 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
4647 // debug statements here
4649 // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
4650 export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
4651 if(!isWasmInitialized) {
4652 throw new Error("initializeWasm() must be awaited first!");
4654 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
4655 return nativeResponseValue;
4657 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
4658 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
4659 if(!isWasmInitialized) {
4660 throw new Error("initializeWasm() must be awaited first!");
4662 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
4663 // debug statements here
4665 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
4666 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
4667 if(!isWasmInitialized) {
4668 throw new Error("initializeWasm() must be awaited first!");
4670 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
4671 // debug statements here
4673 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
4674 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
4675 if(!isWasmInitialized) {
4676 throw new Error("initializeWasm() must be awaited first!");
4678 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
4679 // debug statements here
4681 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
4682 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
4683 if(!isWasmInitialized) {
4684 throw new Error("initializeWasm() must be awaited first!");
4686 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
4687 // debug statements here
4689 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
4690 export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
4691 if(!isWasmInitialized) {
4692 throw new Error("initializeWasm() must be awaited first!");
4694 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
4695 return nativeResponseValue;
4697 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
4698 export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
4699 if(!isWasmInitialized) {
4700 throw new Error("initializeWasm() must be awaited first!");
4702 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
4703 return nativeResponseValue;
4705 // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
4706 export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
4707 if(!isWasmInitialized) {
4708 throw new Error("initializeWasm() must be awaited first!");
4710 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
4711 // debug statements here
4713 // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
4714 export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
4715 if(!isWasmInitialized) {
4716 throw new Error("initializeWasm() must be awaited first!");
4718 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
4719 return nativeResponseValue;
4721 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
4722 export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
4723 if(!isWasmInitialized) {
4724 throw new Error("initializeWasm() must be awaited first!");
4726 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
4727 return nativeResponseValue;
4729 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
4730 export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
4731 if(!isWasmInitialized) {
4732 throw new Error("initializeWasm() must be awaited first!");
4734 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
4735 return nativeResponseValue;
4737 // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
4738 export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
4739 if(!isWasmInitialized) {
4740 throw new Error("initializeWasm() must be awaited first!");
4742 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
4743 // debug statements here
4745 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
4746 export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
4747 if(!isWasmInitialized) {
4748 throw new Error("initializeWasm() must be awaited first!");
4750 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
4751 return nativeResponseValue;
4753 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
4754 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
4755 if(!isWasmInitialized) {
4756 throw new Error("initializeWasm() must be awaited first!");
4758 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
4759 return nativeResponseValue;
4761 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
4762 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
4763 if(!isWasmInitialized) {
4764 throw new Error("initializeWasm() must be awaited first!");
4766 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
4767 return nativeResponseValue;
4769 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
4770 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
4771 if(!isWasmInitialized) {
4772 throw new Error("initializeWasm() must be awaited first!");
4774 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
4775 // debug statements here
4777 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
4778 export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
4779 if(!isWasmInitialized) {
4780 throw new Error("initializeWasm() must be awaited first!");
4782 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
4783 return nativeResponseValue;
4785 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
4786 export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
4787 if(!isWasmInitialized) {
4788 throw new Error("initializeWasm() must be awaited first!");
4790 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
4791 return nativeResponseValue;
4793 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4794 export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
4795 if(!isWasmInitialized) {
4796 throw new Error("initializeWasm() must be awaited first!");
4798 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
4799 return nativeResponseValue;
4801 // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
4802 export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
4803 if(!isWasmInitialized) {
4804 throw new Error("initializeWasm() must be awaited first!");
4806 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
4807 // debug statements here
4809 // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
4810 export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
4811 if(!isWasmInitialized) {
4812 throw new Error("initializeWasm() must be awaited first!");
4814 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
4815 return nativeResponseValue;
4817 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
4818 export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
4819 if(!isWasmInitialized) {
4820 throw new Error("initializeWasm() must be awaited first!");
4822 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
4823 return nativeResponseValue;
4825 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
4826 export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
4827 if(!isWasmInitialized) {
4828 throw new Error("initializeWasm() must be awaited first!");
4830 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
4831 return nativeResponseValue;
4833 // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
4834 export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
4835 if(!isWasmInitialized) {
4836 throw new Error("initializeWasm() must be awaited first!");
4838 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
4839 // debug statements here
4841 // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
4842 export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
4843 if(!isWasmInitialized) {
4844 throw new Error("initializeWasm() must be awaited first!");
4846 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
4847 return nativeResponseValue;
4849 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
4850 export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
4851 if(!isWasmInitialized) {
4852 throw new Error("initializeWasm() must be awaited first!");
4854 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
4855 return nativeResponseValue;
4857 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
4858 export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
4859 if(!isWasmInitialized) {
4860 throw new Error("initializeWasm() must be awaited first!");
4862 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
4863 return nativeResponseValue;
4865 // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
4866 export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
4867 if(!isWasmInitialized) {
4868 throw new Error("initializeWasm() must be awaited first!");
4870 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
4871 // debug statements here
4873 // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
4874 export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
4875 if(!isWasmInitialized) {
4876 throw new Error("initializeWasm() must be awaited first!");
4878 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
4879 return nativeResponseValue;
4881 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
4882 export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
4883 if(!isWasmInitialized) {
4884 throw new Error("initializeWasm() must be awaited first!");
4886 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
4887 return nativeResponseValue;
4889 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
4890 export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
4891 if(!isWasmInitialized) {
4892 throw new Error("initializeWasm() must be awaited first!");
4894 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
4895 return nativeResponseValue;
4897 // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
4898 export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
4899 if(!isWasmInitialized) {
4900 throw new Error("initializeWasm() must be awaited first!");
4902 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
4903 // debug statements here
4905 // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
4906 export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
4907 if(!isWasmInitialized) {
4908 throw new Error("initializeWasm() must be awaited first!");
4910 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
4911 return nativeResponseValue;
4913 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
4914 export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
4915 if(!isWasmInitialized) {
4916 throw new Error("initializeWasm() must be awaited first!");
4918 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
4919 return nativeResponseValue;
4921 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
4922 export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
4923 if(!isWasmInitialized) {
4924 throw new Error("initializeWasm() must be awaited first!");
4926 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
4927 return nativeResponseValue;
4929 // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
4930 export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
4931 if(!isWasmInitialized) {
4932 throw new Error("initializeWasm() must be awaited first!");
4934 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
4935 // debug statements here
4937 // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
4938 export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
4939 if(!isWasmInitialized) {
4940 throw new Error("initializeWasm() must be awaited first!");
4942 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
4943 return nativeResponseValue;
4945 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
4946 export function CResult_InitDecodeErrorZ_ok(o: number): number {
4947 if(!isWasmInitialized) {
4948 throw new Error("initializeWasm() must be awaited first!");
4950 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
4951 return nativeResponseValue;
4953 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
4954 export function CResult_InitDecodeErrorZ_err(e: number): number {
4955 if(!isWasmInitialized) {
4956 throw new Error("initializeWasm() must be awaited first!");
4958 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
4959 return nativeResponseValue;
4961 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
4962 export function CResult_InitDecodeErrorZ_free(_res: number): void {
4963 if(!isWasmInitialized) {
4964 throw new Error("initializeWasm() must be awaited first!");
4966 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
4967 // debug statements here
4969 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
4970 export function CResult_InitDecodeErrorZ_clone(orig: number): number {
4971 if(!isWasmInitialized) {
4972 throw new Error("initializeWasm() must be awaited first!");
4974 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
4975 return nativeResponseValue;
4977 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
4978 export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
4979 if(!isWasmInitialized) {
4980 throw new Error("initializeWasm() must be awaited first!");
4982 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
4983 return nativeResponseValue;
4985 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
4986 export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
4987 if(!isWasmInitialized) {
4988 throw new Error("initializeWasm() must be awaited first!");
4990 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
4991 return nativeResponseValue;
4993 // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
4994 export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
4995 if(!isWasmInitialized) {
4996 throw new Error("initializeWasm() must be awaited first!");
4998 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
4999 // debug statements here
5001 // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
5002 export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
5003 if(!isWasmInitialized) {
5004 throw new Error("initializeWasm() must be awaited first!");
5006 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
5007 return nativeResponseValue;
5009 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
5010 export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
5011 if(!isWasmInitialized) {
5012 throw new Error("initializeWasm() must be awaited first!");
5014 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
5015 return nativeResponseValue;
5017 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
5018 export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
5019 if(!isWasmInitialized) {
5020 throw new Error("initializeWasm() must be awaited first!");
5022 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
5023 return nativeResponseValue;
5025 // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
5026 export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
5027 if(!isWasmInitialized) {
5028 throw new Error("initializeWasm() must be awaited first!");
5030 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
5031 // debug statements here
5033 // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
5034 export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
5035 if(!isWasmInitialized) {
5036 throw new Error("initializeWasm() must be awaited first!");
5038 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
5039 return nativeResponseValue;
5041 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
5042 export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
5043 if(!isWasmInitialized) {
5044 throw new Error("initializeWasm() must be awaited first!");
5046 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
5047 return nativeResponseValue;
5049 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
5050 export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
5051 if(!isWasmInitialized) {
5052 throw new Error("initializeWasm() must be awaited first!");
5054 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5055 return nativeResponseValue;
5057 // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5058 export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5059 if(!isWasmInitialized) {
5060 throw new Error("initializeWasm() must be awaited first!");
5062 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5063 // debug statements here
5065 // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5066 export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5067 if(!isWasmInitialized) {
5068 throw new Error("initializeWasm() must be awaited first!");
5070 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5071 return nativeResponseValue;
5073 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5074 export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5075 if(!isWasmInitialized) {
5076 throw new Error("initializeWasm() must be awaited first!");
5078 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5079 return nativeResponseValue;
5081 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5082 export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5083 if(!isWasmInitialized) {
5084 throw new Error("initializeWasm() must be awaited first!");
5086 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5087 return nativeResponseValue;
5089 // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5090 export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5091 if(!isWasmInitialized) {
5092 throw new Error("initializeWasm() must be awaited first!");
5094 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5095 // debug statements here
5097 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5098 export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5099 if(!isWasmInitialized) {
5100 throw new Error("initializeWasm() must be awaited first!");
5102 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5103 return nativeResponseValue;
5105 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5106 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5107 if(!isWasmInitialized) {
5108 throw new Error("initializeWasm() must be awaited first!");
5110 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5111 return nativeResponseValue;
5113 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5114 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5115 if(!isWasmInitialized) {
5116 throw new Error("initializeWasm() must be awaited first!");
5118 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5119 return nativeResponseValue;
5121 // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5122 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5123 if(!isWasmInitialized) {
5124 throw new Error("initializeWasm() must be awaited first!");
5126 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5127 // debug statements here
5129 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5130 export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5131 if(!isWasmInitialized) {
5132 throw new Error("initializeWasm() must be awaited first!");
5134 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5135 return nativeResponseValue;
5137 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5138 export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5139 if(!isWasmInitialized) {
5140 throw new Error("initializeWasm() must be awaited first!");
5142 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5143 return nativeResponseValue;
5145 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5146 export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5147 if(!isWasmInitialized) {
5148 throw new Error("initializeWasm() must be awaited first!");
5150 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5151 return nativeResponseValue;
5153 // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
5154 export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
5155 if(!isWasmInitialized) {
5156 throw new Error("initializeWasm() must be awaited first!");
5158 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
5159 // debug statements here
5161 // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
5162 export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
5163 if(!isWasmInitialized) {
5164 throw new Error("initializeWasm() must be awaited first!");
5166 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
5167 return nativeResponseValue;
5169 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
5170 export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
5171 if(!isWasmInitialized) {
5172 throw new Error("initializeWasm() must be awaited first!");
5174 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
5175 return nativeResponseValue;
5177 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5178 export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
5179 if(!isWasmInitialized) {
5180 throw new Error("initializeWasm() must be awaited first!");
5182 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
5183 return nativeResponseValue;
5185 // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
5186 export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
5187 if(!isWasmInitialized) {
5188 throw new Error("initializeWasm() must be awaited first!");
5190 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
5191 // debug statements here
5193 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
5194 export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
5195 if(!isWasmInitialized) {
5196 throw new Error("initializeWasm() must be awaited first!");
5198 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
5199 return nativeResponseValue;
5201 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
5202 export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
5203 if(!isWasmInitialized) {
5204 throw new Error("initializeWasm() must be awaited first!");
5206 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
5207 return nativeResponseValue;
5209 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5210 export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
5211 if(!isWasmInitialized) {
5212 throw new Error("initializeWasm() must be awaited first!");
5214 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
5215 return nativeResponseValue;
5217 // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
5218 export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
5219 if(!isWasmInitialized) {
5220 throw new Error("initializeWasm() must be awaited first!");
5222 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
5223 // debug statements here
5225 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
5226 export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
5227 if(!isWasmInitialized) {
5228 throw new Error("initializeWasm() must be awaited first!");
5230 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
5231 return nativeResponseValue;
5233 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
5234 export function CResult_PingDecodeErrorZ_ok(o: number): number {
5235 if(!isWasmInitialized) {
5236 throw new Error("initializeWasm() must be awaited first!");
5238 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
5239 return nativeResponseValue;
5241 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
5242 export function CResult_PingDecodeErrorZ_err(e: number): number {
5243 if(!isWasmInitialized) {
5244 throw new Error("initializeWasm() must be awaited first!");
5246 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
5247 return nativeResponseValue;
5249 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
5250 export function CResult_PingDecodeErrorZ_free(_res: number): void {
5251 if(!isWasmInitialized) {
5252 throw new Error("initializeWasm() must be awaited first!");
5254 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
5255 // debug statements here
5257 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
5258 export function CResult_PingDecodeErrorZ_clone(orig: number): number {
5259 if(!isWasmInitialized) {
5260 throw new Error("initializeWasm() must be awaited first!");
5262 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
5263 return nativeResponseValue;
5265 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
5266 export function CResult_PongDecodeErrorZ_ok(o: number): number {
5267 if(!isWasmInitialized) {
5268 throw new Error("initializeWasm() must be awaited first!");
5270 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
5271 return nativeResponseValue;
5273 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
5274 export function CResult_PongDecodeErrorZ_err(e: number): number {
5275 if(!isWasmInitialized) {
5276 throw new Error("initializeWasm() must be awaited first!");
5278 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
5279 return nativeResponseValue;
5281 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
5282 export function CResult_PongDecodeErrorZ_free(_res: number): void {
5283 if(!isWasmInitialized) {
5284 throw new Error("initializeWasm() must be awaited first!");
5286 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
5287 // debug statements here
5289 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
5290 export function CResult_PongDecodeErrorZ_clone(orig: number): number {
5291 if(!isWasmInitialized) {
5292 throw new Error("initializeWasm() must be awaited first!");
5294 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
5295 return nativeResponseValue;
5297 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
5298 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5299 if(!isWasmInitialized) {
5300 throw new Error("initializeWasm() must be awaited first!");
5302 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
5303 return nativeResponseValue;
5305 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5306 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
5307 if(!isWasmInitialized) {
5308 throw new Error("initializeWasm() must be awaited first!");
5310 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
5311 return nativeResponseValue;
5313 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
5314 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5315 if(!isWasmInitialized) {
5316 throw new Error("initializeWasm() must be awaited first!");
5318 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
5319 // debug statements here
5321 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5322 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5323 if(!isWasmInitialized) {
5324 throw new Error("initializeWasm() must be awaited first!");
5326 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
5327 return nativeResponseValue;
5329 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
5330 export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
5331 if(!isWasmInitialized) {
5332 throw new Error("initializeWasm() must be awaited first!");
5334 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
5335 return nativeResponseValue;
5337 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5338 export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
5339 if(!isWasmInitialized) {
5340 throw new Error("initializeWasm() must be awaited first!");
5342 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
5343 return nativeResponseValue;
5345 // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
5346 export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
5347 if(!isWasmInitialized) {
5348 throw new Error("initializeWasm() must be awaited first!");
5350 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
5351 // debug statements here
5353 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5354 export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
5355 if(!isWasmInitialized) {
5356 throw new Error("initializeWasm() must be awaited first!");
5358 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
5359 return nativeResponseValue;
5361 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
5362 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
5363 if(!isWasmInitialized) {
5364 throw new Error("initializeWasm() must be awaited first!");
5366 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
5367 return nativeResponseValue;
5369 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5370 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
5371 if(!isWasmInitialized) {
5372 throw new Error("initializeWasm() must be awaited first!");
5374 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
5375 return nativeResponseValue;
5377 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
5378 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
5379 if(!isWasmInitialized) {
5380 throw new Error("initializeWasm() must be awaited first!");
5382 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
5383 // debug statements here
5385 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5386 export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
5387 if(!isWasmInitialized) {
5388 throw new Error("initializeWasm() must be awaited first!");
5390 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
5391 return nativeResponseValue;
5393 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
5394 export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
5395 if(!isWasmInitialized) {
5396 throw new Error("initializeWasm() must be awaited first!");
5398 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
5399 return nativeResponseValue;
5401 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
5402 export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
5403 if(!isWasmInitialized) {
5404 throw new Error("initializeWasm() must be awaited first!");
5406 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
5407 return nativeResponseValue;
5409 // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
5410 export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
5411 if(!isWasmInitialized) {
5412 throw new Error("initializeWasm() must be awaited first!");
5414 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
5415 // debug statements here
5417 // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
5418 export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
5419 if(!isWasmInitialized) {
5420 throw new Error("initializeWasm() must be awaited first!");
5422 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
5423 return nativeResponseValue;
5425 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
5426 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
5427 if(!isWasmInitialized) {
5428 throw new Error("initializeWasm() must be awaited first!");
5430 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
5431 return nativeResponseValue;
5433 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
5434 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
5435 if(!isWasmInitialized) {
5436 throw new Error("initializeWasm() must be awaited first!");
5438 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
5439 return nativeResponseValue;
5441 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
5442 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
5443 if(!isWasmInitialized) {
5444 throw new Error("initializeWasm() must be awaited first!");
5446 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
5447 // debug statements here
5449 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
5450 export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
5451 if(!isWasmInitialized) {
5452 throw new Error("initializeWasm() must be awaited first!");
5454 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
5455 return nativeResponseValue;
5457 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
5458 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
5459 if(!isWasmInitialized) {
5460 throw new Error("initializeWasm() must be awaited first!");
5462 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
5463 return nativeResponseValue;
5465 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5466 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
5467 if(!isWasmInitialized) {
5468 throw new Error("initializeWasm() must be awaited first!");
5470 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
5471 return nativeResponseValue;
5473 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
5474 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
5475 if(!isWasmInitialized) {
5476 throw new Error("initializeWasm() must be awaited first!");
5478 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
5479 // debug statements here
5481 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5482 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5483 if(!isWasmInitialized) {
5484 throw new Error("initializeWasm() must be awaited first!");
5486 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
5487 return nativeResponseValue;
5489 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
5490 export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
5491 if(!isWasmInitialized) {
5492 throw new Error("initializeWasm() must be awaited first!");
5494 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
5495 return nativeResponseValue;
5497 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
5498 export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
5499 if(!isWasmInitialized) {
5500 throw new Error("initializeWasm() must be awaited first!");
5502 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
5503 return nativeResponseValue;
5505 // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
5506 export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
5507 if(!isWasmInitialized) {
5508 throw new Error("initializeWasm() must be awaited first!");
5510 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
5511 // debug statements here
5513 // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
5514 export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
5515 if(!isWasmInitialized) {
5516 throw new Error("initializeWasm() must be awaited first!");
5518 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
5519 return nativeResponseValue;
5521 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
5522 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
5523 if(!isWasmInitialized) {
5524 throw new Error("initializeWasm() must be awaited first!");
5526 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
5527 return nativeResponseValue;
5529 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
5530 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
5531 if(!isWasmInitialized) {
5532 throw new Error("initializeWasm() must be awaited first!");
5534 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
5535 return nativeResponseValue;
5537 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
5538 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
5539 if(!isWasmInitialized) {
5540 throw new Error("initializeWasm() must be awaited first!");
5542 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
5543 // debug statements here
5545 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
5546 export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
5547 if(!isWasmInitialized) {
5548 throw new Error("initializeWasm() must be awaited first!");
5550 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
5551 return nativeResponseValue;
5553 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
5554 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
5555 if(!isWasmInitialized) {
5556 throw new Error("initializeWasm() must be awaited first!");
5558 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
5559 return nativeResponseValue;
5561 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
5562 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
5563 if(!isWasmInitialized) {
5564 throw new Error("initializeWasm() must be awaited first!");
5566 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
5567 return nativeResponseValue;
5569 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
5570 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
5571 if(!isWasmInitialized) {
5572 throw new Error("initializeWasm() must be awaited first!");
5574 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
5575 // debug statements here
5577 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
5578 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
5579 if(!isWasmInitialized) {
5580 throw new Error("initializeWasm() must be awaited first!");
5582 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
5583 return nativeResponseValue;
5585 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
5586 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
5587 if(!isWasmInitialized) {
5588 throw new Error("initializeWasm() must be awaited first!");
5590 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
5591 return nativeResponseValue;
5593 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5594 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
5595 if(!isWasmInitialized) {
5596 throw new Error("initializeWasm() must be awaited first!");
5598 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
5599 return nativeResponseValue;
5601 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
5602 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
5603 if(!isWasmInitialized) {
5604 throw new Error("initializeWasm() must be awaited first!");
5606 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
5607 // debug statements here
5609 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5610 export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
5611 if(!isWasmInitialized) {
5612 throw new Error("initializeWasm() must be awaited first!");
5614 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
5615 return nativeResponseValue;
5617 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
5618 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
5619 if(!isWasmInitialized) {
5620 throw new Error("initializeWasm() must be awaited first!");
5622 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
5623 return nativeResponseValue;
5625 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
5626 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
5627 if(!isWasmInitialized) {
5628 throw new Error("initializeWasm() must be awaited first!");
5630 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
5631 return nativeResponseValue;
5633 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
5634 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
5635 if(!isWasmInitialized) {
5636 throw new Error("initializeWasm() must be awaited first!");
5638 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
5639 // debug statements here
5641 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
5642 export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
5643 if(!isWasmInitialized) {
5644 throw new Error("initializeWasm() must be awaited first!");
5646 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
5647 return nativeResponseValue;
5649 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
5650 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
5651 if(!isWasmInitialized) {
5652 throw new Error("initializeWasm() must be awaited first!");
5654 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
5655 return nativeResponseValue;
5657 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
5658 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
5659 if(!isWasmInitialized) {
5660 throw new Error("initializeWasm() must be awaited first!");
5662 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
5663 return nativeResponseValue;
5665 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
5666 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
5667 if(!isWasmInitialized) {
5668 throw new Error("initializeWasm() must be awaited first!");
5670 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
5671 // debug statements here
5673 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
5674 export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
5675 if(!isWasmInitialized) {
5676 throw new Error("initializeWasm() must be awaited first!");
5678 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
5679 return nativeResponseValue;
5681 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
5682 export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
5683 if(!isWasmInitialized) {
5684 throw new Error("initializeWasm() must be awaited first!");
5686 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
5687 return nativeResponseValue;
5689 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
5690 export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
5691 if(!isWasmInitialized) {
5692 throw new Error("initializeWasm() must be awaited first!");
5694 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
5695 return nativeResponseValue;
5697 // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
5698 export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
5699 if(!isWasmInitialized) {
5700 throw new Error("initializeWasm() must be awaited first!");
5702 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
5703 // debug statements here
5705 // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
5706 export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
5707 if(!isWasmInitialized) {
5708 throw new Error("initializeWasm() must be awaited first!");
5710 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
5711 return nativeResponseValue;
5713 // void Event_free(struct LDKEvent this_ptr);
5714 export function Event_free(this_ptr: number): void {
5715 if(!isWasmInitialized) {
5716 throw new Error("initializeWasm() must be awaited first!");
5718 const nativeResponseValue = wasm.Event_free(this_ptr);
5719 // debug statements here
5721 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
5722 export function Event_clone(orig: number): number {
5723 if(!isWasmInitialized) {
5724 throw new Error("initializeWasm() must be awaited first!");
5726 const nativeResponseValue = wasm.Event_clone(orig);
5727 return nativeResponseValue;
5729 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
5730 export function Event_write(obj: number): Uint8Array {
5731 if(!isWasmInitialized) {
5732 throw new Error("initializeWasm() must be awaited first!");
5734 const nativeResponseValue = wasm.Event_write(obj);
5735 return decodeArray(nativeResponseValue);
5737 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
5738 export function MessageSendEvent_free(this_ptr: number): void {
5739 if(!isWasmInitialized) {
5740 throw new Error("initializeWasm() must be awaited first!");
5742 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
5743 // debug statements here
5745 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
5746 export function MessageSendEvent_clone(orig: number): number {
5747 if(!isWasmInitialized) {
5748 throw new Error("initializeWasm() must be awaited first!");
5750 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
5751 return nativeResponseValue;
5753 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
5754 export function MessageSendEventsProvider_free(this_ptr: number): void {
5755 if(!isWasmInitialized) {
5756 throw new Error("initializeWasm() must be awaited first!");
5758 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
5759 // debug statements here
5761 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
5762 export function EventsProvider_free(this_ptr: number): void {
5763 if(!isWasmInitialized) {
5764 throw new Error("initializeWasm() must be awaited first!");
5766 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
5767 // debug statements here
5769 // void EventHandler_free(struct LDKEventHandler this_ptr);
5770 export function EventHandler_free(this_ptr: number): void {
5771 if(!isWasmInitialized) {
5772 throw new Error("initializeWasm() must be awaited first!");
5774 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
5775 // debug statements here
5777 // void APIError_free(struct LDKAPIError this_ptr);
5778 export function APIError_free(this_ptr: number): void {
5779 if(!isWasmInitialized) {
5780 throw new Error("initializeWasm() must be awaited first!");
5782 const nativeResponseValue = wasm.APIError_free(this_ptr);
5783 // debug statements here
5785 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
5786 export function APIError_clone(orig: number): number {
5787 if(!isWasmInitialized) {
5788 throw new Error("initializeWasm() must be awaited first!");
5790 const nativeResponseValue = wasm.APIError_clone(orig);
5791 return nativeResponseValue;
5793 // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
5794 export function sign(msg: Uint8Array, sk: Uint8Array): number {
5795 if(!isWasmInitialized) {
5796 throw new Error("initializeWasm() must be awaited first!");
5798 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
5799 return nativeResponseValue;
5801 // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
5802 export function recover_pk(msg: Uint8Array, sig: String): number {
5803 if(!isWasmInitialized) {
5804 throw new Error("initializeWasm() must be awaited first!");
5806 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
5807 return nativeResponseValue;
5809 // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
5810 export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
5811 if(!isWasmInitialized) {
5812 throw new Error("initializeWasm() must be awaited first!");
5814 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
5815 return nativeResponseValue;
5817 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
5818 export function Level_clone(orig: number): Level {
5819 if(!isWasmInitialized) {
5820 throw new Error("initializeWasm() must be awaited first!");
5822 const nativeResponseValue = wasm.Level_clone(orig);
5823 return nativeResponseValue;
5825 // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
5826 export function Level_eq(a: number, b: number): boolean {
5827 if(!isWasmInitialized) {
5828 throw new Error("initializeWasm() must be awaited first!");
5830 const nativeResponseValue = wasm.Level_eq(a, b);
5831 return nativeResponseValue;
5833 // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
5834 export function Level_hash(o: number): number {
5835 if(!isWasmInitialized) {
5836 throw new Error("initializeWasm() must be awaited first!");
5838 const nativeResponseValue = wasm.Level_hash(o);
5839 return nativeResponseValue;
5841 // MUST_USE_RES enum LDKLevel Level_max(void);
5842 export function Level_max(): Level {
5843 if(!isWasmInitialized) {
5844 throw new Error("initializeWasm() must be awaited first!");
5846 const nativeResponseValue = wasm.Level_max();
5847 return nativeResponseValue;
5849 // void Logger_free(struct LDKLogger this_ptr);
5850 export function Logger_free(this_ptr: number): void {
5851 if(!isWasmInitialized) {
5852 throw new Error("initializeWasm() must be awaited first!");
5854 const nativeResponseValue = wasm.Logger_free(this_ptr);
5855 // debug statements here
5857 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
5858 export function ChannelHandshakeConfig_free(this_obj: number): void {
5859 if(!isWasmInitialized) {
5860 throw new Error("initializeWasm() must be awaited first!");
5862 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
5863 // debug statements here
5865 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5866 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
5867 if(!isWasmInitialized) {
5868 throw new Error("initializeWasm() must be awaited first!");
5870 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
5871 return nativeResponseValue;
5873 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
5874 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
5875 if(!isWasmInitialized) {
5876 throw new Error("initializeWasm() must be awaited first!");
5878 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
5879 // debug statements here
5881 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5882 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
5883 if(!isWasmInitialized) {
5884 throw new Error("initializeWasm() must be awaited first!");
5886 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
5887 return nativeResponseValue;
5889 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
5890 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
5891 if(!isWasmInitialized) {
5892 throw new Error("initializeWasm() must be awaited first!");
5894 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
5895 // debug statements here
5897 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
5898 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
5899 if(!isWasmInitialized) {
5900 throw new Error("initializeWasm() must be awaited first!");
5902 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
5903 return nativeResponseValue;
5905 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
5906 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
5907 if(!isWasmInitialized) {
5908 throw new Error("initializeWasm() must be awaited first!");
5910 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
5911 // debug statements here
5913 // 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);
5914 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
5915 if(!isWasmInitialized) {
5916 throw new Error("initializeWasm() must be awaited first!");
5918 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
5919 return nativeResponseValue;
5921 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
5922 export function ChannelHandshakeConfig_clone(orig: number): number {
5923 if(!isWasmInitialized) {
5924 throw new Error("initializeWasm() must be awaited first!");
5926 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
5927 return nativeResponseValue;
5929 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
5930 export function ChannelHandshakeConfig_default(): number {
5931 if(!isWasmInitialized) {
5932 throw new Error("initializeWasm() must be awaited first!");
5934 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
5935 return nativeResponseValue;
5937 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
5938 export function ChannelHandshakeLimits_free(this_obj: number): void {
5939 if(!isWasmInitialized) {
5940 throw new Error("initializeWasm() must be awaited first!");
5942 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
5943 // debug statements here
5945 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5946 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
5947 if(!isWasmInitialized) {
5948 throw new Error("initializeWasm() must be awaited first!");
5950 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
5951 return nativeResponseValue;
5953 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5954 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
5955 if(!isWasmInitialized) {
5956 throw new Error("initializeWasm() must be awaited first!");
5958 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
5959 // debug statements here
5961 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5962 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
5963 if(!isWasmInitialized) {
5964 throw new Error("initializeWasm() must be awaited first!");
5966 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
5967 return nativeResponseValue;
5969 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5970 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
5971 if(!isWasmInitialized) {
5972 throw new Error("initializeWasm() must be awaited first!");
5974 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
5975 // debug statements here
5977 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5978 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
5979 if(!isWasmInitialized) {
5980 throw new Error("initializeWasm() must be awaited first!");
5982 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
5983 return nativeResponseValue;
5985 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
5986 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
5987 if(!isWasmInitialized) {
5988 throw new Error("initializeWasm() must be awaited first!");
5990 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
5991 // debug statements here
5993 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
5994 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
5995 if(!isWasmInitialized) {
5996 throw new Error("initializeWasm() must be awaited first!");
5998 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
5999 return nativeResponseValue;
6001 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
6002 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
6003 if(!isWasmInitialized) {
6004 throw new Error("initializeWasm() must be awaited first!");
6006 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
6007 // debug statements here
6009 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6010 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
6011 if(!isWasmInitialized) {
6012 throw new Error("initializeWasm() must be awaited first!");
6014 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
6015 return nativeResponseValue;
6017 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6018 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
6019 if(!isWasmInitialized) {
6020 throw new Error("initializeWasm() must be awaited first!");
6022 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
6023 // debug statements here
6025 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6026 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
6027 if(!isWasmInitialized) {
6028 throw new Error("initializeWasm() must be awaited first!");
6030 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
6031 return nativeResponseValue;
6033 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
6034 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
6035 if(!isWasmInitialized) {
6036 throw new Error("initializeWasm() must be awaited first!");
6038 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
6039 // debug statements here
6041 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6042 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
6043 if(!isWasmInitialized) {
6044 throw new Error("initializeWasm() must be awaited first!");
6046 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
6047 return nativeResponseValue;
6049 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
6050 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
6051 if(!isWasmInitialized) {
6052 throw new Error("initializeWasm() must be awaited first!");
6054 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
6055 // debug statements here
6057 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
6058 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
6059 if(!isWasmInitialized) {
6060 throw new Error("initializeWasm() must be awaited first!");
6062 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
6063 return nativeResponseValue;
6065 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
6066 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
6067 if(!isWasmInitialized) {
6068 throw new Error("initializeWasm() must be awaited first!");
6070 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
6071 // debug statements here
6073 // 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);
6074 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 {
6075 if(!isWasmInitialized) {
6076 throw new Error("initializeWasm() must be awaited first!");
6078 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);
6079 return nativeResponseValue;
6081 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
6082 export function ChannelHandshakeLimits_clone(orig: number): number {
6083 if(!isWasmInitialized) {
6084 throw new Error("initializeWasm() must be awaited first!");
6086 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
6087 return nativeResponseValue;
6089 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
6090 export function ChannelHandshakeLimits_default(): number {
6091 if(!isWasmInitialized) {
6092 throw new Error("initializeWasm() must be awaited first!");
6094 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
6095 return nativeResponseValue;
6097 // void ChannelConfig_free(struct LDKChannelConfig this_obj);
6098 export function ChannelConfig_free(this_obj: number): void {
6099 if(!isWasmInitialized) {
6100 throw new Error("initializeWasm() must be awaited first!");
6102 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
6103 // debug statements here
6105 // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6106 export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
6107 if(!isWasmInitialized) {
6108 throw new Error("initializeWasm() must be awaited first!");
6110 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
6111 return nativeResponseValue;
6113 // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6114 export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
6115 if(!isWasmInitialized) {
6116 throw new Error("initializeWasm() must be awaited first!");
6118 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
6119 // debug statements here
6121 // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6122 export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
6123 if(!isWasmInitialized) {
6124 throw new Error("initializeWasm() must be awaited first!");
6126 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
6127 return nativeResponseValue;
6129 // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
6130 export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
6131 if(!isWasmInitialized) {
6132 throw new Error("initializeWasm() must be awaited first!");
6134 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
6135 // debug statements here
6137 // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6138 export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
6139 if(!isWasmInitialized) {
6140 throw new Error("initializeWasm() must be awaited first!");
6142 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
6143 return nativeResponseValue;
6145 // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
6146 export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6147 if(!isWasmInitialized) {
6148 throw new Error("initializeWasm() must be awaited first!");
6150 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
6151 // debug statements here
6153 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6154 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
6155 if(!isWasmInitialized) {
6156 throw new Error("initializeWasm() must be awaited first!");
6158 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
6159 return nativeResponseValue;
6161 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6162 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
6163 if(!isWasmInitialized) {
6164 throw new Error("initializeWasm() must be awaited first!");
6166 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
6167 // debug statements here
6169 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
6170 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
6171 if(!isWasmInitialized) {
6172 throw new Error("initializeWasm() must be awaited first!");
6174 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
6175 return nativeResponseValue;
6177 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
6178 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
6179 if(!isWasmInitialized) {
6180 throw new Error("initializeWasm() must be awaited first!");
6182 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
6183 // debug statements here
6185 // 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);
6186 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 {
6187 if(!isWasmInitialized) {
6188 throw new Error("initializeWasm() must be awaited first!");
6190 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);
6191 return nativeResponseValue;
6193 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
6194 export function ChannelConfig_clone(orig: number): number {
6195 if(!isWasmInitialized) {
6196 throw new Error("initializeWasm() must be awaited first!");
6198 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
6199 return nativeResponseValue;
6201 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
6202 export function ChannelConfig_default(): number {
6203 if(!isWasmInitialized) {
6204 throw new Error("initializeWasm() must be awaited first!");
6206 const nativeResponseValue = wasm.ChannelConfig_default();
6207 return nativeResponseValue;
6209 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
6210 export function ChannelConfig_write(obj: number): Uint8Array {
6211 if(!isWasmInitialized) {
6212 throw new Error("initializeWasm() must be awaited first!");
6214 const nativeResponseValue = wasm.ChannelConfig_write(obj);
6215 return decodeArray(nativeResponseValue);
6217 // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
6218 export function ChannelConfig_read(ser: Uint8Array): number {
6219 if(!isWasmInitialized) {
6220 throw new Error("initializeWasm() must be awaited first!");
6222 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
6223 return nativeResponseValue;
6225 // void UserConfig_free(struct LDKUserConfig this_obj);
6226 export function UserConfig_free(this_obj: number): void {
6227 if(!isWasmInitialized) {
6228 throw new Error("initializeWasm() must be awaited first!");
6230 const nativeResponseValue = wasm.UserConfig_free(this_obj);
6231 // debug statements here
6233 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6234 export function UserConfig_get_own_channel_config(this_ptr: number): number {
6235 if(!isWasmInitialized) {
6236 throw new Error("initializeWasm() must be awaited first!");
6238 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
6239 return nativeResponseValue;
6241 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
6242 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
6243 if(!isWasmInitialized) {
6244 throw new Error("initializeWasm() must be awaited first!");
6246 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
6247 // debug statements here
6249 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6250 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
6251 if(!isWasmInitialized) {
6252 throw new Error("initializeWasm() must be awaited first!");
6254 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
6255 return nativeResponseValue;
6257 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
6258 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
6259 if(!isWasmInitialized) {
6260 throw new Error("initializeWasm() must be awaited first!");
6262 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
6263 // debug statements here
6265 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6266 export function UserConfig_get_channel_options(this_ptr: number): number {
6267 if(!isWasmInitialized) {
6268 throw new Error("initializeWasm() must be awaited first!");
6270 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
6271 return nativeResponseValue;
6273 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
6274 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
6275 if(!isWasmInitialized) {
6276 throw new Error("initializeWasm() must be awaited first!");
6278 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
6279 // debug statements here
6281 // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
6282 export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
6283 if(!isWasmInitialized) {
6284 throw new Error("initializeWasm() must be awaited first!");
6286 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
6287 return nativeResponseValue;
6289 // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
6290 export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
6291 if(!isWasmInitialized) {
6292 throw new Error("initializeWasm() must be awaited first!");
6294 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
6295 // debug statements here
6297 // 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);
6298 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 {
6299 if(!isWasmInitialized) {
6300 throw new Error("initializeWasm() must be awaited first!");
6302 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
6303 return nativeResponseValue;
6305 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
6306 export function UserConfig_clone(orig: number): number {
6307 if(!isWasmInitialized) {
6308 throw new Error("initializeWasm() must be awaited first!");
6310 const nativeResponseValue = wasm.UserConfig_clone(orig);
6311 return nativeResponseValue;
6313 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
6314 export function UserConfig_default(): number {
6315 if(!isWasmInitialized) {
6316 throw new Error("initializeWasm() must be awaited first!");
6318 const nativeResponseValue = wasm.UserConfig_default();
6319 return nativeResponseValue;
6321 // void BestBlock_free(struct LDKBestBlock this_obj);
6322 export function BestBlock_free(this_obj: number): void {
6323 if(!isWasmInitialized) {
6324 throw new Error("initializeWasm() must be awaited first!");
6326 const nativeResponseValue = wasm.BestBlock_free(this_obj);
6327 // debug statements here
6329 // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
6330 export function BestBlock_clone(orig: number): number {
6331 if(!isWasmInitialized) {
6332 throw new Error("initializeWasm() must be awaited first!");
6334 const nativeResponseValue = wasm.BestBlock_clone(orig);
6335 return nativeResponseValue;
6337 // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
6338 export function BestBlock_from_genesis(network: Network): number {
6339 if(!isWasmInitialized) {
6340 throw new Error("initializeWasm() must be awaited first!");
6342 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
6343 return nativeResponseValue;
6345 // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
6346 export function BestBlock_new(block_hash: Uint8Array, height: number): number {
6347 if(!isWasmInitialized) {
6348 throw new Error("initializeWasm() must be awaited first!");
6350 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
6351 return nativeResponseValue;
6353 // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
6354 export function BestBlock_block_hash(this_arg: number): Uint8Array {
6355 if(!isWasmInitialized) {
6356 throw new Error("initializeWasm() must be awaited first!");
6358 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
6359 return decodeArray(nativeResponseValue);
6361 // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
6362 export function BestBlock_height(this_arg: number): number {
6363 if(!isWasmInitialized) {
6364 throw new Error("initializeWasm() must be awaited first!");
6366 const nativeResponseValue = wasm.BestBlock_height(this_arg);
6367 return nativeResponseValue;
6369 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
6370 export function AccessError_clone(orig: number): AccessError {
6371 if(!isWasmInitialized) {
6372 throw new Error("initializeWasm() must be awaited first!");
6374 const nativeResponseValue = wasm.AccessError_clone(orig);
6375 return nativeResponseValue;
6377 // void Access_free(struct LDKAccess this_ptr);
6378 export function Access_free(this_ptr: number): void {
6379 if(!isWasmInitialized) {
6380 throw new Error("initializeWasm() must be awaited first!");
6382 const nativeResponseValue = wasm.Access_free(this_ptr);
6383 // debug statements here
6385 // void Listen_free(struct LDKListen this_ptr);
6386 export function Listen_free(this_ptr: number): void {
6387 if(!isWasmInitialized) {
6388 throw new Error("initializeWasm() must be awaited first!");
6390 const nativeResponseValue = wasm.Listen_free(this_ptr);
6391 // debug statements here
6393 // void Confirm_free(struct LDKConfirm this_ptr);
6394 export function Confirm_free(this_ptr: number): void {
6395 if(!isWasmInitialized) {
6396 throw new Error("initializeWasm() must be awaited first!");
6398 const nativeResponseValue = wasm.Confirm_free(this_ptr);
6399 // debug statements here
6401 // void Watch_free(struct LDKWatch this_ptr);
6402 export function Watch_free(this_ptr: number): void {
6403 if(!isWasmInitialized) {
6404 throw new Error("initializeWasm() must be awaited first!");
6406 const nativeResponseValue = wasm.Watch_free(this_ptr);
6407 // debug statements here
6409 // void Filter_free(struct LDKFilter this_ptr);
6410 export function Filter_free(this_ptr: number): void {
6411 if(!isWasmInitialized) {
6412 throw new Error("initializeWasm() must be awaited first!");
6414 const nativeResponseValue = wasm.Filter_free(this_ptr);
6415 // debug statements here
6417 // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
6418 export function WatchedOutput_free(this_obj: number): void {
6419 if(!isWasmInitialized) {
6420 throw new Error("initializeWasm() must be awaited first!");
6422 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
6423 // debug statements here
6425 // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6426 export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
6427 if(!isWasmInitialized) {
6428 throw new Error("initializeWasm() must be awaited first!");
6430 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
6431 return decodeArray(nativeResponseValue);
6433 // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6434 export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
6435 if(!isWasmInitialized) {
6436 throw new Error("initializeWasm() must be awaited first!");
6438 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
6439 // debug statements here
6441 // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6442 export function WatchedOutput_get_outpoint(this_ptr: number): number {
6443 if(!isWasmInitialized) {
6444 throw new Error("initializeWasm() must be awaited first!");
6446 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
6447 return nativeResponseValue;
6449 // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6450 export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
6451 if(!isWasmInitialized) {
6452 throw new Error("initializeWasm() must be awaited first!");
6454 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
6455 // debug statements here
6457 // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
6458 export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
6459 if(!isWasmInitialized) {
6460 throw new Error("initializeWasm() must be awaited first!");
6462 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
6463 return decodeArray(nativeResponseValue);
6465 // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6466 export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
6467 if(!isWasmInitialized) {
6468 throw new Error("initializeWasm() must be awaited first!");
6470 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
6471 // debug statements here
6473 // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
6474 export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
6475 if(!isWasmInitialized) {
6476 throw new Error("initializeWasm() must be awaited first!");
6478 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
6479 return nativeResponseValue;
6481 // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
6482 export function WatchedOutput_clone(orig: number): number {
6483 if(!isWasmInitialized) {
6484 throw new Error("initializeWasm() must be awaited first!");
6486 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
6487 return nativeResponseValue;
6489 // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
6490 export function WatchedOutput_hash(o: number): number {
6491 if(!isWasmInitialized) {
6492 throw new Error("initializeWasm() must be awaited first!");
6494 const nativeResponseValue = wasm.WatchedOutput_hash(o);
6495 return nativeResponseValue;
6497 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
6498 export function BroadcasterInterface_free(this_ptr: number): void {
6499 if(!isWasmInitialized) {
6500 throw new Error("initializeWasm() must be awaited first!");
6502 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
6503 // debug statements here
6505 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
6506 export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
6507 if(!isWasmInitialized) {
6508 throw new Error("initializeWasm() must be awaited first!");
6510 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
6511 return nativeResponseValue;
6513 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
6514 export function FeeEstimator_free(this_ptr: number): void {
6515 if(!isWasmInitialized) {
6516 throw new Error("initializeWasm() must be awaited first!");
6518 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
6519 // debug statements here
6521 // void ChainMonitor_free(struct LDKChainMonitor this_obj);
6522 export function ChainMonitor_free(this_obj: number): void {
6523 if(!isWasmInitialized) {
6524 throw new Error("initializeWasm() must be awaited first!");
6526 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
6527 // debug statements here
6529 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
6530 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
6531 if(!isWasmInitialized) {
6532 throw new Error("initializeWasm() must be awaited first!");
6534 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
6535 return nativeResponseValue;
6537 // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6538 export function ChainMonitor_as_Listen(this_arg: number): number {
6539 if(!isWasmInitialized) {
6540 throw new Error("initializeWasm() must be awaited first!");
6542 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
6543 return nativeResponseValue;
6545 // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6546 export function ChainMonitor_as_Confirm(this_arg: number): number {
6547 if(!isWasmInitialized) {
6548 throw new Error("initializeWasm() must be awaited first!");
6550 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
6551 return nativeResponseValue;
6553 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6554 export function ChainMonitor_as_Watch(this_arg: number): number {
6555 if(!isWasmInitialized) {
6556 throw new Error("initializeWasm() must be awaited first!");
6558 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
6559 return nativeResponseValue;
6561 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
6562 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
6563 if(!isWasmInitialized) {
6564 throw new Error("initializeWasm() must be awaited first!");
6566 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
6567 return nativeResponseValue;
6569 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
6570 export function ChannelMonitorUpdate_free(this_obj: number): void {
6571 if(!isWasmInitialized) {
6572 throw new Error("initializeWasm() must be awaited first!");
6574 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
6575 // debug statements here
6577 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
6578 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
6579 if(!isWasmInitialized) {
6580 throw new Error("initializeWasm() must be awaited first!");
6582 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
6583 return nativeResponseValue;
6585 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
6586 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
6587 if(!isWasmInitialized) {
6588 throw new Error("initializeWasm() must be awaited first!");
6590 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
6591 // debug statements here
6593 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
6594 export function ChannelMonitorUpdate_clone(orig: number): number {
6595 if(!isWasmInitialized) {
6596 throw new Error("initializeWasm() must be awaited first!");
6598 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
6599 return nativeResponseValue;
6601 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
6602 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
6603 if(!isWasmInitialized) {
6604 throw new Error("initializeWasm() must be awaited first!");
6606 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
6607 return decodeArray(nativeResponseValue);
6609 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
6610 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
6611 if(!isWasmInitialized) {
6612 throw new Error("initializeWasm() must be awaited first!");
6614 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
6615 return nativeResponseValue;
6617 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
6618 export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
6619 if(!isWasmInitialized) {
6620 throw new Error("initializeWasm() must be awaited first!");
6622 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
6623 return nativeResponseValue;
6625 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
6626 export function MonitorUpdateError_free(this_obj: number): void {
6627 if(!isWasmInitialized) {
6628 throw new Error("initializeWasm() must be awaited first!");
6630 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
6631 // debug statements here
6633 // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
6634 export function MonitorUpdateError_clone(orig: number): number {
6635 if(!isWasmInitialized) {
6636 throw new Error("initializeWasm() must be awaited first!");
6638 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
6639 return nativeResponseValue;
6641 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
6642 export function MonitorEvent_free(this_ptr: number): void {
6643 if(!isWasmInitialized) {
6644 throw new Error("initializeWasm() must be awaited first!");
6646 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
6647 // debug statements here
6649 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
6650 export function MonitorEvent_clone(orig: number): number {
6651 if(!isWasmInitialized) {
6652 throw new Error("initializeWasm() must be awaited first!");
6654 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
6655 return nativeResponseValue;
6657 // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
6658 export function HTLCUpdate_free(this_obj: number): void {
6659 if(!isWasmInitialized) {
6660 throw new Error("initializeWasm() must be awaited first!");
6662 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
6663 // debug statements here
6665 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
6666 export function HTLCUpdate_clone(orig: number): number {
6667 if(!isWasmInitialized) {
6668 throw new Error("initializeWasm() must be awaited first!");
6670 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
6671 return nativeResponseValue;
6673 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
6674 export function HTLCUpdate_write(obj: number): Uint8Array {
6675 if(!isWasmInitialized) {
6676 throw new Error("initializeWasm() must be awaited first!");
6678 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
6679 return decodeArray(nativeResponseValue);
6681 // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
6682 export function HTLCUpdate_read(ser: Uint8Array): number {
6683 if(!isWasmInitialized) {
6684 throw new Error("initializeWasm() must be awaited first!");
6686 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
6687 return nativeResponseValue;
6689 // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
6690 export function ChannelMonitor_free(this_obj: number): void {
6691 if(!isWasmInitialized) {
6692 throw new Error("initializeWasm() must be awaited first!");
6694 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
6695 // debug statements here
6697 // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
6698 export function ChannelMonitor_clone(orig: number): number {
6699 if(!isWasmInitialized) {
6700 throw new Error("initializeWasm() must be awaited first!");
6702 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
6703 return nativeResponseValue;
6705 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
6706 export function ChannelMonitor_write(obj: number): Uint8Array {
6707 if(!isWasmInitialized) {
6708 throw new Error("initializeWasm() must be awaited first!");
6710 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
6711 return decodeArray(nativeResponseValue);
6713 // 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);
6714 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
6715 if(!isWasmInitialized) {
6716 throw new Error("initializeWasm() must be awaited first!");
6718 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
6719 return nativeResponseValue;
6721 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6722 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
6723 if(!isWasmInitialized) {
6724 throw new Error("initializeWasm() must be awaited first!");
6726 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
6727 return nativeResponseValue;
6729 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6730 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
6731 if(!isWasmInitialized) {
6732 throw new Error("initializeWasm() must be awaited first!");
6734 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
6735 return nativeResponseValue;
6737 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6738 export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
6739 if(!isWasmInitialized) {
6740 throw new Error("initializeWasm() must be awaited first!");
6742 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
6743 return nativeResponseValue;
6745 // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
6746 export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
6747 if(!isWasmInitialized) {
6748 throw new Error("initializeWasm() must be awaited first!");
6750 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
6751 // debug statements here
6753 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6754 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
6755 if(!isWasmInitialized) {
6756 throw new Error("initializeWasm() must be awaited first!");
6758 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
6759 return nativeResponseValue;
6761 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6762 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
6763 if(!isWasmInitialized) {
6764 throw new Error("initializeWasm() must be awaited first!");
6766 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
6767 return nativeResponseValue;
6769 // 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);
6770 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
6771 if(!isWasmInitialized) {
6772 throw new Error("initializeWasm() must be awaited first!");
6774 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
6775 return nativeResponseValue;
6777 // 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);
6778 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6779 if(!isWasmInitialized) {
6780 throw new Error("initializeWasm() must be awaited first!");
6782 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
6783 return nativeResponseValue;
6785 // 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);
6786 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
6787 if(!isWasmInitialized) {
6788 throw new Error("initializeWasm() must be awaited first!");
6790 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
6791 // debug statements here
6793 // 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);
6794 export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6795 if(!isWasmInitialized) {
6796 throw new Error("initializeWasm() must be awaited first!");
6798 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
6799 return nativeResponseValue;
6801 // 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);
6802 export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
6803 if(!isWasmInitialized) {
6804 throw new Error("initializeWasm() must be awaited first!");
6806 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
6807 // debug statements here
6809 // 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);
6810 export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
6811 if(!isWasmInitialized) {
6812 throw new Error("initializeWasm() must be awaited first!");
6814 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
6815 return nativeResponseValue;
6817 // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6818 export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
6819 if(!isWasmInitialized) {
6820 throw new Error("initializeWasm() must be awaited first!");
6822 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
6823 return nativeResponseValue;
6825 // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
6826 export function ChannelMonitor_current_best_block(this_arg: number): number {
6827 if(!isWasmInitialized) {
6828 throw new Error("initializeWasm() must be awaited first!");
6830 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
6831 return nativeResponseValue;
6833 // void Persist_free(struct LDKPersist this_ptr);
6834 export function Persist_free(this_ptr: number): void {
6835 if(!isWasmInitialized) {
6836 throw new Error("initializeWasm() must be awaited first!");
6838 const nativeResponseValue = wasm.Persist_free(this_ptr);
6839 // debug statements here
6841 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
6842 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
6843 if(!isWasmInitialized) {
6844 throw new Error("initializeWasm() must be awaited first!");
6846 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
6847 return nativeResponseValue;
6849 // void OutPoint_free(struct LDKOutPoint this_obj);
6850 export function OutPoint_free(this_obj: number): void {
6851 if(!isWasmInitialized) {
6852 throw new Error("initializeWasm() must be awaited first!");
6854 const nativeResponseValue = wasm.OutPoint_free(this_obj);
6855 // debug statements here
6857 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
6858 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
6859 if(!isWasmInitialized) {
6860 throw new Error("initializeWasm() must be awaited first!");
6862 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
6863 return decodeArray(nativeResponseValue);
6865 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6866 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
6867 if(!isWasmInitialized) {
6868 throw new Error("initializeWasm() must be awaited first!");
6870 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
6871 // debug statements here
6873 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
6874 export function OutPoint_get_index(this_ptr: number): number {
6875 if(!isWasmInitialized) {
6876 throw new Error("initializeWasm() must be awaited first!");
6878 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
6879 return nativeResponseValue;
6881 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
6882 export function OutPoint_set_index(this_ptr: number, val: number): void {
6883 if(!isWasmInitialized) {
6884 throw new Error("initializeWasm() must be awaited first!");
6886 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
6887 // debug statements here
6889 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
6890 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
6891 if(!isWasmInitialized) {
6892 throw new Error("initializeWasm() must be awaited first!");
6894 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
6895 return nativeResponseValue;
6897 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
6898 export function OutPoint_clone(orig: number): number {
6899 if(!isWasmInitialized) {
6900 throw new Error("initializeWasm() must be awaited first!");
6902 const nativeResponseValue = wasm.OutPoint_clone(orig);
6903 return nativeResponseValue;
6905 // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
6906 export function OutPoint_eq(a: number, b: number): boolean {
6907 if(!isWasmInitialized) {
6908 throw new Error("initializeWasm() must be awaited first!");
6910 const nativeResponseValue = wasm.OutPoint_eq(a, b);
6911 return nativeResponseValue;
6913 // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
6914 export function OutPoint_hash(o: number): number {
6915 if(!isWasmInitialized) {
6916 throw new Error("initializeWasm() must be awaited first!");
6918 const nativeResponseValue = wasm.OutPoint_hash(o);
6919 return nativeResponseValue;
6921 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
6922 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
6923 if(!isWasmInitialized) {
6924 throw new Error("initializeWasm() must be awaited first!");
6926 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
6927 return decodeArray(nativeResponseValue);
6929 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
6930 export function OutPoint_write(obj: number): Uint8Array {
6931 if(!isWasmInitialized) {
6932 throw new Error("initializeWasm() must be awaited first!");
6934 const nativeResponseValue = wasm.OutPoint_write(obj);
6935 return decodeArray(nativeResponseValue);
6937 // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
6938 export function OutPoint_read(ser: Uint8Array): number {
6939 if(!isWasmInitialized) {
6940 throw new Error("initializeWasm() must be awaited first!");
6942 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
6943 return nativeResponseValue;
6945 // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
6946 export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
6947 if(!isWasmInitialized) {
6948 throw new Error("initializeWasm() must be awaited first!");
6950 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
6951 // debug statements here
6953 // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6954 export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
6955 if(!isWasmInitialized) {
6956 throw new Error("initializeWasm() must be awaited first!");
6958 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
6959 return nativeResponseValue;
6961 // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
6962 export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
6963 if(!isWasmInitialized) {
6964 throw new Error("initializeWasm() must be awaited first!");
6966 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
6967 // debug statements here
6969 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6970 export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
6971 if(!isWasmInitialized) {
6972 throw new Error("initializeWasm() must be awaited first!");
6974 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
6975 return decodeArray(nativeResponseValue);
6977 // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6978 export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6979 if(!isWasmInitialized) {
6980 throw new Error("initializeWasm() must be awaited first!");
6982 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
6983 // debug statements here
6985 // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
6986 export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
6987 if(!isWasmInitialized) {
6988 throw new Error("initializeWasm() must be awaited first!");
6990 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
6991 return nativeResponseValue;
6993 // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
6994 export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
6995 if(!isWasmInitialized) {
6996 throw new Error("initializeWasm() must be awaited first!");
6998 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
6999 // debug statements here
7001 // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
7002 export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
7003 if(!isWasmInitialized) {
7004 throw new Error("initializeWasm() must be awaited first!");
7006 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
7007 // debug statements here
7009 // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7010 export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
7011 if(!isWasmInitialized) {
7012 throw new Error("initializeWasm() must be awaited first!");
7014 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
7015 return decodeArray(nativeResponseValue);
7017 // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7018 export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
7019 if(!isWasmInitialized) {
7020 throw new Error("initializeWasm() must be awaited first!");
7022 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
7023 // debug statements here
7025 // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
7026 export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
7027 if(!isWasmInitialized) {
7028 throw new Error("initializeWasm() must be awaited first!");
7030 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
7031 return decodeArray(nativeResponseValue);
7033 // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7034 export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
7035 if(!isWasmInitialized) {
7036 throw new Error("initializeWasm() must be awaited first!");
7038 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
7039 // debug statements here
7041 // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7042 export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
7043 if(!isWasmInitialized) {
7044 throw new Error("initializeWasm() must be awaited first!");
7046 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7047 return nativeResponseValue;
7049 // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7050 export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7051 if(!isWasmInitialized) {
7052 throw new Error("initializeWasm() must be awaited first!");
7054 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7055 // debug statements here
7057 // 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);
7058 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 {
7059 if(!isWasmInitialized) {
7060 throw new Error("initializeWasm() must be awaited first!");
7062 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);
7063 return nativeResponseValue;
7065 // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
7066 export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
7067 if(!isWasmInitialized) {
7068 throw new Error("initializeWasm() must be awaited first!");
7070 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
7071 return nativeResponseValue;
7073 // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
7074 export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
7075 if(!isWasmInitialized) {
7076 throw new Error("initializeWasm() must be awaited first!");
7078 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
7079 return decodeArray(nativeResponseValue);
7081 // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
7082 export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
7083 if(!isWasmInitialized) {
7084 throw new Error("initializeWasm() must be awaited first!");
7086 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
7087 return nativeResponseValue;
7089 // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
7090 export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
7091 if(!isWasmInitialized) {
7092 throw new Error("initializeWasm() must be awaited first!");
7094 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
7095 // debug statements here
7097 // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7098 export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
7099 if(!isWasmInitialized) {
7100 throw new Error("initializeWasm() must be awaited first!");
7102 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
7103 return nativeResponseValue;
7105 // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7106 export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
7107 if(!isWasmInitialized) {
7108 throw new Error("initializeWasm() must be awaited first!");
7110 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
7111 // debug statements here
7113 // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
7114 export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
7115 if(!isWasmInitialized) {
7116 throw new Error("initializeWasm() must be awaited first!");
7118 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
7119 // debug statements here
7121 // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
7122 export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
7123 if(!isWasmInitialized) {
7124 throw new Error("initializeWasm() must be awaited first!");
7126 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
7127 return decodeArray(nativeResponseValue);
7129 // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7130 export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
7131 if(!isWasmInitialized) {
7132 throw new Error("initializeWasm() must be awaited first!");
7134 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
7135 // debug statements here
7137 // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
7138 export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
7139 if(!isWasmInitialized) {
7140 throw new Error("initializeWasm() must be awaited first!");
7142 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
7143 return nativeResponseValue;
7145 // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
7146 export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
7147 if(!isWasmInitialized) {
7148 throw new Error("initializeWasm() must be awaited first!");
7150 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
7151 // debug statements here
7153 // 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);
7154 export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
7155 if(!isWasmInitialized) {
7156 throw new Error("initializeWasm() must be awaited first!");
7158 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
7159 return nativeResponseValue;
7161 // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
7162 export function StaticPaymentOutputDescriptor_clone(orig: number): number {
7163 if(!isWasmInitialized) {
7164 throw new Error("initializeWasm() must be awaited first!");
7166 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
7167 return nativeResponseValue;
7169 // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
7170 export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
7171 if(!isWasmInitialized) {
7172 throw new Error("initializeWasm() must be awaited first!");
7174 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
7175 return decodeArray(nativeResponseValue);
7177 // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
7178 export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
7179 if(!isWasmInitialized) {
7180 throw new Error("initializeWasm() must be awaited first!");
7182 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
7183 return nativeResponseValue;
7185 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
7186 export function SpendableOutputDescriptor_free(this_ptr: number): void {
7187 if(!isWasmInitialized) {
7188 throw new Error("initializeWasm() must be awaited first!");
7190 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
7191 // debug statements here
7193 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
7194 export function SpendableOutputDescriptor_clone(orig: number): number {
7195 if(!isWasmInitialized) {
7196 throw new Error("initializeWasm() must be awaited first!");
7198 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
7199 return nativeResponseValue;
7201 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
7202 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
7203 if(!isWasmInitialized) {
7204 throw new Error("initializeWasm() must be awaited first!");
7206 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
7207 return decodeArray(nativeResponseValue);
7209 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
7210 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
7211 if(!isWasmInitialized) {
7212 throw new Error("initializeWasm() must be awaited first!");
7214 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
7215 return nativeResponseValue;
7217 // void BaseSign_free(struct LDKBaseSign this_ptr);
7218 export function BaseSign_free(this_ptr: number): void {
7219 if(!isWasmInitialized) {
7220 throw new Error("initializeWasm() must be awaited first!");
7222 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
7223 // debug statements here
7225 // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
7226 export function Sign_clone(orig: number): number {
7227 if(!isWasmInitialized) {
7228 throw new Error("initializeWasm() must be awaited first!");
7230 const nativeResponseValue = wasm.Sign_clone(orig);
7231 return nativeResponseValue;
7233 // void Sign_free(struct LDKSign this_ptr);
7234 export function Sign_free(this_ptr: number): void {
7235 if(!isWasmInitialized) {
7236 throw new Error("initializeWasm() must be awaited first!");
7238 const nativeResponseValue = wasm.Sign_free(this_ptr);
7239 // debug statements here
7241 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
7242 export function KeysInterface_free(this_ptr: number): void {
7243 if(!isWasmInitialized) {
7244 throw new Error("initializeWasm() must be awaited first!");
7246 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
7247 // debug statements here
7249 // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
7250 export function InMemorySigner_free(this_obj: number): void {
7251 if(!isWasmInitialized) {
7252 throw new Error("initializeWasm() must be awaited first!");
7254 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
7255 // debug statements here
7257 // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7258 export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
7259 if(!isWasmInitialized) {
7260 throw new Error("initializeWasm() must be awaited first!");
7262 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
7263 return decodeArray(nativeResponseValue);
7265 // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7266 export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
7267 if(!isWasmInitialized) {
7268 throw new Error("initializeWasm() must be awaited first!");
7270 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
7271 // debug statements here
7273 // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7274 export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
7275 if(!isWasmInitialized) {
7276 throw new Error("initializeWasm() must be awaited first!");
7278 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
7279 return decodeArray(nativeResponseValue);
7281 // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7282 export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
7283 if(!isWasmInitialized) {
7284 throw new Error("initializeWasm() must be awaited first!");
7286 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
7287 // debug statements here
7289 // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7290 export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
7291 if(!isWasmInitialized) {
7292 throw new Error("initializeWasm() must be awaited first!");
7294 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
7295 return decodeArray(nativeResponseValue);
7297 // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7298 export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
7299 if(!isWasmInitialized) {
7300 throw new Error("initializeWasm() must be awaited first!");
7302 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
7303 // debug statements here
7305 // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7306 export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
7307 if(!isWasmInitialized) {
7308 throw new Error("initializeWasm() must be awaited first!");
7310 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
7311 return decodeArray(nativeResponseValue);
7313 // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7314 export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
7315 if(!isWasmInitialized) {
7316 throw new Error("initializeWasm() must be awaited first!");
7318 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
7319 // debug statements here
7321 // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7322 export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
7323 if(!isWasmInitialized) {
7324 throw new Error("initializeWasm() must be awaited first!");
7326 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
7327 return decodeArray(nativeResponseValue);
7329 // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
7330 export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
7331 if(!isWasmInitialized) {
7332 throw new Error("initializeWasm() must be awaited first!");
7334 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
7335 // debug statements here
7337 // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
7338 export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
7339 if(!isWasmInitialized) {
7340 throw new Error("initializeWasm() must be awaited first!");
7342 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
7343 return decodeArray(nativeResponseValue);
7345 // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7346 export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
7347 if(!isWasmInitialized) {
7348 throw new Error("initializeWasm() must be awaited first!");
7350 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
7351 // debug statements here
7353 // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
7354 export function InMemorySigner_clone(orig: number): number {
7355 if(!isWasmInitialized) {
7356 throw new Error("initializeWasm() must be awaited first!");
7358 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
7359 return nativeResponseValue;
7361 // 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);
7362 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 {
7363 if(!isWasmInitialized) {
7364 throw new Error("initializeWasm() must be awaited first!");
7366 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));
7367 return nativeResponseValue;
7369 // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7370 export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
7371 if(!isWasmInitialized) {
7372 throw new Error("initializeWasm() must be awaited first!");
7374 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
7375 return nativeResponseValue;
7377 // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7378 export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
7379 if(!isWasmInitialized) {
7380 throw new Error("initializeWasm() must be awaited first!");
7382 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
7383 return nativeResponseValue;
7385 // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7386 export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
7387 if(!isWasmInitialized) {
7388 throw new Error("initializeWasm() must be awaited first!");
7390 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
7391 return nativeResponseValue;
7393 // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7394 export function InMemorySigner_is_outbound(this_arg: number): boolean {
7395 if(!isWasmInitialized) {
7396 throw new Error("initializeWasm() must be awaited first!");
7398 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
7399 return nativeResponseValue;
7401 // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7402 export function InMemorySigner_funding_outpoint(this_arg: number): number {
7403 if(!isWasmInitialized) {
7404 throw new Error("initializeWasm() must be awaited first!");
7406 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
7407 return nativeResponseValue;
7409 // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7410 export function InMemorySigner_get_channel_parameters(this_arg: number): number {
7411 if(!isWasmInitialized) {
7412 throw new Error("initializeWasm() must be awaited first!");
7414 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
7415 return nativeResponseValue;
7417 // 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);
7418 export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7419 if(!isWasmInitialized) {
7420 throw new Error("initializeWasm() must be awaited first!");
7422 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7423 return nativeResponseValue;
7425 // 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);
7426 export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
7427 if(!isWasmInitialized) {
7428 throw new Error("initializeWasm() must be awaited first!");
7430 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
7431 return nativeResponseValue;
7433 // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7434 export function InMemorySigner_as_BaseSign(this_arg: number): number {
7435 if(!isWasmInitialized) {
7436 throw new Error("initializeWasm() must be awaited first!");
7438 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
7439 return nativeResponseValue;
7441 // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
7442 export function InMemorySigner_as_Sign(this_arg: number): number {
7443 if(!isWasmInitialized) {
7444 throw new Error("initializeWasm() must be awaited first!");
7446 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
7447 return nativeResponseValue;
7449 // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
7450 export function InMemorySigner_write(obj: number): Uint8Array {
7451 if(!isWasmInitialized) {
7452 throw new Error("initializeWasm() must be awaited first!");
7454 const nativeResponseValue = wasm.InMemorySigner_write(obj);
7455 return decodeArray(nativeResponseValue);
7457 // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
7458 export function InMemorySigner_read(ser: Uint8Array): number {
7459 if(!isWasmInitialized) {
7460 throw new Error("initializeWasm() must be awaited first!");
7462 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
7463 return nativeResponseValue;
7465 // void KeysManager_free(struct LDKKeysManager this_obj);
7466 export function KeysManager_free(this_obj: number): void {
7467 if(!isWasmInitialized) {
7468 throw new Error("initializeWasm() must be awaited first!");
7470 const nativeResponseValue = wasm.KeysManager_free(this_obj);
7471 // debug statements here
7473 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
7474 export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
7475 if(!isWasmInitialized) {
7476 throw new Error("initializeWasm() must be awaited first!");
7478 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
7479 return nativeResponseValue;
7481 // 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]);
7482 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
7483 if(!isWasmInitialized) {
7484 throw new Error("initializeWasm() must be awaited first!");
7486 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
7487 return nativeResponseValue;
7489 // 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);
7490 export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
7491 if(!isWasmInitialized) {
7492 throw new Error("initializeWasm() must be awaited first!");
7494 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
7495 return nativeResponseValue;
7497 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
7498 export function KeysManager_as_KeysInterface(this_arg: number): number {
7499 if(!isWasmInitialized) {
7500 throw new Error("initializeWasm() must be awaited first!");
7502 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
7503 return nativeResponseValue;
7505 // void ChannelManager_free(struct LDKChannelManager this_obj);
7506 export function ChannelManager_free(this_obj: number): void {
7507 if(!isWasmInitialized) {
7508 throw new Error("initializeWasm() must be awaited first!");
7510 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
7511 // debug statements here
7513 // void ChainParameters_free(struct LDKChainParameters this_obj);
7514 export function ChainParameters_free(this_obj: number): void {
7515 if(!isWasmInitialized) {
7516 throw new Error("initializeWasm() must be awaited first!");
7518 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
7519 // debug statements here
7521 // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7522 export function ChainParameters_get_network(this_ptr: number): Network {
7523 if(!isWasmInitialized) {
7524 throw new Error("initializeWasm() must be awaited first!");
7526 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
7527 return nativeResponseValue;
7529 // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
7530 export function ChainParameters_set_network(this_ptr: number, val: Network): void {
7531 if(!isWasmInitialized) {
7532 throw new Error("initializeWasm() must be awaited first!");
7534 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
7535 // debug statements here
7537 // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
7538 export function ChainParameters_get_best_block(this_ptr: number): number {
7539 if(!isWasmInitialized) {
7540 throw new Error("initializeWasm() must be awaited first!");
7542 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
7543 return nativeResponseValue;
7545 // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
7546 export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
7547 if(!isWasmInitialized) {
7548 throw new Error("initializeWasm() must be awaited first!");
7550 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
7551 // debug statements here
7553 // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
7554 export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
7555 if(!isWasmInitialized) {
7556 throw new Error("initializeWasm() must be awaited first!");
7558 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
7559 return nativeResponseValue;
7561 // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
7562 export function ChainParameters_clone(orig: number): number {
7563 if(!isWasmInitialized) {
7564 throw new Error("initializeWasm() must be awaited first!");
7566 const nativeResponseValue = wasm.ChainParameters_clone(orig);
7567 return nativeResponseValue;
7569 // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
7570 export function ChannelCounterparty_free(this_obj: number): void {
7571 if(!isWasmInitialized) {
7572 throw new Error("initializeWasm() must be awaited first!");
7574 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
7575 // debug statements here
7577 // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
7578 export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
7579 if(!isWasmInitialized) {
7580 throw new Error("initializeWasm() must be awaited first!");
7582 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
7583 return decodeArray(nativeResponseValue);
7585 // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7586 export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
7587 if(!isWasmInitialized) {
7588 throw new Error("initializeWasm() must be awaited first!");
7590 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
7591 // debug statements here
7593 // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
7594 export function ChannelCounterparty_get_features(this_ptr: number): number {
7595 if(!isWasmInitialized) {
7596 throw new Error("initializeWasm() must be awaited first!");
7598 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
7599 return nativeResponseValue;
7601 // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
7602 export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
7603 if(!isWasmInitialized) {
7604 throw new Error("initializeWasm() must be awaited first!");
7606 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
7607 // debug statements here
7609 // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
7610 export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
7611 if(!isWasmInitialized) {
7612 throw new Error("initializeWasm() must be awaited first!");
7614 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
7615 return nativeResponseValue;
7617 // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
7618 export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
7619 if(!isWasmInitialized) {
7620 throw new Error("initializeWasm() must be awaited first!");
7622 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
7623 // debug statements here
7625 // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
7626 export function ChannelCounterparty_clone(orig: number): number {
7627 if(!isWasmInitialized) {
7628 throw new Error("initializeWasm() must be awaited first!");
7630 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
7631 return nativeResponseValue;
7633 // void ChannelDetails_free(struct LDKChannelDetails this_obj);
7634 export function ChannelDetails_free(this_obj: number): void {
7635 if(!isWasmInitialized) {
7636 throw new Error("initializeWasm() must be awaited first!");
7638 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
7639 // debug statements here
7641 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
7642 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
7643 if(!isWasmInitialized) {
7644 throw new Error("initializeWasm() must be awaited first!");
7646 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
7647 return decodeArray(nativeResponseValue);
7649 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7650 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
7651 if(!isWasmInitialized) {
7652 throw new Error("initializeWasm() must be awaited first!");
7654 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
7655 // debug statements here
7657 // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7658 export function ChannelDetails_get_counterparty(this_ptr: number): number {
7659 if(!isWasmInitialized) {
7660 throw new Error("initializeWasm() must be awaited first!");
7662 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
7663 return nativeResponseValue;
7665 // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
7666 export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
7667 if(!isWasmInitialized) {
7668 throw new Error("initializeWasm() must be awaited first!");
7670 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
7671 // debug statements here
7673 // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7674 export function ChannelDetails_get_funding_txo(this_ptr: number): number {
7675 if(!isWasmInitialized) {
7676 throw new Error("initializeWasm() must be awaited first!");
7678 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
7679 return nativeResponseValue;
7681 // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7682 export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
7683 if(!isWasmInitialized) {
7684 throw new Error("initializeWasm() must be awaited first!");
7686 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
7687 // debug statements here
7689 // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7690 export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
7691 if(!isWasmInitialized) {
7692 throw new Error("initializeWasm() must be awaited first!");
7694 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
7695 return nativeResponseValue;
7697 // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
7698 export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
7699 if(!isWasmInitialized) {
7700 throw new Error("initializeWasm() must be awaited first!");
7702 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
7703 // debug statements here
7705 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7706 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
7707 if(!isWasmInitialized) {
7708 throw new Error("initializeWasm() must be awaited first!");
7710 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
7711 return nativeResponseValue;
7713 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7714 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
7715 if(!isWasmInitialized) {
7716 throw new Error("initializeWasm() must be awaited first!");
7718 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
7719 // debug statements here
7721 // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7722 export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
7723 if(!isWasmInitialized) {
7724 throw new Error("initializeWasm() must be awaited first!");
7726 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
7727 return nativeResponseValue;
7729 // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
7730 export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
7731 if(!isWasmInitialized) {
7732 throw new Error("initializeWasm() must be awaited first!");
7734 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
7735 // debug statements here
7737 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7738 export function ChannelDetails_get_user_id(this_ptr: number): number {
7739 if(!isWasmInitialized) {
7740 throw new Error("initializeWasm() must be awaited first!");
7742 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
7743 return nativeResponseValue;
7745 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7746 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
7747 if(!isWasmInitialized) {
7748 throw new Error("initializeWasm() must be awaited first!");
7750 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
7751 // debug statements here
7753 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7754 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
7755 if(!isWasmInitialized) {
7756 throw new Error("initializeWasm() must be awaited first!");
7758 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
7759 return nativeResponseValue;
7761 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7762 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
7763 if(!isWasmInitialized) {
7764 throw new Error("initializeWasm() must be awaited first!");
7766 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
7767 // debug statements here
7769 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7770 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
7771 if(!isWasmInitialized) {
7772 throw new Error("initializeWasm() must be awaited first!");
7774 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
7775 return nativeResponseValue;
7777 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
7778 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
7779 if(!isWasmInitialized) {
7780 throw new Error("initializeWasm() must be awaited first!");
7782 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
7783 // debug statements here
7785 // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7786 export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
7787 if(!isWasmInitialized) {
7788 throw new Error("initializeWasm() must be awaited first!");
7790 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
7791 return nativeResponseValue;
7793 // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
7794 export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
7795 if(!isWasmInitialized) {
7796 throw new Error("initializeWasm() must be awaited first!");
7798 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
7799 // debug statements here
7801 // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7802 export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
7803 if(!isWasmInitialized) {
7804 throw new Error("initializeWasm() must be awaited first!");
7806 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
7807 return nativeResponseValue;
7809 // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
7810 export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
7811 if(!isWasmInitialized) {
7812 throw new Error("initializeWasm() must be awaited first!");
7814 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
7815 // debug statements here
7817 // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7818 export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
7819 if(!isWasmInitialized) {
7820 throw new Error("initializeWasm() must be awaited first!");
7822 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
7823 return nativeResponseValue;
7825 // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7826 export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
7827 if(!isWasmInitialized) {
7828 throw new Error("initializeWasm() must be awaited first!");
7830 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
7831 // debug statements here
7833 // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7834 export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
7835 if(!isWasmInitialized) {
7836 throw new Error("initializeWasm() must be awaited first!");
7838 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
7839 return nativeResponseValue;
7841 // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7842 export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
7843 if(!isWasmInitialized) {
7844 throw new Error("initializeWasm() must be awaited first!");
7846 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
7847 // debug statements here
7849 // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7850 export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
7851 if(!isWasmInitialized) {
7852 throw new Error("initializeWasm() must be awaited first!");
7854 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
7855 return nativeResponseValue;
7857 // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7858 export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
7859 if(!isWasmInitialized) {
7860 throw new Error("initializeWasm() must be awaited first!");
7862 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
7863 // debug statements here
7865 // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
7866 export function ChannelDetails_get_is_public(this_ptr: number): boolean {
7867 if(!isWasmInitialized) {
7868 throw new Error("initializeWasm() must be awaited first!");
7870 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
7871 return nativeResponseValue;
7873 // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
7874 export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
7875 if(!isWasmInitialized) {
7876 throw new Error("initializeWasm() must be awaited first!");
7878 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
7879 // debug statements here
7881 // 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);
7882 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 {
7883 if(!isWasmInitialized) {
7884 throw new Error("initializeWasm() must be awaited first!");
7886 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);
7887 return nativeResponseValue;
7889 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
7890 export function ChannelDetails_clone(orig: number): number {
7891 if(!isWasmInitialized) {
7892 throw new Error("initializeWasm() must be awaited first!");
7894 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
7895 return nativeResponseValue;
7897 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
7898 export function PaymentSendFailure_free(this_ptr: number): void {
7899 if(!isWasmInitialized) {
7900 throw new Error("initializeWasm() must be awaited first!");
7902 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
7903 // debug statements here
7905 // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
7906 export function PaymentSendFailure_clone(orig: number): number {
7907 if(!isWasmInitialized) {
7908 throw new Error("initializeWasm() must be awaited first!");
7910 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
7911 return nativeResponseValue;
7913 // 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);
7914 export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
7915 if(!isWasmInitialized) {
7916 throw new Error("initializeWasm() must be awaited first!");
7918 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
7919 return nativeResponseValue;
7921 // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
7922 export function ChannelManager_get_current_default_configuration(this_arg: number): number {
7923 if(!isWasmInitialized) {
7924 throw new Error("initializeWasm() must be awaited first!");
7926 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
7927 return nativeResponseValue;
7929 // 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);
7930 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 {
7931 if(!isWasmInitialized) {
7932 throw new Error("initializeWasm() must be awaited first!");
7934 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
7935 return nativeResponseValue;
7937 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7938 export function ChannelManager_list_channels(this_arg: number): number[] {
7939 if(!isWasmInitialized) {
7940 throw new Error("initializeWasm() must be awaited first!");
7942 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
7943 return nativeResponseValue;
7945 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7946 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
7947 if(!isWasmInitialized) {
7948 throw new Error("initializeWasm() must be awaited first!");
7950 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
7951 return nativeResponseValue;
7953 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
7954 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
7955 if(!isWasmInitialized) {
7956 throw new Error("initializeWasm() must be awaited first!");
7958 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
7959 return nativeResponseValue;
7961 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
7962 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
7963 if(!isWasmInitialized) {
7964 throw new Error("initializeWasm() must be awaited first!");
7966 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
7967 return nativeResponseValue;
7969 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
7970 export function ChannelManager_force_close_all_channels(this_arg: number): void {
7971 if(!isWasmInitialized) {
7972 throw new Error("initializeWasm() must be awaited first!");
7974 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
7975 // debug statements here
7977 // 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);
7978 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
7979 if(!isWasmInitialized) {
7980 throw new Error("initializeWasm() must be awaited first!");
7982 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
7983 return nativeResponseValue;
7985 // 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);
7986 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
7987 if(!isWasmInitialized) {
7988 throw new Error("initializeWasm() must be awaited first!");
7990 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
7991 return nativeResponseValue;
7993 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
7994 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
7995 if(!isWasmInitialized) {
7996 throw new Error("initializeWasm() must be awaited first!");
7998 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
7999 // debug statements here
8001 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
8002 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
8003 if(!isWasmInitialized) {
8004 throw new Error("initializeWasm() must be awaited first!");
8006 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
8007 // debug statements here
8009 // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
8010 export function ChannelManager_timer_tick_occurred(this_arg: number): void {
8011 if(!isWasmInitialized) {
8012 throw new Error("initializeWasm() must be awaited first!");
8014 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
8015 // debug statements here
8017 // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
8018 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
8019 if(!isWasmInitialized) {
8020 throw new Error("initializeWasm() must be awaited first!");
8022 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
8023 return nativeResponseValue;
8025 // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
8026 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
8027 if(!isWasmInitialized) {
8028 throw new Error("initializeWasm() must be awaited first!");
8030 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
8031 return nativeResponseValue;
8033 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
8034 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
8035 if(!isWasmInitialized) {
8036 throw new Error("initializeWasm() must be awaited first!");
8038 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
8039 return decodeArray(nativeResponseValue);
8041 // 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);
8042 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
8043 if(!isWasmInitialized) {
8044 throw new Error("initializeWasm() must be awaited first!");
8046 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
8047 // debug statements here
8049 // 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);
8050 export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
8051 if(!isWasmInitialized) {
8052 throw new Error("initializeWasm() must be awaited first!");
8054 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
8055 return nativeResponseValue;
8057 // 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);
8058 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 {
8059 if(!isWasmInitialized) {
8060 throw new Error("initializeWasm() must be awaited first!");
8062 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
8063 return nativeResponseValue;
8065 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
8066 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
8067 if(!isWasmInitialized) {
8068 throw new Error("initializeWasm() must be awaited first!");
8070 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
8071 return nativeResponseValue;
8073 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
8074 export function ChannelManager_as_EventsProvider(this_arg: number): number {
8075 if(!isWasmInitialized) {
8076 throw new Error("initializeWasm() must be awaited first!");
8078 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
8079 return nativeResponseValue;
8081 // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
8082 export function ChannelManager_as_Listen(this_arg: number): number {
8083 if(!isWasmInitialized) {
8084 throw new Error("initializeWasm() must be awaited first!");
8086 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
8087 return nativeResponseValue;
8089 // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
8090 export function ChannelManager_as_Confirm(this_arg: number): number {
8091 if(!isWasmInitialized) {
8092 throw new Error("initializeWasm() must be awaited first!");
8094 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
8095 return nativeResponseValue;
8097 // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
8098 export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
8099 if(!isWasmInitialized) {
8100 throw new Error("initializeWasm() must be awaited first!");
8102 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
8103 return nativeResponseValue;
8105 // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
8106 export function ChannelManager_await_persistable_update(this_arg: number): void {
8107 if(!isWasmInitialized) {
8108 throw new Error("initializeWasm() must be awaited first!");
8110 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
8111 // debug statements here
8113 // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
8114 export function ChannelManager_current_best_block(this_arg: number): number {
8115 if(!isWasmInitialized) {
8116 throw new Error("initializeWasm() must be awaited first!");
8118 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
8119 return nativeResponseValue;
8121 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
8122 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
8123 if(!isWasmInitialized) {
8124 throw new Error("initializeWasm() must be awaited first!");
8126 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
8127 return nativeResponseValue;
8129 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
8130 export function ChannelManager_write(obj: number): Uint8Array {
8131 if(!isWasmInitialized) {
8132 throw new Error("initializeWasm() must be awaited first!");
8134 const nativeResponseValue = wasm.ChannelManager_write(obj);
8135 return decodeArray(nativeResponseValue);
8137 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
8138 export function ChannelManagerReadArgs_free(this_obj: number): void {
8139 if(!isWasmInitialized) {
8140 throw new Error("initializeWasm() must be awaited first!");
8142 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
8143 // debug statements here
8145 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8146 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
8147 if(!isWasmInitialized) {
8148 throw new Error("initializeWasm() must be awaited first!");
8150 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
8151 return nativeResponseValue;
8153 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
8154 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
8155 if(!isWasmInitialized) {
8156 throw new Error("initializeWasm() must be awaited first!");
8158 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
8159 // debug statements here
8161 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8162 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
8163 if(!isWasmInitialized) {
8164 throw new Error("initializeWasm() must be awaited first!");
8166 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
8167 return nativeResponseValue;
8169 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
8170 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
8171 if(!isWasmInitialized) {
8172 throw new Error("initializeWasm() must be awaited first!");
8174 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
8175 // debug statements here
8177 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8178 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
8179 if(!isWasmInitialized) {
8180 throw new Error("initializeWasm() must be awaited first!");
8182 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
8183 return nativeResponseValue;
8185 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
8186 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
8187 if(!isWasmInitialized) {
8188 throw new Error("initializeWasm() must be awaited first!");
8190 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
8191 // debug statements here
8193 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8194 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
8195 if(!isWasmInitialized) {
8196 throw new Error("initializeWasm() must be awaited first!");
8198 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
8199 return nativeResponseValue;
8201 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
8202 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
8203 if(!isWasmInitialized) {
8204 throw new Error("initializeWasm() must be awaited first!");
8206 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
8207 // debug statements here
8209 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8210 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
8211 if(!isWasmInitialized) {
8212 throw new Error("initializeWasm() must be awaited first!");
8214 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
8215 return nativeResponseValue;
8217 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
8218 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
8219 if(!isWasmInitialized) {
8220 throw new Error("initializeWasm() must be awaited first!");
8222 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
8223 // debug statements here
8225 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
8226 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
8227 if(!isWasmInitialized) {
8228 throw new Error("initializeWasm() must be awaited first!");
8230 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
8231 return nativeResponseValue;
8233 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
8234 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
8235 if(!isWasmInitialized) {
8236 throw new Error("initializeWasm() must be awaited first!");
8238 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
8239 // debug statements here
8241 // 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);
8242 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 {
8243 if(!isWasmInitialized) {
8244 throw new Error("initializeWasm() must be awaited first!");
8246 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
8247 return nativeResponseValue;
8249 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
8250 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
8251 if(!isWasmInitialized) {
8252 throw new Error("initializeWasm() must be awaited first!");
8254 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
8255 return nativeResponseValue;
8257 // void DecodeError_free(struct LDKDecodeError this_obj);
8258 export function DecodeError_free(this_obj: number): void {
8259 if(!isWasmInitialized) {
8260 throw new Error("initializeWasm() must be awaited first!");
8262 const nativeResponseValue = wasm.DecodeError_free(this_obj);
8263 // debug statements here
8265 // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
8266 export function DecodeError_clone(orig: number): number {
8267 if(!isWasmInitialized) {
8268 throw new Error("initializeWasm() must be awaited first!");
8270 const nativeResponseValue = wasm.DecodeError_clone(orig);
8271 return nativeResponseValue;
8273 // void Init_free(struct LDKInit this_obj);
8274 export function Init_free(this_obj: number): void {
8275 if(!isWasmInitialized) {
8276 throw new Error("initializeWasm() must be awaited first!");
8278 const nativeResponseValue = wasm.Init_free(this_obj);
8279 // debug statements here
8281 // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
8282 export function Init_get_features(this_ptr: number): number {
8283 if(!isWasmInitialized) {
8284 throw new Error("initializeWasm() must be awaited first!");
8286 const nativeResponseValue = wasm.Init_get_features(this_ptr);
8287 return nativeResponseValue;
8289 // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
8290 export function Init_set_features(this_ptr: number, val: number): void {
8291 if(!isWasmInitialized) {
8292 throw new Error("initializeWasm() must be awaited first!");
8294 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
8295 // debug statements here
8297 // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
8298 export function Init_new(features_arg: number): number {
8299 if(!isWasmInitialized) {
8300 throw new Error("initializeWasm() must be awaited first!");
8302 const nativeResponseValue = wasm.Init_new(features_arg);
8303 return nativeResponseValue;
8305 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
8306 export function Init_clone(orig: number): number {
8307 if(!isWasmInitialized) {
8308 throw new Error("initializeWasm() must be awaited first!");
8310 const nativeResponseValue = wasm.Init_clone(orig);
8311 return nativeResponseValue;
8313 // void ErrorMessage_free(struct LDKErrorMessage this_obj);
8314 export function ErrorMessage_free(this_obj: number): void {
8315 if(!isWasmInitialized) {
8316 throw new Error("initializeWasm() must be awaited first!");
8318 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
8319 // debug statements here
8321 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
8322 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
8323 if(!isWasmInitialized) {
8324 throw new Error("initializeWasm() must be awaited first!");
8326 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
8327 return decodeArray(nativeResponseValue);
8329 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8330 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
8331 if(!isWasmInitialized) {
8332 throw new Error("initializeWasm() must be awaited first!");
8334 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
8335 // debug statements here
8337 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
8338 export function ErrorMessage_get_data(this_ptr: number): String {
8339 if(!isWasmInitialized) {
8340 throw new Error("initializeWasm() must be awaited first!");
8342 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
8343 return nativeResponseValue;
8345 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
8346 export function ErrorMessage_set_data(this_ptr: number, val: String): void {
8347 if(!isWasmInitialized) {
8348 throw new Error("initializeWasm() must be awaited first!");
8350 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
8351 // debug statements here
8353 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
8354 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
8355 if(!isWasmInitialized) {
8356 throw new Error("initializeWasm() must be awaited first!");
8358 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
8359 return nativeResponseValue;
8361 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
8362 export function ErrorMessage_clone(orig: number): number {
8363 if(!isWasmInitialized) {
8364 throw new Error("initializeWasm() must be awaited first!");
8366 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
8367 return nativeResponseValue;
8369 // void Ping_free(struct LDKPing this_obj);
8370 export function Ping_free(this_obj: number): void {
8371 if(!isWasmInitialized) {
8372 throw new Error("initializeWasm() must be awaited first!");
8374 const nativeResponseValue = wasm.Ping_free(this_obj);
8375 // debug statements here
8377 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
8378 export function Ping_get_ponglen(this_ptr: number): number {
8379 if(!isWasmInitialized) {
8380 throw new Error("initializeWasm() must be awaited first!");
8382 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
8383 return nativeResponseValue;
8385 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8386 export function Ping_set_ponglen(this_ptr: number, val: number): void {
8387 if(!isWasmInitialized) {
8388 throw new Error("initializeWasm() must be awaited first!");
8390 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
8391 // debug statements here
8393 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
8394 export function Ping_get_byteslen(this_ptr: number): number {
8395 if(!isWasmInitialized) {
8396 throw new Error("initializeWasm() must be awaited first!");
8398 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
8399 return nativeResponseValue;
8401 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
8402 export function Ping_set_byteslen(this_ptr: number, val: number): void {
8403 if(!isWasmInitialized) {
8404 throw new Error("initializeWasm() must be awaited first!");
8406 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
8407 // debug statements here
8409 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
8410 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
8411 if(!isWasmInitialized) {
8412 throw new Error("initializeWasm() must be awaited first!");
8414 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
8415 return nativeResponseValue;
8417 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
8418 export function Ping_clone(orig: number): number {
8419 if(!isWasmInitialized) {
8420 throw new Error("initializeWasm() must be awaited first!");
8422 const nativeResponseValue = wasm.Ping_clone(orig);
8423 return nativeResponseValue;
8425 // void Pong_free(struct LDKPong this_obj);
8426 export function Pong_free(this_obj: number): void {
8427 if(!isWasmInitialized) {
8428 throw new Error("initializeWasm() must be awaited first!");
8430 const nativeResponseValue = wasm.Pong_free(this_obj);
8431 // debug statements here
8433 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
8434 export function Pong_get_byteslen(this_ptr: number): number {
8435 if(!isWasmInitialized) {
8436 throw new Error("initializeWasm() must be awaited first!");
8438 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
8439 return nativeResponseValue;
8441 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
8442 export function Pong_set_byteslen(this_ptr: number, val: number): void {
8443 if(!isWasmInitialized) {
8444 throw new Error("initializeWasm() must be awaited first!");
8446 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
8447 // debug statements here
8449 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
8450 export function Pong_new(byteslen_arg: number): number {
8451 if(!isWasmInitialized) {
8452 throw new Error("initializeWasm() must be awaited first!");
8454 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
8455 return nativeResponseValue;
8457 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
8458 export function Pong_clone(orig: number): number {
8459 if(!isWasmInitialized) {
8460 throw new Error("initializeWasm() must be awaited first!");
8462 const nativeResponseValue = wasm.Pong_clone(orig);
8463 return nativeResponseValue;
8465 // void OpenChannel_free(struct LDKOpenChannel this_obj);
8466 export function OpenChannel_free(this_obj: number): void {
8467 if(!isWasmInitialized) {
8468 throw new Error("initializeWasm() must be awaited first!");
8470 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
8471 // debug statements here
8473 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8474 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
8475 if(!isWasmInitialized) {
8476 throw new Error("initializeWasm() must be awaited first!");
8478 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
8479 return decodeArray(nativeResponseValue);
8481 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8482 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8483 if(!isWasmInitialized) {
8484 throw new Error("initializeWasm() must be awaited first!");
8486 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
8487 // debug statements here
8489 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
8490 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8491 if(!isWasmInitialized) {
8492 throw new Error("initializeWasm() must be awaited first!");
8494 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
8495 return decodeArray(nativeResponseValue);
8497 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8498 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8499 if(!isWasmInitialized) {
8500 throw new Error("initializeWasm() must be awaited first!");
8502 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8503 // debug statements here
8505 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8506 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
8507 if(!isWasmInitialized) {
8508 throw new Error("initializeWasm() must be awaited first!");
8510 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
8511 return nativeResponseValue;
8513 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8514 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
8515 if(!isWasmInitialized) {
8516 throw new Error("initializeWasm() must be awaited first!");
8518 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
8519 // debug statements here
8521 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8522 export function OpenChannel_get_push_msat(this_ptr: number): number {
8523 if(!isWasmInitialized) {
8524 throw new Error("initializeWasm() must be awaited first!");
8526 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
8527 return nativeResponseValue;
8529 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8530 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
8531 if(!isWasmInitialized) {
8532 throw new Error("initializeWasm() must be awaited first!");
8534 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
8535 // debug statements here
8537 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8538 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
8539 if(!isWasmInitialized) {
8540 throw new Error("initializeWasm() must be awaited first!");
8542 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
8543 return nativeResponseValue;
8545 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8546 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8547 if(!isWasmInitialized) {
8548 throw new Error("initializeWasm() must be awaited first!");
8550 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
8551 // debug statements here
8553 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8554 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8555 if(!isWasmInitialized) {
8556 throw new Error("initializeWasm() must be awaited first!");
8558 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8559 return nativeResponseValue;
8561 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8562 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
8563 if(!isWasmInitialized) {
8564 throw new Error("initializeWasm() must be awaited first!");
8566 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
8567 // debug statements here
8569 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8570 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
8571 if(!isWasmInitialized) {
8572 throw new Error("initializeWasm() must be awaited first!");
8574 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
8575 return nativeResponseValue;
8577 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8578 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
8579 if(!isWasmInitialized) {
8580 throw new Error("initializeWasm() must be awaited first!");
8582 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
8583 // debug statements here
8585 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8586 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
8587 if(!isWasmInitialized) {
8588 throw new Error("initializeWasm() must be awaited first!");
8590 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
8591 return nativeResponseValue;
8593 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
8594 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8595 if(!isWasmInitialized) {
8596 throw new Error("initializeWasm() must be awaited first!");
8598 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
8599 // debug statements here
8601 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8602 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
8603 if(!isWasmInitialized) {
8604 throw new Error("initializeWasm() must be awaited first!");
8606 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
8607 return nativeResponseValue;
8609 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
8610 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
8611 if(!isWasmInitialized) {
8612 throw new Error("initializeWasm() must be awaited first!");
8614 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
8615 // debug statements here
8617 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8618 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
8619 if(!isWasmInitialized) {
8620 throw new Error("initializeWasm() must be awaited first!");
8622 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
8623 return nativeResponseValue;
8625 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
8626 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
8627 if(!isWasmInitialized) {
8628 throw new Error("initializeWasm() must be awaited first!");
8630 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
8631 // debug statements here
8633 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8634 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
8635 if(!isWasmInitialized) {
8636 throw new Error("initializeWasm() must be awaited first!");
8638 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
8639 return nativeResponseValue;
8641 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
8642 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
8643 if(!isWasmInitialized) {
8644 throw new Error("initializeWasm() must be awaited first!");
8646 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
8647 // debug statements here
8649 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8650 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
8651 if(!isWasmInitialized) {
8652 throw new Error("initializeWasm() must be awaited first!");
8654 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
8655 return decodeArray(nativeResponseValue);
8657 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8658 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8659 if(!isWasmInitialized) {
8660 throw new Error("initializeWasm() must be awaited first!");
8662 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
8663 // debug statements here
8665 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8666 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
8667 if(!isWasmInitialized) {
8668 throw new Error("initializeWasm() must be awaited first!");
8670 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
8671 return decodeArray(nativeResponseValue);
8673 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8674 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8675 if(!isWasmInitialized) {
8676 throw new Error("initializeWasm() must be awaited first!");
8678 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
8679 // debug statements here
8681 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8682 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
8683 if(!isWasmInitialized) {
8684 throw new Error("initializeWasm() must be awaited first!");
8686 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
8687 return decodeArray(nativeResponseValue);
8689 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8690 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
8691 if(!isWasmInitialized) {
8692 throw new Error("initializeWasm() must be awaited first!");
8694 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
8695 // debug statements here
8697 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8698 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8699 if(!isWasmInitialized) {
8700 throw new Error("initializeWasm() must be awaited first!");
8702 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
8703 return decodeArray(nativeResponseValue);
8705 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8706 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8707 if(!isWasmInitialized) {
8708 throw new Error("initializeWasm() must be awaited first!");
8710 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8711 // debug statements here
8713 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8714 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
8715 if(!isWasmInitialized) {
8716 throw new Error("initializeWasm() must be awaited first!");
8718 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
8719 return decodeArray(nativeResponseValue);
8721 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8722 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8723 if(!isWasmInitialized) {
8724 throw new Error("initializeWasm() must be awaited first!");
8726 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
8727 // debug statements here
8729 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8730 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
8731 if(!isWasmInitialized) {
8732 throw new Error("initializeWasm() must be awaited first!");
8734 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
8735 return decodeArray(nativeResponseValue);
8737 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8738 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8739 if(!isWasmInitialized) {
8740 throw new Error("initializeWasm() must be awaited first!");
8742 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
8743 // debug statements here
8745 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
8746 export function OpenChannel_get_channel_flags(this_ptr: number): number {
8747 if(!isWasmInitialized) {
8748 throw new Error("initializeWasm() must be awaited first!");
8750 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
8751 return nativeResponseValue;
8753 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
8754 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
8755 if(!isWasmInitialized) {
8756 throw new Error("initializeWasm() must be awaited first!");
8758 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
8759 // debug statements here
8761 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
8762 export function OpenChannel_clone(orig: number): number {
8763 if(!isWasmInitialized) {
8764 throw new Error("initializeWasm() must be awaited first!");
8766 const nativeResponseValue = wasm.OpenChannel_clone(orig);
8767 return nativeResponseValue;
8769 // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
8770 export function AcceptChannel_free(this_obj: number): void {
8771 if(!isWasmInitialized) {
8772 throw new Error("initializeWasm() must be awaited first!");
8774 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
8775 // debug statements here
8777 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
8778 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
8779 if(!isWasmInitialized) {
8780 throw new Error("initializeWasm() must be awaited first!");
8782 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
8783 return decodeArray(nativeResponseValue);
8785 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8786 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
8787 if(!isWasmInitialized) {
8788 throw new Error("initializeWasm() must be awaited first!");
8790 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
8791 // debug statements here
8793 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8794 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
8795 if(!isWasmInitialized) {
8796 throw new Error("initializeWasm() must be awaited first!");
8798 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
8799 return nativeResponseValue;
8801 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8802 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
8803 if(!isWasmInitialized) {
8804 throw new Error("initializeWasm() must be awaited first!");
8806 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
8807 // debug statements here
8809 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8810 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
8811 if(!isWasmInitialized) {
8812 throw new Error("initializeWasm() must be awaited first!");
8814 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
8815 return nativeResponseValue;
8817 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8818 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
8819 if(!isWasmInitialized) {
8820 throw new Error("initializeWasm() must be awaited first!");
8822 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
8823 // debug statements here
8825 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8826 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
8827 if(!isWasmInitialized) {
8828 throw new Error("initializeWasm() must be awaited first!");
8830 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
8831 return nativeResponseValue;
8833 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8834 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
8835 if(!isWasmInitialized) {
8836 throw new Error("initializeWasm() must be awaited first!");
8838 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
8839 // debug statements here
8841 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8842 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
8843 if(!isWasmInitialized) {
8844 throw new Error("initializeWasm() must be awaited first!");
8846 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
8847 return nativeResponseValue;
8849 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
8850 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
8851 if(!isWasmInitialized) {
8852 throw new Error("initializeWasm() must be awaited first!");
8854 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
8855 // debug statements here
8857 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8858 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
8859 if(!isWasmInitialized) {
8860 throw new Error("initializeWasm() must be awaited first!");
8862 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
8863 return nativeResponseValue;
8865 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
8866 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
8867 if(!isWasmInitialized) {
8868 throw new Error("initializeWasm() must be awaited first!");
8870 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
8871 // debug statements here
8873 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8874 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
8875 if(!isWasmInitialized) {
8876 throw new Error("initializeWasm() must be awaited first!");
8878 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
8879 return nativeResponseValue;
8881 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
8882 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
8883 if(!isWasmInitialized) {
8884 throw new Error("initializeWasm() must be awaited first!");
8886 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
8887 // debug statements here
8889 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8890 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
8891 if(!isWasmInitialized) {
8892 throw new Error("initializeWasm() must be awaited first!");
8894 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
8895 return nativeResponseValue;
8897 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
8898 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
8899 if(!isWasmInitialized) {
8900 throw new Error("initializeWasm() must be awaited first!");
8902 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
8903 // debug statements here
8905 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8906 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
8907 if(!isWasmInitialized) {
8908 throw new Error("initializeWasm() must be awaited first!");
8910 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
8911 return decodeArray(nativeResponseValue);
8913 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8914 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8915 if(!isWasmInitialized) {
8916 throw new Error("initializeWasm() must be awaited first!");
8918 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
8919 // debug statements here
8921 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8922 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
8923 if(!isWasmInitialized) {
8924 throw new Error("initializeWasm() must be awaited first!");
8926 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
8927 return decodeArray(nativeResponseValue);
8929 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8930 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8931 if(!isWasmInitialized) {
8932 throw new Error("initializeWasm() must be awaited first!");
8934 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
8935 // debug statements here
8937 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8938 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
8939 if(!isWasmInitialized) {
8940 throw new Error("initializeWasm() must be awaited first!");
8942 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
8943 return decodeArray(nativeResponseValue);
8945 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8946 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
8947 if(!isWasmInitialized) {
8948 throw new Error("initializeWasm() must be awaited first!");
8950 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
8951 // debug statements here
8953 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8954 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8955 if(!isWasmInitialized) {
8956 throw new Error("initializeWasm() must be awaited first!");
8958 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
8959 return decodeArray(nativeResponseValue);
8961 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8962 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8963 if(!isWasmInitialized) {
8964 throw new Error("initializeWasm() must be awaited first!");
8966 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8967 // debug statements here
8969 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8970 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
8971 if(!isWasmInitialized) {
8972 throw new Error("initializeWasm() must be awaited first!");
8974 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
8975 return decodeArray(nativeResponseValue);
8977 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8978 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8979 if(!isWasmInitialized) {
8980 throw new Error("initializeWasm() must be awaited first!");
8982 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
8983 // debug statements here
8985 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
8986 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
8987 if(!isWasmInitialized) {
8988 throw new Error("initializeWasm() must be awaited first!");
8990 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
8991 return decodeArray(nativeResponseValue);
8993 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8994 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8995 if(!isWasmInitialized) {
8996 throw new Error("initializeWasm() must be awaited first!");
8998 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
8999 // debug statements here
9001 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
9002 export function AcceptChannel_clone(orig: number): number {
9003 if(!isWasmInitialized) {
9004 throw new Error("initializeWasm() must be awaited first!");
9006 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
9007 return nativeResponseValue;
9009 // void FundingCreated_free(struct LDKFundingCreated this_obj);
9010 export function FundingCreated_free(this_obj: number): void {
9011 if(!isWasmInitialized) {
9012 throw new Error("initializeWasm() must be awaited first!");
9014 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
9015 // debug statements here
9017 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
9018 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
9019 if(!isWasmInitialized) {
9020 throw new Error("initializeWasm() must be awaited first!");
9022 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
9023 return decodeArray(nativeResponseValue);
9025 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9026 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
9027 if(!isWasmInitialized) {
9028 throw new Error("initializeWasm() must be awaited first!");
9030 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
9031 // debug statements here
9033 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
9034 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
9035 if(!isWasmInitialized) {
9036 throw new Error("initializeWasm() must be awaited first!");
9038 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
9039 return decodeArray(nativeResponseValue);
9041 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9042 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
9043 if(!isWasmInitialized) {
9044 throw new Error("initializeWasm() must be awaited first!");
9046 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
9047 // debug statements here
9049 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
9050 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
9051 if(!isWasmInitialized) {
9052 throw new Error("initializeWasm() must be awaited first!");
9054 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
9055 return nativeResponseValue;
9057 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
9058 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
9059 if(!isWasmInitialized) {
9060 throw new Error("initializeWasm() must be awaited first!");
9062 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
9063 // debug statements here
9065 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
9066 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
9067 if(!isWasmInitialized) {
9068 throw new Error("initializeWasm() must be awaited first!");
9070 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
9071 return decodeArray(nativeResponseValue);
9073 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
9074 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
9075 if(!isWasmInitialized) {
9076 throw new Error("initializeWasm() must be awaited first!");
9078 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
9079 // debug statements here
9081 // 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);
9082 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
9083 if(!isWasmInitialized) {
9084 throw new Error("initializeWasm() must be awaited first!");
9086 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
9087 return nativeResponseValue;
9089 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
9090 export function FundingCreated_clone(orig: number): number {
9091 if(!isWasmInitialized) {
9092 throw new Error("initializeWasm() must be awaited first!");
9094 const nativeResponseValue = wasm.FundingCreated_clone(orig);
9095 return nativeResponseValue;
9097 // void FundingSigned_free(struct LDKFundingSigned this_obj);
9098 export function FundingSigned_free(this_obj: number): void {
9099 if(!isWasmInitialized) {
9100 throw new Error("initializeWasm() must be awaited first!");
9102 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
9103 // debug statements here
9105 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
9106 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
9107 if(!isWasmInitialized) {
9108 throw new Error("initializeWasm() must be awaited first!");
9110 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
9111 return decodeArray(nativeResponseValue);
9113 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9114 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9115 if(!isWasmInitialized) {
9116 throw new Error("initializeWasm() must be awaited first!");
9118 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
9119 // debug statements here
9121 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
9122 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
9123 if(!isWasmInitialized) {
9124 throw new Error("initializeWasm() must be awaited first!");
9126 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
9127 return decodeArray(nativeResponseValue);
9129 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9130 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9131 if(!isWasmInitialized) {
9132 throw new Error("initializeWasm() must be awaited first!");
9134 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
9135 // debug statements here
9137 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
9138 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
9139 if(!isWasmInitialized) {
9140 throw new Error("initializeWasm() must be awaited first!");
9142 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
9143 return nativeResponseValue;
9145 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
9146 export function FundingSigned_clone(orig: number): number {
9147 if(!isWasmInitialized) {
9148 throw new Error("initializeWasm() must be awaited first!");
9150 const nativeResponseValue = wasm.FundingSigned_clone(orig);
9151 return nativeResponseValue;
9153 // void FundingLocked_free(struct LDKFundingLocked this_obj);
9154 export function FundingLocked_free(this_obj: number): void {
9155 if(!isWasmInitialized) {
9156 throw new Error("initializeWasm() must be awaited first!");
9158 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
9159 // debug statements here
9161 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
9162 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
9163 if(!isWasmInitialized) {
9164 throw new Error("initializeWasm() must be awaited first!");
9166 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
9167 return decodeArray(nativeResponseValue);
9169 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9170 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
9171 if(!isWasmInitialized) {
9172 throw new Error("initializeWasm() must be awaited first!");
9174 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
9175 // debug statements here
9177 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
9178 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
9179 if(!isWasmInitialized) {
9180 throw new Error("initializeWasm() must be awaited first!");
9182 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
9183 return decodeArray(nativeResponseValue);
9185 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9186 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9187 if(!isWasmInitialized) {
9188 throw new Error("initializeWasm() must be awaited first!");
9190 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
9191 // debug statements here
9193 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
9194 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
9195 if(!isWasmInitialized) {
9196 throw new Error("initializeWasm() must be awaited first!");
9198 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
9199 return nativeResponseValue;
9201 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
9202 export function FundingLocked_clone(orig: number): number {
9203 if(!isWasmInitialized) {
9204 throw new Error("initializeWasm() must be awaited first!");
9206 const nativeResponseValue = wasm.FundingLocked_clone(orig);
9207 return nativeResponseValue;
9209 // void Shutdown_free(struct LDKShutdown this_obj);
9210 export function Shutdown_free(this_obj: number): void {
9211 if(!isWasmInitialized) {
9212 throw new Error("initializeWasm() must be awaited first!");
9214 const nativeResponseValue = wasm.Shutdown_free(this_obj);
9215 // debug statements here
9217 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
9218 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
9219 if(!isWasmInitialized) {
9220 throw new Error("initializeWasm() must be awaited first!");
9222 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
9223 return decodeArray(nativeResponseValue);
9225 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9226 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
9227 if(!isWasmInitialized) {
9228 throw new Error("initializeWasm() must be awaited first!");
9230 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
9231 // debug statements here
9233 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
9234 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
9235 if(!isWasmInitialized) {
9236 throw new Error("initializeWasm() must be awaited first!");
9238 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
9239 return decodeArray(nativeResponseValue);
9241 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9242 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
9243 if(!isWasmInitialized) {
9244 throw new Error("initializeWasm() must be awaited first!");
9246 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
9247 // debug statements here
9249 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
9250 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
9251 if(!isWasmInitialized) {
9252 throw new Error("initializeWasm() must be awaited first!");
9254 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
9255 return nativeResponseValue;
9257 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
9258 export function Shutdown_clone(orig: number): number {
9259 if(!isWasmInitialized) {
9260 throw new Error("initializeWasm() must be awaited first!");
9262 const nativeResponseValue = wasm.Shutdown_clone(orig);
9263 return nativeResponseValue;
9265 // void ClosingSigned_free(struct LDKClosingSigned this_obj);
9266 export function ClosingSigned_free(this_obj: number): void {
9267 if(!isWasmInitialized) {
9268 throw new Error("initializeWasm() must be awaited first!");
9270 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
9271 // debug statements here
9273 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
9274 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
9275 if(!isWasmInitialized) {
9276 throw new Error("initializeWasm() must be awaited first!");
9278 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
9279 return decodeArray(nativeResponseValue);
9281 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9282 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9283 if(!isWasmInitialized) {
9284 throw new Error("initializeWasm() must be awaited first!");
9286 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
9287 // debug statements here
9289 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9290 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
9291 if(!isWasmInitialized) {
9292 throw new Error("initializeWasm() must be awaited first!");
9294 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
9295 return nativeResponseValue;
9297 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
9298 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
9299 if(!isWasmInitialized) {
9300 throw new Error("initializeWasm() must be awaited first!");
9302 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
9303 // debug statements here
9305 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
9306 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
9307 if(!isWasmInitialized) {
9308 throw new Error("initializeWasm() must be awaited first!");
9310 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
9311 return decodeArray(nativeResponseValue);
9313 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9314 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9315 if(!isWasmInitialized) {
9316 throw new Error("initializeWasm() must be awaited first!");
9318 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
9319 // debug statements here
9321 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
9322 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
9323 if(!isWasmInitialized) {
9324 throw new Error("initializeWasm() must be awaited first!");
9326 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
9327 return nativeResponseValue;
9329 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
9330 export function ClosingSigned_clone(orig: number): number {
9331 if(!isWasmInitialized) {
9332 throw new Error("initializeWasm() must be awaited first!");
9334 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
9335 return nativeResponseValue;
9337 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
9338 export function UpdateAddHTLC_free(this_obj: number): void {
9339 if(!isWasmInitialized) {
9340 throw new Error("initializeWasm() must be awaited first!");
9342 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
9343 // debug statements here
9345 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9346 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
9347 if(!isWasmInitialized) {
9348 throw new Error("initializeWasm() must be awaited first!");
9350 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
9351 return decodeArray(nativeResponseValue);
9353 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9354 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9355 if(!isWasmInitialized) {
9356 throw new Error("initializeWasm() must be awaited first!");
9358 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
9359 // debug statements here
9361 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9362 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
9363 if(!isWasmInitialized) {
9364 throw new Error("initializeWasm() must be awaited first!");
9366 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
9367 return nativeResponseValue;
9369 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9370 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
9371 if(!isWasmInitialized) {
9372 throw new Error("initializeWasm() must be awaited first!");
9374 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
9375 // debug statements here
9377 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9378 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
9379 if(!isWasmInitialized) {
9380 throw new Error("initializeWasm() must be awaited first!");
9382 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
9383 return nativeResponseValue;
9385 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
9386 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
9387 if(!isWasmInitialized) {
9388 throw new Error("initializeWasm() must be awaited first!");
9390 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
9391 // debug statements here
9393 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
9394 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
9395 if(!isWasmInitialized) {
9396 throw new Error("initializeWasm() must be awaited first!");
9398 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
9399 return decodeArray(nativeResponseValue);
9401 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9402 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
9403 if(!isWasmInitialized) {
9404 throw new Error("initializeWasm() must be awaited first!");
9406 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
9407 // debug statements here
9409 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
9410 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
9411 if(!isWasmInitialized) {
9412 throw new Error("initializeWasm() must be awaited first!");
9414 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
9415 return nativeResponseValue;
9417 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
9418 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
9419 if(!isWasmInitialized) {
9420 throw new Error("initializeWasm() must be awaited first!");
9422 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
9423 // debug statements here
9425 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
9426 export function UpdateAddHTLC_clone(orig: number): number {
9427 if(!isWasmInitialized) {
9428 throw new Error("initializeWasm() must be awaited first!");
9430 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
9431 return nativeResponseValue;
9433 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
9434 export function UpdateFulfillHTLC_free(this_obj: number): void {
9435 if(!isWasmInitialized) {
9436 throw new Error("initializeWasm() must be awaited first!");
9438 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
9439 // debug statements here
9441 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9442 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
9443 if(!isWasmInitialized) {
9444 throw new Error("initializeWasm() must be awaited first!");
9446 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
9447 return decodeArray(nativeResponseValue);
9449 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9450 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9451 if(!isWasmInitialized) {
9452 throw new Error("initializeWasm() must be awaited first!");
9454 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
9455 // debug statements here
9457 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
9458 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
9459 if(!isWasmInitialized) {
9460 throw new Error("initializeWasm() must be awaited first!");
9462 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
9463 return nativeResponseValue;
9465 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
9466 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
9467 if(!isWasmInitialized) {
9468 throw new Error("initializeWasm() must be awaited first!");
9470 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
9471 // debug statements here
9473 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
9474 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
9475 if(!isWasmInitialized) {
9476 throw new Error("initializeWasm() must be awaited first!");
9478 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
9479 return decodeArray(nativeResponseValue);
9481 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9482 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
9483 if(!isWasmInitialized) {
9484 throw new Error("initializeWasm() must be awaited first!");
9486 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
9487 // debug statements here
9489 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
9490 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
9491 if(!isWasmInitialized) {
9492 throw new Error("initializeWasm() must be awaited first!");
9494 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
9495 return nativeResponseValue;
9497 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
9498 export function UpdateFulfillHTLC_clone(orig: number): number {
9499 if(!isWasmInitialized) {
9500 throw new Error("initializeWasm() must be awaited first!");
9502 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
9503 return nativeResponseValue;
9505 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
9506 export function UpdateFailHTLC_free(this_obj: number): void {
9507 if(!isWasmInitialized) {
9508 throw new Error("initializeWasm() must be awaited first!");
9510 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
9511 // debug statements here
9513 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
9514 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
9515 if(!isWasmInitialized) {
9516 throw new Error("initializeWasm() must be awaited first!");
9518 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
9519 return decodeArray(nativeResponseValue);
9521 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9522 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9523 if(!isWasmInitialized) {
9524 throw new Error("initializeWasm() must be awaited first!");
9526 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
9527 // debug statements here
9529 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
9530 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
9531 if(!isWasmInitialized) {
9532 throw new Error("initializeWasm() must be awaited first!");
9534 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
9535 return nativeResponseValue;
9537 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
9538 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
9539 if(!isWasmInitialized) {
9540 throw new Error("initializeWasm() must be awaited first!");
9542 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
9543 // debug statements here
9545 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
9546 export function UpdateFailHTLC_clone(orig: number): number {
9547 if(!isWasmInitialized) {
9548 throw new Error("initializeWasm() must be awaited first!");
9550 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
9551 return nativeResponseValue;
9553 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
9554 export function UpdateFailMalformedHTLC_free(this_obj: number): void {
9555 if(!isWasmInitialized) {
9556 throw new Error("initializeWasm() must be awaited first!");
9558 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
9559 // debug statements here
9561 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
9562 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
9563 if(!isWasmInitialized) {
9564 throw new Error("initializeWasm() must be awaited first!");
9566 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
9567 return decodeArray(nativeResponseValue);
9569 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9570 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
9571 if(!isWasmInitialized) {
9572 throw new Error("initializeWasm() must be awaited first!");
9574 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
9575 // debug statements here
9577 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
9578 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
9579 if(!isWasmInitialized) {
9580 throw new Error("initializeWasm() must be awaited first!");
9582 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
9583 return nativeResponseValue;
9585 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
9586 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
9587 if(!isWasmInitialized) {
9588 throw new Error("initializeWasm() must be awaited first!");
9590 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
9591 // debug statements here
9593 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
9594 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
9595 if(!isWasmInitialized) {
9596 throw new Error("initializeWasm() must be awaited first!");
9598 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
9599 return nativeResponseValue;
9601 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
9602 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
9603 if(!isWasmInitialized) {
9604 throw new Error("initializeWasm() must be awaited first!");
9606 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
9607 // debug statements here
9609 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
9610 export function UpdateFailMalformedHTLC_clone(orig: number): number {
9611 if(!isWasmInitialized) {
9612 throw new Error("initializeWasm() must be awaited first!");
9614 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
9615 return nativeResponseValue;
9617 // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
9618 export function CommitmentSigned_free(this_obj: number): void {
9619 if(!isWasmInitialized) {
9620 throw new Error("initializeWasm() must be awaited first!");
9622 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
9623 // debug statements here
9625 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
9626 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
9627 if(!isWasmInitialized) {
9628 throw new Error("initializeWasm() must be awaited first!");
9630 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
9631 return decodeArray(nativeResponseValue);
9633 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9634 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
9635 if(!isWasmInitialized) {
9636 throw new Error("initializeWasm() must be awaited first!");
9638 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
9639 // debug statements here
9641 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
9642 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
9643 if(!isWasmInitialized) {
9644 throw new Error("initializeWasm() must be awaited first!");
9646 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
9647 return decodeArray(nativeResponseValue);
9649 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
9650 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
9651 if(!isWasmInitialized) {
9652 throw new Error("initializeWasm() must be awaited first!");
9654 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
9655 // debug statements here
9657 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
9658 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
9659 if(!isWasmInitialized) {
9660 throw new Error("initializeWasm() must be awaited first!");
9662 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
9663 // debug statements here
9665 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
9666 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
9667 if(!isWasmInitialized) {
9668 throw new Error("initializeWasm() must be awaited first!");
9670 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
9671 return nativeResponseValue;
9673 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
9674 export function CommitmentSigned_clone(orig: number): number {
9675 if(!isWasmInitialized) {
9676 throw new Error("initializeWasm() must be awaited first!");
9678 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
9679 return nativeResponseValue;
9681 // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
9682 export function RevokeAndACK_free(this_obj: number): void {
9683 if(!isWasmInitialized) {
9684 throw new Error("initializeWasm() must be awaited first!");
9686 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
9687 // debug statements here
9689 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
9690 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
9691 if(!isWasmInitialized) {
9692 throw new Error("initializeWasm() must be awaited first!");
9694 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
9695 return decodeArray(nativeResponseValue);
9697 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9698 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
9699 if(!isWasmInitialized) {
9700 throw new Error("initializeWasm() must be awaited first!");
9702 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
9703 // debug statements here
9705 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
9706 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
9707 if(!isWasmInitialized) {
9708 throw new Error("initializeWasm() must be awaited first!");
9710 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
9711 return decodeArray(nativeResponseValue);
9713 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9714 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
9715 if(!isWasmInitialized) {
9716 throw new Error("initializeWasm() must be awaited first!");
9718 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
9719 // debug statements here
9721 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
9722 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
9723 if(!isWasmInitialized) {
9724 throw new Error("initializeWasm() must be awaited first!");
9726 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
9727 return decodeArray(nativeResponseValue);
9729 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9730 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9731 if(!isWasmInitialized) {
9732 throw new Error("initializeWasm() must be awaited first!");
9734 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
9735 // debug statements here
9737 // 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);
9738 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
9739 if(!isWasmInitialized) {
9740 throw new Error("initializeWasm() must be awaited first!");
9742 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
9743 return nativeResponseValue;
9745 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
9746 export function RevokeAndACK_clone(orig: number): number {
9747 if(!isWasmInitialized) {
9748 throw new Error("initializeWasm() must be awaited first!");
9750 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
9751 return nativeResponseValue;
9753 // void UpdateFee_free(struct LDKUpdateFee this_obj);
9754 export function UpdateFee_free(this_obj: number): void {
9755 if(!isWasmInitialized) {
9756 throw new Error("initializeWasm() must be awaited first!");
9758 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
9759 // debug statements here
9761 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
9762 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
9763 if(!isWasmInitialized) {
9764 throw new Error("initializeWasm() must be awaited first!");
9766 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
9767 return decodeArray(nativeResponseValue);
9769 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9770 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
9771 if(!isWasmInitialized) {
9772 throw new Error("initializeWasm() must be awaited first!");
9774 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
9775 // debug statements here
9777 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
9778 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
9779 if(!isWasmInitialized) {
9780 throw new Error("initializeWasm() must be awaited first!");
9782 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
9783 return nativeResponseValue;
9785 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
9786 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
9787 if(!isWasmInitialized) {
9788 throw new Error("initializeWasm() must be awaited first!");
9790 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
9791 // debug statements here
9793 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
9794 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
9795 if(!isWasmInitialized) {
9796 throw new Error("initializeWasm() must be awaited first!");
9798 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
9799 return nativeResponseValue;
9801 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
9802 export function UpdateFee_clone(orig: number): number {
9803 if(!isWasmInitialized) {
9804 throw new Error("initializeWasm() must be awaited first!");
9806 const nativeResponseValue = wasm.UpdateFee_clone(orig);
9807 return nativeResponseValue;
9809 // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
9810 export function DataLossProtect_free(this_obj: number): void {
9811 if(!isWasmInitialized) {
9812 throw new Error("initializeWasm() must be awaited first!");
9814 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
9815 // debug statements here
9817 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
9818 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
9819 if(!isWasmInitialized) {
9820 throw new Error("initializeWasm() must be awaited first!");
9822 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
9823 return decodeArray(nativeResponseValue);
9825 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9826 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
9827 if(!isWasmInitialized) {
9828 throw new Error("initializeWasm() must be awaited first!");
9830 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
9831 // debug statements here
9833 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
9834 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
9835 if(!isWasmInitialized) {
9836 throw new Error("initializeWasm() must be awaited first!");
9838 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
9839 return decodeArray(nativeResponseValue);
9841 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9842 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
9843 if(!isWasmInitialized) {
9844 throw new Error("initializeWasm() must be awaited first!");
9846 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
9847 // debug statements here
9849 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
9850 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
9851 if(!isWasmInitialized) {
9852 throw new Error("initializeWasm() must be awaited first!");
9854 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
9855 return nativeResponseValue;
9857 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
9858 export function DataLossProtect_clone(orig: number): number {
9859 if(!isWasmInitialized) {
9860 throw new Error("initializeWasm() must be awaited first!");
9862 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
9863 return nativeResponseValue;
9865 // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
9866 export function ChannelReestablish_free(this_obj: number): void {
9867 if(!isWasmInitialized) {
9868 throw new Error("initializeWasm() must be awaited first!");
9870 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
9871 // debug statements here
9873 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
9874 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
9875 if(!isWasmInitialized) {
9876 throw new Error("initializeWasm() must be awaited first!");
9878 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
9879 return decodeArray(nativeResponseValue);
9881 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9882 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
9883 if(!isWasmInitialized) {
9884 throw new Error("initializeWasm() must be awaited first!");
9886 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
9887 // debug statements here
9889 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
9890 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
9891 if(!isWasmInitialized) {
9892 throw new Error("initializeWasm() must be awaited first!");
9894 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
9895 return nativeResponseValue;
9897 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
9898 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
9899 if(!isWasmInitialized) {
9900 throw new Error("initializeWasm() must be awaited first!");
9902 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
9903 // debug statements here
9905 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
9906 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
9907 if(!isWasmInitialized) {
9908 throw new Error("initializeWasm() must be awaited first!");
9910 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
9911 return nativeResponseValue;
9913 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
9914 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
9915 if(!isWasmInitialized) {
9916 throw new Error("initializeWasm() must be awaited first!");
9918 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
9919 // debug statements here
9921 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
9922 export function ChannelReestablish_clone(orig: number): number {
9923 if(!isWasmInitialized) {
9924 throw new Error("initializeWasm() must be awaited first!");
9926 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
9927 return nativeResponseValue;
9929 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
9930 export function AnnouncementSignatures_free(this_obj: number): void {
9931 if(!isWasmInitialized) {
9932 throw new Error("initializeWasm() must be awaited first!");
9934 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
9935 // debug statements here
9937 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
9938 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
9939 if(!isWasmInitialized) {
9940 throw new Error("initializeWasm() must be awaited first!");
9942 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
9943 return decodeArray(nativeResponseValue);
9945 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9946 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
9947 if(!isWasmInitialized) {
9948 throw new Error("initializeWasm() must be awaited first!");
9950 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
9951 // debug statements here
9953 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9954 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
9955 if(!isWasmInitialized) {
9956 throw new Error("initializeWasm() must be awaited first!");
9958 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
9959 return nativeResponseValue;
9961 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
9962 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
9963 if(!isWasmInitialized) {
9964 throw new Error("initializeWasm() must be awaited first!");
9966 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
9967 // debug statements here
9969 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9970 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
9971 if(!isWasmInitialized) {
9972 throw new Error("initializeWasm() must be awaited first!");
9974 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
9975 return decodeArray(nativeResponseValue);
9977 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
9978 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
9979 if(!isWasmInitialized) {
9980 throw new Error("initializeWasm() must be awaited first!");
9982 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
9983 // debug statements here
9985 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
9986 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
9987 if(!isWasmInitialized) {
9988 throw new Error("initializeWasm() must be awaited first!");
9990 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
9991 return decodeArray(nativeResponseValue);
9993 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
9994 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
9995 if(!isWasmInitialized) {
9996 throw new Error("initializeWasm() must be awaited first!");
9998 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
9999 // debug statements here
10001 // 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);
10002 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
10003 if(!isWasmInitialized) {
10004 throw new Error("initializeWasm() must be awaited first!");
10006 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
10007 return nativeResponseValue;
10009 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
10010 export function AnnouncementSignatures_clone(orig: number): number {
10011 if(!isWasmInitialized) {
10012 throw new Error("initializeWasm() must be awaited first!");
10014 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
10015 return nativeResponseValue;
10017 // void NetAddress_free(struct LDKNetAddress this_ptr);
10018 export function NetAddress_free(this_ptr: number): void {
10019 if(!isWasmInitialized) {
10020 throw new Error("initializeWasm() must be awaited first!");
10022 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
10023 // debug statements here
10025 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
10026 export function NetAddress_clone(orig: number): number {
10027 if(!isWasmInitialized) {
10028 throw new Error("initializeWasm() must be awaited first!");
10030 const nativeResponseValue = wasm.NetAddress_clone(orig);
10031 return nativeResponseValue;
10033 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
10034 export function NetAddress_write(obj: number): Uint8Array {
10035 if(!isWasmInitialized) {
10036 throw new Error("initializeWasm() must be awaited first!");
10038 const nativeResponseValue = wasm.NetAddress_write(obj);
10039 return decodeArray(nativeResponseValue);
10041 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
10042 export function Result_read(ser: Uint8Array): number {
10043 if(!isWasmInitialized) {
10044 throw new Error("initializeWasm() must be awaited first!");
10046 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
10047 return nativeResponseValue;
10049 // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
10050 export function NetAddress_read(ser: Uint8Array): number {
10051 if(!isWasmInitialized) {
10052 throw new Error("initializeWasm() must be awaited first!");
10054 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
10055 return nativeResponseValue;
10057 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
10058 export function UnsignedNodeAnnouncement_free(this_obj: number): void {
10059 if(!isWasmInitialized) {
10060 throw new Error("initializeWasm() must be awaited first!");
10062 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
10063 // debug statements here
10065 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10066 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
10067 if(!isWasmInitialized) {
10068 throw new Error("initializeWasm() must be awaited first!");
10070 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
10071 return nativeResponseValue;
10073 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
10074 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
10075 if(!isWasmInitialized) {
10076 throw new Error("initializeWasm() must be awaited first!");
10078 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
10079 // debug statements here
10081 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10082 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
10083 if(!isWasmInitialized) {
10084 throw new Error("initializeWasm() must be awaited first!");
10086 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
10087 return nativeResponseValue;
10089 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
10090 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
10091 if(!isWasmInitialized) {
10092 throw new Error("initializeWasm() must be awaited first!");
10094 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
10095 // debug statements here
10097 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
10098 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
10099 if(!isWasmInitialized) {
10100 throw new Error("initializeWasm() must be awaited first!");
10102 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
10103 return decodeArray(nativeResponseValue);
10105 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10106 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
10107 if(!isWasmInitialized) {
10108 throw new Error("initializeWasm() must be awaited first!");
10110 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
10111 // debug statements here
10113 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
10114 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
10115 if(!isWasmInitialized) {
10116 throw new Error("initializeWasm() must be awaited first!");
10118 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
10119 return decodeArray(nativeResponseValue);
10121 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
10122 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
10123 if(!isWasmInitialized) {
10124 throw new Error("initializeWasm() must be awaited first!");
10126 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
10127 // debug statements here
10129 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
10130 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
10131 if(!isWasmInitialized) {
10132 throw new Error("initializeWasm() must be awaited first!");
10134 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
10135 return decodeArray(nativeResponseValue);
10137 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10138 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
10139 if(!isWasmInitialized) {
10140 throw new Error("initializeWasm() must be awaited first!");
10142 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
10143 // debug statements here
10145 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
10146 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
10147 if(!isWasmInitialized) {
10148 throw new Error("initializeWasm() must be awaited first!");
10150 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
10151 // debug statements here
10153 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
10154 export function UnsignedNodeAnnouncement_clone(orig: number): number {
10155 if(!isWasmInitialized) {
10156 throw new Error("initializeWasm() must be awaited first!");
10158 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
10159 return nativeResponseValue;
10161 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
10162 export function NodeAnnouncement_free(this_obj: number): void {
10163 if(!isWasmInitialized) {
10164 throw new Error("initializeWasm() must be awaited first!");
10166 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
10167 // debug statements here
10169 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
10170 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
10171 if(!isWasmInitialized) {
10172 throw new Error("initializeWasm() must be awaited first!");
10174 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
10175 return decodeArray(nativeResponseValue);
10177 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10178 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
10179 if(!isWasmInitialized) {
10180 throw new Error("initializeWasm() must be awaited first!");
10182 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
10183 // debug statements here
10185 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
10186 export function NodeAnnouncement_get_contents(this_ptr: number): number {
10187 if(!isWasmInitialized) {
10188 throw new Error("initializeWasm() must be awaited first!");
10190 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
10191 return nativeResponseValue;
10193 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
10194 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
10195 if(!isWasmInitialized) {
10196 throw new Error("initializeWasm() must be awaited first!");
10198 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
10199 // debug statements here
10201 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
10202 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
10203 if(!isWasmInitialized) {
10204 throw new Error("initializeWasm() must be awaited first!");
10206 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
10207 return nativeResponseValue;
10209 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
10210 export function NodeAnnouncement_clone(orig: number): number {
10211 if(!isWasmInitialized) {
10212 throw new Error("initializeWasm() must be awaited first!");
10214 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
10215 return nativeResponseValue;
10217 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
10218 export function UnsignedChannelAnnouncement_free(this_obj: number): void {
10219 if(!isWasmInitialized) {
10220 throw new Error("initializeWasm() must be awaited first!");
10222 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
10223 // debug statements here
10225 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10226 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
10227 if(!isWasmInitialized) {
10228 throw new Error("initializeWasm() must be awaited first!");
10230 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
10231 return nativeResponseValue;
10233 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
10234 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
10235 if(!isWasmInitialized) {
10236 throw new Error("initializeWasm() must be awaited first!");
10238 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
10239 // debug statements here
10241 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
10242 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
10243 if(!isWasmInitialized) {
10244 throw new Error("initializeWasm() must be awaited first!");
10246 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
10247 return decodeArray(nativeResponseValue);
10249 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10250 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10251 if(!isWasmInitialized) {
10252 throw new Error("initializeWasm() must be awaited first!");
10254 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
10255 // debug statements here
10257 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10258 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
10259 if(!isWasmInitialized) {
10260 throw new Error("initializeWasm() must be awaited first!");
10262 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
10263 return nativeResponseValue;
10265 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
10266 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
10267 if(!isWasmInitialized) {
10268 throw new Error("initializeWasm() must be awaited first!");
10270 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
10271 // debug statements here
10273 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10274 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
10275 if(!isWasmInitialized) {
10276 throw new Error("initializeWasm() must be awaited first!");
10278 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
10279 return decodeArray(nativeResponseValue);
10281 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10282 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
10283 if(!isWasmInitialized) {
10284 throw new Error("initializeWasm() must be awaited first!");
10286 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
10287 // debug statements here
10289 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10290 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
10291 if(!isWasmInitialized) {
10292 throw new Error("initializeWasm() must be awaited first!");
10294 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
10295 return decodeArray(nativeResponseValue);
10297 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10298 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
10299 if(!isWasmInitialized) {
10300 throw new Error("initializeWasm() must be awaited first!");
10302 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
10303 // debug statements here
10305 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10306 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
10307 if(!isWasmInitialized) {
10308 throw new Error("initializeWasm() must be awaited first!");
10310 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
10311 return decodeArray(nativeResponseValue);
10313 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10314 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
10315 if(!isWasmInitialized) {
10316 throw new Error("initializeWasm() must be awaited first!");
10318 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
10319 // debug statements here
10321 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
10322 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
10323 if(!isWasmInitialized) {
10324 throw new Error("initializeWasm() must be awaited first!");
10326 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
10327 return decodeArray(nativeResponseValue);
10329 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10330 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
10331 if(!isWasmInitialized) {
10332 throw new Error("initializeWasm() must be awaited first!");
10334 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
10335 // debug statements here
10337 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
10338 export function UnsignedChannelAnnouncement_clone(orig: number): number {
10339 if(!isWasmInitialized) {
10340 throw new Error("initializeWasm() must be awaited first!");
10342 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
10343 return nativeResponseValue;
10345 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
10346 export function ChannelAnnouncement_free(this_obj: number): void {
10347 if(!isWasmInitialized) {
10348 throw new Error("initializeWasm() must be awaited first!");
10350 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
10351 // debug statements here
10353 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10354 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
10355 if(!isWasmInitialized) {
10356 throw new Error("initializeWasm() must be awaited first!");
10358 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
10359 return decodeArray(nativeResponseValue);
10361 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10362 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
10363 if(!isWasmInitialized) {
10364 throw new Error("initializeWasm() must be awaited first!");
10366 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
10367 // debug statements here
10369 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10370 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
10371 if(!isWasmInitialized) {
10372 throw new Error("initializeWasm() must be awaited first!");
10374 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
10375 return decodeArray(nativeResponseValue);
10377 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10378 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
10379 if(!isWasmInitialized) {
10380 throw new Error("initializeWasm() must be awaited first!");
10382 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
10383 // debug statements here
10385 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10386 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
10387 if(!isWasmInitialized) {
10388 throw new Error("initializeWasm() must be awaited first!");
10390 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
10391 return decodeArray(nativeResponseValue);
10393 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10394 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
10395 if(!isWasmInitialized) {
10396 throw new Error("initializeWasm() must be awaited first!");
10398 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
10399 // debug statements here
10401 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10402 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
10403 if(!isWasmInitialized) {
10404 throw new Error("initializeWasm() must be awaited first!");
10406 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
10407 return decodeArray(nativeResponseValue);
10409 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
10410 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
10411 if(!isWasmInitialized) {
10412 throw new Error("initializeWasm() must be awaited first!");
10414 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
10415 // debug statements here
10417 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
10418 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
10419 if(!isWasmInitialized) {
10420 throw new Error("initializeWasm() must be awaited first!");
10422 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
10423 return nativeResponseValue;
10425 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
10426 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
10427 if(!isWasmInitialized) {
10428 throw new Error("initializeWasm() must be awaited first!");
10430 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
10431 // debug statements here
10433 // 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);
10434 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 {
10435 if(!isWasmInitialized) {
10436 throw new Error("initializeWasm() must be awaited first!");
10438 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);
10439 return nativeResponseValue;
10441 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
10442 export function ChannelAnnouncement_clone(orig: number): number {
10443 if(!isWasmInitialized) {
10444 throw new Error("initializeWasm() must be awaited first!");
10446 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
10447 return nativeResponseValue;
10449 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
10450 export function UnsignedChannelUpdate_free(this_obj: number): void {
10451 if(!isWasmInitialized) {
10452 throw new Error("initializeWasm() must be awaited first!");
10454 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
10455 // debug statements here
10457 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
10458 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
10459 if(!isWasmInitialized) {
10460 throw new Error("initializeWasm() must be awaited first!");
10462 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
10463 return decodeArray(nativeResponseValue);
10465 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10466 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10467 if(!isWasmInitialized) {
10468 throw new Error("initializeWasm() must be awaited first!");
10470 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
10471 // debug statements here
10473 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10474 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
10475 if(!isWasmInitialized) {
10476 throw new Error("initializeWasm() must be awaited first!");
10478 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
10479 return nativeResponseValue;
10481 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10482 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
10483 if(!isWasmInitialized) {
10484 throw new Error("initializeWasm() must be awaited first!");
10486 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
10487 // debug statements here
10489 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10490 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
10491 if(!isWasmInitialized) {
10492 throw new Error("initializeWasm() must be awaited first!");
10494 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
10495 return nativeResponseValue;
10497 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10498 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
10499 if(!isWasmInitialized) {
10500 throw new Error("initializeWasm() must be awaited first!");
10502 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
10503 // debug statements here
10505 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10506 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
10507 if(!isWasmInitialized) {
10508 throw new Error("initializeWasm() must be awaited first!");
10510 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
10511 return nativeResponseValue;
10513 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
10514 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
10515 if(!isWasmInitialized) {
10516 throw new Error("initializeWasm() must be awaited first!");
10518 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
10519 // debug statements here
10521 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10522 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
10523 if(!isWasmInitialized) {
10524 throw new Error("initializeWasm() must be awaited first!");
10526 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
10527 return nativeResponseValue;
10529 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
10530 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
10531 if(!isWasmInitialized) {
10532 throw new Error("initializeWasm() must be awaited first!");
10534 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
10535 // debug statements here
10537 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10538 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
10539 if(!isWasmInitialized) {
10540 throw new Error("initializeWasm() must be awaited first!");
10542 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
10543 return nativeResponseValue;
10545 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
10546 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10547 if(!isWasmInitialized) {
10548 throw new Error("initializeWasm() must be awaited first!");
10550 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
10551 // debug statements here
10553 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10554 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
10555 if(!isWasmInitialized) {
10556 throw new Error("initializeWasm() must be awaited first!");
10558 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
10559 return nativeResponseValue;
10561 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10562 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
10563 if(!isWasmInitialized) {
10564 throw new Error("initializeWasm() must be awaited first!");
10566 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
10567 // debug statements here
10569 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
10570 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
10571 if(!isWasmInitialized) {
10572 throw new Error("initializeWasm() must be awaited first!");
10574 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
10575 return nativeResponseValue;
10577 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
10578 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
10579 if(!isWasmInitialized) {
10580 throw new Error("initializeWasm() must be awaited first!");
10582 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
10583 // debug statements here
10585 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
10586 export function UnsignedChannelUpdate_clone(orig: number): number {
10587 if(!isWasmInitialized) {
10588 throw new Error("initializeWasm() must be awaited first!");
10590 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
10591 return nativeResponseValue;
10593 // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
10594 export function ChannelUpdate_free(this_obj: number): void {
10595 if(!isWasmInitialized) {
10596 throw new Error("initializeWasm() must be awaited first!");
10598 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
10599 // debug statements here
10601 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
10602 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
10603 if(!isWasmInitialized) {
10604 throw new Error("initializeWasm() must be awaited first!");
10606 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
10607 return decodeArray(nativeResponseValue);
10609 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
10610 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
10611 if(!isWasmInitialized) {
10612 throw new Error("initializeWasm() must be awaited first!");
10614 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
10615 // debug statements here
10617 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
10618 export function ChannelUpdate_get_contents(this_ptr: number): number {
10619 if(!isWasmInitialized) {
10620 throw new Error("initializeWasm() must be awaited first!");
10622 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
10623 return nativeResponseValue;
10625 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
10626 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
10627 if(!isWasmInitialized) {
10628 throw new Error("initializeWasm() must be awaited first!");
10630 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
10631 // debug statements here
10633 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
10634 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
10635 if(!isWasmInitialized) {
10636 throw new Error("initializeWasm() must be awaited first!");
10638 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
10639 return nativeResponseValue;
10641 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
10642 export function ChannelUpdate_clone(orig: number): number {
10643 if(!isWasmInitialized) {
10644 throw new Error("initializeWasm() must be awaited first!");
10646 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
10647 return nativeResponseValue;
10649 // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
10650 export function QueryChannelRange_free(this_obj: number): void {
10651 if(!isWasmInitialized) {
10652 throw new Error("initializeWasm() must be awaited first!");
10654 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
10655 // debug statements here
10657 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
10658 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
10659 if(!isWasmInitialized) {
10660 throw new Error("initializeWasm() must be awaited first!");
10662 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
10663 return decodeArray(nativeResponseValue);
10665 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10666 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10667 if(!isWasmInitialized) {
10668 throw new Error("initializeWasm() must be awaited first!");
10670 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
10671 // debug statements here
10673 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
10674 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
10675 if(!isWasmInitialized) {
10676 throw new Error("initializeWasm() must be awaited first!");
10678 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
10679 return nativeResponseValue;
10681 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10682 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
10683 if(!isWasmInitialized) {
10684 throw new Error("initializeWasm() must be awaited first!");
10686 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
10687 // debug statements here
10689 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
10690 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
10691 if(!isWasmInitialized) {
10692 throw new Error("initializeWasm() must be awaited first!");
10694 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
10695 return nativeResponseValue;
10697 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10698 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
10699 if(!isWasmInitialized) {
10700 throw new Error("initializeWasm() must be awaited first!");
10702 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
10703 // debug statements here
10705 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
10706 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
10707 if(!isWasmInitialized) {
10708 throw new Error("initializeWasm() must be awaited first!");
10710 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
10711 return nativeResponseValue;
10713 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
10714 export function QueryChannelRange_clone(orig: number): number {
10715 if(!isWasmInitialized) {
10716 throw new Error("initializeWasm() must be awaited first!");
10718 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
10719 return nativeResponseValue;
10721 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
10722 export function ReplyChannelRange_free(this_obj: number): void {
10723 if(!isWasmInitialized) {
10724 throw new Error("initializeWasm() must be awaited first!");
10726 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
10727 // debug statements here
10729 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
10730 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
10731 if(!isWasmInitialized) {
10732 throw new Error("initializeWasm() must be awaited first!");
10734 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
10735 return decodeArray(nativeResponseValue);
10737 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10738 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10739 if(!isWasmInitialized) {
10740 throw new Error("initializeWasm() must be awaited first!");
10742 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
10743 // debug statements here
10745 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10746 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
10747 if(!isWasmInitialized) {
10748 throw new Error("initializeWasm() must be awaited first!");
10750 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
10751 return nativeResponseValue;
10753 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10754 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
10755 if(!isWasmInitialized) {
10756 throw new Error("initializeWasm() must be awaited first!");
10758 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
10759 // debug statements here
10761 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10762 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
10763 if(!isWasmInitialized) {
10764 throw new Error("initializeWasm() must be awaited first!");
10766 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
10767 return nativeResponseValue;
10769 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
10770 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
10771 if(!isWasmInitialized) {
10772 throw new Error("initializeWasm() must be awaited first!");
10774 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
10775 // debug statements here
10777 // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
10778 export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
10779 if(!isWasmInitialized) {
10780 throw new Error("initializeWasm() must be awaited first!");
10782 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
10783 return nativeResponseValue;
10785 // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
10786 export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
10787 if(!isWasmInitialized) {
10788 throw new Error("initializeWasm() must be awaited first!");
10790 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
10791 // debug statements here
10793 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
10794 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
10795 if(!isWasmInitialized) {
10796 throw new Error("initializeWasm() must be awaited first!");
10798 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
10799 // debug statements here
10801 // 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);
10802 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 {
10803 if(!isWasmInitialized) {
10804 throw new Error("initializeWasm() must be awaited first!");
10806 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
10807 return nativeResponseValue;
10809 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
10810 export function ReplyChannelRange_clone(orig: number): number {
10811 if(!isWasmInitialized) {
10812 throw new Error("initializeWasm() must be awaited first!");
10814 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
10815 return nativeResponseValue;
10817 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
10818 export function QueryShortChannelIds_free(this_obj: number): void {
10819 if(!isWasmInitialized) {
10820 throw new Error("initializeWasm() must be awaited first!");
10822 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
10823 // debug statements here
10825 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
10826 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
10827 if(!isWasmInitialized) {
10828 throw new Error("initializeWasm() must be awaited first!");
10830 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
10831 return decodeArray(nativeResponseValue);
10833 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10834 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10835 if(!isWasmInitialized) {
10836 throw new Error("initializeWasm() must be awaited first!");
10838 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
10839 // debug statements here
10841 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
10842 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
10843 if(!isWasmInitialized) {
10844 throw new Error("initializeWasm() must be awaited first!");
10846 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
10847 // debug statements here
10849 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
10850 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
10851 if(!isWasmInitialized) {
10852 throw new Error("initializeWasm() must be awaited first!");
10854 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
10855 return nativeResponseValue;
10857 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
10858 export function QueryShortChannelIds_clone(orig: number): number {
10859 if(!isWasmInitialized) {
10860 throw new Error("initializeWasm() must be awaited first!");
10862 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
10863 return nativeResponseValue;
10865 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
10866 export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
10867 if(!isWasmInitialized) {
10868 throw new Error("initializeWasm() must be awaited first!");
10870 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
10871 // debug statements here
10873 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
10874 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
10875 if(!isWasmInitialized) {
10876 throw new Error("initializeWasm() must be awaited first!");
10878 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
10879 return decodeArray(nativeResponseValue);
10881 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10882 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10883 if(!isWasmInitialized) {
10884 throw new Error("initializeWasm() must be awaited first!");
10886 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
10887 // debug statements here
10889 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
10890 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
10891 if(!isWasmInitialized) {
10892 throw new Error("initializeWasm() must be awaited first!");
10894 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
10895 return nativeResponseValue;
10897 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
10898 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
10899 if(!isWasmInitialized) {
10900 throw new Error("initializeWasm() must be awaited first!");
10902 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
10903 // debug statements here
10905 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
10906 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
10907 if(!isWasmInitialized) {
10908 throw new Error("initializeWasm() must be awaited first!");
10910 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
10911 return nativeResponseValue;
10913 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
10914 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
10915 if(!isWasmInitialized) {
10916 throw new Error("initializeWasm() must be awaited first!");
10918 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
10919 return nativeResponseValue;
10921 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
10922 export function GossipTimestampFilter_free(this_obj: number): void {
10923 if(!isWasmInitialized) {
10924 throw new Error("initializeWasm() must be awaited first!");
10926 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
10927 // debug statements here
10929 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
10930 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
10931 if(!isWasmInitialized) {
10932 throw new Error("initializeWasm() must be awaited first!");
10934 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
10935 return decodeArray(nativeResponseValue);
10937 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10938 export function GossipTimestampFilter_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.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
10943 // debug statements here
10945 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
10946 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
10947 if(!isWasmInitialized) {
10948 throw new Error("initializeWasm() must be awaited first!");
10950 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
10951 return nativeResponseValue;
10953 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
10954 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
10955 if(!isWasmInitialized) {
10956 throw new Error("initializeWasm() must be awaited first!");
10958 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
10959 // debug statements here
10961 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
10962 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
10963 if(!isWasmInitialized) {
10964 throw new Error("initializeWasm() must be awaited first!");
10966 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
10967 return nativeResponseValue;
10969 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
10970 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
10971 if(!isWasmInitialized) {
10972 throw new Error("initializeWasm() must be awaited first!");
10974 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
10975 // debug statements here
10977 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
10978 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
10979 if(!isWasmInitialized) {
10980 throw new Error("initializeWasm() must be awaited first!");
10982 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
10983 return nativeResponseValue;
10985 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
10986 export function GossipTimestampFilter_clone(orig: number): number {
10987 if(!isWasmInitialized) {
10988 throw new Error("initializeWasm() must be awaited first!");
10990 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
10991 return nativeResponseValue;
10993 // void ErrorAction_free(struct LDKErrorAction this_ptr);
10994 export function ErrorAction_free(this_ptr: number): void {
10995 if(!isWasmInitialized) {
10996 throw new Error("initializeWasm() must be awaited first!");
10998 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
10999 // debug statements here
11001 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
11002 export function ErrorAction_clone(orig: number): number {
11003 if(!isWasmInitialized) {
11004 throw new Error("initializeWasm() must be awaited first!");
11006 const nativeResponseValue = wasm.ErrorAction_clone(orig);
11007 return nativeResponseValue;
11009 // void LightningError_free(struct LDKLightningError this_obj);
11010 export function LightningError_free(this_obj: number): void {
11011 if(!isWasmInitialized) {
11012 throw new Error("initializeWasm() must be awaited first!");
11014 const nativeResponseValue = wasm.LightningError_free(this_obj);
11015 // debug statements here
11017 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
11018 export function LightningError_get_err(this_ptr: number): String {
11019 if(!isWasmInitialized) {
11020 throw new Error("initializeWasm() must be awaited first!");
11022 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
11023 return nativeResponseValue;
11025 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
11026 export function LightningError_set_err(this_ptr: number, val: String): void {
11027 if(!isWasmInitialized) {
11028 throw new Error("initializeWasm() must be awaited first!");
11030 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
11031 // debug statements here
11033 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
11034 export function LightningError_get_action(this_ptr: number): number {
11035 if(!isWasmInitialized) {
11036 throw new Error("initializeWasm() must be awaited first!");
11038 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
11039 return nativeResponseValue;
11041 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
11042 export function LightningError_set_action(this_ptr: number, val: number): void {
11043 if(!isWasmInitialized) {
11044 throw new Error("initializeWasm() must be awaited first!");
11046 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
11047 // debug statements here
11049 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
11050 export function LightningError_new(err_arg: String, action_arg: number): number {
11051 if(!isWasmInitialized) {
11052 throw new Error("initializeWasm() must be awaited first!");
11054 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
11055 return nativeResponseValue;
11057 // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
11058 export function LightningError_clone(orig: number): number {
11059 if(!isWasmInitialized) {
11060 throw new Error("initializeWasm() must be awaited first!");
11062 const nativeResponseValue = wasm.LightningError_clone(orig);
11063 return nativeResponseValue;
11065 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
11066 export function CommitmentUpdate_free(this_obj: number): void {
11067 if(!isWasmInitialized) {
11068 throw new Error("initializeWasm() must be awaited first!");
11070 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
11071 // debug statements here
11073 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
11074 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
11075 if(!isWasmInitialized) {
11076 throw new Error("initializeWasm() must be awaited first!");
11078 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
11079 // debug statements here
11081 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
11082 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
11083 if(!isWasmInitialized) {
11084 throw new Error("initializeWasm() must be awaited first!");
11086 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
11087 // debug statements here
11089 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
11090 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
11091 if(!isWasmInitialized) {
11092 throw new Error("initializeWasm() must be awaited first!");
11094 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
11095 // debug statements here
11097 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
11098 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
11099 if(!isWasmInitialized) {
11100 throw new Error("initializeWasm() must be awaited first!");
11102 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
11103 // debug statements here
11105 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
11106 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
11107 if(!isWasmInitialized) {
11108 throw new Error("initializeWasm() must be awaited first!");
11110 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
11111 return nativeResponseValue;
11113 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
11114 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
11115 if(!isWasmInitialized) {
11116 throw new Error("initializeWasm() must be awaited first!");
11118 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
11119 // debug statements here
11121 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
11122 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
11123 if(!isWasmInitialized) {
11124 throw new Error("initializeWasm() must be awaited first!");
11126 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
11127 return nativeResponseValue;
11129 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
11130 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
11131 if(!isWasmInitialized) {
11132 throw new Error("initializeWasm() must be awaited first!");
11134 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
11135 // debug statements here
11137 // 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);
11138 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 {
11139 if(!isWasmInitialized) {
11140 throw new Error("initializeWasm() must be awaited first!");
11142 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);
11143 return nativeResponseValue;
11145 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
11146 export function CommitmentUpdate_clone(orig: number): number {
11147 if(!isWasmInitialized) {
11148 throw new Error("initializeWasm() must be awaited first!");
11150 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
11151 return nativeResponseValue;
11153 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
11154 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
11155 if(!isWasmInitialized) {
11156 throw new Error("initializeWasm() must be awaited first!");
11158 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
11159 // debug statements here
11161 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
11162 export function HTLCFailChannelUpdate_clone(orig: number): number {
11163 if(!isWasmInitialized) {
11164 throw new Error("initializeWasm() must be awaited first!");
11166 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
11167 return nativeResponseValue;
11169 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
11170 export function ChannelMessageHandler_free(this_ptr: number): void {
11171 if(!isWasmInitialized) {
11172 throw new Error("initializeWasm() must be awaited first!");
11174 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
11175 // debug statements here
11177 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
11178 export function RoutingMessageHandler_free(this_ptr: number): void {
11179 if(!isWasmInitialized) {
11180 throw new Error("initializeWasm() must be awaited first!");
11182 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
11183 // debug statements here
11185 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
11186 export function AcceptChannel_write(obj: number): Uint8Array {
11187 if(!isWasmInitialized) {
11188 throw new Error("initializeWasm() must be awaited first!");
11190 const nativeResponseValue = wasm.AcceptChannel_write(obj);
11191 return decodeArray(nativeResponseValue);
11193 // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
11194 export function AcceptChannel_read(ser: Uint8Array): number {
11195 if(!isWasmInitialized) {
11196 throw new Error("initializeWasm() must be awaited first!");
11198 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
11199 return nativeResponseValue;
11201 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
11202 export function AnnouncementSignatures_write(obj: number): Uint8Array {
11203 if(!isWasmInitialized) {
11204 throw new Error("initializeWasm() must be awaited first!");
11206 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
11207 return decodeArray(nativeResponseValue);
11209 // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
11210 export function AnnouncementSignatures_read(ser: Uint8Array): number {
11211 if(!isWasmInitialized) {
11212 throw new Error("initializeWasm() must be awaited first!");
11214 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
11215 return nativeResponseValue;
11217 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
11218 export function ChannelReestablish_write(obj: number): Uint8Array {
11219 if(!isWasmInitialized) {
11220 throw new Error("initializeWasm() must be awaited first!");
11222 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
11223 return decodeArray(nativeResponseValue);
11225 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
11226 export function ChannelReestablish_read(ser: Uint8Array): number {
11227 if(!isWasmInitialized) {
11228 throw new Error("initializeWasm() must be awaited first!");
11230 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
11231 return nativeResponseValue;
11233 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
11234 export function ClosingSigned_write(obj: number): Uint8Array {
11235 if(!isWasmInitialized) {
11236 throw new Error("initializeWasm() must be awaited first!");
11238 const nativeResponseValue = wasm.ClosingSigned_write(obj);
11239 return decodeArray(nativeResponseValue);
11241 // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
11242 export function ClosingSigned_read(ser: Uint8Array): number {
11243 if(!isWasmInitialized) {
11244 throw new Error("initializeWasm() must be awaited first!");
11246 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
11247 return nativeResponseValue;
11249 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
11250 export function CommitmentSigned_write(obj: number): Uint8Array {
11251 if(!isWasmInitialized) {
11252 throw new Error("initializeWasm() must be awaited first!");
11254 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
11255 return decodeArray(nativeResponseValue);
11257 // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
11258 export function CommitmentSigned_read(ser: Uint8Array): number {
11259 if(!isWasmInitialized) {
11260 throw new Error("initializeWasm() must be awaited first!");
11262 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
11263 return nativeResponseValue;
11265 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
11266 export function FundingCreated_write(obj: number): Uint8Array {
11267 if(!isWasmInitialized) {
11268 throw new Error("initializeWasm() must be awaited first!");
11270 const nativeResponseValue = wasm.FundingCreated_write(obj);
11271 return decodeArray(nativeResponseValue);
11273 // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
11274 export function FundingCreated_read(ser: Uint8Array): number {
11275 if(!isWasmInitialized) {
11276 throw new Error("initializeWasm() must be awaited first!");
11278 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
11279 return nativeResponseValue;
11281 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
11282 export function FundingSigned_write(obj: number): Uint8Array {
11283 if(!isWasmInitialized) {
11284 throw new Error("initializeWasm() must be awaited first!");
11286 const nativeResponseValue = wasm.FundingSigned_write(obj);
11287 return decodeArray(nativeResponseValue);
11289 // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
11290 export function FundingSigned_read(ser: Uint8Array): number {
11291 if(!isWasmInitialized) {
11292 throw new Error("initializeWasm() must be awaited first!");
11294 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
11295 return nativeResponseValue;
11297 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
11298 export function FundingLocked_write(obj: number): Uint8Array {
11299 if(!isWasmInitialized) {
11300 throw new Error("initializeWasm() must be awaited first!");
11302 const nativeResponseValue = wasm.FundingLocked_write(obj);
11303 return decodeArray(nativeResponseValue);
11305 // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
11306 export function FundingLocked_read(ser: Uint8Array): number {
11307 if(!isWasmInitialized) {
11308 throw new Error("initializeWasm() must be awaited first!");
11310 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
11311 return nativeResponseValue;
11313 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
11314 export function Init_write(obj: number): Uint8Array {
11315 if(!isWasmInitialized) {
11316 throw new Error("initializeWasm() must be awaited first!");
11318 const nativeResponseValue = wasm.Init_write(obj);
11319 return decodeArray(nativeResponseValue);
11321 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
11322 export function Init_read(ser: Uint8Array): number {
11323 if(!isWasmInitialized) {
11324 throw new Error("initializeWasm() must be awaited first!");
11326 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
11327 return nativeResponseValue;
11329 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
11330 export function OpenChannel_write(obj: number): Uint8Array {
11331 if(!isWasmInitialized) {
11332 throw new Error("initializeWasm() must be awaited first!");
11334 const nativeResponseValue = wasm.OpenChannel_write(obj);
11335 return decodeArray(nativeResponseValue);
11337 // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
11338 export function OpenChannel_read(ser: Uint8Array): number {
11339 if(!isWasmInitialized) {
11340 throw new Error("initializeWasm() must be awaited first!");
11342 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
11343 return nativeResponseValue;
11345 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
11346 export function RevokeAndACK_write(obj: number): Uint8Array {
11347 if(!isWasmInitialized) {
11348 throw new Error("initializeWasm() must be awaited first!");
11350 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
11351 return decodeArray(nativeResponseValue);
11353 // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
11354 export function RevokeAndACK_read(ser: Uint8Array): number {
11355 if(!isWasmInitialized) {
11356 throw new Error("initializeWasm() must be awaited first!");
11358 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
11359 return nativeResponseValue;
11361 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
11362 export function Shutdown_write(obj: number): Uint8Array {
11363 if(!isWasmInitialized) {
11364 throw new Error("initializeWasm() must be awaited first!");
11366 const nativeResponseValue = wasm.Shutdown_write(obj);
11367 return decodeArray(nativeResponseValue);
11369 // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
11370 export function Shutdown_read(ser: Uint8Array): number {
11371 if(!isWasmInitialized) {
11372 throw new Error("initializeWasm() must be awaited first!");
11374 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
11375 return nativeResponseValue;
11377 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
11378 export function UpdateFailHTLC_write(obj: number): Uint8Array {
11379 if(!isWasmInitialized) {
11380 throw new Error("initializeWasm() must be awaited first!");
11382 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
11383 return decodeArray(nativeResponseValue);
11385 // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
11386 export function UpdateFailHTLC_read(ser: Uint8Array): number {
11387 if(!isWasmInitialized) {
11388 throw new Error("initializeWasm() must be awaited first!");
11390 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
11391 return nativeResponseValue;
11393 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
11394 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
11395 if(!isWasmInitialized) {
11396 throw new Error("initializeWasm() must be awaited first!");
11398 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
11399 return decodeArray(nativeResponseValue);
11401 // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
11402 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
11403 if(!isWasmInitialized) {
11404 throw new Error("initializeWasm() must be awaited first!");
11406 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
11407 return nativeResponseValue;
11409 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
11410 export function UpdateFee_write(obj: number): Uint8Array {
11411 if(!isWasmInitialized) {
11412 throw new Error("initializeWasm() must be awaited first!");
11414 const nativeResponseValue = wasm.UpdateFee_write(obj);
11415 return decodeArray(nativeResponseValue);
11417 // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
11418 export function UpdateFee_read(ser: Uint8Array): number {
11419 if(!isWasmInitialized) {
11420 throw new Error("initializeWasm() must be awaited first!");
11422 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
11423 return nativeResponseValue;
11425 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
11426 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
11427 if(!isWasmInitialized) {
11428 throw new Error("initializeWasm() must be awaited first!");
11430 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
11431 return decodeArray(nativeResponseValue);
11433 // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
11434 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
11435 if(!isWasmInitialized) {
11436 throw new Error("initializeWasm() must be awaited first!");
11438 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
11439 return nativeResponseValue;
11441 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
11442 export function UpdateAddHTLC_write(obj: number): Uint8Array {
11443 if(!isWasmInitialized) {
11444 throw new Error("initializeWasm() must be awaited first!");
11446 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
11447 return decodeArray(nativeResponseValue);
11449 // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
11450 export function UpdateAddHTLC_read(ser: Uint8Array): number {
11451 if(!isWasmInitialized) {
11452 throw new Error("initializeWasm() must be awaited first!");
11454 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
11455 return nativeResponseValue;
11457 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
11458 export function Ping_write(obj: number): Uint8Array {
11459 if(!isWasmInitialized) {
11460 throw new Error("initializeWasm() must be awaited first!");
11462 const nativeResponseValue = wasm.Ping_write(obj);
11463 return decodeArray(nativeResponseValue);
11465 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
11466 export function Ping_read(ser: Uint8Array): number {
11467 if(!isWasmInitialized) {
11468 throw new Error("initializeWasm() must be awaited first!");
11470 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
11471 return nativeResponseValue;
11473 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
11474 export function Pong_write(obj: number): Uint8Array {
11475 if(!isWasmInitialized) {
11476 throw new Error("initializeWasm() must be awaited first!");
11478 const nativeResponseValue = wasm.Pong_write(obj);
11479 return decodeArray(nativeResponseValue);
11481 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
11482 export function Pong_read(ser: Uint8Array): number {
11483 if(!isWasmInitialized) {
11484 throw new Error("initializeWasm() must be awaited first!");
11486 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
11487 return nativeResponseValue;
11489 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
11490 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
11491 if(!isWasmInitialized) {
11492 throw new Error("initializeWasm() must be awaited first!");
11494 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
11495 return decodeArray(nativeResponseValue);
11497 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
11498 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
11499 if(!isWasmInitialized) {
11500 throw new Error("initializeWasm() must be awaited first!");
11502 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
11503 return nativeResponseValue;
11505 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
11506 export function ChannelAnnouncement_write(obj: number): Uint8Array {
11507 if(!isWasmInitialized) {
11508 throw new Error("initializeWasm() must be awaited first!");
11510 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
11511 return decodeArray(nativeResponseValue);
11513 // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
11514 export function ChannelAnnouncement_read(ser: Uint8Array): number {
11515 if(!isWasmInitialized) {
11516 throw new Error("initializeWasm() must be awaited first!");
11518 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
11519 return nativeResponseValue;
11521 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
11522 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
11523 if(!isWasmInitialized) {
11524 throw new Error("initializeWasm() must be awaited first!");
11526 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
11527 return decodeArray(nativeResponseValue);
11529 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
11530 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
11531 if(!isWasmInitialized) {
11532 throw new Error("initializeWasm() must be awaited first!");
11534 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
11535 return nativeResponseValue;
11537 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
11538 export function ChannelUpdate_write(obj: number): Uint8Array {
11539 if(!isWasmInitialized) {
11540 throw new Error("initializeWasm() must be awaited first!");
11542 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
11543 return decodeArray(nativeResponseValue);
11545 // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
11546 export function ChannelUpdate_read(ser: Uint8Array): number {
11547 if(!isWasmInitialized) {
11548 throw new Error("initializeWasm() must be awaited first!");
11550 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
11551 return nativeResponseValue;
11553 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
11554 export function ErrorMessage_write(obj: number): Uint8Array {
11555 if(!isWasmInitialized) {
11556 throw new Error("initializeWasm() must be awaited first!");
11558 const nativeResponseValue = wasm.ErrorMessage_write(obj);
11559 return decodeArray(nativeResponseValue);
11561 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
11562 export function ErrorMessage_read(ser: Uint8Array): number {
11563 if(!isWasmInitialized) {
11564 throw new Error("initializeWasm() must be awaited first!");
11566 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
11567 return nativeResponseValue;
11569 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
11570 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
11571 if(!isWasmInitialized) {
11572 throw new Error("initializeWasm() must be awaited first!");
11574 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
11575 return decodeArray(nativeResponseValue);
11577 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
11578 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
11579 if(!isWasmInitialized) {
11580 throw new Error("initializeWasm() must be awaited first!");
11582 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
11583 return nativeResponseValue;
11585 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
11586 export function NodeAnnouncement_write(obj: number): Uint8Array {
11587 if(!isWasmInitialized) {
11588 throw new Error("initializeWasm() must be awaited first!");
11590 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
11591 return decodeArray(nativeResponseValue);
11593 // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
11594 export function NodeAnnouncement_read(ser: Uint8Array): number {
11595 if(!isWasmInitialized) {
11596 throw new Error("initializeWasm() must be awaited first!");
11598 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
11599 return nativeResponseValue;
11601 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
11602 export function QueryShortChannelIds_read(ser: Uint8Array): number {
11603 if(!isWasmInitialized) {
11604 throw new Error("initializeWasm() must be awaited first!");
11606 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
11607 return nativeResponseValue;
11609 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
11610 export function QueryShortChannelIds_write(obj: number): Uint8Array {
11611 if(!isWasmInitialized) {
11612 throw new Error("initializeWasm() must be awaited first!");
11614 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
11615 return decodeArray(nativeResponseValue);
11617 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
11618 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
11619 if(!isWasmInitialized) {
11620 throw new Error("initializeWasm() must be awaited first!");
11622 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
11623 return nativeResponseValue;
11625 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
11626 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
11627 if(!isWasmInitialized) {
11628 throw new Error("initializeWasm() must be awaited first!");
11630 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
11631 return decodeArray(nativeResponseValue);
11633 // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
11634 export function QueryChannelRange_end_blocknum(this_arg: number): number {
11635 if(!isWasmInitialized) {
11636 throw new Error("initializeWasm() must be awaited first!");
11638 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
11639 return nativeResponseValue;
11641 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
11642 export function QueryChannelRange_read(ser: Uint8Array): number {
11643 if(!isWasmInitialized) {
11644 throw new Error("initializeWasm() must be awaited first!");
11646 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
11647 return nativeResponseValue;
11649 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
11650 export function QueryChannelRange_write(obj: number): Uint8Array {
11651 if(!isWasmInitialized) {
11652 throw new Error("initializeWasm() must be awaited first!");
11654 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
11655 return decodeArray(nativeResponseValue);
11657 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
11658 export function ReplyChannelRange_read(ser: Uint8Array): number {
11659 if(!isWasmInitialized) {
11660 throw new Error("initializeWasm() must be awaited first!");
11662 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
11663 return nativeResponseValue;
11665 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
11666 export function ReplyChannelRange_write(obj: number): Uint8Array {
11667 if(!isWasmInitialized) {
11668 throw new Error("initializeWasm() must be awaited first!");
11670 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
11671 return decodeArray(nativeResponseValue);
11673 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
11674 export function GossipTimestampFilter_read(ser: Uint8Array): number {
11675 if(!isWasmInitialized) {
11676 throw new Error("initializeWasm() must be awaited first!");
11678 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
11679 return nativeResponseValue;
11681 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
11682 export function GossipTimestampFilter_write(obj: number): Uint8Array {
11683 if(!isWasmInitialized) {
11684 throw new Error("initializeWasm() must be awaited first!");
11686 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
11687 return decodeArray(nativeResponseValue);
11689 // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
11690 export function IgnoringMessageHandler_free(this_obj: number): void {
11691 if(!isWasmInitialized) {
11692 throw new Error("initializeWasm() must be awaited first!");
11694 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
11695 // debug statements here
11697 // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
11698 export function IgnoringMessageHandler_new(): number {
11699 if(!isWasmInitialized) {
11700 throw new Error("initializeWasm() must be awaited first!");
11702 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
11703 return nativeResponseValue;
11705 // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
11706 export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
11707 if(!isWasmInitialized) {
11708 throw new Error("initializeWasm() must be awaited first!");
11710 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
11711 return nativeResponseValue;
11713 // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
11714 export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
11715 if(!isWasmInitialized) {
11716 throw new Error("initializeWasm() must be awaited first!");
11718 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
11719 return nativeResponseValue;
11721 // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
11722 export function ErroringMessageHandler_free(this_obj: number): void {
11723 if(!isWasmInitialized) {
11724 throw new Error("initializeWasm() must be awaited first!");
11726 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
11727 // debug statements here
11729 // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
11730 export function ErroringMessageHandler_new(): number {
11731 if(!isWasmInitialized) {
11732 throw new Error("initializeWasm() must be awaited first!");
11734 const nativeResponseValue = wasm.ErroringMessageHandler_new();
11735 return nativeResponseValue;
11737 // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
11738 export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
11739 if(!isWasmInitialized) {
11740 throw new Error("initializeWasm() must be awaited first!");
11742 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
11743 return nativeResponseValue;
11745 // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
11746 export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
11747 if(!isWasmInitialized) {
11748 throw new Error("initializeWasm() must be awaited first!");
11750 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
11751 return nativeResponseValue;
11753 // void MessageHandler_free(struct LDKMessageHandler this_obj);
11754 export function MessageHandler_free(this_obj: number): void {
11755 if(!isWasmInitialized) {
11756 throw new Error("initializeWasm() must be awaited first!");
11758 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
11759 // debug statements here
11761 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
11762 export function MessageHandler_get_chan_handler(this_ptr: number): number {
11763 if(!isWasmInitialized) {
11764 throw new Error("initializeWasm() must be awaited first!");
11766 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
11767 return nativeResponseValue;
11769 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
11770 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
11771 if(!isWasmInitialized) {
11772 throw new Error("initializeWasm() must be awaited first!");
11774 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
11775 // debug statements here
11777 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
11778 export function MessageHandler_get_route_handler(this_ptr: number): number {
11779 if(!isWasmInitialized) {
11780 throw new Error("initializeWasm() must be awaited first!");
11782 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
11783 return nativeResponseValue;
11785 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
11786 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
11787 if(!isWasmInitialized) {
11788 throw new Error("initializeWasm() must be awaited first!");
11790 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
11791 // debug statements here
11793 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
11794 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
11795 if(!isWasmInitialized) {
11796 throw new Error("initializeWasm() must be awaited first!");
11798 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
11799 return nativeResponseValue;
11801 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
11802 export function SocketDescriptor_clone(orig: number): number {
11803 if(!isWasmInitialized) {
11804 throw new Error("initializeWasm() must be awaited first!");
11806 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
11807 return nativeResponseValue;
11809 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
11810 export function SocketDescriptor_free(this_ptr: number): void {
11811 if(!isWasmInitialized) {
11812 throw new Error("initializeWasm() must be awaited first!");
11814 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
11815 // debug statements here
11817 // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
11818 export function PeerHandleError_free(this_obj: number): void {
11819 if(!isWasmInitialized) {
11820 throw new Error("initializeWasm() must be awaited first!");
11822 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
11823 // debug statements here
11825 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
11826 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
11827 if(!isWasmInitialized) {
11828 throw new Error("initializeWasm() must be awaited first!");
11830 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
11831 return nativeResponseValue;
11833 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
11834 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
11835 if(!isWasmInitialized) {
11836 throw new Error("initializeWasm() must be awaited first!");
11838 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
11839 // debug statements here
11841 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
11842 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
11843 if(!isWasmInitialized) {
11844 throw new Error("initializeWasm() must be awaited first!");
11846 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
11847 return nativeResponseValue;
11849 // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
11850 export function PeerHandleError_clone(orig: number): number {
11851 if(!isWasmInitialized) {
11852 throw new Error("initializeWasm() must be awaited first!");
11854 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
11855 return nativeResponseValue;
11857 // void PeerManager_free(struct LDKPeerManager this_obj);
11858 export function PeerManager_free(this_obj: number): void {
11859 if(!isWasmInitialized) {
11860 throw new Error("initializeWasm() must be awaited first!");
11862 const nativeResponseValue = wasm.PeerManager_free(this_obj);
11863 // debug statements here
11865 // 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);
11866 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
11867 if(!isWasmInitialized) {
11868 throw new Error("initializeWasm() must be awaited first!");
11870 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
11871 return nativeResponseValue;
11873 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
11874 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
11875 if(!isWasmInitialized) {
11876 throw new Error("initializeWasm() must be awaited first!");
11878 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
11879 return nativeResponseValue;
11881 // 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);
11882 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
11883 if(!isWasmInitialized) {
11884 throw new Error("initializeWasm() must be awaited first!");
11886 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
11887 return nativeResponseValue;
11889 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
11890 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
11891 if(!isWasmInitialized) {
11892 throw new Error("initializeWasm() must be awaited first!");
11894 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
11895 return nativeResponseValue;
11897 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
11898 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
11899 if(!isWasmInitialized) {
11900 throw new Error("initializeWasm() must be awaited first!");
11902 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
11903 return nativeResponseValue;
11905 // 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);
11906 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
11907 if(!isWasmInitialized) {
11908 throw new Error("initializeWasm() must be awaited first!");
11910 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
11911 return nativeResponseValue;
11913 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
11914 export function PeerManager_process_events(this_arg: number): void {
11915 if(!isWasmInitialized) {
11916 throw new Error("initializeWasm() must be awaited first!");
11918 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
11919 // debug statements here
11921 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
11922 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
11923 if(!isWasmInitialized) {
11924 throw new Error("initializeWasm() must be awaited first!");
11926 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
11927 // debug statements here
11929 // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
11930 export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
11931 if(!isWasmInitialized) {
11932 throw new Error("initializeWasm() must be awaited first!");
11934 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
11935 // debug statements here
11937 // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
11938 export function PeerManager_timer_tick_occurred(this_arg: number): void {
11939 if(!isWasmInitialized) {
11940 throw new Error("initializeWasm() must be awaited first!");
11942 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
11943 // debug statements here
11945 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
11946 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
11947 if(!isWasmInitialized) {
11948 throw new Error("initializeWasm() must be awaited first!");
11950 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
11951 return decodeArray(nativeResponseValue);
11953 // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
11954 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
11955 if(!isWasmInitialized) {
11956 throw new Error("initializeWasm() must be awaited first!");
11958 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
11959 return nativeResponseValue;
11961 // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
11962 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
11963 if(!isWasmInitialized) {
11964 throw new Error("initializeWasm() must be awaited first!");
11966 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
11967 return nativeResponseValue;
11969 // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
11970 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
11971 if(!isWasmInitialized) {
11972 throw new Error("initializeWasm() must be awaited first!");
11974 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
11975 return nativeResponseValue;
11977 // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
11978 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
11979 if(!isWasmInitialized) {
11980 throw new Error("initializeWasm() must be awaited first!");
11982 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
11983 return nativeResponseValue;
11985 // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
11986 export function TxCreationKeys_free(this_obj: number): void {
11987 if(!isWasmInitialized) {
11988 throw new Error("initializeWasm() must be awaited first!");
11990 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
11991 // debug statements here
11993 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
11994 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
11995 if(!isWasmInitialized) {
11996 throw new Error("initializeWasm() must be awaited first!");
11998 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
11999 return decodeArray(nativeResponseValue);
12001 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12002 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
12003 if(!isWasmInitialized) {
12004 throw new Error("initializeWasm() must be awaited first!");
12006 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
12007 // debug statements here
12009 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12010 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
12011 if(!isWasmInitialized) {
12012 throw new Error("initializeWasm() must be awaited first!");
12014 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
12015 return decodeArray(nativeResponseValue);
12017 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12018 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
12019 if(!isWasmInitialized) {
12020 throw new Error("initializeWasm() must be awaited first!");
12022 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
12023 // debug statements here
12025 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12026 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
12027 if(!isWasmInitialized) {
12028 throw new Error("initializeWasm() must be awaited first!");
12030 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
12031 return decodeArray(nativeResponseValue);
12033 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12034 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
12035 if(!isWasmInitialized) {
12036 throw new Error("initializeWasm() must be awaited first!");
12038 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
12039 // debug statements here
12041 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12042 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
12043 if(!isWasmInitialized) {
12044 throw new Error("initializeWasm() must be awaited first!");
12046 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
12047 return decodeArray(nativeResponseValue);
12049 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12050 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
12051 if(!isWasmInitialized) {
12052 throw new Error("initializeWasm() must be awaited first!");
12054 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
12055 // debug statements here
12057 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
12058 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
12059 if(!isWasmInitialized) {
12060 throw new Error("initializeWasm() must be awaited first!");
12062 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
12063 return decodeArray(nativeResponseValue);
12065 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12066 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
12067 if(!isWasmInitialized) {
12068 throw new Error("initializeWasm() must be awaited first!");
12070 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
12071 // debug statements here
12073 // 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);
12074 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 {
12075 if(!isWasmInitialized) {
12076 throw new Error("initializeWasm() must be awaited first!");
12078 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));
12079 return nativeResponseValue;
12081 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
12082 export function TxCreationKeys_clone(orig: number): number {
12083 if(!isWasmInitialized) {
12084 throw new Error("initializeWasm() must be awaited first!");
12086 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
12087 return nativeResponseValue;
12089 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
12090 export function TxCreationKeys_write(obj: number): Uint8Array {
12091 if(!isWasmInitialized) {
12092 throw new Error("initializeWasm() must be awaited first!");
12094 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
12095 return decodeArray(nativeResponseValue);
12097 // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
12098 export function TxCreationKeys_read(ser: Uint8Array): number {
12099 if(!isWasmInitialized) {
12100 throw new Error("initializeWasm() must be awaited first!");
12102 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
12103 return nativeResponseValue;
12105 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
12106 export function ChannelPublicKeys_free(this_obj: number): void {
12107 if(!isWasmInitialized) {
12108 throw new Error("initializeWasm() must be awaited first!");
12110 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
12111 // debug statements here
12113 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12114 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
12115 if(!isWasmInitialized) {
12116 throw new Error("initializeWasm() must be awaited first!");
12118 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
12119 return decodeArray(nativeResponseValue);
12121 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12122 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
12123 if(!isWasmInitialized) {
12124 throw new Error("initializeWasm() must be awaited first!");
12126 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
12127 // debug statements here
12129 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12130 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
12131 if(!isWasmInitialized) {
12132 throw new Error("initializeWasm() must be awaited first!");
12134 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
12135 return decodeArray(nativeResponseValue);
12137 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12138 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
12139 if(!isWasmInitialized) {
12140 throw new Error("initializeWasm() must be awaited first!");
12142 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
12143 // debug statements here
12145 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12146 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
12147 if(!isWasmInitialized) {
12148 throw new Error("initializeWasm() must be awaited first!");
12150 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
12151 return decodeArray(nativeResponseValue);
12153 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12154 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
12155 if(!isWasmInitialized) {
12156 throw new Error("initializeWasm() must be awaited first!");
12158 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
12159 // debug statements here
12161 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12162 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
12163 if(!isWasmInitialized) {
12164 throw new Error("initializeWasm() must be awaited first!");
12166 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
12167 return decodeArray(nativeResponseValue);
12169 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12170 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
12171 if(!isWasmInitialized) {
12172 throw new Error("initializeWasm() must be awaited first!");
12174 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
12175 // debug statements here
12177 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
12178 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
12179 if(!isWasmInitialized) {
12180 throw new Error("initializeWasm() must be awaited first!");
12182 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
12183 return decodeArray(nativeResponseValue);
12185 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12186 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
12187 if(!isWasmInitialized) {
12188 throw new Error("initializeWasm() must be awaited first!");
12190 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
12191 // debug statements here
12193 // 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);
12194 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 {
12195 if(!isWasmInitialized) {
12196 throw new Error("initializeWasm() must be awaited first!");
12198 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));
12199 return nativeResponseValue;
12201 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
12202 export function ChannelPublicKeys_clone(orig: number): number {
12203 if(!isWasmInitialized) {
12204 throw new Error("initializeWasm() must be awaited first!");
12206 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
12207 return nativeResponseValue;
12209 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
12210 export function ChannelPublicKeys_write(obj: number): Uint8Array {
12211 if(!isWasmInitialized) {
12212 throw new Error("initializeWasm() must be awaited first!");
12214 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
12215 return decodeArray(nativeResponseValue);
12217 // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
12218 export function ChannelPublicKeys_read(ser: Uint8Array): number {
12219 if(!isWasmInitialized) {
12220 throw new Error("initializeWasm() must be awaited first!");
12222 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
12223 return nativeResponseValue;
12225 // 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);
12226 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 {
12227 if(!isWasmInitialized) {
12228 throw new Error("initializeWasm() must be awaited first!");
12230 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));
12231 return nativeResponseValue;
12233 // 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);
12234 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
12235 if(!isWasmInitialized) {
12236 throw new Error("initializeWasm() must be awaited first!");
12238 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
12239 return nativeResponseValue;
12241 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
12242 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
12243 if(!isWasmInitialized) {
12244 throw new Error("initializeWasm() must be awaited first!");
12246 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
12247 return decodeArray(nativeResponseValue);
12249 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
12250 export function HTLCOutputInCommitment_free(this_obj: number): void {
12251 if(!isWasmInitialized) {
12252 throw new Error("initializeWasm() must be awaited first!");
12254 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
12255 // debug statements here
12257 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12258 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
12259 if(!isWasmInitialized) {
12260 throw new Error("initializeWasm() must be awaited first!");
12262 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
12263 return nativeResponseValue;
12265 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
12266 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
12267 if(!isWasmInitialized) {
12268 throw new Error("initializeWasm() must be awaited first!");
12270 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
12271 // debug statements here
12273 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12274 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
12275 if(!isWasmInitialized) {
12276 throw new Error("initializeWasm() must be awaited first!");
12278 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
12279 return nativeResponseValue;
12281 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
12282 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
12283 if(!isWasmInitialized) {
12284 throw new Error("initializeWasm() must be awaited first!");
12286 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
12287 // debug statements here
12289 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12290 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
12291 if(!isWasmInitialized) {
12292 throw new Error("initializeWasm() must be awaited first!");
12294 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
12295 return nativeResponseValue;
12297 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
12298 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
12299 if(!isWasmInitialized) {
12300 throw new Error("initializeWasm() must be awaited first!");
12302 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
12303 // debug statements here
12305 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
12306 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
12307 if(!isWasmInitialized) {
12308 throw new Error("initializeWasm() must be awaited first!");
12310 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
12311 return decodeArray(nativeResponseValue);
12313 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12314 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
12315 if(!isWasmInitialized) {
12316 throw new Error("initializeWasm() must be awaited first!");
12318 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
12319 // debug statements here
12321 // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
12322 export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
12323 if(!isWasmInitialized) {
12324 throw new Error("initializeWasm() must be awaited first!");
12326 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
12327 return nativeResponseValue;
12329 // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
12330 export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
12331 if(!isWasmInitialized) {
12332 throw new Error("initializeWasm() must be awaited first!");
12334 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
12335 // debug statements here
12337 // 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);
12338 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 {
12339 if(!isWasmInitialized) {
12340 throw new Error("initializeWasm() must be awaited first!");
12342 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
12343 return nativeResponseValue;
12345 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
12346 export function HTLCOutputInCommitment_clone(orig: number): number {
12347 if(!isWasmInitialized) {
12348 throw new Error("initializeWasm() must be awaited first!");
12350 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
12351 return nativeResponseValue;
12353 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
12354 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
12355 if(!isWasmInitialized) {
12356 throw new Error("initializeWasm() must be awaited first!");
12358 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
12359 return decodeArray(nativeResponseValue);
12361 // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
12362 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
12363 if(!isWasmInitialized) {
12364 throw new Error("initializeWasm() must be awaited first!");
12366 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
12367 return nativeResponseValue;
12369 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
12370 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
12371 if(!isWasmInitialized) {
12372 throw new Error("initializeWasm() must be awaited first!");
12374 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
12375 return decodeArray(nativeResponseValue);
12377 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
12378 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
12379 if(!isWasmInitialized) {
12380 throw new Error("initializeWasm() must be awaited first!");
12382 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
12383 return decodeArray(nativeResponseValue);
12385 // 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);
12386 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 {
12387 if(!isWasmInitialized) {
12388 throw new Error("initializeWasm() must be awaited first!");
12390 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
12391 return decodeArray(nativeResponseValue);
12393 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
12394 export function ChannelTransactionParameters_free(this_obj: number): void {
12395 if(!isWasmInitialized) {
12396 throw new Error("initializeWasm() must be awaited first!");
12398 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
12399 // debug statements here
12401 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12402 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
12403 if(!isWasmInitialized) {
12404 throw new Error("initializeWasm() must be awaited first!");
12406 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
12407 return nativeResponseValue;
12409 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12410 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
12411 if(!isWasmInitialized) {
12412 throw new Error("initializeWasm() must be awaited first!");
12414 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
12415 // debug statements here
12417 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12418 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
12419 if(!isWasmInitialized) {
12420 throw new Error("initializeWasm() must be awaited first!");
12422 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
12423 return nativeResponseValue;
12425 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12426 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
12427 if(!isWasmInitialized) {
12428 throw new Error("initializeWasm() must be awaited first!");
12430 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
12431 // debug statements here
12433 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12434 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
12435 if(!isWasmInitialized) {
12436 throw new Error("initializeWasm() must be awaited first!");
12438 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
12439 return nativeResponseValue;
12441 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
12442 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
12443 if(!isWasmInitialized) {
12444 throw new Error("initializeWasm() must be awaited first!");
12446 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
12447 // debug statements here
12449 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12450 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
12451 if(!isWasmInitialized) {
12452 throw new Error("initializeWasm() must be awaited first!");
12454 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
12455 return nativeResponseValue;
12457 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
12458 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
12459 if(!isWasmInitialized) {
12460 throw new Error("initializeWasm() must be awaited first!");
12462 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
12463 // debug statements here
12465 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
12466 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
12467 if(!isWasmInitialized) {
12468 throw new Error("initializeWasm() must be awaited first!");
12470 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
12471 return nativeResponseValue;
12473 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
12474 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
12475 if(!isWasmInitialized) {
12476 throw new Error("initializeWasm() must be awaited first!");
12478 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
12479 // debug statements here
12481 // 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);
12482 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 {
12483 if(!isWasmInitialized) {
12484 throw new Error("initializeWasm() must be awaited first!");
12486 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
12487 return nativeResponseValue;
12489 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
12490 export function ChannelTransactionParameters_clone(orig: number): number {
12491 if(!isWasmInitialized) {
12492 throw new Error("initializeWasm() must be awaited first!");
12494 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
12495 return nativeResponseValue;
12497 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
12498 export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
12499 if(!isWasmInitialized) {
12500 throw new Error("initializeWasm() must be awaited first!");
12502 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
12503 // debug statements here
12505 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
12506 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
12507 if(!isWasmInitialized) {
12508 throw new Error("initializeWasm() must be awaited first!");
12510 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
12511 return nativeResponseValue;
12513 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
12514 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
12515 if(!isWasmInitialized) {
12516 throw new Error("initializeWasm() must be awaited first!");
12518 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
12519 // debug statements here
12521 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
12522 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
12523 if(!isWasmInitialized) {
12524 throw new Error("initializeWasm() must be awaited first!");
12526 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
12527 return nativeResponseValue;
12529 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
12530 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
12531 if(!isWasmInitialized) {
12532 throw new Error("initializeWasm() must be awaited first!");
12534 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
12535 // debug statements here
12537 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
12538 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
12539 if(!isWasmInitialized) {
12540 throw new Error("initializeWasm() must be awaited first!");
12542 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
12543 return nativeResponseValue;
12545 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
12546 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
12547 if(!isWasmInitialized) {
12548 throw new Error("initializeWasm() must be awaited first!");
12550 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
12551 return nativeResponseValue;
12553 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12554 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
12555 if(!isWasmInitialized) {
12556 throw new Error("initializeWasm() must be awaited first!");
12558 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
12559 return nativeResponseValue;
12561 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12562 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
12563 if(!isWasmInitialized) {
12564 throw new Error("initializeWasm() must be awaited first!");
12566 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
12567 return nativeResponseValue;
12569 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
12570 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
12571 if(!isWasmInitialized) {
12572 throw new Error("initializeWasm() must be awaited first!");
12574 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
12575 return nativeResponseValue;
12577 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
12578 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
12579 if(!isWasmInitialized) {
12580 throw new Error("initializeWasm() must be awaited first!");
12582 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
12583 return decodeArray(nativeResponseValue);
12585 // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
12586 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
12587 if(!isWasmInitialized) {
12588 throw new Error("initializeWasm() must be awaited first!");
12590 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
12591 return nativeResponseValue;
12593 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
12594 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
12595 if(!isWasmInitialized) {
12596 throw new Error("initializeWasm() must be awaited first!");
12598 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
12599 return decodeArray(nativeResponseValue);
12601 // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
12602 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
12603 if(!isWasmInitialized) {
12604 throw new Error("initializeWasm() must be awaited first!");
12606 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
12607 return nativeResponseValue;
12609 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
12610 export function DirectedChannelTransactionParameters_free(this_obj: number): void {
12611 if(!isWasmInitialized) {
12612 throw new Error("initializeWasm() must be awaited first!");
12614 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
12615 // debug statements here
12617 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12618 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
12619 if(!isWasmInitialized) {
12620 throw new Error("initializeWasm() must be awaited first!");
12622 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
12623 return nativeResponseValue;
12625 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12626 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
12627 if(!isWasmInitialized) {
12628 throw new Error("initializeWasm() must be awaited first!");
12630 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
12631 return nativeResponseValue;
12633 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12634 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
12635 if(!isWasmInitialized) {
12636 throw new Error("initializeWasm() must be awaited first!");
12638 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
12639 return nativeResponseValue;
12641 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12642 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
12643 if(!isWasmInitialized) {
12644 throw new Error("initializeWasm() must be awaited first!");
12646 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
12647 return nativeResponseValue;
12649 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
12650 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
12651 if(!isWasmInitialized) {
12652 throw new Error("initializeWasm() must be awaited first!");
12654 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
12655 return nativeResponseValue;
12657 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
12658 export function HolderCommitmentTransaction_free(this_obj: number): void {
12659 if(!isWasmInitialized) {
12660 throw new Error("initializeWasm() must be awaited first!");
12662 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
12663 // debug statements here
12665 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
12666 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
12667 if(!isWasmInitialized) {
12668 throw new Error("initializeWasm() must be awaited first!");
12670 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
12671 return decodeArray(nativeResponseValue);
12673 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
12674 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
12675 if(!isWasmInitialized) {
12676 throw new Error("initializeWasm() must be awaited first!");
12678 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
12679 // debug statements here
12681 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
12682 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
12683 if(!isWasmInitialized) {
12684 throw new Error("initializeWasm() must be awaited first!");
12686 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
12687 // debug statements here
12689 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
12690 export function HolderCommitmentTransaction_clone(orig: number): number {
12691 if(!isWasmInitialized) {
12692 throw new Error("initializeWasm() must be awaited first!");
12694 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
12695 return nativeResponseValue;
12697 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
12698 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
12699 if(!isWasmInitialized) {
12700 throw new Error("initializeWasm() must be awaited first!");
12702 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
12703 return decodeArray(nativeResponseValue);
12705 // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
12706 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
12707 if(!isWasmInitialized) {
12708 throw new Error("initializeWasm() must be awaited first!");
12710 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
12711 return nativeResponseValue;
12713 // 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);
12714 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
12715 if(!isWasmInitialized) {
12716 throw new Error("initializeWasm() must be awaited first!");
12718 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
12719 return nativeResponseValue;
12721 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
12722 export function BuiltCommitmentTransaction_free(this_obj: number): void {
12723 if(!isWasmInitialized) {
12724 throw new Error("initializeWasm() must be awaited first!");
12726 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
12727 // debug statements here
12729 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
12730 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
12731 if(!isWasmInitialized) {
12732 throw new Error("initializeWasm() must be awaited first!");
12734 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
12735 return decodeArray(nativeResponseValue);
12737 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
12738 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
12739 if(!isWasmInitialized) {
12740 throw new Error("initializeWasm() must be awaited first!");
12742 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
12743 // debug statements here
12745 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
12746 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
12747 if(!isWasmInitialized) {
12748 throw new Error("initializeWasm() must be awaited first!");
12750 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
12751 return decodeArray(nativeResponseValue);
12753 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12754 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
12755 if(!isWasmInitialized) {
12756 throw new Error("initializeWasm() must be awaited first!");
12758 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
12759 // debug statements here
12761 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
12762 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
12763 if(!isWasmInitialized) {
12764 throw new Error("initializeWasm() must be awaited first!");
12766 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
12767 return nativeResponseValue;
12769 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
12770 export function BuiltCommitmentTransaction_clone(orig: number): number {
12771 if(!isWasmInitialized) {
12772 throw new Error("initializeWasm() must be awaited first!");
12774 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
12775 return nativeResponseValue;
12777 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
12778 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
12779 if(!isWasmInitialized) {
12780 throw new Error("initializeWasm() must be awaited first!");
12782 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
12783 return decodeArray(nativeResponseValue);
12785 // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
12786 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
12787 if(!isWasmInitialized) {
12788 throw new Error("initializeWasm() must be awaited first!");
12790 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
12791 return nativeResponseValue;
12793 // 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);
12794 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
12795 if(!isWasmInitialized) {
12796 throw new Error("initializeWasm() must be awaited first!");
12798 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
12799 return decodeArray(nativeResponseValue);
12801 // 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);
12802 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
12803 if(!isWasmInitialized) {
12804 throw new Error("initializeWasm() must be awaited first!");
12806 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
12807 return decodeArray(nativeResponseValue);
12809 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
12810 export function CommitmentTransaction_free(this_obj: number): void {
12811 if(!isWasmInitialized) {
12812 throw new Error("initializeWasm() must be awaited first!");
12814 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
12815 // debug statements here
12817 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
12818 export function CommitmentTransaction_clone(orig: number): number {
12819 if(!isWasmInitialized) {
12820 throw new Error("initializeWasm() must be awaited first!");
12822 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
12823 return nativeResponseValue;
12825 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
12826 export function CommitmentTransaction_write(obj: number): Uint8Array {
12827 if(!isWasmInitialized) {
12828 throw new Error("initializeWasm() must be awaited first!");
12830 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
12831 return decodeArray(nativeResponseValue);
12833 // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
12834 export function CommitmentTransaction_read(ser: Uint8Array): number {
12835 if(!isWasmInitialized) {
12836 throw new Error("initializeWasm() must be awaited first!");
12838 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
12839 return nativeResponseValue;
12841 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12842 export function CommitmentTransaction_commitment_number(this_arg: number): number {
12843 if(!isWasmInitialized) {
12844 throw new Error("initializeWasm() must be awaited first!");
12846 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
12847 return nativeResponseValue;
12849 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12850 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
12851 if(!isWasmInitialized) {
12852 throw new Error("initializeWasm() must be awaited first!");
12854 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
12855 return nativeResponseValue;
12857 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12858 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
12859 if(!isWasmInitialized) {
12860 throw new Error("initializeWasm() must be awaited first!");
12862 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
12863 return nativeResponseValue;
12865 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12866 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
12867 if(!isWasmInitialized) {
12868 throw new Error("initializeWasm() must be awaited first!");
12870 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
12871 return nativeResponseValue;
12873 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
12874 export function CommitmentTransaction_trust(this_arg: number): number {
12875 if(!isWasmInitialized) {
12876 throw new Error("initializeWasm() must be awaited first!");
12878 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
12879 return nativeResponseValue;
12881 // 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);
12882 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
12883 if(!isWasmInitialized) {
12884 throw new Error("initializeWasm() must be awaited first!");
12886 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
12887 return nativeResponseValue;
12889 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
12890 export function TrustedCommitmentTransaction_free(this_obj: number): void {
12891 if(!isWasmInitialized) {
12892 throw new Error("initializeWasm() must be awaited first!");
12894 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
12895 // debug statements here
12897 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12898 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
12899 if(!isWasmInitialized) {
12900 throw new Error("initializeWasm() must be awaited first!");
12902 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
12903 return decodeArray(nativeResponseValue);
12905 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12906 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
12907 if(!isWasmInitialized) {
12908 throw new Error("initializeWasm() must be awaited first!");
12910 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
12911 return nativeResponseValue;
12913 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
12914 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
12915 if(!isWasmInitialized) {
12916 throw new Error("initializeWasm() must be awaited first!");
12918 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
12919 return nativeResponseValue;
12921 // 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);
12922 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
12923 if(!isWasmInitialized) {
12924 throw new Error("initializeWasm() must be awaited first!");
12926 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
12927 return nativeResponseValue;
12929 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
12930 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
12931 if(!isWasmInitialized) {
12932 throw new Error("initializeWasm() must be awaited first!");
12934 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
12935 return nativeResponseValue;
12937 // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
12938 export function InitFeatures_eq(a: number, b: number): boolean {
12939 if(!isWasmInitialized) {
12940 throw new Error("initializeWasm() must be awaited first!");
12942 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
12943 return nativeResponseValue;
12945 // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
12946 export function NodeFeatures_eq(a: number, b: number): boolean {
12947 if(!isWasmInitialized) {
12948 throw new Error("initializeWasm() must be awaited first!");
12950 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
12951 return nativeResponseValue;
12953 // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
12954 export function ChannelFeatures_eq(a: number, b: number): boolean {
12955 if(!isWasmInitialized) {
12956 throw new Error("initializeWasm() must be awaited first!");
12958 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
12959 return nativeResponseValue;
12961 // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
12962 export function InvoiceFeatures_eq(a: number, b: number): boolean {
12963 if(!isWasmInitialized) {
12964 throw new Error("initializeWasm() must be awaited first!");
12966 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
12967 return nativeResponseValue;
12969 // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
12970 export function InitFeatures_clone(orig: number): number {
12971 if(!isWasmInitialized) {
12972 throw new Error("initializeWasm() must be awaited first!");
12974 const nativeResponseValue = wasm.InitFeatures_clone(orig);
12975 return nativeResponseValue;
12977 // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
12978 export function NodeFeatures_clone(orig: number): number {
12979 if(!isWasmInitialized) {
12980 throw new Error("initializeWasm() must be awaited first!");
12982 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
12983 return nativeResponseValue;
12985 // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
12986 export function ChannelFeatures_clone(orig: number): number {
12987 if(!isWasmInitialized) {
12988 throw new Error("initializeWasm() must be awaited first!");
12990 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
12991 return nativeResponseValue;
12993 // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
12994 export function InvoiceFeatures_clone(orig: number): number {
12995 if(!isWasmInitialized) {
12996 throw new Error("initializeWasm() must be awaited first!");
12998 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
12999 return nativeResponseValue;
13001 // void InitFeatures_free(struct LDKInitFeatures this_obj);
13002 export function InitFeatures_free(this_obj: number): void {
13003 if(!isWasmInitialized) {
13004 throw new Error("initializeWasm() must be awaited first!");
13006 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
13007 // debug statements here
13009 // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
13010 export function NodeFeatures_free(this_obj: number): void {
13011 if(!isWasmInitialized) {
13012 throw new Error("initializeWasm() must be awaited first!");
13014 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
13015 // debug statements here
13017 // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
13018 export function ChannelFeatures_free(this_obj: number): void {
13019 if(!isWasmInitialized) {
13020 throw new Error("initializeWasm() must be awaited first!");
13022 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
13023 // debug statements here
13025 // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
13026 export function InvoiceFeatures_free(this_obj: number): void {
13027 if(!isWasmInitialized) {
13028 throw new Error("initializeWasm() must be awaited first!");
13030 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
13031 // debug statements here
13033 // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
13034 export function InitFeatures_empty(): number {
13035 if(!isWasmInitialized) {
13036 throw new Error("initializeWasm() must be awaited first!");
13038 const nativeResponseValue = wasm.InitFeatures_empty();
13039 return nativeResponseValue;
13041 // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
13042 export function InitFeatures_known(): number {
13043 if(!isWasmInitialized) {
13044 throw new Error("initializeWasm() must be awaited first!");
13046 const nativeResponseValue = wasm.InitFeatures_known();
13047 return nativeResponseValue;
13049 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
13050 export function NodeFeatures_empty(): number {
13051 if(!isWasmInitialized) {
13052 throw new Error("initializeWasm() must be awaited first!");
13054 const nativeResponseValue = wasm.NodeFeatures_empty();
13055 return nativeResponseValue;
13057 // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
13058 export function NodeFeatures_known(): number {
13059 if(!isWasmInitialized) {
13060 throw new Error("initializeWasm() must be awaited first!");
13062 const nativeResponseValue = wasm.NodeFeatures_known();
13063 return nativeResponseValue;
13065 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
13066 export function ChannelFeatures_empty(): number {
13067 if(!isWasmInitialized) {
13068 throw new Error("initializeWasm() must be awaited first!");
13070 const nativeResponseValue = wasm.ChannelFeatures_empty();
13071 return nativeResponseValue;
13073 // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
13074 export function ChannelFeatures_known(): number {
13075 if(!isWasmInitialized) {
13076 throw new Error("initializeWasm() must be awaited first!");
13078 const nativeResponseValue = wasm.ChannelFeatures_known();
13079 return nativeResponseValue;
13081 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
13082 export function InvoiceFeatures_empty(): number {
13083 if(!isWasmInitialized) {
13084 throw new Error("initializeWasm() must be awaited first!");
13086 const nativeResponseValue = wasm.InvoiceFeatures_empty();
13087 return nativeResponseValue;
13089 // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
13090 export function InvoiceFeatures_known(): number {
13091 if(!isWasmInitialized) {
13092 throw new Error("initializeWasm() must be awaited first!");
13094 const nativeResponseValue = wasm.InvoiceFeatures_known();
13095 return nativeResponseValue;
13097 // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
13098 export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
13099 if(!isWasmInitialized) {
13100 throw new Error("initializeWasm() must be awaited first!");
13102 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
13103 return nativeResponseValue;
13105 // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
13106 export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
13107 if(!isWasmInitialized) {
13108 throw new Error("initializeWasm() must be awaited first!");
13110 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
13111 return nativeResponseValue;
13113 // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
13114 export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
13115 if(!isWasmInitialized) {
13116 throw new Error("initializeWasm() must be awaited first!");
13118 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
13119 return nativeResponseValue;
13121 // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
13122 export function InitFeatures_write(obj: number): Uint8Array {
13123 if(!isWasmInitialized) {
13124 throw new Error("initializeWasm() must be awaited first!");
13126 const nativeResponseValue = wasm.InitFeatures_write(obj);
13127 return decodeArray(nativeResponseValue);
13129 // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
13130 export function NodeFeatures_write(obj: number): Uint8Array {
13131 if(!isWasmInitialized) {
13132 throw new Error("initializeWasm() must be awaited first!");
13134 const nativeResponseValue = wasm.NodeFeatures_write(obj);
13135 return decodeArray(nativeResponseValue);
13137 // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
13138 export function ChannelFeatures_write(obj: number): Uint8Array {
13139 if(!isWasmInitialized) {
13140 throw new Error("initializeWasm() must be awaited first!");
13142 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
13143 return decodeArray(nativeResponseValue);
13145 // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
13146 export function InvoiceFeatures_write(obj: number): Uint8Array {
13147 if(!isWasmInitialized) {
13148 throw new Error("initializeWasm() must be awaited first!");
13150 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
13151 return decodeArray(nativeResponseValue);
13153 // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
13154 export function InitFeatures_read(ser: Uint8Array): number {
13155 if(!isWasmInitialized) {
13156 throw new Error("initializeWasm() must be awaited first!");
13158 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
13159 return nativeResponseValue;
13161 // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
13162 export function NodeFeatures_read(ser: Uint8Array): number {
13163 if(!isWasmInitialized) {
13164 throw new Error("initializeWasm() must be awaited first!");
13166 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
13167 return nativeResponseValue;
13169 // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
13170 export function ChannelFeatures_read(ser: Uint8Array): number {
13171 if(!isWasmInitialized) {
13172 throw new Error("initializeWasm() must be awaited first!");
13174 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
13175 return nativeResponseValue;
13177 // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
13178 export function InvoiceFeatures_read(ser: Uint8Array): number {
13179 if(!isWasmInitialized) {
13180 throw new Error("initializeWasm() must be awaited first!");
13182 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
13183 return nativeResponseValue;
13185 // void RouteHop_free(struct LDKRouteHop this_obj);
13186 export function RouteHop_free(this_obj: number): void {
13187 if(!isWasmInitialized) {
13188 throw new Error("initializeWasm() must be awaited first!");
13190 const nativeResponseValue = wasm.RouteHop_free(this_obj);
13191 // debug statements here
13193 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13194 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
13195 if(!isWasmInitialized) {
13196 throw new Error("initializeWasm() must be awaited first!");
13198 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
13199 return decodeArray(nativeResponseValue);
13201 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13202 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
13203 if(!isWasmInitialized) {
13204 throw new Error("initializeWasm() must be awaited first!");
13206 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
13207 // debug statements here
13209 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13210 export function RouteHop_get_node_features(this_ptr: number): number {
13211 if(!isWasmInitialized) {
13212 throw new Error("initializeWasm() must be awaited first!");
13214 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
13215 return nativeResponseValue;
13217 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
13218 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
13219 if(!isWasmInitialized) {
13220 throw new Error("initializeWasm() must be awaited first!");
13222 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
13223 // debug statements here
13225 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13226 export function RouteHop_get_short_channel_id(this_ptr: number): number {
13227 if(!isWasmInitialized) {
13228 throw new Error("initializeWasm() must be awaited first!");
13230 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
13231 return nativeResponseValue;
13233 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13234 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
13235 if(!isWasmInitialized) {
13236 throw new Error("initializeWasm() must be awaited first!");
13238 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
13239 // debug statements here
13241 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13242 export function RouteHop_get_channel_features(this_ptr: number): number {
13243 if(!isWasmInitialized) {
13244 throw new Error("initializeWasm() must be awaited first!");
13246 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
13247 return nativeResponseValue;
13249 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13250 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
13251 if(!isWasmInitialized) {
13252 throw new Error("initializeWasm() must be awaited first!");
13254 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
13255 // debug statements here
13257 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13258 export function RouteHop_get_fee_msat(this_ptr: number): number {
13259 if(!isWasmInitialized) {
13260 throw new Error("initializeWasm() must be awaited first!");
13262 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
13263 return nativeResponseValue;
13265 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
13266 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
13267 if(!isWasmInitialized) {
13268 throw new Error("initializeWasm() must be awaited first!");
13270 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
13271 // debug statements here
13273 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
13274 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
13275 if(!isWasmInitialized) {
13276 throw new Error("initializeWasm() must be awaited first!");
13278 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
13279 return nativeResponseValue;
13281 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
13282 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13283 if(!isWasmInitialized) {
13284 throw new Error("initializeWasm() must be awaited first!");
13286 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
13287 // debug statements here
13289 // 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);
13290 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 {
13291 if(!isWasmInitialized) {
13292 throw new Error("initializeWasm() must be awaited first!");
13294 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);
13295 return nativeResponseValue;
13297 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
13298 export function RouteHop_clone(orig: number): number {
13299 if(!isWasmInitialized) {
13300 throw new Error("initializeWasm() must be awaited first!");
13302 const nativeResponseValue = wasm.RouteHop_clone(orig);
13303 return nativeResponseValue;
13305 // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
13306 export function RouteHop_write(obj: number): Uint8Array {
13307 if(!isWasmInitialized) {
13308 throw new Error("initializeWasm() must be awaited first!");
13310 const nativeResponseValue = wasm.RouteHop_write(obj);
13311 return decodeArray(nativeResponseValue);
13313 // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
13314 export function RouteHop_read(ser: Uint8Array): number {
13315 if(!isWasmInitialized) {
13316 throw new Error("initializeWasm() must be awaited first!");
13318 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
13319 return nativeResponseValue;
13321 // void Route_free(struct LDKRoute this_obj);
13322 export function Route_free(this_obj: number): void {
13323 if(!isWasmInitialized) {
13324 throw new Error("initializeWasm() must be awaited first!");
13326 const nativeResponseValue = wasm.Route_free(this_obj);
13327 // debug statements here
13329 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
13330 export function Route_set_paths(this_ptr: number, val: number[][]): void {
13331 if(!isWasmInitialized) {
13332 throw new Error("initializeWasm() must be awaited first!");
13334 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
13335 // debug statements here
13337 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
13338 export function Route_new(paths_arg: number[][]): number {
13339 if(!isWasmInitialized) {
13340 throw new Error("initializeWasm() must be awaited first!");
13342 const nativeResponseValue = wasm.Route_new(paths_arg);
13343 return nativeResponseValue;
13345 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
13346 export function Route_clone(orig: number): number {
13347 if(!isWasmInitialized) {
13348 throw new Error("initializeWasm() must be awaited first!");
13350 const nativeResponseValue = wasm.Route_clone(orig);
13351 return nativeResponseValue;
13353 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
13354 export function Route_write(obj: number): Uint8Array {
13355 if(!isWasmInitialized) {
13356 throw new Error("initializeWasm() must be awaited first!");
13358 const nativeResponseValue = wasm.Route_write(obj);
13359 return decodeArray(nativeResponseValue);
13361 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
13362 export function Route_read(ser: Uint8Array): number {
13363 if(!isWasmInitialized) {
13364 throw new Error("initializeWasm() must be awaited first!");
13366 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
13367 return nativeResponseValue;
13369 // void RouteHint_free(struct LDKRouteHint this_obj);
13370 export function RouteHint_free(this_obj: number): void {
13371 if(!isWasmInitialized) {
13372 throw new Error("initializeWasm() must be awaited first!");
13374 const nativeResponseValue = wasm.RouteHint_free(this_obj);
13375 // debug statements here
13377 // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
13378 export function RouteHint_eq(a: number, b: number): boolean {
13379 if(!isWasmInitialized) {
13380 throw new Error("initializeWasm() must be awaited first!");
13382 const nativeResponseValue = wasm.RouteHint_eq(a, b);
13383 return nativeResponseValue;
13385 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
13386 export function RouteHint_clone(orig: number): number {
13387 if(!isWasmInitialized) {
13388 throw new Error("initializeWasm() must be awaited first!");
13390 const nativeResponseValue = wasm.RouteHint_clone(orig);
13391 return nativeResponseValue;
13393 // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
13394 export function RouteHintHop_free(this_obj: number): void {
13395 if(!isWasmInitialized) {
13396 throw new Error("initializeWasm() must be awaited first!");
13398 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
13399 // debug statements here
13401 // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13402 export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
13403 if(!isWasmInitialized) {
13404 throw new Error("initializeWasm() must be awaited first!");
13406 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
13407 return decodeArray(nativeResponseValue);
13409 // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13410 export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
13411 if(!isWasmInitialized) {
13412 throw new Error("initializeWasm() must be awaited first!");
13414 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
13415 // debug statements here
13417 // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13418 export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
13419 if(!isWasmInitialized) {
13420 throw new Error("initializeWasm() must be awaited first!");
13422 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
13423 return nativeResponseValue;
13425 // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
13426 export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
13427 if(!isWasmInitialized) {
13428 throw new Error("initializeWasm() must be awaited first!");
13430 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
13431 // debug statements here
13433 // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13434 export function RouteHintHop_get_fees(this_ptr: number): number {
13435 if(!isWasmInitialized) {
13436 throw new Error("initializeWasm() must be awaited first!");
13438 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
13439 return nativeResponseValue;
13441 // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13442 export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
13443 if(!isWasmInitialized) {
13444 throw new Error("initializeWasm() must be awaited first!");
13446 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
13447 // debug statements here
13449 // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13450 export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
13451 if(!isWasmInitialized) {
13452 throw new Error("initializeWasm() must be awaited first!");
13454 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
13455 return nativeResponseValue;
13457 // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
13458 export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13459 if(!isWasmInitialized) {
13460 throw new Error("initializeWasm() must be awaited first!");
13462 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
13463 // debug statements here
13465 // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13466 export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
13467 if(!isWasmInitialized) {
13468 throw new Error("initializeWasm() must be awaited first!");
13470 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
13471 return nativeResponseValue;
13473 // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13474 export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13475 if(!isWasmInitialized) {
13476 throw new Error("initializeWasm() must be awaited first!");
13478 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
13479 // debug statements here
13481 // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
13482 export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
13483 if(!isWasmInitialized) {
13484 throw new Error("initializeWasm() must be awaited first!");
13486 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
13487 return nativeResponseValue;
13489 // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13490 export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
13491 if(!isWasmInitialized) {
13492 throw new Error("initializeWasm() must be awaited first!");
13494 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
13495 // debug statements here
13497 // 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);
13498 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 {
13499 if(!isWasmInitialized) {
13500 throw new Error("initializeWasm() must be awaited first!");
13502 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);
13503 return nativeResponseValue;
13505 // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
13506 export function RouteHintHop_eq(a: number, b: number): boolean {
13507 if(!isWasmInitialized) {
13508 throw new Error("initializeWasm() must be awaited first!");
13510 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
13511 return nativeResponseValue;
13513 // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
13514 export function RouteHintHop_clone(orig: number): number {
13515 if(!isWasmInitialized) {
13516 throw new Error("initializeWasm() must be awaited first!");
13518 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
13519 return nativeResponseValue;
13521 // 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);
13522 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 {
13523 if(!isWasmInitialized) {
13524 throw new Error("initializeWasm() must be awaited first!");
13526 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
13527 return nativeResponseValue;
13529 // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
13530 export function NetworkGraph_free(this_obj: number): void {
13531 if(!isWasmInitialized) {
13532 throw new Error("initializeWasm() must be awaited first!");
13534 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
13535 // debug statements here
13537 // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
13538 export function NetworkGraph_clone(orig: number): number {
13539 if(!isWasmInitialized) {
13540 throw new Error("initializeWasm() must be awaited first!");
13542 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
13543 return nativeResponseValue;
13545 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
13546 export function LockedNetworkGraph_free(this_obj: number): void {
13547 if(!isWasmInitialized) {
13548 throw new Error("initializeWasm() must be awaited first!");
13550 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
13551 // debug statements here
13553 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
13554 export function NetGraphMsgHandler_free(this_obj: number): void {
13555 if(!isWasmInitialized) {
13556 throw new Error("initializeWasm() must be awaited first!");
13558 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
13559 // debug statements here
13561 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
13562 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
13563 if(!isWasmInitialized) {
13564 throw new Error("initializeWasm() must be awaited first!");
13566 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
13567 return nativeResponseValue;
13569 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
13570 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
13571 if(!isWasmInitialized) {
13572 throw new Error("initializeWasm() must be awaited first!");
13574 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
13575 return nativeResponseValue;
13577 // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
13578 export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
13579 if(!isWasmInitialized) {
13580 throw new Error("initializeWasm() must be awaited first!");
13582 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
13583 // debug statements here
13585 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13586 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
13587 if(!isWasmInitialized) {
13588 throw new Error("initializeWasm() must be awaited first!");
13590 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
13591 return nativeResponseValue;
13593 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
13594 export function LockedNetworkGraph_graph(this_arg: number): number {
13595 if(!isWasmInitialized) {
13596 throw new Error("initializeWasm() must be awaited first!");
13598 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
13599 return nativeResponseValue;
13601 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13602 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
13603 if(!isWasmInitialized) {
13604 throw new Error("initializeWasm() must be awaited first!");
13606 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
13607 return nativeResponseValue;
13609 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
13610 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
13611 if(!isWasmInitialized) {
13612 throw new Error("initializeWasm() must be awaited first!");
13614 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
13615 return nativeResponseValue;
13617 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
13618 export function DirectionalChannelInfo_free(this_obj: number): void {
13619 if(!isWasmInitialized) {
13620 throw new Error("initializeWasm() must be awaited first!");
13622 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
13623 // debug statements here
13625 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13626 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
13627 if(!isWasmInitialized) {
13628 throw new Error("initializeWasm() must be awaited first!");
13630 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
13631 return nativeResponseValue;
13633 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
13634 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
13635 if(!isWasmInitialized) {
13636 throw new Error("initializeWasm() must be awaited first!");
13638 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
13639 // debug statements here
13641 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13642 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
13643 if(!isWasmInitialized) {
13644 throw new Error("initializeWasm() must be awaited first!");
13646 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
13647 return nativeResponseValue;
13649 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
13650 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
13651 if(!isWasmInitialized) {
13652 throw new Error("initializeWasm() must be awaited first!");
13654 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
13655 // debug statements here
13657 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13658 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
13659 if(!isWasmInitialized) {
13660 throw new Error("initializeWasm() must be awaited first!");
13662 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
13663 return nativeResponseValue;
13665 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
13666 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
13667 if(!isWasmInitialized) {
13668 throw new Error("initializeWasm() must be awaited first!");
13670 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
13671 // debug statements here
13673 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13674 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
13675 if(!isWasmInitialized) {
13676 throw new Error("initializeWasm() must be awaited first!");
13678 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
13679 return nativeResponseValue;
13681 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
13682 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
13683 if(!isWasmInitialized) {
13684 throw new Error("initializeWasm() must be awaited first!");
13686 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
13687 // debug statements here
13689 // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13690 export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
13691 if(!isWasmInitialized) {
13692 throw new Error("initializeWasm() must be awaited first!");
13694 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
13695 return nativeResponseValue;
13697 // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13698 export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
13699 if(!isWasmInitialized) {
13700 throw new Error("initializeWasm() must be awaited first!");
13702 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
13703 // debug statements here
13705 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13706 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
13707 if(!isWasmInitialized) {
13708 throw new Error("initializeWasm() must be awaited first!");
13710 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
13711 return nativeResponseValue;
13713 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
13714 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
13715 if(!isWasmInitialized) {
13716 throw new Error("initializeWasm() must be awaited first!");
13718 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
13719 // debug statements here
13721 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
13722 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
13723 if(!isWasmInitialized) {
13724 throw new Error("initializeWasm() must be awaited first!");
13726 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
13727 return nativeResponseValue;
13729 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
13730 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
13731 if(!isWasmInitialized) {
13732 throw new Error("initializeWasm() must be awaited first!");
13734 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
13735 // debug statements here
13737 // 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);
13738 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 {
13739 if(!isWasmInitialized) {
13740 throw new Error("initializeWasm() must be awaited first!");
13742 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);
13743 return nativeResponseValue;
13745 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
13746 export function DirectionalChannelInfo_clone(orig: number): number {
13747 if(!isWasmInitialized) {
13748 throw new Error("initializeWasm() must be awaited first!");
13750 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
13751 return nativeResponseValue;
13753 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
13754 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
13755 if(!isWasmInitialized) {
13756 throw new Error("initializeWasm() must be awaited first!");
13758 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
13759 return decodeArray(nativeResponseValue);
13761 // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
13762 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
13763 if(!isWasmInitialized) {
13764 throw new Error("initializeWasm() must be awaited first!");
13766 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
13767 return nativeResponseValue;
13769 // void ChannelInfo_free(struct LDKChannelInfo this_obj);
13770 export function ChannelInfo_free(this_obj: number): void {
13771 if(!isWasmInitialized) {
13772 throw new Error("initializeWasm() must be awaited first!");
13774 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
13775 // debug statements here
13777 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13778 export function ChannelInfo_get_features(this_ptr: number): number {
13779 if(!isWasmInitialized) {
13780 throw new Error("initializeWasm() must be awaited first!");
13782 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
13783 return nativeResponseValue;
13785 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
13786 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
13787 if(!isWasmInitialized) {
13788 throw new Error("initializeWasm() must be awaited first!");
13790 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
13791 // debug statements here
13793 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13794 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
13795 if(!isWasmInitialized) {
13796 throw new Error("initializeWasm() must be awaited first!");
13798 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
13799 return decodeArray(nativeResponseValue);
13801 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13802 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
13803 if(!isWasmInitialized) {
13804 throw new Error("initializeWasm() must be awaited first!");
13806 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
13807 // debug statements here
13809 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13810 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
13811 if(!isWasmInitialized) {
13812 throw new Error("initializeWasm() must be awaited first!");
13814 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
13815 return nativeResponseValue;
13817 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
13818 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
13819 if(!isWasmInitialized) {
13820 throw new Error("initializeWasm() must be awaited first!");
13822 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
13823 // debug statements here
13825 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13826 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
13827 if(!isWasmInitialized) {
13828 throw new Error("initializeWasm() must be awaited first!");
13830 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
13831 return decodeArray(nativeResponseValue);
13833 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13834 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
13835 if(!isWasmInitialized) {
13836 throw new Error("initializeWasm() must be awaited first!");
13838 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
13839 // debug statements here
13841 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13842 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
13843 if(!isWasmInitialized) {
13844 throw new Error("initializeWasm() must be awaited first!");
13846 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
13847 return nativeResponseValue;
13849 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
13850 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
13851 if(!isWasmInitialized) {
13852 throw new Error("initializeWasm() must be awaited first!");
13854 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
13855 // debug statements here
13857 // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13858 export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
13859 if(!isWasmInitialized) {
13860 throw new Error("initializeWasm() must be awaited first!");
13862 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
13863 return nativeResponseValue;
13865 // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
13866 export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
13867 if(!isWasmInitialized) {
13868 throw new Error("initializeWasm() must be awaited first!");
13870 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
13871 // debug statements here
13873 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
13874 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
13875 if(!isWasmInitialized) {
13876 throw new Error("initializeWasm() must be awaited first!");
13878 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
13879 return nativeResponseValue;
13881 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
13882 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
13883 if(!isWasmInitialized) {
13884 throw new Error("initializeWasm() must be awaited first!");
13886 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
13887 // debug statements here
13889 // 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);
13890 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 {
13891 if(!isWasmInitialized) {
13892 throw new Error("initializeWasm() must be awaited first!");
13894 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);
13895 return nativeResponseValue;
13897 // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
13898 export function ChannelInfo_clone(orig: number): number {
13899 if(!isWasmInitialized) {
13900 throw new Error("initializeWasm() must be awaited first!");
13902 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
13903 return nativeResponseValue;
13905 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
13906 export function ChannelInfo_write(obj: number): Uint8Array {
13907 if(!isWasmInitialized) {
13908 throw new Error("initializeWasm() must be awaited first!");
13910 const nativeResponseValue = wasm.ChannelInfo_write(obj);
13911 return decodeArray(nativeResponseValue);
13913 // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
13914 export function ChannelInfo_read(ser: Uint8Array): number {
13915 if(!isWasmInitialized) {
13916 throw new Error("initializeWasm() must be awaited first!");
13918 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
13919 return nativeResponseValue;
13921 // void RoutingFees_free(struct LDKRoutingFees this_obj);
13922 export function RoutingFees_free(this_obj: number): void {
13923 if(!isWasmInitialized) {
13924 throw new Error("initializeWasm() must be awaited first!");
13926 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
13927 // debug statements here
13929 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
13930 export function RoutingFees_get_base_msat(this_ptr: number): number {
13931 if(!isWasmInitialized) {
13932 throw new Error("initializeWasm() must be awaited first!");
13934 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
13935 return nativeResponseValue;
13937 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
13938 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
13939 if(!isWasmInitialized) {
13940 throw new Error("initializeWasm() must be awaited first!");
13942 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
13943 // debug statements here
13945 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
13946 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
13947 if(!isWasmInitialized) {
13948 throw new Error("initializeWasm() must be awaited first!");
13950 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
13951 return nativeResponseValue;
13953 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
13954 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
13955 if(!isWasmInitialized) {
13956 throw new Error("initializeWasm() must be awaited first!");
13958 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
13959 // debug statements here
13961 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
13962 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
13963 if(!isWasmInitialized) {
13964 throw new Error("initializeWasm() must be awaited first!");
13966 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
13967 return nativeResponseValue;
13969 // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
13970 export function RoutingFees_eq(a: number, b: number): boolean {
13971 if(!isWasmInitialized) {
13972 throw new Error("initializeWasm() must be awaited first!");
13974 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
13975 return nativeResponseValue;
13977 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
13978 export function RoutingFees_clone(orig: number): number {
13979 if(!isWasmInitialized) {
13980 throw new Error("initializeWasm() must be awaited first!");
13982 const nativeResponseValue = wasm.RoutingFees_clone(orig);
13983 return nativeResponseValue;
13985 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
13986 export function RoutingFees_write(obj: number): Uint8Array {
13987 if(!isWasmInitialized) {
13988 throw new Error("initializeWasm() must be awaited first!");
13990 const nativeResponseValue = wasm.RoutingFees_write(obj);
13991 return decodeArray(nativeResponseValue);
13993 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
13994 export function RoutingFees_read(ser: Uint8Array): number {
13995 if(!isWasmInitialized) {
13996 throw new Error("initializeWasm() must be awaited first!");
13998 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
13999 return nativeResponseValue;
14001 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
14002 export function NodeAnnouncementInfo_free(this_obj: number): void {
14003 if(!isWasmInitialized) {
14004 throw new Error("initializeWasm() must be awaited first!");
14006 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
14007 // debug statements here
14009 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
14010 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
14011 if(!isWasmInitialized) {
14012 throw new Error("initializeWasm() must be awaited first!");
14014 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
14015 return nativeResponseValue;
14017 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
14018 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
14019 if(!isWasmInitialized) {
14020 throw new Error("initializeWasm() must be awaited first!");
14022 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
14023 // debug statements here
14025 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
14026 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
14027 if(!isWasmInitialized) {
14028 throw new Error("initializeWasm() must be awaited first!");
14030 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
14031 return nativeResponseValue;
14033 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
14034 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
14035 if(!isWasmInitialized) {
14036 throw new Error("initializeWasm() must be awaited first!");
14038 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
14039 // debug statements here
14041 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
14042 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
14043 if(!isWasmInitialized) {
14044 throw new Error("initializeWasm() must be awaited first!");
14046 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
14047 return decodeArray(nativeResponseValue);
14049 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
14050 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
14051 if(!isWasmInitialized) {
14052 throw new Error("initializeWasm() must be awaited first!");
14054 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
14055 // debug statements here
14057 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
14058 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
14059 if(!isWasmInitialized) {
14060 throw new Error("initializeWasm() must be awaited first!");
14062 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
14063 return decodeArray(nativeResponseValue);
14065 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14066 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
14067 if(!isWasmInitialized) {
14068 throw new Error("initializeWasm() must be awaited first!");
14070 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
14071 // debug statements here
14073 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
14074 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
14075 if(!isWasmInitialized) {
14076 throw new Error("initializeWasm() must be awaited first!");
14078 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
14079 // debug statements here
14081 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
14082 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
14083 if(!isWasmInitialized) {
14084 throw new Error("initializeWasm() must be awaited first!");
14086 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
14087 return nativeResponseValue;
14089 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
14090 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
14091 if(!isWasmInitialized) {
14092 throw new Error("initializeWasm() must be awaited first!");
14094 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
14095 // debug statements here
14097 // 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);
14098 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 {
14099 if(!isWasmInitialized) {
14100 throw new Error("initializeWasm() must be awaited first!");
14102 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
14103 return nativeResponseValue;
14105 // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
14106 export function NodeAnnouncementInfo_clone(orig: number): number {
14107 if(!isWasmInitialized) {
14108 throw new Error("initializeWasm() must be awaited first!");
14110 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
14111 return nativeResponseValue;
14113 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
14114 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
14115 if(!isWasmInitialized) {
14116 throw new Error("initializeWasm() must be awaited first!");
14118 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
14119 return decodeArray(nativeResponseValue);
14121 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
14122 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
14123 if(!isWasmInitialized) {
14124 throw new Error("initializeWasm() must be awaited first!");
14126 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
14127 return nativeResponseValue;
14129 // void NodeInfo_free(struct LDKNodeInfo this_obj);
14130 export function NodeInfo_free(this_obj: number): void {
14131 if(!isWasmInitialized) {
14132 throw new Error("initializeWasm() must be awaited first!");
14134 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
14135 // debug statements here
14137 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
14138 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
14139 if(!isWasmInitialized) {
14140 throw new Error("initializeWasm() must be awaited first!");
14142 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
14143 // debug statements here
14145 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
14146 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
14147 if(!isWasmInitialized) {
14148 throw new Error("initializeWasm() must be awaited first!");
14150 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
14151 return nativeResponseValue;
14153 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
14154 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
14155 if(!isWasmInitialized) {
14156 throw new Error("initializeWasm() must be awaited first!");
14158 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
14159 // debug statements here
14161 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
14162 export function NodeInfo_get_announcement_info(this_ptr: number): number {
14163 if(!isWasmInitialized) {
14164 throw new Error("initializeWasm() must be awaited first!");
14166 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
14167 return nativeResponseValue;
14169 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
14170 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
14171 if(!isWasmInitialized) {
14172 throw new Error("initializeWasm() must be awaited first!");
14174 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
14175 // debug statements here
14177 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
14178 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
14179 if(!isWasmInitialized) {
14180 throw new Error("initializeWasm() must be awaited first!");
14182 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
14183 return nativeResponseValue;
14185 // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
14186 export function NodeInfo_clone(orig: number): number {
14187 if(!isWasmInitialized) {
14188 throw new Error("initializeWasm() must be awaited first!");
14190 const nativeResponseValue = wasm.NodeInfo_clone(orig);
14191 return nativeResponseValue;
14193 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
14194 export function NodeInfo_write(obj: number): Uint8Array {
14195 if(!isWasmInitialized) {
14196 throw new Error("initializeWasm() must be awaited first!");
14198 const nativeResponseValue = wasm.NodeInfo_write(obj);
14199 return decodeArray(nativeResponseValue);
14201 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
14202 export function NodeInfo_read(ser: Uint8Array): number {
14203 if(!isWasmInitialized) {
14204 throw new Error("initializeWasm() must be awaited first!");
14206 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
14207 return nativeResponseValue;
14209 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
14210 export function NetworkGraph_write(obj: number): Uint8Array {
14211 if(!isWasmInitialized) {
14212 throw new Error("initializeWasm() must be awaited first!");
14214 const nativeResponseValue = wasm.NetworkGraph_write(obj);
14215 return decodeArray(nativeResponseValue);
14217 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
14218 export function NetworkGraph_read(ser: Uint8Array): number {
14219 if(!isWasmInitialized) {
14220 throw new Error("initializeWasm() must be awaited first!");
14222 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
14223 return nativeResponseValue;
14225 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
14226 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
14227 if(!isWasmInitialized) {
14228 throw new Error("initializeWasm() must be awaited first!");
14230 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
14231 return nativeResponseValue;
14233 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
14234 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
14235 if(!isWasmInitialized) {
14236 throw new Error("initializeWasm() must be awaited first!");
14238 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
14239 return nativeResponseValue;
14241 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
14242 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
14243 if(!isWasmInitialized) {
14244 throw new Error("initializeWasm() must be awaited first!");
14246 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
14247 return nativeResponseValue;
14249 // 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);
14250 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
14251 if(!isWasmInitialized) {
14252 throw new Error("initializeWasm() must be awaited first!");
14254 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
14255 return nativeResponseValue;
14257 // 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);
14258 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
14259 if(!isWasmInitialized) {
14260 throw new Error("initializeWasm() must be awaited first!");
14262 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
14263 return nativeResponseValue;
14265 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
14266 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
14267 if(!isWasmInitialized) {
14268 throw new Error("initializeWasm() must be awaited first!");
14270 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
14271 // debug statements here
14273 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
14274 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
14275 if(!isWasmInitialized) {
14276 throw new Error("initializeWasm() must be awaited first!");
14278 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
14279 return nativeResponseValue;
14281 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
14282 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
14283 if(!isWasmInitialized) {
14284 throw new Error("initializeWasm() must be awaited first!");
14286 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
14287 return nativeResponseValue;
14289 // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
14290 export function FilesystemPersister_free(this_obj: number): void {
14291 if(!isWasmInitialized) {
14292 throw new Error("initializeWasm() must be awaited first!");
14294 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
14295 // debug statements here
14297 // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
14298 export function FilesystemPersister_new(path_to_channel_data: String): number {
14299 if(!isWasmInitialized) {
14300 throw new Error("initializeWasm() must be awaited first!");
14302 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
14303 return nativeResponseValue;
14305 // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14306 export function FilesystemPersister_get_data_dir(this_arg: number): String {
14307 if(!isWasmInitialized) {
14308 throw new Error("initializeWasm() must be awaited first!");
14310 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
14311 return nativeResponseValue;
14313 // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
14314 export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
14315 if(!isWasmInitialized) {
14316 throw new Error("initializeWasm() must be awaited first!");
14318 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
14319 return nativeResponseValue;
14321 // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
14322 export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
14323 if(!isWasmInitialized) {
14324 throw new Error("initializeWasm() must be awaited first!");
14326 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
14327 return nativeResponseValue;
14329 // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
14330 export function FilesystemPersister_as_Persist(this_arg: number): number {
14331 if(!isWasmInitialized) {
14332 throw new Error("initializeWasm() must be awaited first!");
14334 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
14335 return nativeResponseValue;
14337 // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
14338 export function BackgroundProcessor_free(this_obj: number): void {
14339 if(!isWasmInitialized) {
14340 throw new Error("initializeWasm() must be awaited first!");
14342 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
14343 // debug statements here
14345 // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
14346 export function ChannelManagerPersister_free(this_ptr: number): void {
14347 if(!isWasmInitialized) {
14348 throw new Error("initializeWasm() must be awaited first!");
14350 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
14351 // debug statements here
14353 // 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);
14354 export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, peer_manager: number, logger: number): number {
14355 if(!isWasmInitialized) {
14356 throw new Error("initializeWasm() must be awaited first!");
14358 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, peer_manager, logger);
14359 return nativeResponseValue;
14361 // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
14362 export function BackgroundProcessor_stop(this_arg: number): number {
14363 if(!isWasmInitialized) {
14364 throw new Error("initializeWasm() must be awaited first!");
14366 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
14367 return nativeResponseValue;
14369 // void check_platform(void);
14370 export function check_platform(): void {
14371 if(!isWasmInitialized) {
14372 throw new Error("initializeWasm() must be awaited first!");
14374 const nativeResponseValue = wasm.check_platform();
14375 // debug statements here
14377 // void Invoice_free(struct LDKInvoice this_obj);
14378 export function Invoice_free(this_obj: number): void {
14379 if(!isWasmInitialized) {
14380 throw new Error("initializeWasm() must be awaited first!");
14382 const nativeResponseValue = wasm.Invoice_free(this_obj);
14383 // debug statements here
14385 // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
14386 export function Invoice_eq(a: number, b: number): boolean {
14387 if(!isWasmInitialized) {
14388 throw new Error("initializeWasm() must be awaited first!");
14390 const nativeResponseValue = wasm.Invoice_eq(a, b);
14391 return nativeResponseValue;
14393 // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
14394 export function Invoice_clone(orig: number): number {
14395 if(!isWasmInitialized) {
14396 throw new Error("initializeWasm() must be awaited first!");
14398 const nativeResponseValue = wasm.Invoice_clone(orig);
14399 return nativeResponseValue;
14401 // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
14402 export function SignedRawInvoice_free(this_obj: number): void {
14403 if(!isWasmInitialized) {
14404 throw new Error("initializeWasm() must be awaited first!");
14406 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
14407 // debug statements here
14409 // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
14410 export function SignedRawInvoice_eq(a: number, b: number): boolean {
14411 if(!isWasmInitialized) {
14412 throw new Error("initializeWasm() must be awaited first!");
14414 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
14415 return nativeResponseValue;
14417 // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
14418 export function SignedRawInvoice_clone(orig: number): number {
14419 if(!isWasmInitialized) {
14420 throw new Error("initializeWasm() must be awaited first!");
14422 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
14423 return nativeResponseValue;
14425 // void RawInvoice_free(struct LDKRawInvoice this_obj);
14426 export function RawInvoice_free(this_obj: number): void {
14427 if(!isWasmInitialized) {
14428 throw new Error("initializeWasm() must be awaited first!");
14430 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
14431 // debug statements here
14433 // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
14434 export function RawInvoice_get_data(this_ptr: number): number {
14435 if(!isWasmInitialized) {
14436 throw new Error("initializeWasm() must be awaited first!");
14438 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
14439 return nativeResponseValue;
14441 // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
14442 export function RawInvoice_set_data(this_ptr: number, val: number): void {
14443 if(!isWasmInitialized) {
14444 throw new Error("initializeWasm() must be awaited first!");
14446 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
14447 // debug statements here
14449 // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
14450 export function RawInvoice_eq(a: number, b: number): boolean {
14451 if(!isWasmInitialized) {
14452 throw new Error("initializeWasm() must be awaited first!");
14454 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
14455 return nativeResponseValue;
14457 // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
14458 export function RawInvoice_clone(orig: number): number {
14459 if(!isWasmInitialized) {
14460 throw new Error("initializeWasm() must be awaited first!");
14462 const nativeResponseValue = wasm.RawInvoice_clone(orig);
14463 return nativeResponseValue;
14465 // void RawDataPart_free(struct LDKRawDataPart this_obj);
14466 export function RawDataPart_free(this_obj: number): void {
14467 if(!isWasmInitialized) {
14468 throw new Error("initializeWasm() must be awaited first!");
14470 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
14471 // debug statements here
14473 // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
14474 export function RawDataPart_get_timestamp(this_ptr: number): number {
14475 if(!isWasmInitialized) {
14476 throw new Error("initializeWasm() must be awaited first!");
14478 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
14479 return nativeResponseValue;
14481 // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
14482 export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
14483 if(!isWasmInitialized) {
14484 throw new Error("initializeWasm() must be awaited first!");
14486 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
14487 // debug statements here
14489 // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
14490 export function RawDataPart_eq(a: number, b: number): boolean {
14491 if(!isWasmInitialized) {
14492 throw new Error("initializeWasm() must be awaited first!");
14494 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
14495 return nativeResponseValue;
14497 // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
14498 export function RawDataPart_clone(orig: number): number {
14499 if(!isWasmInitialized) {
14500 throw new Error("initializeWasm() must be awaited first!");
14502 const nativeResponseValue = wasm.RawDataPart_clone(orig);
14503 return nativeResponseValue;
14505 // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
14506 export function PositiveTimestamp_free(this_obj: number): void {
14507 if(!isWasmInitialized) {
14508 throw new Error("initializeWasm() must be awaited first!");
14510 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
14511 // debug statements here
14513 // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
14514 export function PositiveTimestamp_eq(a: number, b: number): boolean {
14515 if(!isWasmInitialized) {
14516 throw new Error("initializeWasm() must be awaited first!");
14518 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
14519 return nativeResponseValue;
14521 // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
14522 export function PositiveTimestamp_clone(orig: number): number {
14523 if(!isWasmInitialized) {
14524 throw new Error("initializeWasm() must be awaited first!");
14526 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
14527 return nativeResponseValue;
14529 // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
14530 export function SiPrefix_clone(orig: number): SiPrefix {
14531 if(!isWasmInitialized) {
14532 throw new Error("initializeWasm() must be awaited first!");
14534 const nativeResponseValue = wasm.SiPrefix_clone(orig);
14535 return nativeResponseValue;
14537 // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
14538 export function SiPrefix_eq(a: number, b: number): boolean {
14539 if(!isWasmInitialized) {
14540 throw new Error("initializeWasm() must be awaited first!");
14542 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
14543 return nativeResponseValue;
14545 // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
14546 export function SiPrefix_multiplier(this_arg: number): number {
14547 if(!isWasmInitialized) {
14548 throw new Error("initializeWasm() must be awaited first!");
14550 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
14551 return nativeResponseValue;
14553 // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
14554 export function Currency_clone(orig: number): Currency {
14555 if(!isWasmInitialized) {
14556 throw new Error("initializeWasm() must be awaited first!");
14558 const nativeResponseValue = wasm.Currency_clone(orig);
14559 return nativeResponseValue;
14561 // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
14562 export function Currency_eq(a: number, b: number): boolean {
14563 if(!isWasmInitialized) {
14564 throw new Error("initializeWasm() must be awaited first!");
14566 const nativeResponseValue = wasm.Currency_eq(a, b);
14567 return nativeResponseValue;
14569 // void Sha256_free(struct LDKSha256 this_obj);
14570 export function Sha256_free(this_obj: number): void {
14571 if(!isWasmInitialized) {
14572 throw new Error("initializeWasm() must be awaited first!");
14574 const nativeResponseValue = wasm.Sha256_free(this_obj);
14575 // debug statements here
14577 // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
14578 export function Sha256_eq(a: number, b: number): boolean {
14579 if(!isWasmInitialized) {
14580 throw new Error("initializeWasm() must be awaited first!");
14582 const nativeResponseValue = wasm.Sha256_eq(a, b);
14583 return nativeResponseValue;
14585 // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
14586 export function Sha256_clone(orig: number): number {
14587 if(!isWasmInitialized) {
14588 throw new Error("initializeWasm() must be awaited first!");
14590 const nativeResponseValue = wasm.Sha256_clone(orig);
14591 return nativeResponseValue;
14593 // void Description_free(struct LDKDescription this_obj);
14594 export function Description_free(this_obj: number): void {
14595 if(!isWasmInitialized) {
14596 throw new Error("initializeWasm() must be awaited first!");
14598 const nativeResponseValue = wasm.Description_free(this_obj);
14599 // debug statements here
14601 // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
14602 export function Description_eq(a: number, b: number): boolean {
14603 if(!isWasmInitialized) {
14604 throw new Error("initializeWasm() must be awaited first!");
14606 const nativeResponseValue = wasm.Description_eq(a, b);
14607 return nativeResponseValue;
14609 // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
14610 export function Description_clone(orig: number): number {
14611 if(!isWasmInitialized) {
14612 throw new Error("initializeWasm() must be awaited first!");
14614 const nativeResponseValue = wasm.Description_clone(orig);
14615 return nativeResponseValue;
14617 // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
14618 export function PayeePubKey_free(this_obj: number): void {
14619 if(!isWasmInitialized) {
14620 throw new Error("initializeWasm() must be awaited first!");
14622 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
14623 // debug statements here
14625 // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
14626 export function PayeePubKey_eq(a: number, b: number): boolean {
14627 if(!isWasmInitialized) {
14628 throw new Error("initializeWasm() must be awaited first!");
14630 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
14631 return nativeResponseValue;
14633 // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
14634 export function PayeePubKey_clone(orig: number): number {
14635 if(!isWasmInitialized) {
14636 throw new Error("initializeWasm() must be awaited first!");
14638 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
14639 return nativeResponseValue;
14641 // void ExpiryTime_free(struct LDKExpiryTime this_obj);
14642 export function ExpiryTime_free(this_obj: number): void {
14643 if(!isWasmInitialized) {
14644 throw new Error("initializeWasm() must be awaited first!");
14646 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
14647 // debug statements here
14649 // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
14650 export function ExpiryTime_eq(a: number, b: number): boolean {
14651 if(!isWasmInitialized) {
14652 throw new Error("initializeWasm() must be awaited first!");
14654 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
14655 return nativeResponseValue;
14657 // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
14658 export function ExpiryTime_clone(orig: number): number {
14659 if(!isWasmInitialized) {
14660 throw new Error("initializeWasm() must be awaited first!");
14662 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
14663 return nativeResponseValue;
14665 // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
14666 export function MinFinalCltvExpiry_free(this_obj: number): void {
14667 if(!isWasmInitialized) {
14668 throw new Error("initializeWasm() must be awaited first!");
14670 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
14671 // debug statements here
14673 // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
14674 export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
14675 if(!isWasmInitialized) {
14676 throw new Error("initializeWasm() must be awaited first!");
14678 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
14679 return nativeResponseValue;
14681 // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
14682 export function MinFinalCltvExpiry_clone(orig: number): number {
14683 if(!isWasmInitialized) {
14684 throw new Error("initializeWasm() must be awaited first!");
14686 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
14687 return nativeResponseValue;
14689 // void Fallback_free(struct LDKFallback this_ptr);
14690 export function Fallback_free(this_ptr: number): void {
14691 if(!isWasmInitialized) {
14692 throw new Error("initializeWasm() must be awaited first!");
14694 const nativeResponseValue = wasm.Fallback_free(this_ptr);
14695 // debug statements here
14697 // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
14698 export function Fallback_clone(orig: number): number {
14699 if(!isWasmInitialized) {
14700 throw new Error("initializeWasm() must be awaited first!");
14702 const nativeResponseValue = wasm.Fallback_clone(orig);
14703 return nativeResponseValue;
14705 // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
14706 export function Fallback_eq(a: number, b: number): boolean {
14707 if(!isWasmInitialized) {
14708 throw new Error("initializeWasm() must be awaited first!");
14710 const nativeResponseValue = wasm.Fallback_eq(a, b);
14711 return nativeResponseValue;
14713 // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
14714 export function InvoiceSignature_free(this_obj: number): void {
14715 if(!isWasmInitialized) {
14716 throw new Error("initializeWasm() must be awaited first!");
14718 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
14719 // debug statements here
14721 // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
14722 export function InvoiceSignature_eq(a: number, b: number): boolean {
14723 if(!isWasmInitialized) {
14724 throw new Error("initializeWasm() must be awaited first!");
14726 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
14727 return nativeResponseValue;
14729 // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
14730 export function InvoiceSignature_clone(orig: number): number {
14731 if(!isWasmInitialized) {
14732 throw new Error("initializeWasm() must be awaited first!");
14734 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
14735 return nativeResponseValue;
14737 // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
14738 export function PrivateRoute_free(this_obj: number): void {
14739 if(!isWasmInitialized) {
14740 throw new Error("initializeWasm() must be awaited first!");
14742 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
14743 // debug statements here
14745 // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
14746 export function PrivateRoute_eq(a: number, b: number): boolean {
14747 if(!isWasmInitialized) {
14748 throw new Error("initializeWasm() must be awaited first!");
14750 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
14751 return nativeResponseValue;
14753 // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
14754 export function PrivateRoute_clone(orig: number): number {
14755 if(!isWasmInitialized) {
14756 throw new Error("initializeWasm() must be awaited first!");
14758 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
14759 return nativeResponseValue;
14761 // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
14762 export function SignedRawInvoice_into_parts(this_arg: number): number {
14763 if(!isWasmInitialized) {
14764 throw new Error("initializeWasm() must be awaited first!");
14766 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
14767 return nativeResponseValue;
14769 // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14770 export function SignedRawInvoice_raw_invoice(this_arg: number): number {
14771 if(!isWasmInitialized) {
14772 throw new Error("initializeWasm() must be awaited first!");
14774 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
14775 return nativeResponseValue;
14777 // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
14778 export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
14779 if(!isWasmInitialized) {
14780 throw new Error("initializeWasm() must be awaited first!");
14782 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
14783 return decodeArray(nativeResponseValue);
14785 // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14786 export function SignedRawInvoice_signature(this_arg: number): number {
14787 if(!isWasmInitialized) {
14788 throw new Error("initializeWasm() must be awaited first!");
14790 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
14791 return nativeResponseValue;
14793 // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14794 export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
14795 if(!isWasmInitialized) {
14796 throw new Error("initializeWasm() must be awaited first!");
14798 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
14799 return nativeResponseValue;
14801 // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
14802 export function SignedRawInvoice_check_signature(this_arg: number): boolean {
14803 if(!isWasmInitialized) {
14804 throw new Error("initializeWasm() must be awaited first!");
14806 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
14807 return nativeResponseValue;
14809 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14810 export function RawInvoice_hash(this_arg: number): Uint8Array {
14811 if(!isWasmInitialized) {
14812 throw new Error("initializeWasm() must be awaited first!");
14814 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
14815 return decodeArray(nativeResponseValue);
14817 // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14818 export function RawInvoice_payment_hash(this_arg: number): number {
14819 if(!isWasmInitialized) {
14820 throw new Error("initializeWasm() must be awaited first!");
14822 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
14823 return nativeResponseValue;
14825 // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14826 export function RawInvoice_description(this_arg: number): number {
14827 if(!isWasmInitialized) {
14828 throw new Error("initializeWasm() must be awaited first!");
14830 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
14831 return nativeResponseValue;
14833 // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14834 export function RawInvoice_payee_pub_key(this_arg: number): number {
14835 if(!isWasmInitialized) {
14836 throw new Error("initializeWasm() must be awaited first!");
14838 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
14839 return nativeResponseValue;
14841 // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14842 export function RawInvoice_description_hash(this_arg: number): number {
14843 if(!isWasmInitialized) {
14844 throw new Error("initializeWasm() must be awaited first!");
14846 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
14847 return nativeResponseValue;
14849 // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14850 export function RawInvoice_expiry_time(this_arg: number): number {
14851 if(!isWasmInitialized) {
14852 throw new Error("initializeWasm() must be awaited first!");
14854 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
14855 return nativeResponseValue;
14857 // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14858 export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
14859 if(!isWasmInitialized) {
14860 throw new Error("initializeWasm() must be awaited first!");
14862 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
14863 return nativeResponseValue;
14865 // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14866 export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
14867 if(!isWasmInitialized) {
14868 throw new Error("initializeWasm() must be awaited first!");
14870 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
14871 return decodeArray(nativeResponseValue);
14873 // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14874 export function RawInvoice_features(this_arg: number): number {
14875 if(!isWasmInitialized) {
14876 throw new Error("initializeWasm() must be awaited first!");
14878 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
14879 return nativeResponseValue;
14881 // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14882 export function RawInvoice_private_routes(this_arg: number): number[] {
14883 if(!isWasmInitialized) {
14884 throw new Error("initializeWasm() must be awaited first!");
14886 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
14887 return nativeResponseValue;
14889 // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14890 export function RawInvoice_amount_pico_btc(this_arg: number): number {
14891 if(!isWasmInitialized) {
14892 throw new Error("initializeWasm() must be awaited first!");
14894 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
14895 return nativeResponseValue;
14897 // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
14898 export function RawInvoice_currency(this_arg: number): Currency {
14899 if(!isWasmInitialized) {
14900 throw new Error("initializeWasm() must be awaited first!");
14902 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
14903 return nativeResponseValue;
14905 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
14906 export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
14907 if(!isWasmInitialized) {
14908 throw new Error("initializeWasm() must be awaited first!");
14910 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
14911 return nativeResponseValue;
14913 // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
14914 export function PositiveTimestamp_from_system_time(time: number): number {
14915 if(!isWasmInitialized) {
14916 throw new Error("initializeWasm() must be awaited first!");
14918 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
14919 return nativeResponseValue;
14921 // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
14922 export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
14923 if(!isWasmInitialized) {
14924 throw new Error("initializeWasm() must be awaited first!");
14926 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
14927 return nativeResponseValue;
14929 // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
14930 export function PositiveTimestamp_as_time(this_arg: number): number {
14931 if(!isWasmInitialized) {
14932 throw new Error("initializeWasm() must be awaited first!");
14934 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
14935 return nativeResponseValue;
14937 // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
14938 export function Invoice_into_signed_raw(this_arg: number): number {
14939 if(!isWasmInitialized) {
14940 throw new Error("initializeWasm() must be awaited first!");
14942 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
14943 return nativeResponseValue;
14945 // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
14946 export function Invoice_check_signature(this_arg: number): number {
14947 if(!isWasmInitialized) {
14948 throw new Error("initializeWasm() must be awaited first!");
14950 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
14951 return nativeResponseValue;
14953 // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
14954 export function Invoice_from_signed(signed_invoice: number): number {
14955 if(!isWasmInitialized) {
14956 throw new Error("initializeWasm() must be awaited first!");
14958 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
14959 return nativeResponseValue;
14961 // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
14962 export function Invoice_timestamp(this_arg: number): number {
14963 if(!isWasmInitialized) {
14964 throw new Error("initializeWasm() must be awaited first!");
14966 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
14967 return nativeResponseValue;
14969 // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
14970 export function Invoice_payment_hash(this_arg: number): Uint8Array {
14971 if(!isWasmInitialized) {
14972 throw new Error("initializeWasm() must be awaited first!");
14974 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
14975 return decodeArray(nativeResponseValue);
14977 // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
14978 export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
14979 if(!isWasmInitialized) {
14980 throw new Error("initializeWasm() must be awaited first!");
14982 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
14983 return decodeArray(nativeResponseValue);
14985 // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
14986 export function Invoice_payment_secret(this_arg: number): Uint8Array {
14987 if(!isWasmInitialized) {
14988 throw new Error("initializeWasm() must be awaited first!");
14990 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
14991 return decodeArray(nativeResponseValue);
14993 // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
14994 export function Invoice_features(this_arg: number): number {
14995 if(!isWasmInitialized) {
14996 throw new Error("initializeWasm() must be awaited first!");
14998 const nativeResponseValue = wasm.Invoice_features(this_arg);
14999 return nativeResponseValue;
15001 // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
15002 export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
15003 if(!isWasmInitialized) {
15004 throw new Error("initializeWasm() must be awaited first!");
15006 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
15007 return decodeArray(nativeResponseValue);
15009 // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
15010 export function Invoice_expiry_time(this_arg: number): number {
15011 if(!isWasmInitialized) {
15012 throw new Error("initializeWasm() must be awaited first!");
15014 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
15015 return nativeResponseValue;
15017 // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
15018 export function Invoice_min_final_cltv_expiry(this_arg: number): number {
15019 if(!isWasmInitialized) {
15020 throw new Error("initializeWasm() must be awaited first!");
15022 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
15023 return nativeResponseValue;
15025 // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
15026 export function Invoice_private_routes(this_arg: number): number[] {
15027 if(!isWasmInitialized) {
15028 throw new Error("initializeWasm() must be awaited first!");
15030 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
15031 return nativeResponseValue;
15033 // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
15034 export function Invoice_route_hints(this_arg: number): number[] {
15035 if(!isWasmInitialized) {
15036 throw new Error("initializeWasm() must be awaited first!");
15038 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
15039 return nativeResponseValue;
15041 // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
15042 export function Invoice_currency(this_arg: number): Currency {
15043 if(!isWasmInitialized) {
15044 throw new Error("initializeWasm() must be awaited first!");
15046 const nativeResponseValue = wasm.Invoice_currency(this_arg);
15047 return nativeResponseValue;
15049 // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
15050 export function Invoice_amount_pico_btc(this_arg: number): number {
15051 if(!isWasmInitialized) {
15052 throw new Error("initializeWasm() must be awaited first!");
15054 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
15055 return nativeResponseValue;
15057 // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
15058 export function Description_new(description: String): number {
15059 if(!isWasmInitialized) {
15060 throw new Error("initializeWasm() must be awaited first!");
15062 const nativeResponseValue = wasm.Description_new(description);
15063 return nativeResponseValue;
15065 // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
15066 export function Description_into_inner(this_arg: number): String {
15067 if(!isWasmInitialized) {
15068 throw new Error("initializeWasm() must be awaited first!");
15070 const nativeResponseValue = wasm.Description_into_inner(this_arg);
15071 return nativeResponseValue;
15073 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
15074 export function ExpiryTime_from_seconds(seconds: number): number {
15075 if(!isWasmInitialized) {
15076 throw new Error("initializeWasm() must be awaited first!");
15078 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
15079 return nativeResponseValue;
15081 // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
15082 export function ExpiryTime_from_duration(duration: number): number {
15083 if(!isWasmInitialized) {
15084 throw new Error("initializeWasm() must be awaited first!");
15086 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
15087 return nativeResponseValue;
15089 // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
15090 export function ExpiryTime_as_seconds(this_arg: number): number {
15091 if(!isWasmInitialized) {
15092 throw new Error("initializeWasm() must be awaited first!");
15094 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
15095 return nativeResponseValue;
15097 // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
15098 export function ExpiryTime_as_duration(this_arg: number): number {
15099 if(!isWasmInitialized) {
15100 throw new Error("initializeWasm() must be awaited first!");
15102 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
15103 return nativeResponseValue;
15105 // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
15106 export function PrivateRoute_new(hops: number): number {
15107 if(!isWasmInitialized) {
15108 throw new Error("initializeWasm() must be awaited first!");
15110 const nativeResponseValue = wasm.PrivateRoute_new(hops);
15111 return nativeResponseValue;
15113 // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
15114 export function PrivateRoute_into_inner(this_arg: number): number {
15115 if(!isWasmInitialized) {
15116 throw new Error("initializeWasm() must be awaited first!");
15118 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
15119 return nativeResponseValue;
15121 // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
15122 export function CreationError_clone(orig: number): CreationError {
15123 if(!isWasmInitialized) {
15124 throw new Error("initializeWasm() must be awaited first!");
15126 const nativeResponseValue = wasm.CreationError_clone(orig);
15127 return nativeResponseValue;
15129 // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
15130 export function CreationError_eq(a: number, b: number): boolean {
15131 if(!isWasmInitialized) {
15132 throw new Error("initializeWasm() must be awaited first!");
15134 const nativeResponseValue = wasm.CreationError_eq(a, b);
15135 return nativeResponseValue;
15137 // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
15138 export function CreationError_to_str(o: number): String {
15139 if(!isWasmInitialized) {
15140 throw new Error("initializeWasm() must be awaited first!");
15142 const nativeResponseValue = wasm.CreationError_to_str(o);
15143 return nativeResponseValue;
15145 // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
15146 export function SemanticError_clone(orig: number): SemanticError {
15147 if(!isWasmInitialized) {
15148 throw new Error("initializeWasm() must be awaited first!");
15150 const nativeResponseValue = wasm.SemanticError_clone(orig);
15151 return nativeResponseValue;
15153 // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
15154 export function SemanticError_eq(a: number, b: number): boolean {
15155 if(!isWasmInitialized) {
15156 throw new Error("initializeWasm() must be awaited first!");
15158 const nativeResponseValue = wasm.SemanticError_eq(a, b);
15159 return nativeResponseValue;
15161 // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
15162 export function SemanticError_to_str(o: number): String {
15163 if(!isWasmInitialized) {
15164 throw new Error("initializeWasm() must be awaited first!");
15166 const nativeResponseValue = wasm.SemanticError_to_str(o);
15167 return nativeResponseValue;
15169 // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
15170 export function SignOrCreationError_free(this_ptr: number): void {
15171 if(!isWasmInitialized) {
15172 throw new Error("initializeWasm() must be awaited first!");
15174 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
15175 // debug statements here
15177 // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
15178 export function SignOrCreationError_clone(orig: number): number {
15179 if(!isWasmInitialized) {
15180 throw new Error("initializeWasm() must be awaited first!");
15182 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
15183 return nativeResponseValue;
15185 // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
15186 export function SignOrCreationError_eq(a: number, b: number): boolean {
15187 if(!isWasmInitialized) {
15188 throw new Error("initializeWasm() must be awaited first!");
15190 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
15191 return nativeResponseValue;
15193 // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
15194 export function SignOrCreationError_to_str(o: number): String {
15195 if(!isWasmInitialized) {
15196 throw new Error("initializeWasm() must be awaited first!");
15198 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
15199 return nativeResponseValue;
15201 // 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);
15202 export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
15203 if(!isWasmInitialized) {
15204 throw new Error("initializeWasm() must be awaited first!");
15206 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
15207 return nativeResponseValue;
15209 // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
15210 export function SiPrefix_from_str(s: String): number {
15211 if(!isWasmInitialized) {
15212 throw new Error("initializeWasm() must be awaited first!");
15214 const nativeResponseValue = wasm.SiPrefix_from_str(s);
15215 return nativeResponseValue;
15217 // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
15218 export function Invoice_from_str(s: String): number {
15219 if(!isWasmInitialized) {
15220 throw new Error("initializeWasm() must be awaited first!");
15222 const nativeResponseValue = wasm.Invoice_from_str(s);
15223 return nativeResponseValue;
15225 // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
15226 export function SignedRawInvoice_from_str(s: String): number {
15227 if(!isWasmInitialized) {
15228 throw new Error("initializeWasm() must be awaited first!");
15230 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
15231 return nativeResponseValue;
15233 // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
15234 export function Invoice_to_str(o: number): String {
15235 if(!isWasmInitialized) {
15236 throw new Error("initializeWasm() must be awaited first!");
15238 const nativeResponseValue = wasm.Invoice_to_str(o);
15239 return nativeResponseValue;
15241 // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
15242 export function SignedRawInvoice_to_str(o: number): String {
15243 if(!isWasmInitialized) {
15244 throw new Error("initializeWasm() must be awaited first!");
15246 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
15247 return nativeResponseValue;
15249 // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
15250 export function Currency_to_str(o: number): String {
15251 if(!isWasmInitialized) {
15252 throw new Error("initializeWasm() must be awaited first!");
15254 const nativeResponseValue = wasm.Currency_to_str(o);
15255 return nativeResponseValue;
15257 // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
15258 export function SiPrefix_to_str(o: number): String {
15259 if(!isWasmInitialized) {
15260 throw new Error("initializeWasm() must be awaited first!");
15262 const nativeResponseValue = wasm.SiPrefix_to_str(o);
15263 return nativeResponseValue;
15266 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
15267 if(isWasmInitialized && !allowDoubleInitialization) {
15270 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
15271 wasm = wasmInstance.exports;
15272 isWasmInitialized = true;