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 long LDKC2Tuple_u64u64Z_new(number a, number b);
156 public static native number LDKC2Tuple_u64u64Z_get_a(long ptr);
157 public static native number LDKC2Tuple_u64u64Z_get_b(long ptr);
158 public static class LDKSpendableOutputDescriptor {
159 private LDKSpendableOutputDescriptor() {}
160 export class StaticOutput extends LDKSpendableOutputDescriptor {
161 public number outpoint;
162 public number output;
163 StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
165 export class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
166 public number outpoint;
167 public Uint8Array per_commitment_point;
168 public number to_self_delay;
169 public number output;
170 public number key_derivation_params;
171 public Uint8Array revocation_pubkey;
172 DynamicOutputP2WSH(number outpoint, Uint8Array per_commitment_point, number to_self_delay, number output, number key_derivation_params, Uint8Array revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
174 export class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
175 public number outpoint;
176 public number output;
177 public number key_derivation_params;
178 StaticOutputCounterpartyPayment(number outpoint, number output, number key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
180 static native void init();
182 static { LDKSpendableOutputDescriptor.init(); }
183 public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
184 public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
185 public static class LDKErrorAction {
186 private LDKErrorAction() {}
187 export class DisconnectPeer extends LDKErrorAction {
189 DisconnectPeer(number msg) { this.msg = msg; }
191 export class IgnoreError extends LDKErrorAction {
194 export class SendErrorMessage extends LDKErrorAction {
196 SendErrorMessage(number msg) { this.msg = msg; }
198 static native void init();
200 static { LDKErrorAction.init(); }
201 public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
202 public static class LDKHTLCFailChannelUpdate {
203 private LDKHTLCFailChannelUpdate() {}
204 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
206 ChannelUpdateMessage(number msg) { this.msg = msg; }
208 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
209 public number short_channel_id;
210 public boolean is_permanent;
211 ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
213 export class NodeFailure extends LDKHTLCFailChannelUpdate {
214 public Uint8Array node_id;
215 public boolean is_permanent;
216 NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
218 static native void init();
220 static { LDKHTLCFailChannelUpdate.init(); }
221 public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
222 public static class LDKMessageSendEvent {
223 private LDKMessageSendEvent() {}
224 export class SendAcceptChannel extends LDKMessageSendEvent {
225 public Uint8Array node_id;
227 SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
229 export class SendOpenChannel extends LDKMessageSendEvent {
230 public Uint8Array node_id;
232 SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
234 export class SendFundingCreated extends LDKMessageSendEvent {
235 public Uint8Array node_id;
237 SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
239 export class SendFundingSigned extends LDKMessageSendEvent {
240 public Uint8Array node_id;
242 SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
244 export class SendFundingLocked extends LDKMessageSendEvent {
245 public Uint8Array node_id;
247 SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
249 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
250 public Uint8Array node_id;
252 SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
254 export class UpdateHTLCs extends LDKMessageSendEvent {
255 public Uint8Array node_id;
256 public number updates;
257 UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
259 export class SendRevokeAndACK extends LDKMessageSendEvent {
260 public Uint8Array node_id;
262 SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
264 export class SendClosingSigned extends LDKMessageSendEvent {
265 public Uint8Array node_id;
267 SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
269 export class SendShutdown extends LDKMessageSendEvent {
270 public Uint8Array node_id;
272 SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
274 export class SendChannelReestablish extends LDKMessageSendEvent {
275 public Uint8Array node_id;
277 SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
279 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
281 public number update_msg;
282 BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
284 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
286 BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
288 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
290 BroadcastChannelUpdate(number msg) { this.msg = msg; }
292 export class HandleError extends LDKMessageSendEvent {
293 public Uint8Array node_id;
294 public number action;
295 HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
297 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
298 public number update;
299 PaymentFailureNetworkUpdate(number update) { this.update = update; }
301 export class SendChannelRangeQuery extends LDKMessageSendEvent {
302 public Uint8Array node_id;
304 SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
306 export class SendShortIdsQuery extends LDKMessageSendEvent {
307 public Uint8Array node_id;
309 SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
311 static native void init();
313 static { LDKMessageSendEvent.init(); }
314 public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
315 public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
316 public static class LDKEvent {
317 private LDKEvent() {}
318 export class FundingGenerationReady extends LDKEvent {
319 public Uint8Array temporary_channel_id;
320 public number channel_value_satoshis;
321 public Uint8Array output_script;
322 public number user_channel_id;
323 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; }
325 export class FundingBroadcastSafe extends LDKEvent {
326 public number funding_txo;
327 public number user_channel_id;
328 FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
330 export class PaymentReceived extends LDKEvent {
331 public Uint8Array payment_hash;
332 public Uint8Array payment_secret;
334 PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
336 export class PaymentSent extends LDKEvent {
337 public Uint8Array payment_preimage;
338 PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
340 export class PaymentFailed extends LDKEvent {
341 public Uint8Array payment_hash;
342 public boolean rejected_by_dest;
343 PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
345 export class PendingHTLCsForwardable extends LDKEvent {
346 public number time_forwardable;
347 PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
349 export class SpendableOutputs extends LDKEvent {
350 public number[] outputs;
351 SpendableOutputs(number[] outputs) { this.outputs = outputs; }
353 static native void init();
355 static { LDKEvent.init(); }
356 public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
357 public static native long LDKCVec_EventZ_new(number[] elems);
358 public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
359 public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
360 public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
361 public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
362 public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
363 public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
364 public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
365 public static native long LDKCVec_MonitorEventZ_new(number[] elems);
366 public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
367 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
368 public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
369 public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
370 public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
371 public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
372 public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
373 public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
374 public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
375 public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
376 public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
377 public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
378 public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
379 public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
380 public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
381 public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
382 public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
383 public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
384 public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
385 public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
386 public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
387 public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
388 public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
389 public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
390 public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
391 public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
392 public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
393 public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
394 public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
398 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
400 export interface LDKChannelKeys {
401 get_per_commitment_point (idx: number): Uint8Array;
402 release_commitment_secret (idx: number): Uint8Array;
403 key_derivation_params (): number;
404 sign_counterparty_commitment (commitment_tx: number): number;
405 sign_holder_commitment (commitment_tx: number): number;
406 sign_holder_commitment_htlc_transactions (commitment_tx: number): number;
407 sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
408 sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
409 sign_closing_transaction (closing_tx: Uint8Array): number;
410 sign_channel_announcement (msg: number): number;
411 ready_channel (channel_parameters: number): void;
412 write (): Uint8Array;
415 export function LDKChannelKeys_new(impl: LDKChannelKeys, pubkeys: number): number {
416 throw new Error('unimplemented'); // TODO: bind to WASM
419 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
422 // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
423 export function ChannelKeys_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
424 if(!isWasmInitialized) {
425 throw new Error("initializeWasm() must be awaited first!");
427 const nativeResponseValue = wasm.ChannelKeys_get_per_commitment_point(this_arg, idx);
428 return decodeArray(nativeResponseValue);
430 // LDKThirtyTwoBytes ChannelKeys_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx
431 export function ChannelKeys_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
432 if(!isWasmInitialized) {
433 throw new Error("initializeWasm() must be awaited first!");
435 const nativeResponseValue = wasm.ChannelKeys_release_commitment_secret(this_arg, idx);
436 return decodeArray(nativeResponseValue);
438 // LDKC2Tuple_u64u64Z ChannelKeys_key_derivation_params LDKChannelKeys* this_arg
439 export function ChannelKeys_key_derivation_params(this_arg: number): number {
440 if(!isWasmInitialized) {
441 throw new Error("initializeWasm() must be awaited first!");
443 const nativeResponseValue = wasm.ChannelKeys_key_derivation_params(this_arg);
444 return nativeResponseValue;
446 // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_counterparty_commitment LDKChannelKeys* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
447 export function ChannelKeys_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
448 if(!isWasmInitialized) {
449 throw new Error("initializeWasm() must be awaited first!");
451 const nativeResponseValue = wasm.ChannelKeys_sign_counterparty_commitment(this_arg, commitment_tx);
452 return nativeResponseValue;
454 // LDKCResult_SignatureNoneZ ChannelKeys_sign_holder_commitment LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
455 export function ChannelKeys_sign_holder_commitment(this_arg: number, commitment_tx: number): number {
456 if(!isWasmInitialized) {
457 throw new Error("initializeWasm() must be awaited first!");
459 const nativeResponseValue = wasm.ChannelKeys_sign_holder_commitment(this_arg, commitment_tx);
460 return nativeResponseValue;
462 // LDKCResult_CVec_SignatureZNoneZ ChannelKeys_sign_holder_commitment_htlc_transactions LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
463 export function ChannelKeys_sign_holder_commitment_htlc_transactions(this_arg: number, commitment_tx: number): number {
464 if(!isWasmInitialized) {
465 throw new Error("initializeWasm() must be awaited first!");
467 const nativeResponseValue = wasm.ChannelKeys_sign_holder_commitment_htlc_transactions(this_arg, commitment_tx);
468 return nativeResponseValue;
470 // LDKCResult_SignatureNoneZ ChannelKeys_sign_justice_transaction LDKChannelKeys* 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
471 export function ChannelKeys_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
472 if(!isWasmInitialized) {
473 throw new Error("initializeWasm() must be awaited first!");
475 const nativeResponseValue = wasm.ChannelKeys_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
476 return nativeResponseValue;
478 // LDKCResult_SignatureNoneZ ChannelKeys_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
479 export function ChannelKeys_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
480 if(!isWasmInitialized) {
481 throw new Error("initializeWasm() must be awaited first!");
483 const nativeResponseValue = wasm.ChannelKeys_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
484 return nativeResponseValue;
486 // LDKCResult_SignatureNoneZ ChannelKeys_sign_closing_transaction LDKChannelKeys* this_arg, struct LDKTransaction closing_tx
487 export function ChannelKeys_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
488 if(!isWasmInitialized) {
489 throw new Error("initializeWasm() must be awaited first!");
491 const nativeResponseValue = wasm.ChannelKeys_sign_closing_transaction(this_arg, encodeArray(closing_tx));
492 return nativeResponseValue;
494 // LDKCResult_SignatureNoneZ ChannelKeys_sign_channel_announcement LDKChannelKeys* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
495 export function ChannelKeys_sign_channel_announcement(this_arg: number, msg: number): number {
496 if(!isWasmInitialized) {
497 throw new Error("initializeWasm() must be awaited first!");
499 const nativeResponseValue = wasm.ChannelKeys_sign_channel_announcement(this_arg, msg);
500 return nativeResponseValue;
502 // void ChannelKeys_ready_channel LDKChannelKeys* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
503 export function ChannelKeys_ready_channel(this_arg: number, channel_parameters: number): void {
504 if(!isWasmInitialized) {
505 throw new Error("initializeWasm() must be awaited first!");
507 const nativeResponseValue = wasm.ChannelKeys_ready_channel(this_arg, channel_parameters);
508 // debug statements here
510 // LDKCVec_u8Z ChannelKeys_write LDKChannelKeys* this_arg
511 export function ChannelKeys_write(this_arg: number): Uint8Array {
512 if(!isWasmInitialized) {
513 throw new Error("initializeWasm() must be awaited first!");
515 const nativeResponseValue = wasm.ChannelKeys_write(this_arg);
516 return decodeArray(nativeResponseValue);
518 // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
519 export function ChannelKeys_get_pubkeys(this_arg: number): number {
520 if(!isWasmInitialized) {
521 throw new Error("initializeWasm() must be awaited first!");
523 const nativeResponseValue = wasm.ChannelKeys_get_pubkeys(this_arg);
524 return nativeResponseValue;
526 public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
527 public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
528 public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
529 public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
530 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
531 public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
532 public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
533 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
534 public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
535 public static native boolean LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(long arg);
536 public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(long arg);
537 public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_err(long arg);
538 public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
539 public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
540 public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
541 public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
542 public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
543 public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
544 public static class LDKAPIError {
545 private LDKAPIError() {}
546 export class APIMisuseError extends LDKAPIError {
547 public Uint8Array err;
548 APIMisuseError(Uint8Array err) { this.err = err; }
550 export class FeeRateTooHigh extends LDKAPIError {
551 public Uint8Array err;
552 public number feerate;
553 FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
555 export class RouteError extends LDKAPIError {
557 RouteError(String err) { this.err = err; }
559 export class ChannelUnavailable extends LDKAPIError {
560 public Uint8Array err;
561 ChannelUnavailable(Uint8Array err) { this.err = err; }
563 export class MonitorUpdateFailed extends LDKAPIError {
564 MonitorUpdateFailed() { }
566 static native void init();
568 static { LDKAPIError.init(); }
569 public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
570 public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
571 public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
572 public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
573 public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
574 public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
575 public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
576 public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
577 public static class LDKNetAddress {
578 private LDKNetAddress() {}
579 export class IPv4 extends LDKNetAddress {
580 public Uint8Array addr;
582 IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
584 export class IPv6 extends LDKNetAddress {
585 public Uint8Array addr;
587 IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
589 export class OnionV2 extends LDKNetAddress {
590 public Uint8Array addr;
592 OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
594 export class OnionV3 extends LDKNetAddress {
595 public Uint8Array ed25519_pubkey;
596 public number checksum;
597 public number version;
599 OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
601 static native void init();
603 static { LDKNetAddress.init(); }
604 public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
605 public static native long LDKCVec_NetAddressZ_new(number[] elems);
606 public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
610 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
612 export interface LDKWatch {
613 watch_channel (funding_txo: number, monitor: number): number;
614 update_channel (funding_txo: number, update: number): number;
615 release_pending_monitor_events (): number[];
618 export function LDKWatch_new(impl: LDKWatch): number {
619 throw new Error('unimplemented'); // TODO: bind to WASM
622 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
625 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
626 export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
627 if(!isWasmInitialized) {
628 throw new Error("initializeWasm() must be awaited first!");
630 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
631 return nativeResponseValue;
633 // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch* this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
634 export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
635 if(!isWasmInitialized) {
636 throw new Error("initializeWasm() must be awaited first!");
638 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
639 return nativeResponseValue;
641 // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch* this_arg
642 export function Watch_release_pending_monitor_events(this_arg: number): number[] {
643 if(!isWasmInitialized) {
644 throw new Error("initializeWasm() must be awaited first!");
646 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
647 return nativeResponseValue;
652 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
654 export interface LDKBroadcasterInterface {
655 broadcast_transaction (tx: Uint8Array): void;
658 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
659 throw new Error('unimplemented'); // TODO: bind to WASM
662 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
665 // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
666 export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
667 if(!isWasmInitialized) {
668 throw new Error("initializeWasm() must be awaited first!");
670 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
671 // debug statements here
676 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
678 export interface LDKKeysInterface {
679 get_node_secret (): Uint8Array;
680 get_destination_script (): Uint8Array;
681 get_shutdown_pubkey (): Uint8Array;
682 get_channel_keys (inbound: boolean, channel_value_satoshis: number): number;
683 get_secure_random_bytes (): Uint8Array;
684 read_chan_signer (reader: Uint8Array): number;
687 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
688 throw new Error('unimplemented'); // TODO: bind to WASM
691 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
694 // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface* this_arg
695 export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
696 if(!isWasmInitialized) {
697 throw new Error("initializeWasm() must be awaited first!");
699 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
700 return decodeArray(nativeResponseValue);
702 // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface* this_arg
703 export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
704 if(!isWasmInitialized) {
705 throw new Error("initializeWasm() must be awaited first!");
707 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
708 return decodeArray(nativeResponseValue);
710 // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface* this_arg
711 export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
712 if(!isWasmInitialized) {
713 throw new Error("initializeWasm() must be awaited first!");
715 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
716 return decodeArray(nativeResponseValue);
718 // LDKChannelKeys KeysInterface_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
719 export function KeysInterface_get_channel_keys(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
720 if(!isWasmInitialized) {
721 throw new Error("initializeWasm() must be awaited first!");
723 const nativeResponseValue = wasm.KeysInterface_get_channel_keys(this_arg, inbound, channel_value_satoshis);
724 return nativeResponseValue;
726 // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
727 export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
728 if(!isWasmInitialized) {
729 throw new Error("initializeWasm() must be awaited first!");
731 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
732 return decodeArray(nativeResponseValue);
734 // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
735 export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
736 if(!isWasmInitialized) {
737 throw new Error("initializeWasm() must be awaited first!");
739 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
740 return nativeResponseValue;
745 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
747 export interface LDKFeeEstimator {
748 get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
751 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
752 throw new Error('unimplemented'); // TODO: bind to WASM
755 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
758 // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator* this_arg, enum LDKConfirmationTarget confirmation_target
759 export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
760 if(!isWasmInitialized) {
761 throw new Error("initializeWasm() must be awaited first!");
763 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
764 return nativeResponseValue;
769 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
771 export interface LDKLogger {
772 log (record: String): void;
775 export function LDKLogger_new(impl: LDKLogger): number {
776 throw new Error('unimplemented'); // TODO: bind to WASM
779 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
782 public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
783 public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
784 public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
785 public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
786 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
787 public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
788 public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
789 public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
790 public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
791 public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
792 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
793 public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
794 public static native long LDKCVec_u64Z_new(number[] elems);
795 public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
796 public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
797 public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
798 public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
799 public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
800 public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
801 public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
802 public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
803 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
804 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
805 public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
806 public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
807 public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
808 public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
809 public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
810 public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
811 public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
812 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
813 public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
814 public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
815 public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
816 public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
817 public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
818 public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
819 public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
820 public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
821 public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
822 public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
823 public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
824 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
825 public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
826 public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
827 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
828 public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
829 public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
830 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
831 public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
832 public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
833 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
834 public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
835 public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
836 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
837 public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
838 public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
839 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
840 public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
841 public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
842 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
843 public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
844 public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
845 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
846 public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
847 public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
848 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
849 public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
850 public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
851 public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
852 public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
853 public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
854 public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
855 public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
856 public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
857 public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
858 public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
859 public static native boolean LDKCResult_SecretKeySecpErrorZ_result_ok(long arg);
860 public static native Uint8Array LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
861 public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
862 public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
863 public static native Uint8Array LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
864 public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
865 public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
866 public static native number LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
867 public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
868 public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
869 public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
870 public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
871 public static native long LDKCVec_RouteHopZ_new(number[] elems);
872 public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
873 public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
874 public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
875 public static native long LDKCVec_RouteHintZ_new(number[] elems);
876 public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
877 public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
878 public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
879 public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
880 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
881 public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
882 public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
883 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
884 public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
885 public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
886 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
887 public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
888 public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
889 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
890 public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
894 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
896 export interface LDKMessageSendEventsProvider {
897 get_and_clear_pending_msg_events (): number[];
900 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
901 throw new Error('unimplemented'); // TODO: bind to WASM
904 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
907 // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider* this_arg
908 export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
909 if(!isWasmInitialized) {
910 throw new Error("initializeWasm() must be awaited first!");
912 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
913 return nativeResponseValue;
918 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
920 export interface LDKEventsProvider {
921 get_and_clear_pending_events (): number[];
924 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
925 throw new Error('unimplemented'); // TODO: bind to WASM
928 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
931 // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider* this_arg
932 export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
933 if(!isWasmInitialized) {
934 throw new Error("initializeWasm() must be awaited first!");
936 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
937 return nativeResponseValue;
942 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
944 export interface LDKAccess {
945 get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
948 export function LDKAccess_new(impl: LDKAccess): number {
949 throw new Error('unimplemented'); // TODO: bind to WASM
952 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
955 // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
956 export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
957 if(!isWasmInitialized) {
958 throw new Error("initializeWasm() must be awaited first!");
960 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
961 return nativeResponseValue;
966 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
968 export interface LDKFilter {
969 register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
970 register_output (outpoint: number, script_pubkey: Uint8Array): void;
973 export function LDKFilter_new(impl: LDKFilter): number {
974 throw new Error('unimplemented'); // TODO: bind to WASM
977 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
980 // void Filter_register_tx LDKFilter* this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
981 export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
982 if(!isWasmInitialized) {
983 throw new Error("initializeWasm() must be awaited first!");
985 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
986 // debug statements here
988 // void Filter_register_output LDKFilter* this_arg, const struct LDKOutPoint *NONNULL_PTR outpoint, struct LDKu8slice script_pubkey
989 export function Filter_register_output(this_arg: number, outpoint: number, script_pubkey: Uint8Array): void {
990 if(!isWasmInitialized) {
991 throw new Error("initializeWasm() must be awaited first!");
993 const nativeResponseValue = wasm.Filter_register_output(this_arg, outpoint, encodeArray(script_pubkey));
994 // debug statements here
999 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1001 export interface LDKPersist {
1002 persist_new_channel (id: number, data: number): number;
1003 update_persisted_channel (id: number, update: number, data: number): number;
1006 export function LDKPersist_new(impl: LDKPersist): number {
1007 throw new Error('unimplemented'); // TODO: bind to WASM
1010 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1013 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1014 export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1015 if(!isWasmInitialized) {
1016 throw new Error("initializeWasm() must be awaited first!");
1018 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1019 return nativeResponseValue;
1021 // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist* this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1022 export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1023 if(!isWasmInitialized) {
1024 throw new Error("initializeWasm() must be awaited first!");
1026 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1027 return nativeResponseValue;
1032 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1034 export interface LDKChannelMessageHandler {
1035 handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1036 handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1037 handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1038 handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1039 handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1040 handle_shutdown (their_node_id: Uint8Array, msg: number): void;
1041 handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1042 handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1043 handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1044 handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1045 handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1046 handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1047 handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1048 handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1049 handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1050 peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1051 peer_connected (their_node_id: Uint8Array, msg: number): void;
1052 handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1053 handle_error (their_node_id: Uint8Array, msg: number): void;
1056 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1057 throw new Error('unimplemented'); // TODO: bind to WASM
1060 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1063 // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1064 export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1065 if(!isWasmInitialized) {
1066 throw new Error("initializeWasm() must be awaited first!");
1068 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1069 // debug statements here
1071 // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1072 export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1073 if(!isWasmInitialized) {
1074 throw new Error("initializeWasm() must be awaited first!");
1076 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1077 // debug statements here
1079 // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1080 export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1081 if(!isWasmInitialized) {
1082 throw new Error("initializeWasm() must be awaited first!");
1084 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1085 // debug statements here
1087 // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1088 export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1089 if(!isWasmInitialized) {
1090 throw new Error("initializeWasm() must be awaited first!");
1092 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1093 // debug statements here
1095 // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1096 export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1097 if(!isWasmInitialized) {
1098 throw new Error("initializeWasm() must be awaited first!");
1100 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1101 // debug statements here
1103 // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
1104 export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1105 if(!isWasmInitialized) {
1106 throw new Error("initializeWasm() must be awaited first!");
1108 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), msg);
1109 // debug statements here
1111 // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1112 export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1113 if(!isWasmInitialized) {
1114 throw new Error("initializeWasm() must be awaited first!");
1116 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1117 // debug statements here
1119 // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1120 export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1121 if(!isWasmInitialized) {
1122 throw new Error("initializeWasm() must be awaited first!");
1124 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1125 // debug statements here
1127 // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1128 export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1129 if(!isWasmInitialized) {
1130 throw new Error("initializeWasm() must be awaited first!");
1132 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1133 // debug statements here
1135 // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1136 export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1137 if(!isWasmInitialized) {
1138 throw new Error("initializeWasm() must be awaited first!");
1140 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1141 // debug statements here
1143 // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1144 export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1145 if(!isWasmInitialized) {
1146 throw new Error("initializeWasm() must be awaited first!");
1148 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1149 // debug statements here
1151 // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1152 export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1153 if(!isWasmInitialized) {
1154 throw new Error("initializeWasm() must be awaited first!");
1156 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1157 // debug statements here
1159 // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1160 export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1161 if(!isWasmInitialized) {
1162 throw new Error("initializeWasm() must be awaited first!");
1164 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1165 // debug statements here
1167 // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1168 export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1169 if(!isWasmInitialized) {
1170 throw new Error("initializeWasm() must be awaited first!");
1172 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1173 // debug statements here
1175 // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1176 export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1177 if(!isWasmInitialized) {
1178 throw new Error("initializeWasm() must be awaited first!");
1180 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1181 // debug statements here
1183 // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1184 export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1185 if(!isWasmInitialized) {
1186 throw new Error("initializeWasm() must be awaited first!");
1188 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1189 // debug statements here
1191 // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1192 export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1193 if(!isWasmInitialized) {
1194 throw new Error("initializeWasm() must be awaited first!");
1196 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1197 // debug statements here
1199 // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1200 export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1201 if(!isWasmInitialized) {
1202 throw new Error("initializeWasm() must be awaited first!");
1204 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1205 // debug statements here
1207 // void ChannelMessageHandler_handle_error LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1208 export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1209 if(!isWasmInitialized) {
1210 throw new Error("initializeWasm() must be awaited first!");
1212 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1213 // debug statements here
1218 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1220 export interface LDKRoutingMessageHandler {
1221 handle_node_announcement (msg: number): number;
1222 handle_channel_announcement (msg: number): number;
1223 handle_channel_update (msg: number): number;
1224 handle_htlc_fail_channel_update (update: number): void;
1225 get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1226 get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1227 sync_routing_table (their_node_id: Uint8Array, init: number): void;
1228 handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1229 handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1230 handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1231 handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1234 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1235 throw new Error('unimplemented'); // TODO: bind to WASM
1238 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1241 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler* this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1242 export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1243 if(!isWasmInitialized) {
1244 throw new Error("initializeWasm() must be awaited first!");
1246 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1247 return nativeResponseValue;
1249 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler* this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1250 export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1251 if(!isWasmInitialized) {
1252 throw new Error("initializeWasm() must be awaited first!");
1254 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1255 return nativeResponseValue;
1257 // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1258 export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1259 if(!isWasmInitialized) {
1260 throw new Error("initializeWasm() must be awaited first!");
1262 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1263 return nativeResponseValue;
1265 // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler* this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1266 export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1267 if(!isWasmInitialized) {
1268 throw new Error("initializeWasm() must be awaited first!");
1270 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1271 // debug statements here
1273 // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler* this_arg, uint64_t starting_point, uint8_t batch_amount
1274 export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1275 if(!isWasmInitialized) {
1276 throw new Error("initializeWasm() must be awaited first!");
1278 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1279 return nativeResponseValue;
1281 // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler* this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1282 export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1283 if(!isWasmInitialized) {
1284 throw new Error("initializeWasm() must be awaited first!");
1286 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1287 return nativeResponseValue;
1289 // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1290 export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1291 if(!isWasmInitialized) {
1292 throw new Error("initializeWasm() must be awaited first!");
1294 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1295 // debug statements here
1297 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1298 export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1299 if(!isWasmInitialized) {
1300 throw new Error("initializeWasm() must be awaited first!");
1302 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1303 return nativeResponseValue;
1305 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1306 export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1307 if(!isWasmInitialized) {
1308 throw new Error("initializeWasm() must be awaited first!");
1310 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1311 return nativeResponseValue;
1313 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1314 export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1315 if(!isWasmInitialized) {
1316 throw new Error("initializeWasm() must be awaited first!");
1318 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1319 return nativeResponseValue;
1321 // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler* this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1322 export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1323 if(!isWasmInitialized) {
1324 throw new Error("initializeWasm() must be awaited first!");
1326 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1327 return nativeResponseValue;
1332 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1334 export interface LDKSocketDescriptor {
1335 send_data (data: Uint8Array, resume_read: boolean): number;
1336 disconnect_socket (): void;
1337 eq (other_arg: number): boolean;
1341 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1342 throw new Error('unimplemented'); // TODO: bind to WASM
1345 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1348 // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor* this_arg, struct LDKu8slice data, bool resume_read
1349 export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1350 if(!isWasmInitialized) {
1351 throw new Error("initializeWasm() must be awaited first!");
1353 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1354 return nativeResponseValue;
1356 // void SocketDescriptor_disconnect_socket LDKSocketDescriptor* this_arg
1357 export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1358 if(!isWasmInitialized) {
1359 throw new Error("initializeWasm() must be awaited first!");
1361 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1362 // debug statements here
1364 // uint64_t SocketDescriptor_hash LDKSocketDescriptor* this_arg
1365 export function SocketDescriptor_hash(this_arg: number): number {
1366 if(!isWasmInitialized) {
1367 throw new Error("initializeWasm() must be awaited first!");
1369 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1370 return nativeResponseValue;
1372 // void Transaction_free(struct LDKTransaction _res);
1373 export function Transaction_free(_res: Uint8Array): void {
1374 if(!isWasmInitialized) {
1375 throw new Error("initializeWasm() must be awaited first!");
1377 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1378 // debug statements here
1380 // void TxOut_free(struct LDKTxOut _res);
1381 export function TxOut_free(_res: number): void {
1382 if(!isWasmInitialized) {
1383 throw new Error("initializeWasm() must be awaited first!");
1385 const nativeResponseValue = wasm.TxOut_free(_res);
1386 // debug statements here
1388 // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1389 export function TxOut_clone(orig: number): number {
1390 if(!isWasmInitialized) {
1391 throw new Error("initializeWasm() must be awaited first!");
1393 const nativeResponseValue = wasm.TxOut_clone(orig);
1394 return nativeResponseValue;
1396 // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
1397 export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
1398 if(!isWasmInitialized) {
1399 throw new Error("initializeWasm() must be awaited first!");
1401 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
1402 // debug statements here
1404 // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1405 export function CVec_MessageSendEventZ_free(_res: number[]): void {
1406 if(!isWasmInitialized) {
1407 throw new Error("initializeWasm() must be awaited first!");
1409 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
1410 // debug statements here
1412 // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
1413 export function CVec_EventZ_free(_res: number[]): void {
1414 if(!isWasmInitialized) {
1415 throw new Error("initializeWasm() must be awaited first!");
1417 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
1418 // debug statements here
1420 // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
1421 export function C2Tuple_usizeTransactionZ_free(_res: number): void {
1422 if(!isWasmInitialized) {
1423 throw new Error("initializeWasm() must be awaited first!");
1425 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
1426 // debug statements here
1428 // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
1429 export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
1430 if(!isWasmInitialized) {
1431 throw new Error("initializeWasm() must be awaited first!");
1433 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
1434 return nativeResponseValue;
1436 // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
1437 export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
1438 if(!isWasmInitialized) {
1439 throw new Error("initializeWasm() must be awaited first!");
1441 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
1442 // debug statements here
1444 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
1445 export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
1446 if(!isWasmInitialized) {
1447 throw new Error("initializeWasm() must be awaited first!");
1449 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
1450 return nativeResponseValue;
1452 // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
1453 export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
1454 if(!isWasmInitialized) {
1455 throw new Error("initializeWasm() must be awaited first!");
1457 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
1458 return nativeResponseValue;
1460 // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
1461 export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
1462 if(!isWasmInitialized) {
1463 throw new Error("initializeWasm() must be awaited first!");
1465 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
1466 // debug statements here
1468 // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
1469 export function CVec_MonitorEventZ_free(_res: number[]): void {
1470 if(!isWasmInitialized) {
1471 throw new Error("initializeWasm() must be awaited first!");
1473 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
1474 // debug statements here
1476 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
1477 export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
1478 if(!isWasmInitialized) {
1479 throw new Error("initializeWasm() must be awaited first!");
1481 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
1482 return nativeResponseValue;
1484 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
1485 export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
1486 if(!isWasmInitialized) {
1487 throw new Error("initializeWasm() must be awaited first!");
1489 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
1490 return nativeResponseValue;
1492 // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
1493 export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
1494 if(!isWasmInitialized) {
1495 throw new Error("initializeWasm() must be awaited first!");
1497 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
1498 // debug statements here
1500 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
1501 export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
1502 if(!isWasmInitialized) {
1503 throw new Error("initializeWasm() must be awaited first!");
1505 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
1506 return nativeResponseValue;
1508 // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
1509 export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
1510 if(!isWasmInitialized) {
1511 throw new Error("initializeWasm() must be awaited first!");
1513 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
1514 return nativeResponseValue;
1516 // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
1517 export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
1518 if(!isWasmInitialized) {
1519 throw new Error("initializeWasm() must be awaited first!");
1521 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
1522 // debug statements here
1524 // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
1525 export function C2Tuple_OutPointScriptZ_free(_res: number): void {
1526 if(!isWasmInitialized) {
1527 throw new Error("initializeWasm() must be awaited first!");
1529 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
1530 // debug statements here
1532 // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
1533 export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
1534 if(!isWasmInitialized) {
1535 throw new Error("initializeWasm() must be awaited first!");
1537 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
1538 return nativeResponseValue;
1540 // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
1541 export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
1542 if(!isWasmInitialized) {
1543 throw new Error("initializeWasm() must be awaited first!");
1545 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
1546 // debug statements here
1548 // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
1549 export function C2Tuple_u32TxOutZ_free(_res: number): void {
1550 if(!isWasmInitialized) {
1551 throw new Error("initializeWasm() must be awaited first!");
1553 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
1554 // debug statements here
1556 // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
1557 export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
1558 if(!isWasmInitialized) {
1559 throw new Error("initializeWasm() must be awaited first!");
1561 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
1562 return nativeResponseValue;
1564 // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
1565 export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
1566 if(!isWasmInitialized) {
1567 throw new Error("initializeWasm() must be awaited first!");
1569 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
1570 // debug statements here
1572 // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
1573 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
1574 if(!isWasmInitialized) {
1575 throw new Error("initializeWasm() must be awaited first!");
1577 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
1578 // debug statements here
1580 // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
1581 export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
1582 if(!isWasmInitialized) {
1583 throw new Error("initializeWasm() must be awaited first!");
1585 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
1586 return nativeResponseValue;
1588 // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
1589 export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
1590 if(!isWasmInitialized) {
1591 throw new Error("initializeWasm() must be awaited first!");
1593 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
1594 // debug statements here
1596 // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
1597 export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
1598 if(!isWasmInitialized) {
1599 throw new Error("initializeWasm() must be awaited first!");
1601 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
1602 // debug statements here
1604 // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
1605 export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
1606 if(!isWasmInitialized) {
1607 throw new Error("initializeWasm() must be awaited first!");
1609 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
1610 return nativeResponseValue;
1612 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
1613 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
1614 if(!isWasmInitialized) {
1615 throw new Error("initializeWasm() must be awaited first!");
1617 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
1618 return nativeResponseValue;
1620 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
1621 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
1622 if(!isWasmInitialized) {
1623 throw new Error("initializeWasm() must be awaited first!");
1625 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
1626 return nativeResponseValue;
1628 // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
1629 export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
1630 if(!isWasmInitialized) {
1631 throw new Error("initializeWasm() must be awaited first!");
1633 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
1634 // debug statements here
1636 // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
1637 export function C2Tuple_u64u64Z_free(_res: number): void {
1638 if(!isWasmInitialized) {
1639 throw new Error("initializeWasm() must be awaited first!");
1641 const nativeResponseValue = wasm.C2Tuple_u64u64Z_free(_res);
1642 // debug statements here
1644 // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
1645 export function C2Tuple_u64u64Z_new(a: number, b: number): number {
1646 if(!isWasmInitialized) {
1647 throw new Error("initializeWasm() must be awaited first!");
1649 const nativeResponseValue = wasm.C2Tuple_u64u64Z_new(a, b);
1650 return nativeResponseValue;
1652 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
1653 export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
1654 if(!isWasmInitialized) {
1655 throw new Error("initializeWasm() must be awaited first!");
1657 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
1658 return nativeResponseValue;
1660 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
1661 export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
1662 if(!isWasmInitialized) {
1663 throw new Error("initializeWasm() must be awaited first!");
1665 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
1666 return nativeResponseValue;
1668 // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
1669 export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
1670 if(!isWasmInitialized) {
1671 throw new Error("initializeWasm() must be awaited first!");
1673 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
1674 // debug statements here
1676 // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1677 export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1678 if(!isWasmInitialized) {
1679 throw new Error("initializeWasm() must be awaited first!");
1681 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1682 // debug statements here
1684 // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
1685 export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
1686 if(!isWasmInitialized) {
1687 throw new Error("initializeWasm() must be awaited first!");
1689 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
1690 // debug statements here
1692 // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
1693 export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
1694 if(!isWasmInitialized) {
1695 throw new Error("initializeWasm() must be awaited first!");
1697 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
1698 return nativeResponseValue;
1700 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
1701 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
1702 if(!isWasmInitialized) {
1703 throw new Error("initializeWasm() must be awaited first!");
1705 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
1706 return nativeResponseValue;
1708 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
1709 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
1710 if(!isWasmInitialized) {
1711 throw new Error("initializeWasm() must be awaited first!");
1713 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1714 return nativeResponseValue;
1716 // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
1717 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
1718 if(!isWasmInitialized) {
1719 throw new Error("initializeWasm() must be awaited first!");
1721 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
1722 // debug statements here
1724 // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
1725 export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
1726 if(!isWasmInitialized) {
1727 throw new Error("initializeWasm() must be awaited first!");
1729 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
1730 return nativeResponseValue;
1732 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
1733 export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
1734 if(!isWasmInitialized) {
1735 throw new Error("initializeWasm() must be awaited first!");
1737 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
1738 return nativeResponseValue;
1740 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
1741 export function CResult_SignatureNoneZ_err(): number {
1742 if(!isWasmInitialized) {
1743 throw new Error("initializeWasm() must be awaited first!");
1745 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
1746 return nativeResponseValue;
1748 // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
1749 export function CResult_SignatureNoneZ_free(_res: number): void {
1750 if(!isWasmInitialized) {
1751 throw new Error("initializeWasm() must be awaited first!");
1753 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
1754 // debug statements here
1756 // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
1757 export function CResult_SignatureNoneZ_clone(orig: number): number {
1758 if(!isWasmInitialized) {
1759 throw new Error("initializeWasm() must be awaited first!");
1761 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
1762 return nativeResponseValue;
1764 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1765 export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
1766 if(!isWasmInitialized) {
1767 throw new Error("initializeWasm() must be awaited first!");
1769 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
1770 return nativeResponseValue;
1772 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1773 export function CResult_CVec_SignatureZNoneZ_err(): number {
1774 if(!isWasmInitialized) {
1775 throw new Error("initializeWasm() must be awaited first!");
1777 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
1778 return nativeResponseValue;
1780 // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1781 export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
1782 if(!isWasmInitialized) {
1783 throw new Error("initializeWasm() must be awaited first!");
1785 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
1786 // debug statements here
1788 // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1789 export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
1790 if(!isWasmInitialized) {
1791 throw new Error("initializeWasm() must be awaited first!");
1793 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
1794 return nativeResponseValue;
1796 // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
1797 export function CResult_ChanKeySignerDecodeErrorZ_ok(o: number): number {
1798 if(!isWasmInitialized) {
1799 throw new Error("initializeWasm() must be awaited first!");
1801 const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_ok(o);
1802 return nativeResponseValue;
1804 // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
1805 export function CResult_ChanKeySignerDecodeErrorZ_err(e: number): number {
1806 if(!isWasmInitialized) {
1807 throw new Error("initializeWasm() must be awaited first!");
1809 const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_err(e);
1810 return nativeResponseValue;
1812 // void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
1813 export function CResult_ChanKeySignerDecodeErrorZ_free(_res: number): void {
1814 if(!isWasmInitialized) {
1815 throw new Error("initializeWasm() must be awaited first!");
1817 const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_free(_res);
1818 // debug statements here
1820 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
1821 export function CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: number): number {
1822 if(!isWasmInitialized) {
1823 throw new Error("initializeWasm() must be awaited first!");
1825 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_ok(o);
1826 return nativeResponseValue;
1828 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
1829 export function CResult_InMemoryChannelKeysDecodeErrorZ_err(e: number): number {
1830 if(!isWasmInitialized) {
1831 throw new Error("initializeWasm() must be awaited first!");
1833 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_err(e);
1834 return nativeResponseValue;
1836 // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
1837 export function CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: number): void {
1838 if(!isWasmInitialized) {
1839 throw new Error("initializeWasm() must be awaited first!");
1841 const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_free(_res);
1842 // debug statements here
1844 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
1845 export function CResult_TxOutAccessErrorZ_ok(o: number): number {
1846 if(!isWasmInitialized) {
1847 throw new Error("initializeWasm() must be awaited first!");
1849 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
1850 return nativeResponseValue;
1852 // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
1853 export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
1854 if(!isWasmInitialized) {
1855 throw new Error("initializeWasm() must be awaited first!");
1857 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
1858 return nativeResponseValue;
1860 // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
1861 export function CResult_TxOutAccessErrorZ_free(_res: number): void {
1862 if(!isWasmInitialized) {
1863 throw new Error("initializeWasm() must be awaited first!");
1865 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
1866 // debug statements here
1868 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
1869 export function CResult_NoneAPIErrorZ_ok(): number {
1870 if(!isWasmInitialized) {
1871 throw new Error("initializeWasm() must be awaited first!");
1873 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
1874 return nativeResponseValue;
1876 // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
1877 export function CResult_NoneAPIErrorZ_err(e: number): number {
1878 if(!isWasmInitialized) {
1879 throw new Error("initializeWasm() must be awaited first!");
1881 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
1882 return nativeResponseValue;
1884 // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
1885 export function CResult_NoneAPIErrorZ_free(_res: number): void {
1886 if(!isWasmInitialized) {
1887 throw new Error("initializeWasm() must be awaited first!");
1889 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
1890 // debug statements here
1892 // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
1893 export function CVec_ChannelDetailsZ_free(_res: number[]): void {
1894 if(!isWasmInitialized) {
1895 throw new Error("initializeWasm() must be awaited first!");
1897 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
1898 // debug statements here
1900 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
1901 export function CResult_NonePaymentSendFailureZ_ok(): number {
1902 if(!isWasmInitialized) {
1903 throw new Error("initializeWasm() must be awaited first!");
1905 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
1906 return nativeResponseValue;
1908 // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
1909 export function CResult_NonePaymentSendFailureZ_err(e: number): number {
1910 if(!isWasmInitialized) {
1911 throw new Error("initializeWasm() must be awaited first!");
1913 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
1914 return nativeResponseValue;
1916 // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
1917 export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
1918 if(!isWasmInitialized) {
1919 throw new Error("initializeWasm() must be awaited first!");
1921 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
1922 // debug statements here
1924 // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
1925 export function CVec_NetAddressZ_free(_res: number[]): void {
1926 if(!isWasmInitialized) {
1927 throw new Error("initializeWasm() must be awaited first!");
1929 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
1930 // debug statements here
1932 // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
1933 export function CVec_ChannelMonitorZ_free(_res: number[]): void {
1934 if(!isWasmInitialized) {
1935 throw new Error("initializeWasm() must be awaited first!");
1937 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
1938 // debug statements here
1940 // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
1941 export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
1942 if(!isWasmInitialized) {
1943 throw new Error("initializeWasm() must be awaited first!");
1945 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
1946 // debug statements here
1948 // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
1949 export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
1950 if(!isWasmInitialized) {
1951 throw new Error("initializeWasm() must be awaited first!");
1953 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
1954 return nativeResponseValue;
1956 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
1957 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
1958 if(!isWasmInitialized) {
1959 throw new Error("initializeWasm() must be awaited first!");
1961 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
1962 return nativeResponseValue;
1964 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
1965 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
1966 if(!isWasmInitialized) {
1967 throw new Error("initializeWasm() must be awaited first!");
1969 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
1970 return nativeResponseValue;
1972 // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
1973 export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
1974 if(!isWasmInitialized) {
1975 throw new Error("initializeWasm() must be awaited first!");
1977 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
1978 // debug statements here
1980 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
1981 export function CResult_NetAddressu8Z_ok(o: number): number {
1982 if(!isWasmInitialized) {
1983 throw new Error("initializeWasm() must be awaited first!");
1985 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
1986 return nativeResponseValue;
1988 // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
1989 export function CResult_NetAddressu8Z_err(e: number): number {
1990 if(!isWasmInitialized) {
1991 throw new Error("initializeWasm() must be awaited first!");
1993 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
1994 return nativeResponseValue;
1996 // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
1997 export function CResult_NetAddressu8Z_free(_res: number): void {
1998 if(!isWasmInitialized) {
1999 throw new Error("initializeWasm() must be awaited first!");
2001 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
2002 // debug statements here
2004 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
2005 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
2006 if(!isWasmInitialized) {
2007 throw new Error("initializeWasm() must be awaited first!");
2009 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
2010 return nativeResponseValue;
2012 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
2013 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
2014 if(!isWasmInitialized) {
2015 throw new Error("initializeWasm() must be awaited first!");
2017 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
2018 return nativeResponseValue;
2020 // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
2021 export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
2022 if(!isWasmInitialized) {
2023 throw new Error("initializeWasm() must be awaited first!");
2025 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
2026 // debug statements here
2028 // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2029 export function CVec_u64Z_free(_res: number[]): void {
2030 if(!isWasmInitialized) {
2031 throw new Error("initializeWasm() must be awaited first!");
2033 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2034 // debug statements here
2036 // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
2037 export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
2038 if(!isWasmInitialized) {
2039 throw new Error("initializeWasm() must be awaited first!");
2041 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
2042 // debug statements here
2044 // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
2045 export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
2046 if(!isWasmInitialized) {
2047 throw new Error("initializeWasm() must be awaited first!");
2049 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
2050 // debug statements here
2052 // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
2053 export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
2054 if(!isWasmInitialized) {
2055 throw new Error("initializeWasm() must be awaited first!");
2057 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
2058 // debug statements here
2060 // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
2061 export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
2062 if(!isWasmInitialized) {
2063 throw new Error("initializeWasm() must be awaited first!");
2065 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
2066 // debug statements here
2068 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2069 export function CResult_boolLightningErrorZ_ok(o: boolean): number {
2070 if(!isWasmInitialized) {
2071 throw new Error("initializeWasm() must be awaited first!");
2073 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
2074 return nativeResponseValue;
2076 // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2077 export function CResult_boolLightningErrorZ_err(e: number): number {
2078 if(!isWasmInitialized) {
2079 throw new Error("initializeWasm() must be awaited first!");
2081 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
2082 return nativeResponseValue;
2084 // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2085 export function CResult_boolLightningErrorZ_free(_res: number): void {
2086 if(!isWasmInitialized) {
2087 throw new Error("initializeWasm() must be awaited first!");
2089 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
2090 // debug statements here
2092 // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2093 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2094 if(!isWasmInitialized) {
2095 throw new Error("initializeWasm() must be awaited first!");
2097 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2098 // debug statements here
2100 // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2101 export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2102 if(!isWasmInitialized) {
2103 throw new Error("initializeWasm() must be awaited first!");
2105 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2106 return nativeResponseValue;
2108 // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2109 export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2110 if(!isWasmInitialized) {
2111 throw new Error("initializeWasm() must be awaited first!");
2113 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2114 // debug statements here
2116 // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2117 export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2118 if(!isWasmInitialized) {
2119 throw new Error("initializeWasm() must be awaited first!");
2121 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2122 // debug statements here
2124 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2125 export function CResult_NoneLightningErrorZ_ok(): number {
2126 if(!isWasmInitialized) {
2127 throw new Error("initializeWasm() must be awaited first!");
2129 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2130 return nativeResponseValue;
2132 // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2133 export function CResult_NoneLightningErrorZ_err(e: number): number {
2134 if(!isWasmInitialized) {
2135 throw new Error("initializeWasm() must be awaited first!");
2137 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2138 return nativeResponseValue;
2140 // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2141 export function CResult_NoneLightningErrorZ_free(_res: number): void {
2142 if(!isWasmInitialized) {
2143 throw new Error("initializeWasm() must be awaited first!");
2145 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2146 // debug statements here
2148 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
2149 export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
2150 if(!isWasmInitialized) {
2151 throw new Error("initializeWasm() must be awaited first!");
2153 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
2154 return nativeResponseValue;
2156 // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
2157 export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
2158 if(!isWasmInitialized) {
2159 throw new Error("initializeWasm() must be awaited first!");
2161 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
2162 return nativeResponseValue;
2164 // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
2165 export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
2166 if(!isWasmInitialized) {
2167 throw new Error("initializeWasm() must be awaited first!");
2169 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
2170 // debug statements here
2172 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
2173 export function CResult_InitDecodeErrorZ_ok(o: number): number {
2174 if(!isWasmInitialized) {
2175 throw new Error("initializeWasm() must be awaited first!");
2177 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
2178 return nativeResponseValue;
2180 // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
2181 export function CResult_InitDecodeErrorZ_err(e: number): number {
2182 if(!isWasmInitialized) {
2183 throw new Error("initializeWasm() must be awaited first!");
2185 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
2186 return nativeResponseValue;
2188 // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
2189 export function CResult_InitDecodeErrorZ_free(_res: number): void {
2190 if(!isWasmInitialized) {
2191 throw new Error("initializeWasm() must be awaited first!");
2193 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
2194 // debug statements here
2196 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
2197 export function CResult_PingDecodeErrorZ_ok(o: number): number {
2198 if(!isWasmInitialized) {
2199 throw new Error("initializeWasm() must be awaited first!");
2201 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
2202 return nativeResponseValue;
2204 // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
2205 export function CResult_PingDecodeErrorZ_err(e: number): number {
2206 if(!isWasmInitialized) {
2207 throw new Error("initializeWasm() must be awaited first!");
2209 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
2210 return nativeResponseValue;
2212 // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
2213 export function CResult_PingDecodeErrorZ_free(_res: number): void {
2214 if(!isWasmInitialized) {
2215 throw new Error("initializeWasm() must be awaited first!");
2217 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
2218 // debug statements here
2220 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
2221 export function CResult_PongDecodeErrorZ_ok(o: number): number {
2222 if(!isWasmInitialized) {
2223 throw new Error("initializeWasm() must be awaited first!");
2225 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
2226 return nativeResponseValue;
2228 // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
2229 export function CResult_PongDecodeErrorZ_err(e: number): number {
2230 if(!isWasmInitialized) {
2231 throw new Error("initializeWasm() must be awaited first!");
2233 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
2234 return nativeResponseValue;
2236 // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
2237 export function CResult_PongDecodeErrorZ_free(_res: number): void {
2238 if(!isWasmInitialized) {
2239 throw new Error("initializeWasm() must be awaited first!");
2241 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
2242 // debug statements here
2244 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
2245 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
2246 if(!isWasmInitialized) {
2247 throw new Error("initializeWasm() must be awaited first!");
2249 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
2250 return nativeResponseValue;
2252 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2253 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
2254 if(!isWasmInitialized) {
2255 throw new Error("initializeWasm() must be awaited first!");
2257 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
2258 return nativeResponseValue;
2260 // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
2261 export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
2262 if(!isWasmInitialized) {
2263 throw new Error("initializeWasm() must be awaited first!");
2265 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
2266 // debug statements here
2268 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
2269 export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
2270 if(!isWasmInitialized) {
2271 throw new Error("initializeWasm() must be awaited first!");
2273 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
2274 return nativeResponseValue;
2276 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2277 export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
2278 if(!isWasmInitialized) {
2279 throw new Error("initializeWasm() must be awaited first!");
2281 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
2282 return nativeResponseValue;
2284 // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
2285 export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
2286 if(!isWasmInitialized) {
2287 throw new Error("initializeWasm() must be awaited first!");
2289 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
2290 // debug statements here
2292 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
2293 export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
2294 if(!isWasmInitialized) {
2295 throw new Error("initializeWasm() must be awaited first!");
2297 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
2298 return nativeResponseValue;
2300 // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
2301 export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
2302 if(!isWasmInitialized) {
2303 throw new Error("initializeWasm() must be awaited first!");
2305 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
2306 return nativeResponseValue;
2308 // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
2309 export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
2310 if(!isWasmInitialized) {
2311 throw new Error("initializeWasm() must be awaited first!");
2313 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
2314 // debug statements here
2316 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
2317 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
2318 if(!isWasmInitialized) {
2319 throw new Error("initializeWasm() must be awaited first!");
2321 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
2322 return nativeResponseValue;
2324 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2325 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
2326 if(!isWasmInitialized) {
2327 throw new Error("initializeWasm() must be awaited first!");
2329 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
2330 return nativeResponseValue;
2332 // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
2333 export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
2334 if(!isWasmInitialized) {
2335 throw new Error("initializeWasm() must be awaited first!");
2337 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
2338 // debug statements here
2340 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
2341 export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
2342 if(!isWasmInitialized) {
2343 throw new Error("initializeWasm() must be awaited first!");
2345 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
2346 return nativeResponseValue;
2348 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
2349 export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
2350 if(!isWasmInitialized) {
2351 throw new Error("initializeWasm() must be awaited first!");
2353 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
2354 return nativeResponseValue;
2356 // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
2357 export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
2358 if(!isWasmInitialized) {
2359 throw new Error("initializeWasm() must be awaited first!");
2361 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
2362 // debug statements here
2364 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
2365 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
2366 if(!isWasmInitialized) {
2367 throw new Error("initializeWasm() must be awaited first!");
2369 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
2370 return nativeResponseValue;
2372 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
2373 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
2374 if(!isWasmInitialized) {
2375 throw new Error("initializeWasm() must be awaited first!");
2377 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
2378 return nativeResponseValue;
2380 // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
2381 export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
2382 if(!isWasmInitialized) {
2383 throw new Error("initializeWasm() must be awaited first!");
2385 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
2386 // debug statements here
2388 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
2389 export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
2390 if(!isWasmInitialized) {
2391 throw new Error("initializeWasm() must be awaited first!");
2393 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
2394 return nativeResponseValue;
2396 // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
2397 export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
2398 if(!isWasmInitialized) {
2399 throw new Error("initializeWasm() must be awaited first!");
2401 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
2402 return nativeResponseValue;
2404 // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
2405 export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
2406 if(!isWasmInitialized) {
2407 throw new Error("initializeWasm() must be awaited first!");
2409 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
2410 // debug statements here
2412 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
2413 export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
2414 if(!isWasmInitialized) {
2415 throw new Error("initializeWasm() must be awaited first!");
2417 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
2418 return nativeResponseValue;
2420 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
2421 export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
2422 if(!isWasmInitialized) {
2423 throw new Error("initializeWasm() must be awaited first!");
2425 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
2426 return nativeResponseValue;
2428 // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
2429 export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
2430 if(!isWasmInitialized) {
2431 throw new Error("initializeWasm() must be awaited first!");
2433 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
2434 // debug statements here
2436 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
2437 export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
2438 if(!isWasmInitialized) {
2439 throw new Error("initializeWasm() must be awaited first!");
2441 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
2442 return nativeResponseValue;
2444 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
2445 export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
2446 if(!isWasmInitialized) {
2447 throw new Error("initializeWasm() must be awaited first!");
2449 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
2450 return nativeResponseValue;
2452 // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
2453 export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
2454 if(!isWasmInitialized) {
2455 throw new Error("initializeWasm() must be awaited first!");
2457 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
2458 // debug statements here
2460 // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2461 export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2462 if(!isWasmInitialized) {
2463 throw new Error("initializeWasm() must be awaited first!");
2465 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2466 // debug statements here
2468 // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2469 export function CVec_u8Z_free(_res: Uint8Array): void {
2470 if(!isWasmInitialized) {
2471 throw new Error("initializeWasm() must be awaited first!");
2473 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2474 // debug statements here
2476 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2477 export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2478 if(!isWasmInitialized) {
2479 throw new Error("initializeWasm() must be awaited first!");
2481 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2482 return nativeResponseValue;
2484 // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2485 export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2486 if(!isWasmInitialized) {
2487 throw new Error("initializeWasm() must be awaited first!");
2489 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2490 return nativeResponseValue;
2492 // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2493 export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2494 if(!isWasmInitialized) {
2495 throw new Error("initializeWasm() must be awaited first!");
2497 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2498 // debug statements here
2500 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2501 export function CResult_NonePeerHandleErrorZ_ok(): number {
2502 if(!isWasmInitialized) {
2503 throw new Error("initializeWasm() must be awaited first!");
2505 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2506 return nativeResponseValue;
2508 // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2509 export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2510 if(!isWasmInitialized) {
2511 throw new Error("initializeWasm() must be awaited first!");
2513 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2514 return nativeResponseValue;
2516 // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2517 export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2518 if(!isWasmInitialized) {
2519 throw new Error("initializeWasm() must be awaited first!");
2521 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2522 // debug statements here
2524 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2525 export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2526 if(!isWasmInitialized) {
2527 throw new Error("initializeWasm() must be awaited first!");
2529 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2530 return nativeResponseValue;
2532 // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2533 export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2534 if(!isWasmInitialized) {
2535 throw new Error("initializeWasm() must be awaited first!");
2537 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2538 return nativeResponseValue;
2540 // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2541 export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2542 if(!isWasmInitialized) {
2543 throw new Error("initializeWasm() must be awaited first!");
2545 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2546 // debug statements here
2548 // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
2549 export function CResult_SecretKeySecpErrorZ_ok(o: Uint8Array): number {
2550 if(!isWasmInitialized) {
2551 throw new Error("initializeWasm() must be awaited first!");
2553 const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_ok(encodeArray(o));
2554 return nativeResponseValue;
2556 // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
2557 export function CResult_SecretKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
2558 if(!isWasmInitialized) {
2559 throw new Error("initializeWasm() must be awaited first!");
2561 const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_err(e);
2562 return nativeResponseValue;
2564 // void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
2565 export function CResult_SecretKeySecpErrorZ_free(_res: number): void {
2566 if(!isWasmInitialized) {
2567 throw new Error("initializeWasm() must be awaited first!");
2569 const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_free(_res);
2570 // debug statements here
2572 // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
2573 export function CResult_PublicKeySecpErrorZ_ok(o: Uint8Array): number {
2574 if(!isWasmInitialized) {
2575 throw new Error("initializeWasm() must be awaited first!");
2577 const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_ok(encodeArray(o));
2578 return nativeResponseValue;
2580 // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
2581 export function CResult_PublicKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
2582 if(!isWasmInitialized) {
2583 throw new Error("initializeWasm() must be awaited first!");
2585 const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_err(e);
2586 return nativeResponseValue;
2588 // void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
2589 export function CResult_PublicKeySecpErrorZ_free(_res: number): void {
2590 if(!isWasmInitialized) {
2591 throw new Error("initializeWasm() must be awaited first!");
2593 const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_free(_res);
2594 // debug statements here
2596 // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
2597 export function CResult_TxCreationKeysSecpErrorZ_ok(o: number): number {
2598 if(!isWasmInitialized) {
2599 throw new Error("initializeWasm() must be awaited first!");
2601 const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_ok(o);
2602 return nativeResponseValue;
2604 // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
2605 export function CResult_TxCreationKeysSecpErrorZ_err(e: LDKSecp256k1Error): number {
2606 if(!isWasmInitialized) {
2607 throw new Error("initializeWasm() must be awaited first!");
2609 const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_err(e);
2610 return nativeResponseValue;
2612 // void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
2613 export function CResult_TxCreationKeysSecpErrorZ_free(_res: number): void {
2614 if(!isWasmInitialized) {
2615 throw new Error("initializeWasm() must be awaited first!");
2617 const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_free(_res);
2618 // debug statements here
2620 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2621 export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2622 if(!isWasmInitialized) {
2623 throw new Error("initializeWasm() must be awaited first!");
2625 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2626 return nativeResponseValue;
2628 // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2629 export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2630 if(!isWasmInitialized) {
2631 throw new Error("initializeWasm() must be awaited first!");
2633 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2634 return nativeResponseValue;
2636 // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2637 export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2638 if(!isWasmInitialized) {
2639 throw new Error("initializeWasm() must be awaited first!");
2641 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2642 // debug statements here
2644 // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2645 export function CVec_RouteHopZ_free(_res: number[]): void {
2646 if(!isWasmInitialized) {
2647 throw new Error("initializeWasm() must be awaited first!");
2649 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2650 // debug statements here
2652 // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2653 export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2654 if(!isWasmInitialized) {
2655 throw new Error("initializeWasm() must be awaited first!");
2657 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2658 // debug statements here
2660 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2661 export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2662 if(!isWasmInitialized) {
2663 throw new Error("initializeWasm() must be awaited first!");
2665 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2666 return nativeResponseValue;
2668 // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2669 export function CResult_RouteDecodeErrorZ_err(e: number): number {
2670 if(!isWasmInitialized) {
2671 throw new Error("initializeWasm() must be awaited first!");
2673 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2674 return nativeResponseValue;
2676 // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
2677 export function CResult_RouteDecodeErrorZ_free(_res: number): void {
2678 if(!isWasmInitialized) {
2679 throw new Error("initializeWasm() must be awaited first!");
2681 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
2682 // debug statements here
2684 // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
2685 export function CVec_RouteHintZ_free(_res: number[]): void {
2686 if(!isWasmInitialized) {
2687 throw new Error("initializeWasm() must be awaited first!");
2689 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
2690 // debug statements here
2692 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
2693 export function CResult_RouteLightningErrorZ_ok(o: number): number {
2694 if(!isWasmInitialized) {
2695 throw new Error("initializeWasm() must be awaited first!");
2697 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
2698 return nativeResponseValue;
2700 // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
2701 export function CResult_RouteLightningErrorZ_err(e: number): number {
2702 if(!isWasmInitialized) {
2703 throw new Error("initializeWasm() must be awaited first!");
2705 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
2706 return nativeResponseValue;
2708 // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
2709 export function CResult_RouteLightningErrorZ_free(_res: number): void {
2710 if(!isWasmInitialized) {
2711 throw new Error("initializeWasm() must be awaited first!");
2713 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
2714 // debug statements here
2716 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2717 export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2718 if(!isWasmInitialized) {
2719 throw new Error("initializeWasm() must be awaited first!");
2721 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2722 return nativeResponseValue;
2724 // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2725 export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2726 if(!isWasmInitialized) {
2727 throw new Error("initializeWasm() must be awaited first!");
2729 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2730 return nativeResponseValue;
2732 // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2733 export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2734 if(!isWasmInitialized) {
2735 throw new Error("initializeWasm() must be awaited first!");
2737 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2738 // debug statements here
2740 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2741 export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2742 if(!isWasmInitialized) {
2743 throw new Error("initializeWasm() must be awaited first!");
2745 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2746 return nativeResponseValue;
2748 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2749 export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2750 if(!isWasmInitialized) {
2751 throw new Error("initializeWasm() must be awaited first!");
2753 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2754 return nativeResponseValue;
2756 // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2757 export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2758 if(!isWasmInitialized) {
2759 throw new Error("initializeWasm() must be awaited first!");
2761 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2762 // debug statements here
2764 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2765 export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2766 if(!isWasmInitialized) {
2767 throw new Error("initializeWasm() must be awaited first!");
2769 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2770 return nativeResponseValue;
2772 // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2773 export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2774 if(!isWasmInitialized) {
2775 throw new Error("initializeWasm() must be awaited first!");
2777 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2778 return nativeResponseValue;
2780 // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2781 export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2782 if(!isWasmInitialized) {
2783 throw new Error("initializeWasm() must be awaited first!");
2785 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2786 // debug statements here
2788 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2789 export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2790 if(!isWasmInitialized) {
2791 throw new Error("initializeWasm() must be awaited first!");
2793 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2794 return nativeResponseValue;
2796 // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2797 export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2798 if(!isWasmInitialized) {
2799 throw new Error("initializeWasm() must be awaited first!");
2801 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2802 return nativeResponseValue;
2804 // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2805 export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2806 if(!isWasmInitialized) {
2807 throw new Error("initializeWasm() must be awaited first!");
2809 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2810 // debug statements here
2812 // void Event_free(struct LDKEvent this_ptr);
2813 export function Event_free(this_ptr: number): void {
2814 if(!isWasmInitialized) {
2815 throw new Error("initializeWasm() must be awaited first!");
2817 const nativeResponseValue = wasm.Event_free(this_ptr);
2818 // debug statements here
2820 // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
2821 export function Event_clone(orig: number): number {
2822 if(!isWasmInitialized) {
2823 throw new Error("initializeWasm() must be awaited first!");
2825 const nativeResponseValue = wasm.Event_clone(orig);
2826 return nativeResponseValue;
2828 // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
2829 export function Event_write(obj: number): Uint8Array {
2830 if(!isWasmInitialized) {
2831 throw new Error("initializeWasm() must be awaited first!");
2833 const nativeResponseValue = wasm.Event_write(obj);
2834 return decodeArray(nativeResponseValue);
2836 // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
2837 export function MessageSendEvent_free(this_ptr: number): void {
2838 if(!isWasmInitialized) {
2839 throw new Error("initializeWasm() must be awaited first!");
2841 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
2842 // debug statements here
2844 // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
2845 export function MessageSendEvent_clone(orig: number): number {
2846 if(!isWasmInitialized) {
2847 throw new Error("initializeWasm() must be awaited first!");
2849 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
2850 return nativeResponseValue;
2852 // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
2853 export function MessageSendEventsProvider_free(this_ptr: number): void {
2854 if(!isWasmInitialized) {
2855 throw new Error("initializeWasm() must be awaited first!");
2857 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
2858 // debug statements here
2860 // void EventsProvider_free(struct LDKEventsProvider this_ptr);
2861 export function EventsProvider_free(this_ptr: number): void {
2862 if(!isWasmInitialized) {
2863 throw new Error("initializeWasm() must be awaited first!");
2865 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
2866 // debug statements here
2868 // void APIError_free(struct LDKAPIError this_ptr);
2869 export function APIError_free(this_ptr: number): void {
2870 if(!isWasmInitialized) {
2871 throw new Error("initializeWasm() must be awaited first!");
2873 const nativeResponseValue = wasm.APIError_free(this_ptr);
2874 // debug statements here
2876 // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
2877 export function APIError_clone(orig: number): number {
2878 if(!isWasmInitialized) {
2879 throw new Error("initializeWasm() must be awaited first!");
2881 const nativeResponseValue = wasm.APIError_clone(orig);
2882 return nativeResponseValue;
2884 // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
2885 export function Level_clone(orig: number): LDKLevel {
2886 if(!isWasmInitialized) {
2887 throw new Error("initializeWasm() must be awaited first!");
2889 const nativeResponseValue = wasm.Level_clone(orig);
2890 return nativeResponseValue;
2892 // MUST_USE_RES enum LDKLevel Level_max(void);
2893 export function Level_max(): LDKLevel {
2894 if(!isWasmInitialized) {
2895 throw new Error("initializeWasm() must be awaited first!");
2897 const nativeResponseValue = wasm.Level_max();
2898 return nativeResponseValue;
2900 // void Logger_free(struct LDKLogger this_ptr);
2901 export function Logger_free(this_ptr: number): void {
2902 if(!isWasmInitialized) {
2903 throw new Error("initializeWasm() must be awaited first!");
2905 const nativeResponseValue = wasm.Logger_free(this_ptr);
2906 // debug statements here
2908 // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_ptr);
2909 export function ChannelHandshakeConfig_free(this_ptr: number): void {
2910 if(!isWasmInitialized) {
2911 throw new Error("initializeWasm() must be awaited first!");
2913 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_ptr);
2914 // debug statements here
2916 // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
2917 export function ChannelHandshakeConfig_clone(orig: number): number {
2918 if(!isWasmInitialized) {
2919 throw new Error("initializeWasm() must be awaited first!");
2921 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
2922 return nativeResponseValue;
2924 // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2925 export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
2926 if(!isWasmInitialized) {
2927 throw new Error("initializeWasm() must be awaited first!");
2929 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
2930 return nativeResponseValue;
2932 // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
2933 export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
2934 if(!isWasmInitialized) {
2935 throw new Error("initializeWasm() must be awaited first!");
2937 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
2938 // debug statements here
2940 // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2941 export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
2942 if(!isWasmInitialized) {
2943 throw new Error("initializeWasm() must be awaited first!");
2945 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
2946 return nativeResponseValue;
2948 // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
2949 export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
2950 if(!isWasmInitialized) {
2951 throw new Error("initializeWasm() must be awaited first!");
2953 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
2954 // debug statements here
2956 // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2957 export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
2958 if(!isWasmInitialized) {
2959 throw new Error("initializeWasm() must be awaited first!");
2961 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
2962 return nativeResponseValue;
2964 // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
2965 export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
2966 if(!isWasmInitialized) {
2967 throw new Error("initializeWasm() must be awaited first!");
2969 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
2970 // debug statements here
2972 // 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);
2973 export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
2974 if(!isWasmInitialized) {
2975 throw new Error("initializeWasm() must be awaited first!");
2977 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
2978 return nativeResponseValue;
2980 // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
2981 export function ChannelHandshakeConfig_default(): number {
2982 if(!isWasmInitialized) {
2983 throw new Error("initializeWasm() must be awaited first!");
2985 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
2986 return nativeResponseValue;
2988 // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_ptr);
2989 export function ChannelHandshakeLimits_free(this_ptr: number): void {
2990 if(!isWasmInitialized) {
2991 throw new Error("initializeWasm() must be awaited first!");
2993 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_ptr);
2994 // debug statements here
2996 // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
2997 export function ChannelHandshakeLimits_clone(orig: number): number {
2998 if(!isWasmInitialized) {
2999 throw new Error("initializeWasm() must be awaited first!");
3001 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
3002 return nativeResponseValue;
3004 // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3005 export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
3006 if(!isWasmInitialized) {
3007 throw new Error("initializeWasm() must be awaited first!");
3009 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
3010 return nativeResponseValue;
3012 // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3013 export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
3014 if(!isWasmInitialized) {
3015 throw new Error("initializeWasm() must be awaited first!");
3017 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
3018 // debug statements here
3020 // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3021 export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
3022 if(!isWasmInitialized) {
3023 throw new Error("initializeWasm() must be awaited first!");
3025 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
3026 return nativeResponseValue;
3028 // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3029 export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
3030 if(!isWasmInitialized) {
3031 throw new Error("initializeWasm() must be awaited first!");
3033 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
3034 // debug statements here
3036 // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3037 export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
3038 if(!isWasmInitialized) {
3039 throw new Error("initializeWasm() must be awaited first!");
3041 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
3042 return nativeResponseValue;
3044 // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3045 export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
3046 if(!isWasmInitialized) {
3047 throw new Error("initializeWasm() must be awaited first!");
3049 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
3050 // debug statements here
3052 // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3053 export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
3054 if(!isWasmInitialized) {
3055 throw new Error("initializeWasm() must be awaited first!");
3057 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
3058 return nativeResponseValue;
3060 // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3061 export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
3062 if(!isWasmInitialized) {
3063 throw new Error("initializeWasm() must be awaited first!");
3065 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
3066 // debug statements here
3068 // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3069 export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
3070 if(!isWasmInitialized) {
3071 throw new Error("initializeWasm() must be awaited first!");
3073 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
3074 return nativeResponseValue;
3076 // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
3077 export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
3078 if(!isWasmInitialized) {
3079 throw new Error("initializeWasm() must be awaited first!");
3081 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
3082 // debug statements here
3084 // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3085 export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
3086 if(!isWasmInitialized) {
3087 throw new Error("initializeWasm() must be awaited first!");
3089 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
3090 return nativeResponseValue;
3092 // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3093 export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
3094 if(!isWasmInitialized) {
3095 throw new Error("initializeWasm() must be awaited first!");
3097 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
3098 // debug statements here
3100 // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3101 export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
3102 if(!isWasmInitialized) {
3103 throw new Error("initializeWasm() must be awaited first!");
3105 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
3106 return nativeResponseValue;
3108 // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3109 export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
3110 if(!isWasmInitialized) {
3111 throw new Error("initializeWasm() must be awaited first!");
3113 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
3114 // debug statements here
3116 // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3117 export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
3118 if(!isWasmInitialized) {
3119 throw new Error("initializeWasm() must be awaited first!");
3121 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
3122 return nativeResponseValue;
3124 // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
3125 export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
3126 if(!isWasmInitialized) {
3127 throw new Error("initializeWasm() must be awaited first!");
3129 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
3130 // debug statements here
3132 // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3133 export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
3134 if(!isWasmInitialized) {
3135 throw new Error("initializeWasm() must be awaited first!");
3137 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
3138 return nativeResponseValue;
3140 // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
3141 export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
3142 if(!isWasmInitialized) {
3143 throw new Error("initializeWasm() must be awaited first!");
3145 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
3146 // debug statements here
3148 // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3149 export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
3150 if(!isWasmInitialized) {
3151 throw new Error("initializeWasm() must be awaited first!");
3153 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
3154 return nativeResponseValue;
3156 // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
3157 export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
3158 if(!isWasmInitialized) {
3159 throw new Error("initializeWasm() must be awaited first!");
3161 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
3162 // debug statements here
3164 // 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, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
3165 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, min_dust_limit_satoshis_arg: number, max_dust_limit_satoshis_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
3166 if(!isWasmInitialized) {
3167 throw new Error("initializeWasm() must be awaited first!");
3169 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, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
3170 return nativeResponseValue;
3172 // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
3173 export function ChannelHandshakeLimits_default(): number {
3174 if(!isWasmInitialized) {
3175 throw new Error("initializeWasm() must be awaited first!");
3177 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
3178 return nativeResponseValue;
3180 // void ChannelConfig_free(struct LDKChannelConfig this_ptr);
3181 export function ChannelConfig_free(this_ptr: number): void {
3182 if(!isWasmInitialized) {
3183 throw new Error("initializeWasm() must be awaited first!");
3185 const nativeResponseValue = wasm.ChannelConfig_free(this_ptr);
3186 // debug statements here
3188 // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
3189 export function ChannelConfig_clone(orig: number): number {
3190 if(!isWasmInitialized) {
3191 throw new Error("initializeWasm() must be awaited first!");
3193 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
3194 return nativeResponseValue;
3196 // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3197 export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
3198 if(!isWasmInitialized) {
3199 throw new Error("initializeWasm() must be awaited first!");
3201 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
3202 return nativeResponseValue;
3204 // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
3205 export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
3206 if(!isWasmInitialized) {
3207 throw new Error("initializeWasm() must be awaited first!");
3209 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
3210 // debug statements here
3212 // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3213 export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
3214 if(!isWasmInitialized) {
3215 throw new Error("initializeWasm() must be awaited first!");
3217 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
3218 return nativeResponseValue;
3220 // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
3221 export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
3222 if(!isWasmInitialized) {
3223 throw new Error("initializeWasm() must be awaited first!");
3225 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
3226 // debug statements here
3228 // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3229 export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
3230 if(!isWasmInitialized) {
3231 throw new Error("initializeWasm() must be awaited first!");
3233 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
3234 return nativeResponseValue;
3236 // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
3237 export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
3238 if(!isWasmInitialized) {
3239 throw new Error("initializeWasm() must be awaited first!");
3241 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
3242 // debug statements here
3244 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
3245 export function ChannelConfig_new(fee_proportional_millionths_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
3246 if(!isWasmInitialized) {
3247 throw new Error("initializeWasm() must be awaited first!");
3249 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
3250 return nativeResponseValue;
3252 // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
3253 export function ChannelConfig_default(): number {
3254 if(!isWasmInitialized) {
3255 throw new Error("initializeWasm() must be awaited first!");
3257 const nativeResponseValue = wasm.ChannelConfig_default();
3258 return nativeResponseValue;
3260 // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
3261 export function ChannelConfig_write(obj: number): Uint8Array {
3262 if(!isWasmInitialized) {
3263 throw new Error("initializeWasm() must be awaited first!");
3265 const nativeResponseValue = wasm.ChannelConfig_write(obj);
3266 return decodeArray(nativeResponseValue);
3268 // struct LDKChannelConfig ChannelConfig_read(struct LDKu8slice ser);
3269 export function ChannelConfig_read(ser: Uint8Array): number {
3270 if(!isWasmInitialized) {
3271 throw new Error("initializeWasm() must be awaited first!");
3273 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
3274 return nativeResponseValue;
3276 // void UserConfig_free(struct LDKUserConfig this_ptr);
3277 export function UserConfig_free(this_ptr: number): void {
3278 if(!isWasmInitialized) {
3279 throw new Error("initializeWasm() must be awaited first!");
3281 const nativeResponseValue = wasm.UserConfig_free(this_ptr);
3282 // debug statements here
3284 // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
3285 export function UserConfig_clone(orig: number): number {
3286 if(!isWasmInitialized) {
3287 throw new Error("initializeWasm() must be awaited first!");
3289 const nativeResponseValue = wasm.UserConfig_clone(orig);
3290 return nativeResponseValue;
3292 // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3293 export function UserConfig_get_own_channel_config(this_ptr: number): number {
3294 if(!isWasmInitialized) {
3295 throw new Error("initializeWasm() must be awaited first!");
3297 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
3298 return nativeResponseValue;
3300 // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
3301 export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
3302 if(!isWasmInitialized) {
3303 throw new Error("initializeWasm() must be awaited first!");
3305 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
3306 // debug statements here
3308 // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3309 export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
3310 if(!isWasmInitialized) {
3311 throw new Error("initializeWasm() must be awaited first!");
3313 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
3314 return nativeResponseValue;
3316 // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
3317 export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
3318 if(!isWasmInitialized) {
3319 throw new Error("initializeWasm() must be awaited first!");
3321 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
3322 // debug statements here
3324 // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3325 export function UserConfig_get_channel_options(this_ptr: number): number {
3326 if(!isWasmInitialized) {
3327 throw new Error("initializeWasm() must be awaited first!");
3329 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
3330 return nativeResponseValue;
3332 // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
3333 export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
3334 if(!isWasmInitialized) {
3335 throw new Error("initializeWasm() must be awaited first!");
3337 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
3338 // debug statements here
3340 // 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);
3341 export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
3342 if(!isWasmInitialized) {
3343 throw new Error("initializeWasm() must be awaited first!");
3345 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
3346 return nativeResponseValue;
3348 // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
3349 export function UserConfig_default(): number {
3350 if(!isWasmInitialized) {
3351 throw new Error("initializeWasm() must be awaited first!");
3353 const nativeResponseValue = wasm.UserConfig_default();
3354 return nativeResponseValue;
3356 // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
3357 export function AccessError_clone(orig: number): LDKAccessError {
3358 if(!isWasmInitialized) {
3359 throw new Error("initializeWasm() must be awaited first!");
3361 const nativeResponseValue = wasm.AccessError_clone(orig);
3362 return nativeResponseValue;
3364 // void Access_free(struct LDKAccess this_ptr);
3365 export function Access_free(this_ptr: number): void {
3366 if(!isWasmInitialized) {
3367 throw new Error("initializeWasm() must be awaited first!");
3369 const nativeResponseValue = wasm.Access_free(this_ptr);
3370 // debug statements here
3372 // void Watch_free(struct LDKWatch this_ptr);
3373 export function Watch_free(this_ptr: number): void {
3374 if(!isWasmInitialized) {
3375 throw new Error("initializeWasm() must be awaited first!");
3377 const nativeResponseValue = wasm.Watch_free(this_ptr);
3378 // debug statements here
3380 // void Filter_free(struct LDKFilter this_ptr);
3381 export function Filter_free(this_ptr: number): void {
3382 if(!isWasmInitialized) {
3383 throw new Error("initializeWasm() must be awaited first!");
3385 const nativeResponseValue = wasm.Filter_free(this_ptr);
3386 // debug statements here
3388 // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
3389 export function BroadcasterInterface_free(this_ptr: number): void {
3390 if(!isWasmInitialized) {
3391 throw new Error("initializeWasm() must be awaited first!");
3393 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
3394 // debug statements here
3396 // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
3397 export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
3398 if(!isWasmInitialized) {
3399 throw new Error("initializeWasm() must be awaited first!");
3401 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
3402 return nativeResponseValue;
3404 // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
3405 export function FeeEstimator_free(this_ptr: number): void {
3406 if(!isWasmInitialized) {
3407 throw new Error("initializeWasm() must be awaited first!");
3409 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
3410 // debug statements here
3412 // void ChainMonitor_free(struct LDKChainMonitor this_ptr);
3413 export function ChainMonitor_free(this_ptr: number): void {
3414 if(!isWasmInitialized) {
3415 throw new Error("initializeWasm() must be awaited first!");
3417 const nativeResponseValue = wasm.ChainMonitor_free(this_ptr);
3418 // debug statements here
3420 // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
3421 export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
3422 if(!isWasmInitialized) {
3423 throw new Error("initializeWasm() must be awaited first!");
3425 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
3426 // debug statements here
3428 // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
3429 export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
3430 if(!isWasmInitialized) {
3431 throw new Error("initializeWasm() must be awaited first!");
3433 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
3434 // debug statements here
3436 // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
3437 export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
3438 if(!isWasmInitialized) {
3439 throw new Error("initializeWasm() must be awaited first!");
3441 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
3442 return nativeResponseValue;
3444 // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3445 export function ChainMonitor_as_Watch(this_arg: number): number {
3446 if(!isWasmInitialized) {
3447 throw new Error("initializeWasm() must be awaited first!");
3449 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
3450 return nativeResponseValue;
3452 // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3453 export function ChainMonitor_as_EventsProvider(this_arg: number): number {
3454 if(!isWasmInitialized) {
3455 throw new Error("initializeWasm() must be awaited first!");
3457 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
3458 return nativeResponseValue;
3460 // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_ptr);
3461 export function ChannelMonitorUpdate_free(this_ptr: number): void {
3462 if(!isWasmInitialized) {
3463 throw new Error("initializeWasm() must be awaited first!");
3465 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_ptr);
3466 // debug statements here
3468 // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
3469 export function ChannelMonitorUpdate_clone(orig: number): number {
3470 if(!isWasmInitialized) {
3471 throw new Error("initializeWasm() must be awaited first!");
3473 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
3474 return nativeResponseValue;
3476 // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
3477 export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
3478 if(!isWasmInitialized) {
3479 throw new Error("initializeWasm() must be awaited first!");
3481 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
3482 return nativeResponseValue;
3484 // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
3485 export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
3486 if(!isWasmInitialized) {
3487 throw new Error("initializeWasm() must be awaited first!");
3489 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
3490 // debug statements here
3492 // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
3493 export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
3494 if(!isWasmInitialized) {
3495 throw new Error("initializeWasm() must be awaited first!");
3497 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
3498 return decodeArray(nativeResponseValue);
3500 // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
3501 export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
3502 if(!isWasmInitialized) {
3503 throw new Error("initializeWasm() must be awaited first!");
3505 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
3506 return nativeResponseValue;
3508 // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
3509 export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
3510 if(!isWasmInitialized) {
3511 throw new Error("initializeWasm() must be awaited first!");
3513 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
3514 return nativeResponseValue;
3516 // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_ptr);
3517 export function MonitorUpdateError_free(this_ptr: number): void {
3518 if(!isWasmInitialized) {
3519 throw new Error("initializeWasm() must be awaited first!");
3521 const nativeResponseValue = wasm.MonitorUpdateError_free(this_ptr);
3522 // debug statements here
3524 // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
3525 export function MonitorEvent_free(this_ptr: number): void {
3526 if(!isWasmInitialized) {
3527 throw new Error("initializeWasm() must be awaited first!");
3529 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
3530 // debug statements here
3532 // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
3533 export function MonitorEvent_clone(orig: number): number {
3534 if(!isWasmInitialized) {
3535 throw new Error("initializeWasm() must be awaited first!");
3537 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
3538 return nativeResponseValue;
3540 // void HTLCUpdate_free(struct LDKHTLCUpdate this_ptr);
3541 export function HTLCUpdate_free(this_ptr: number): void {
3542 if(!isWasmInitialized) {
3543 throw new Error("initializeWasm() must be awaited first!");
3545 const nativeResponseValue = wasm.HTLCUpdate_free(this_ptr);
3546 // debug statements here
3548 // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
3549 export function HTLCUpdate_clone(orig: number): number {
3550 if(!isWasmInitialized) {
3551 throw new Error("initializeWasm() must be awaited first!");
3553 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
3554 return nativeResponseValue;
3556 // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
3557 export function HTLCUpdate_write(obj: number): Uint8Array {
3558 if(!isWasmInitialized) {
3559 throw new Error("initializeWasm() must be awaited first!");
3561 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
3562 return decodeArray(nativeResponseValue);
3564 // struct LDKHTLCUpdate HTLCUpdate_read(struct LDKu8slice ser);
3565 export function HTLCUpdate_read(ser: Uint8Array): number {
3566 if(!isWasmInitialized) {
3567 throw new Error("initializeWasm() must be awaited first!");
3569 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
3570 return nativeResponseValue;
3572 // void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
3573 export function ChannelMonitor_free(this_ptr: number): void {
3574 if(!isWasmInitialized) {
3575 throw new Error("initializeWasm() must be awaited first!");
3577 const nativeResponseValue = wasm.ChannelMonitor_free(this_ptr);
3578 // debug statements here
3580 // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
3581 export function ChannelMonitor_write(obj: number): Uint8Array {
3582 if(!isWasmInitialized) {
3583 throw new Error("initializeWasm() must be awaited first!");
3585 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
3586 return decodeArray(nativeResponseValue);
3588 // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(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);
3589 export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
3590 if(!isWasmInitialized) {
3591 throw new Error("initializeWasm() must be awaited first!");
3593 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
3594 return nativeResponseValue;
3596 // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3597 export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
3598 if(!isWasmInitialized) {
3599 throw new Error("initializeWasm() must be awaited first!");
3601 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
3602 return nativeResponseValue;
3604 // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3605 export function ChannelMonitor_get_funding_txo(this_arg: number): number {
3606 if(!isWasmInitialized) {
3607 throw new Error("initializeWasm() must be awaited first!");
3609 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
3610 return nativeResponseValue;
3612 // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
3613 export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
3614 if(!isWasmInitialized) {
3615 throw new Error("initializeWasm() must be awaited first!");
3617 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
3618 return nativeResponseValue;
3620 // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
3621 export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
3622 if(!isWasmInitialized) {
3623 throw new Error("initializeWasm() must be awaited first!");
3625 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
3626 return nativeResponseValue;
3628 // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
3629 export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
3630 if(!isWasmInitialized) {
3631 throw new Error("initializeWasm() must be awaited first!");
3633 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
3634 return nativeResponseValue;
3636 // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(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);
3637 export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
3638 if(!isWasmInitialized) {
3639 throw new Error("initializeWasm() must be awaited first!");
3641 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
3642 return nativeResponseValue;
3644 // void ChannelMonitor_block_disconnected(struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
3645 export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
3646 if(!isWasmInitialized) {
3647 throw new Error("initializeWasm() must be awaited first!");
3649 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
3650 // debug statements here
3652 // void Persist_free(struct LDKPersist this_ptr);
3653 export function Persist_free(this_ptr: number): void {
3654 if(!isWasmInitialized) {
3655 throw new Error("initializeWasm() must be awaited first!");
3657 const nativeResponseValue = wasm.Persist_free(this_ptr);
3658 // debug statements here
3660 // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
3661 export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
3662 if(!isWasmInitialized) {
3663 throw new Error("initializeWasm() must be awaited first!");
3665 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
3666 return nativeResponseValue;
3668 // void OutPoint_free(struct LDKOutPoint this_ptr);
3669 export function OutPoint_free(this_ptr: number): void {
3670 if(!isWasmInitialized) {
3671 throw new Error("initializeWasm() must be awaited first!");
3673 const nativeResponseValue = wasm.OutPoint_free(this_ptr);
3674 // debug statements here
3676 // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
3677 export function OutPoint_clone(orig: number): number {
3678 if(!isWasmInitialized) {
3679 throw new Error("initializeWasm() must be awaited first!");
3681 const nativeResponseValue = wasm.OutPoint_clone(orig);
3682 return nativeResponseValue;
3684 // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
3685 export function OutPoint_get_txid(this_ptr: number): Uint8Array {
3686 if(!isWasmInitialized) {
3687 throw new Error("initializeWasm() must be awaited first!");
3689 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
3690 return decodeArray(nativeResponseValue);
3692 // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3693 export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
3694 if(!isWasmInitialized) {
3695 throw new Error("initializeWasm() must be awaited first!");
3697 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
3698 // debug statements here
3700 // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
3701 export function OutPoint_get_index(this_ptr: number): number {
3702 if(!isWasmInitialized) {
3703 throw new Error("initializeWasm() must be awaited first!");
3705 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
3706 return nativeResponseValue;
3708 // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
3709 export function OutPoint_set_index(this_ptr: number, val: number): void {
3710 if(!isWasmInitialized) {
3711 throw new Error("initializeWasm() must be awaited first!");
3713 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
3714 // debug statements here
3716 // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
3717 export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
3718 if(!isWasmInitialized) {
3719 throw new Error("initializeWasm() must be awaited first!");
3721 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
3722 return nativeResponseValue;
3724 // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
3725 export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
3726 if(!isWasmInitialized) {
3727 throw new Error("initializeWasm() must be awaited first!");
3729 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
3730 return decodeArray(nativeResponseValue);
3732 // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
3733 export function OutPoint_write(obj: number): Uint8Array {
3734 if(!isWasmInitialized) {
3735 throw new Error("initializeWasm() must be awaited first!");
3737 const nativeResponseValue = wasm.OutPoint_write(obj);
3738 return decodeArray(nativeResponseValue);
3740 // struct LDKOutPoint OutPoint_read(struct LDKu8slice ser);
3741 export function OutPoint_read(ser: Uint8Array): number {
3742 if(!isWasmInitialized) {
3743 throw new Error("initializeWasm() must be awaited first!");
3745 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
3746 return nativeResponseValue;
3748 // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
3749 export function SpendableOutputDescriptor_free(this_ptr: number): void {
3750 if(!isWasmInitialized) {
3751 throw new Error("initializeWasm() must be awaited first!");
3753 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
3754 // debug statements here
3756 // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
3757 export function SpendableOutputDescriptor_clone(orig: number): number {
3758 if(!isWasmInitialized) {
3759 throw new Error("initializeWasm() must be awaited first!");
3761 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
3762 return nativeResponseValue;
3764 // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
3765 export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
3766 if(!isWasmInitialized) {
3767 throw new Error("initializeWasm() must be awaited first!");
3769 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
3770 return decodeArray(nativeResponseValue);
3772 // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
3773 export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
3774 if(!isWasmInitialized) {
3775 throw new Error("initializeWasm() must be awaited first!");
3777 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
3778 return nativeResponseValue;
3780 // struct LDKChannelKeys ChannelKeys_clone(const struct LDKChannelKeys *NONNULL_PTR orig);
3781 export function ChannelKeys_clone(orig: number): number {
3782 if(!isWasmInitialized) {
3783 throw new Error("initializeWasm() must be awaited first!");
3785 const nativeResponseValue = wasm.ChannelKeys_clone(orig);
3786 return nativeResponseValue;
3788 // void ChannelKeys_free(struct LDKChannelKeys this_ptr);
3789 export function ChannelKeys_free(this_ptr: number): void {
3790 if(!isWasmInitialized) {
3791 throw new Error("initializeWasm() must be awaited first!");
3793 const nativeResponseValue = wasm.ChannelKeys_free(this_ptr);
3794 // debug statements here
3796 // void KeysInterface_free(struct LDKKeysInterface this_ptr);
3797 export function KeysInterface_free(this_ptr: number): void {
3798 if(!isWasmInitialized) {
3799 throw new Error("initializeWasm() must be awaited first!");
3801 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
3802 // debug statements here
3804 // void InMemoryChannelKeys_free(struct LDKInMemoryChannelKeys this_ptr);
3805 export function InMemoryChannelKeys_free(this_ptr: number): void {
3806 if(!isWasmInitialized) {
3807 throw new Error("initializeWasm() must be awaited first!");
3809 const nativeResponseValue = wasm.InMemoryChannelKeys_free(this_ptr);
3810 // debug statements here
3812 // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
3813 export function InMemoryChannelKeys_clone(orig: number): number {
3814 if(!isWasmInitialized) {
3815 throw new Error("initializeWasm() must be awaited first!");
3817 const nativeResponseValue = wasm.InMemoryChannelKeys_clone(orig);
3818 return nativeResponseValue;
3820 // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3821 export function InMemoryChannelKeys_get_funding_key(this_ptr: number): Uint8Array {
3822 if(!isWasmInitialized) {
3823 throw new Error("initializeWasm() must be awaited first!");
3825 const nativeResponseValue = wasm.InMemoryChannelKeys_get_funding_key(this_ptr);
3826 return decodeArray(nativeResponseValue);
3828 // void InMemoryChannelKeys_set_funding_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3829 export function InMemoryChannelKeys_set_funding_key(this_ptr: number, val: Uint8Array): void {
3830 if(!isWasmInitialized) {
3831 throw new Error("initializeWasm() must be awaited first!");
3833 const nativeResponseValue = wasm.InMemoryChannelKeys_set_funding_key(this_ptr, encodeArray(val));
3834 // debug statements here
3836 // const uint8_t (*InMemoryChannelKeys_get_revocation_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3837 export function InMemoryChannelKeys_get_revocation_base_key(this_ptr: number): Uint8Array {
3838 if(!isWasmInitialized) {
3839 throw new Error("initializeWasm() must be awaited first!");
3841 const nativeResponseValue = wasm.InMemoryChannelKeys_get_revocation_base_key(this_ptr);
3842 return decodeArray(nativeResponseValue);
3844 // void InMemoryChannelKeys_set_revocation_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3845 export function InMemoryChannelKeys_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
3846 if(!isWasmInitialized) {
3847 throw new Error("initializeWasm() must be awaited first!");
3849 const nativeResponseValue = wasm.InMemoryChannelKeys_set_revocation_base_key(this_ptr, encodeArray(val));
3850 // debug statements here
3852 // const uint8_t (*InMemoryChannelKeys_get_payment_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3853 export function InMemoryChannelKeys_get_payment_key(this_ptr: number): Uint8Array {
3854 if(!isWasmInitialized) {
3855 throw new Error("initializeWasm() must be awaited first!");
3857 const nativeResponseValue = wasm.InMemoryChannelKeys_get_payment_key(this_ptr);
3858 return decodeArray(nativeResponseValue);
3860 // void InMemoryChannelKeys_set_payment_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3861 export function InMemoryChannelKeys_set_payment_key(this_ptr: number, val: Uint8Array): void {
3862 if(!isWasmInitialized) {
3863 throw new Error("initializeWasm() must be awaited first!");
3865 const nativeResponseValue = wasm.InMemoryChannelKeys_set_payment_key(this_ptr, encodeArray(val));
3866 // debug statements here
3868 // const uint8_t (*InMemoryChannelKeys_get_delayed_payment_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3869 export function InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
3870 if(!isWasmInitialized) {
3871 throw new Error("initializeWasm() must be awaited first!");
3873 const nativeResponseValue = wasm.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr);
3874 return decodeArray(nativeResponseValue);
3876 // void InMemoryChannelKeys_set_delayed_payment_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3877 export function InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
3878 if(!isWasmInitialized) {
3879 throw new Error("initializeWasm() must be awaited first!");
3881 const nativeResponseValue = wasm.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr, encodeArray(val));
3882 // debug statements here
3884 // const uint8_t (*InMemoryChannelKeys_get_htlc_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3885 export function InMemoryChannelKeys_get_htlc_base_key(this_ptr: number): Uint8Array {
3886 if(!isWasmInitialized) {
3887 throw new Error("initializeWasm() must be awaited first!");
3889 const nativeResponseValue = wasm.InMemoryChannelKeys_get_htlc_base_key(this_ptr);
3890 return decodeArray(nativeResponseValue);
3892 // void InMemoryChannelKeys_set_htlc_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3893 export function InMemoryChannelKeys_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
3894 if(!isWasmInitialized) {
3895 throw new Error("initializeWasm() must be awaited first!");
3897 const nativeResponseValue = wasm.InMemoryChannelKeys_set_htlc_base_key(this_ptr, encodeArray(val));
3898 // debug statements here
3900 // const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
3901 export function InMemoryChannelKeys_get_commitment_seed(this_ptr: number): Uint8Array {
3902 if(!isWasmInitialized) {
3903 throw new Error("initializeWasm() must be awaited first!");
3905 const nativeResponseValue = wasm.InMemoryChannelKeys_get_commitment_seed(this_ptr);
3906 return decodeArray(nativeResponseValue);
3908 // void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3909 export function InMemoryChannelKeys_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
3910 if(!isWasmInitialized) {
3911 throw new Error("initializeWasm() must be awaited first!");
3913 const nativeResponseValue = wasm.InMemoryChannelKeys_set_commitment_seed(this_ptr, encodeArray(val));
3914 // debug statements here
3916 // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_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 LDKC2Tuple_u64u64Z key_derivation_params);
3917 export function InMemoryChannelKeys_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, key_derivation_params: number): number {
3918 if(!isWasmInitialized) {
3919 throw new Error("initializeWasm() must be awaited first!");
3921 const nativeResponseValue = wasm.InMemoryChannelKeys_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, key_derivation_params);
3922 return nativeResponseValue;
3924 // MUST_USE_RES struct LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3925 export function InMemoryChannelKeys_counterparty_pubkeys(this_arg: number): number {
3926 if(!isWasmInitialized) {
3927 throw new Error("initializeWasm() must be awaited first!");
3929 const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_pubkeys(this_arg);
3930 return nativeResponseValue;
3932 // MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3933 export function InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg: number): number {
3934 if(!isWasmInitialized) {
3935 throw new Error("initializeWasm() must be awaited first!");
3937 const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg);
3938 return nativeResponseValue;
3940 // MUST_USE_RES uint16_t InMemoryChannelKeys_holder_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3941 export function InMemoryChannelKeys_holder_selected_contest_delay(this_arg: number): number {
3942 if(!isWasmInitialized) {
3943 throw new Error("initializeWasm() must be awaited first!");
3945 const nativeResponseValue = wasm.InMemoryChannelKeys_holder_selected_contest_delay(this_arg);
3946 return nativeResponseValue;
3948 // MUST_USE_RES bool InMemoryChannelKeys_is_outbound(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3949 export function InMemoryChannelKeys_is_outbound(this_arg: number): boolean {
3950 if(!isWasmInitialized) {
3951 throw new Error("initializeWasm() must be awaited first!");
3953 const nativeResponseValue = wasm.InMemoryChannelKeys_is_outbound(this_arg);
3954 return nativeResponseValue;
3956 // MUST_USE_RES struct LDKOutPoint InMemoryChannelKeys_funding_outpoint(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3957 export function InMemoryChannelKeys_funding_outpoint(this_arg: number): number {
3958 if(!isWasmInitialized) {
3959 throw new Error("initializeWasm() must be awaited first!");
3961 const nativeResponseValue = wasm.InMemoryChannelKeys_funding_outpoint(this_arg);
3962 return nativeResponseValue;
3964 // MUST_USE_RES struct LDKChannelTransactionParameters InMemoryChannelKeys_get_channel_parameters(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3965 export function InMemoryChannelKeys_get_channel_parameters(this_arg: number): number {
3966 if(!isWasmInitialized) {
3967 throw new Error("initializeWasm() must be awaited first!");
3969 const nativeResponseValue = wasm.InMemoryChannelKeys_get_channel_parameters(this_arg);
3970 return nativeResponseValue;
3972 // struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
3973 export function InMemoryChannelKeys_as_ChannelKeys(this_arg: number): number {
3974 if(!isWasmInitialized) {
3975 throw new Error("initializeWasm() must be awaited first!");
3977 const nativeResponseValue = wasm.InMemoryChannelKeys_as_ChannelKeys(this_arg);
3978 return nativeResponseValue;
3980 // struct LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *NONNULL_PTR obj);
3981 export function InMemoryChannelKeys_write(obj: number): Uint8Array {
3982 if(!isWasmInitialized) {
3983 throw new Error("initializeWasm() must be awaited first!");
3985 const nativeResponseValue = wasm.InMemoryChannelKeys_write(obj);
3986 return decodeArray(nativeResponseValue);
3988 // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ InMemoryChannelKeys_read(struct LDKu8slice ser);
3989 export function InMemoryChannelKeys_read(ser: Uint8Array): number {
3990 if(!isWasmInitialized) {
3991 throw new Error("initializeWasm() must be awaited first!");
3993 const nativeResponseValue = wasm.InMemoryChannelKeys_read(encodeArray(ser));
3994 return nativeResponseValue;
3996 // void KeysManager_free(struct LDKKeysManager this_ptr);
3997 export function KeysManager_free(this_ptr: number): void {
3998 if(!isWasmInitialized) {
3999 throw new Error("initializeWasm() must be awaited first!");
4001 const nativeResponseValue = wasm.KeysManager_free(this_ptr);
4002 // debug statements here
4004 // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], enum LDKNetwork network, uint64_t starting_time_secs, uint32_t starting_time_nanos);
4005 export function KeysManager_new(seed: Uint8Array, network: LDKNetwork, starting_time_secs: number, starting_time_nanos: number): number {
4006 if(!isWasmInitialized) {
4007 throw new Error("initializeWasm() must be awaited first!");
4009 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), network, starting_time_secs, starting_time_nanos);
4010 return nativeResponseValue;
4012 // MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, uint64_t params_1, uint64_t params_2);
4013 export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params_1: number, params_2: number): number {
4014 if(!isWasmInitialized) {
4015 throw new Error("initializeWasm() must be awaited first!");
4017 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params_1, params_2);
4018 return nativeResponseValue;
4020 // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
4021 export function KeysManager_as_KeysInterface(this_arg: number): number {
4022 if(!isWasmInitialized) {
4023 throw new Error("initializeWasm() must be awaited first!");
4025 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
4026 return nativeResponseValue;
4028 // void ChannelManager_free(struct LDKChannelManager this_ptr);
4029 export function ChannelManager_free(this_ptr: number): void {
4030 if(!isWasmInitialized) {
4031 throw new Error("initializeWasm() must be awaited first!");
4033 const nativeResponseValue = wasm.ChannelManager_free(this_ptr);
4034 // debug statements here
4036 // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
4037 export function ChannelDetails_free(this_ptr: number): void {
4038 if(!isWasmInitialized) {
4039 throw new Error("initializeWasm() must be awaited first!");
4041 const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
4042 // debug statements here
4044 // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
4045 export function ChannelDetails_clone(orig: number): number {
4046 if(!isWasmInitialized) {
4047 throw new Error("initializeWasm() must be awaited first!");
4049 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
4050 return nativeResponseValue;
4052 // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
4053 export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
4054 if(!isWasmInitialized) {
4055 throw new Error("initializeWasm() must be awaited first!");
4057 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
4058 return decodeArray(nativeResponseValue);
4060 // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4061 export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
4062 if(!isWasmInitialized) {
4063 throw new Error("initializeWasm() must be awaited first!");
4065 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
4066 // debug statements here
4068 // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4069 export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
4070 if(!isWasmInitialized) {
4071 throw new Error("initializeWasm() must be awaited first!");
4073 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
4074 return decodeArray(nativeResponseValue);
4076 // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4077 export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
4078 if(!isWasmInitialized) {
4079 throw new Error("initializeWasm() must be awaited first!");
4081 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
4082 // debug statements here
4084 // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4085 export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
4086 if(!isWasmInitialized) {
4087 throw new Error("initializeWasm() must be awaited first!");
4089 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
4090 return nativeResponseValue;
4092 // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
4093 export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
4094 if(!isWasmInitialized) {
4095 throw new Error("initializeWasm() must be awaited first!");
4097 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
4098 // debug statements here
4100 // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4101 export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
4102 if(!isWasmInitialized) {
4103 throw new Error("initializeWasm() must be awaited first!");
4105 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
4106 return nativeResponseValue;
4108 // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4109 export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
4110 if(!isWasmInitialized) {
4111 throw new Error("initializeWasm() must be awaited first!");
4113 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
4114 // debug statements here
4116 // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4117 export function ChannelDetails_get_user_id(this_ptr: number): number {
4118 if(!isWasmInitialized) {
4119 throw new Error("initializeWasm() must be awaited first!");
4121 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
4122 return nativeResponseValue;
4124 // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4125 export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
4126 if(!isWasmInitialized) {
4127 throw new Error("initializeWasm() must be awaited first!");
4129 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
4130 // debug statements here
4132 // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4133 export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
4134 if(!isWasmInitialized) {
4135 throw new Error("initializeWasm() must be awaited first!");
4137 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
4138 return nativeResponseValue;
4140 // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4141 export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
4142 if(!isWasmInitialized) {
4143 throw new Error("initializeWasm() must be awaited first!");
4145 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
4146 // debug statements here
4148 // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4149 export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
4150 if(!isWasmInitialized) {
4151 throw new Error("initializeWasm() must be awaited first!");
4153 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
4154 return nativeResponseValue;
4156 // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4157 export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
4158 if(!isWasmInitialized) {
4159 throw new Error("initializeWasm() must be awaited first!");
4161 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
4162 // debug statements here
4164 // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4165 export function ChannelDetails_get_is_live(this_ptr: number): boolean {
4166 if(!isWasmInitialized) {
4167 throw new Error("initializeWasm() must be awaited first!");
4169 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
4170 return nativeResponseValue;
4172 // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
4173 export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
4174 if(!isWasmInitialized) {
4175 throw new Error("initializeWasm() must be awaited first!");
4177 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
4178 // debug statements here
4180 // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
4181 export function PaymentSendFailure_free(this_ptr: number): void {
4182 if(!isWasmInitialized) {
4183 throw new Error("initializeWasm() must be awaited first!");
4185 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
4186 // debug statements here
4188 // MUST_USE_RES struct LDKChannelManager ChannelManager_new(enum LDKNetwork network, struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, uintptr_t current_blockchain_height);
4189 export function ChannelManager_new(network: LDKNetwork, fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, current_blockchain_height: number): number {
4190 if(!isWasmInitialized) {
4191 throw new Error("initializeWasm() must be awaited first!");
4193 const nativeResponseValue = wasm.ChannelManager_new(network, fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, current_blockchain_height);
4194 return nativeResponseValue;
4196 // 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);
4197 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 {
4198 if(!isWasmInitialized) {
4199 throw new Error("initializeWasm() must be awaited first!");
4201 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
4202 return nativeResponseValue;
4204 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4205 export function ChannelManager_list_channels(this_arg: number): number[] {
4206 if(!isWasmInitialized) {
4207 throw new Error("initializeWasm() must be awaited first!");
4209 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
4210 return nativeResponseValue;
4212 // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4213 export function ChannelManager_list_usable_channels(this_arg: number): number[] {
4214 if(!isWasmInitialized) {
4215 throw new Error("initializeWasm() must be awaited first!");
4217 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
4218 return nativeResponseValue;
4220 // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
4221 export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
4222 if(!isWasmInitialized) {
4223 throw new Error("initializeWasm() must be awaited first!");
4225 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
4226 return nativeResponseValue;
4228 // void ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
4229 export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): void {
4230 if(!isWasmInitialized) {
4231 throw new Error("initializeWasm() must be awaited first!");
4233 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
4234 // debug statements here
4236 // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4237 export function ChannelManager_force_close_all_channels(this_arg: number): void {
4238 if(!isWasmInitialized) {
4239 throw new Error("initializeWasm() must be awaited first!");
4241 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
4242 // debug statements here
4244 // 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);
4245 export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
4246 if(!isWasmInitialized) {
4247 throw new Error("initializeWasm() must be awaited first!");
4249 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
4250 return nativeResponseValue;
4252 // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
4253 export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
4254 if(!isWasmInitialized) {
4255 throw new Error("initializeWasm() must be awaited first!");
4257 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
4258 // debug statements here
4260 // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
4261 export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
4262 if(!isWasmInitialized) {
4263 throw new Error("initializeWasm() must be awaited first!");
4265 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
4266 // debug statements here
4268 // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
4269 export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
4270 if(!isWasmInitialized) {
4271 throw new Error("initializeWasm() must be awaited first!");
4273 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
4274 // debug statements here
4276 // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
4277 export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
4278 if(!isWasmInitialized) {
4279 throw new Error("initializeWasm() must be awaited first!");
4281 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
4282 // debug statements here
4284 // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], struct LDKThirtyTwoBytes payment_secret);
4285 export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
4286 if(!isWasmInitialized) {
4287 throw new Error("initializeWasm() must be awaited first!");
4289 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
4290 return nativeResponseValue;
4292 // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
4293 export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
4294 if(!isWasmInitialized) {
4295 throw new Error("initializeWasm() must be awaited first!");
4297 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
4298 return nativeResponseValue;
4300 // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
4301 export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
4302 if(!isWasmInitialized) {
4303 throw new Error("initializeWasm() must be awaited first!");
4305 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
4306 return decodeArray(nativeResponseValue);
4308 // 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);
4309 export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
4310 if(!isWasmInitialized) {
4311 throw new Error("initializeWasm() must be awaited first!");
4313 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
4314 // debug statements here
4316 // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
4317 export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
4318 if(!isWasmInitialized) {
4319 throw new Error("initializeWasm() must be awaited first!");
4321 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
4322 return nativeResponseValue;
4324 // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
4325 export function ChannelManager_as_EventsProvider(this_arg: number): number {
4326 if(!isWasmInitialized) {
4327 throw new Error("initializeWasm() must be awaited first!");
4329 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
4330 return nativeResponseValue;
4332 // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
4333 export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
4334 if(!isWasmInitialized) {
4335 throw new Error("initializeWasm() must be awaited first!");
4337 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
4338 // debug statements here
4340 // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
4341 export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
4342 if(!isWasmInitialized) {
4343 throw new Error("initializeWasm() must be awaited first!");
4345 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
4346 // debug statements here
4348 // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
4349 export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
4350 if(!isWasmInitialized) {
4351 throw new Error("initializeWasm() must be awaited first!");
4353 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
4354 return nativeResponseValue;
4356 // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
4357 export function ChannelManager_write(obj: number): Uint8Array {
4358 if(!isWasmInitialized) {
4359 throw new Error("initializeWasm() must be awaited first!");
4361 const nativeResponseValue = wasm.ChannelManager_write(obj);
4362 return decodeArray(nativeResponseValue);
4364 // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_ptr);
4365 export function ChannelManagerReadArgs_free(this_ptr: number): void {
4366 if(!isWasmInitialized) {
4367 throw new Error("initializeWasm() must be awaited first!");
4369 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_ptr);
4370 // debug statements here
4372 // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4373 export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
4374 if(!isWasmInitialized) {
4375 throw new Error("initializeWasm() must be awaited first!");
4377 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
4378 return nativeResponseValue;
4380 // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
4381 export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
4382 if(!isWasmInitialized) {
4383 throw new Error("initializeWasm() must be awaited first!");
4385 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
4386 // debug statements here
4388 // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4389 export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
4390 if(!isWasmInitialized) {
4391 throw new Error("initializeWasm() must be awaited first!");
4393 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
4394 return nativeResponseValue;
4396 // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
4397 export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
4398 if(!isWasmInitialized) {
4399 throw new Error("initializeWasm() must be awaited first!");
4401 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
4402 // debug statements here
4404 // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4405 export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
4406 if(!isWasmInitialized) {
4407 throw new Error("initializeWasm() must be awaited first!");
4409 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
4410 return nativeResponseValue;
4412 // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
4413 export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
4414 if(!isWasmInitialized) {
4415 throw new Error("initializeWasm() must be awaited first!");
4417 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
4418 // debug statements here
4420 // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4421 export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
4422 if(!isWasmInitialized) {
4423 throw new Error("initializeWasm() must be awaited first!");
4425 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
4426 return nativeResponseValue;
4428 // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
4429 export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
4430 if(!isWasmInitialized) {
4431 throw new Error("initializeWasm() must be awaited first!");
4433 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
4434 // debug statements here
4436 // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4437 export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
4438 if(!isWasmInitialized) {
4439 throw new Error("initializeWasm() must be awaited first!");
4441 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
4442 return nativeResponseValue;
4444 // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
4445 export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
4446 if(!isWasmInitialized) {
4447 throw new Error("initializeWasm() must be awaited first!");
4449 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
4450 // debug statements here
4452 // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4453 export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
4454 if(!isWasmInitialized) {
4455 throw new Error("initializeWasm() must be awaited first!");
4457 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
4458 return nativeResponseValue;
4460 // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
4461 export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
4462 if(!isWasmInitialized) {
4463 throw new Error("initializeWasm() must be awaited first!");
4465 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
4466 // debug statements here
4468 // 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);
4469 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 {
4470 if(!isWasmInitialized) {
4471 throw new Error("initializeWasm() must be awaited first!");
4473 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
4474 return nativeResponseValue;
4476 // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
4477 export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
4478 if(!isWasmInitialized) {
4479 throw new Error("initializeWasm() must be awaited first!");
4481 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
4482 return nativeResponseValue;
4484 // void DecodeError_free(struct LDKDecodeError this_ptr);
4485 export function DecodeError_free(this_ptr: number): void {
4486 if(!isWasmInitialized) {
4487 throw new Error("initializeWasm() must be awaited first!");
4489 const nativeResponseValue = wasm.DecodeError_free(this_ptr);
4490 // debug statements here
4492 // void Init_free(struct LDKInit this_ptr);
4493 export function Init_free(this_ptr: number): void {
4494 if(!isWasmInitialized) {
4495 throw new Error("initializeWasm() must be awaited first!");
4497 const nativeResponseValue = wasm.Init_free(this_ptr);
4498 // debug statements here
4500 // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
4501 export function Init_clone(orig: number): number {
4502 if(!isWasmInitialized) {
4503 throw new Error("initializeWasm() must be awaited first!");
4505 const nativeResponseValue = wasm.Init_clone(orig);
4506 return nativeResponseValue;
4508 // void ErrorMessage_free(struct LDKErrorMessage this_ptr);
4509 export function ErrorMessage_free(this_ptr: number): void {
4510 if(!isWasmInitialized) {
4511 throw new Error("initializeWasm() must be awaited first!");
4513 const nativeResponseValue = wasm.ErrorMessage_free(this_ptr);
4514 // debug statements here
4516 // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
4517 export function ErrorMessage_clone(orig: number): number {
4518 if(!isWasmInitialized) {
4519 throw new Error("initializeWasm() must be awaited first!");
4521 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
4522 return nativeResponseValue;
4524 // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
4525 export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
4526 if(!isWasmInitialized) {
4527 throw new Error("initializeWasm() must be awaited first!");
4529 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
4530 return decodeArray(nativeResponseValue);
4532 // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4533 export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
4534 if(!isWasmInitialized) {
4535 throw new Error("initializeWasm() must be awaited first!");
4537 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
4538 // debug statements here
4540 // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
4541 export function ErrorMessage_get_data(this_ptr: number): String {
4542 if(!isWasmInitialized) {
4543 throw new Error("initializeWasm() must be awaited first!");
4545 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
4546 return nativeResponseValue;
4548 // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
4549 export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
4550 if(!isWasmInitialized) {
4551 throw new Error("initializeWasm() must be awaited first!");
4553 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
4554 // debug statements here
4556 // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
4557 export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
4558 if(!isWasmInitialized) {
4559 throw new Error("initializeWasm() must be awaited first!");
4561 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
4562 return nativeResponseValue;
4564 // void Ping_free(struct LDKPing this_ptr);
4565 export function Ping_free(this_ptr: number): void {
4566 if(!isWasmInitialized) {
4567 throw new Error("initializeWasm() must be awaited first!");
4569 const nativeResponseValue = wasm.Ping_free(this_ptr);
4570 // debug statements here
4572 // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
4573 export function Ping_clone(orig: number): number {
4574 if(!isWasmInitialized) {
4575 throw new Error("initializeWasm() must be awaited first!");
4577 const nativeResponseValue = wasm.Ping_clone(orig);
4578 return nativeResponseValue;
4580 // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
4581 export function Ping_get_ponglen(this_ptr: number): number {
4582 if(!isWasmInitialized) {
4583 throw new Error("initializeWasm() must be awaited first!");
4585 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
4586 return nativeResponseValue;
4588 // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
4589 export function Ping_set_ponglen(this_ptr: number, val: number): void {
4590 if(!isWasmInitialized) {
4591 throw new Error("initializeWasm() must be awaited first!");
4593 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
4594 // debug statements here
4596 // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
4597 export function Ping_get_byteslen(this_ptr: number): number {
4598 if(!isWasmInitialized) {
4599 throw new Error("initializeWasm() must be awaited first!");
4601 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
4602 return nativeResponseValue;
4604 // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
4605 export function Ping_set_byteslen(this_ptr: number, val: number): void {
4606 if(!isWasmInitialized) {
4607 throw new Error("initializeWasm() must be awaited first!");
4609 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
4610 // debug statements here
4612 // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
4613 export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
4614 if(!isWasmInitialized) {
4615 throw new Error("initializeWasm() must be awaited first!");
4617 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
4618 return nativeResponseValue;
4620 // void Pong_free(struct LDKPong this_ptr);
4621 export function Pong_free(this_ptr: number): void {
4622 if(!isWasmInitialized) {
4623 throw new Error("initializeWasm() must be awaited first!");
4625 const nativeResponseValue = wasm.Pong_free(this_ptr);
4626 // debug statements here
4628 // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
4629 export function Pong_clone(orig: number): number {
4630 if(!isWasmInitialized) {
4631 throw new Error("initializeWasm() must be awaited first!");
4633 const nativeResponseValue = wasm.Pong_clone(orig);
4634 return nativeResponseValue;
4636 // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
4637 export function Pong_get_byteslen(this_ptr: number): number {
4638 if(!isWasmInitialized) {
4639 throw new Error("initializeWasm() must be awaited first!");
4641 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
4642 return nativeResponseValue;
4644 // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
4645 export function Pong_set_byteslen(this_ptr: number, val: number): void {
4646 if(!isWasmInitialized) {
4647 throw new Error("initializeWasm() must be awaited first!");
4649 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
4650 // debug statements here
4652 // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
4653 export function Pong_new(byteslen_arg: number): number {
4654 if(!isWasmInitialized) {
4655 throw new Error("initializeWasm() must be awaited first!");
4657 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
4658 return nativeResponseValue;
4660 // void OpenChannel_free(struct LDKOpenChannel this_ptr);
4661 export function OpenChannel_free(this_ptr: number): void {
4662 if(!isWasmInitialized) {
4663 throw new Error("initializeWasm() must be awaited first!");
4665 const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
4666 // debug statements here
4668 // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
4669 export function OpenChannel_clone(orig: number): number {
4670 if(!isWasmInitialized) {
4671 throw new Error("initializeWasm() must be awaited first!");
4673 const nativeResponseValue = wasm.OpenChannel_clone(orig);
4674 return nativeResponseValue;
4676 // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
4677 export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
4678 if(!isWasmInitialized) {
4679 throw new Error("initializeWasm() must be awaited first!");
4681 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
4682 return decodeArray(nativeResponseValue);
4684 // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4685 export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
4686 if(!isWasmInitialized) {
4687 throw new Error("initializeWasm() must be awaited first!");
4689 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
4690 // debug statements here
4692 // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
4693 export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
4694 if(!isWasmInitialized) {
4695 throw new Error("initializeWasm() must be awaited first!");
4697 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
4698 return decodeArray(nativeResponseValue);
4700 // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4701 export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
4702 if(!isWasmInitialized) {
4703 throw new Error("initializeWasm() must be awaited first!");
4705 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
4706 // debug statements here
4708 // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4709 export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
4710 if(!isWasmInitialized) {
4711 throw new Error("initializeWasm() must be awaited first!");
4713 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
4714 return nativeResponseValue;
4716 // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4717 export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
4718 if(!isWasmInitialized) {
4719 throw new Error("initializeWasm() must be awaited first!");
4721 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
4722 // debug statements here
4724 // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4725 export function OpenChannel_get_push_msat(this_ptr: number): number {
4726 if(!isWasmInitialized) {
4727 throw new Error("initializeWasm() must be awaited first!");
4729 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
4730 return nativeResponseValue;
4732 // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4733 export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
4734 if(!isWasmInitialized) {
4735 throw new Error("initializeWasm() must be awaited first!");
4737 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
4738 // debug statements here
4740 // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4741 export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
4742 if(!isWasmInitialized) {
4743 throw new Error("initializeWasm() must be awaited first!");
4745 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
4746 return nativeResponseValue;
4748 // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4749 export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
4750 if(!isWasmInitialized) {
4751 throw new Error("initializeWasm() must be awaited first!");
4753 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
4754 // debug statements here
4756 // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4757 export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
4758 if(!isWasmInitialized) {
4759 throw new Error("initializeWasm() must be awaited first!");
4761 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
4762 return nativeResponseValue;
4764 // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4765 export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4766 if(!isWasmInitialized) {
4767 throw new Error("initializeWasm() must be awaited first!");
4769 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
4770 // debug statements here
4772 // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4773 export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
4774 if(!isWasmInitialized) {
4775 throw new Error("initializeWasm() must be awaited first!");
4777 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
4778 return nativeResponseValue;
4780 // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4781 export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
4782 if(!isWasmInitialized) {
4783 throw new Error("initializeWasm() must be awaited first!");
4785 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
4786 // debug statements here
4788 // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4789 export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
4790 if(!isWasmInitialized) {
4791 throw new Error("initializeWasm() must be awaited first!");
4793 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
4794 return nativeResponseValue;
4796 // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4797 export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
4798 if(!isWasmInitialized) {
4799 throw new Error("initializeWasm() must be awaited first!");
4801 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
4802 // debug statements here
4804 // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4805 export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
4806 if(!isWasmInitialized) {
4807 throw new Error("initializeWasm() must be awaited first!");
4809 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
4810 return nativeResponseValue;
4812 // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
4813 export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
4814 if(!isWasmInitialized) {
4815 throw new Error("initializeWasm() must be awaited first!");
4817 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
4818 // debug statements here
4820 // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4821 export function OpenChannel_get_to_self_delay(this_ptr: number): number {
4822 if(!isWasmInitialized) {
4823 throw new Error("initializeWasm() must be awaited first!");
4825 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
4826 return nativeResponseValue;
4828 // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
4829 export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
4830 if(!isWasmInitialized) {
4831 throw new Error("initializeWasm() must be awaited first!");
4833 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
4834 // debug statements here
4836 // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4837 export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
4838 if(!isWasmInitialized) {
4839 throw new Error("initializeWasm() must be awaited first!");
4841 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
4842 return nativeResponseValue;
4844 // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
4845 export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
4846 if(!isWasmInitialized) {
4847 throw new Error("initializeWasm() must be awaited first!");
4849 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
4850 // debug statements here
4852 // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4853 export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
4854 if(!isWasmInitialized) {
4855 throw new Error("initializeWasm() must be awaited first!");
4857 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
4858 return decodeArray(nativeResponseValue);
4860 // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4861 export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
4862 if(!isWasmInitialized) {
4863 throw new Error("initializeWasm() must be awaited first!");
4865 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
4866 // debug statements here
4868 // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4869 export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
4870 if(!isWasmInitialized) {
4871 throw new Error("initializeWasm() must be awaited first!");
4873 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
4874 return decodeArray(nativeResponseValue);
4876 // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4877 export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
4878 if(!isWasmInitialized) {
4879 throw new Error("initializeWasm() must be awaited first!");
4881 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
4882 // debug statements here
4884 // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4885 export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
4886 if(!isWasmInitialized) {
4887 throw new Error("initializeWasm() must be awaited first!");
4889 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
4890 return decodeArray(nativeResponseValue);
4892 // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4893 export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
4894 if(!isWasmInitialized) {
4895 throw new Error("initializeWasm() must be awaited first!");
4897 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
4898 // debug statements here
4900 // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4901 export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
4902 if(!isWasmInitialized) {
4903 throw new Error("initializeWasm() must be awaited first!");
4905 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
4906 return decodeArray(nativeResponseValue);
4908 // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4909 export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
4910 if(!isWasmInitialized) {
4911 throw new Error("initializeWasm() must be awaited first!");
4913 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
4914 // debug statements here
4916 // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4917 export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
4918 if(!isWasmInitialized) {
4919 throw new Error("initializeWasm() must be awaited first!");
4921 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
4922 return decodeArray(nativeResponseValue);
4924 // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4925 export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
4926 if(!isWasmInitialized) {
4927 throw new Error("initializeWasm() must be awaited first!");
4929 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
4930 // debug statements here
4932 // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4933 export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
4934 if(!isWasmInitialized) {
4935 throw new Error("initializeWasm() must be awaited first!");
4937 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
4938 return decodeArray(nativeResponseValue);
4940 // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4941 export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
4942 if(!isWasmInitialized) {
4943 throw new Error("initializeWasm() must be awaited first!");
4945 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
4946 // debug statements here
4948 // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4949 export function OpenChannel_get_channel_flags(this_ptr: number): number {
4950 if(!isWasmInitialized) {
4951 throw new Error("initializeWasm() must be awaited first!");
4953 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
4954 return nativeResponseValue;
4956 // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
4957 export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
4958 if(!isWasmInitialized) {
4959 throw new Error("initializeWasm() must be awaited first!");
4961 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
4962 // debug statements here
4964 // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
4965 export function AcceptChannel_free(this_ptr: number): void {
4966 if(!isWasmInitialized) {
4967 throw new Error("initializeWasm() must be awaited first!");
4969 const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
4970 // debug statements here
4972 // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
4973 export function AcceptChannel_clone(orig: number): number {
4974 if(!isWasmInitialized) {
4975 throw new Error("initializeWasm() must be awaited first!");
4977 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
4978 return nativeResponseValue;
4980 // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
4981 export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
4982 if(!isWasmInitialized) {
4983 throw new Error("initializeWasm() must be awaited first!");
4985 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
4986 return decodeArray(nativeResponseValue);
4988 // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4989 export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
4990 if(!isWasmInitialized) {
4991 throw new Error("initializeWasm() must be awaited first!");
4993 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
4994 // debug statements here
4996 // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4997 export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
4998 if(!isWasmInitialized) {
4999 throw new Error("initializeWasm() must be awaited first!");
5001 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
5002 return nativeResponseValue;
5004 // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
5005 export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
5006 if(!isWasmInitialized) {
5007 throw new Error("initializeWasm() must be awaited first!");
5009 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
5010 // debug statements here
5012 // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5013 export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
5014 if(!isWasmInitialized) {
5015 throw new Error("initializeWasm() must be awaited first!");
5017 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
5018 return nativeResponseValue;
5020 // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
5021 export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
5022 if(!isWasmInitialized) {
5023 throw new Error("initializeWasm() must be awaited first!");
5025 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
5026 // debug statements here
5028 // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5029 export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
5030 if(!isWasmInitialized) {
5031 throw new Error("initializeWasm() must be awaited first!");
5033 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
5034 return nativeResponseValue;
5036 // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
5037 export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
5038 if(!isWasmInitialized) {
5039 throw new Error("initializeWasm() must be awaited first!");
5041 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
5042 // debug statements here
5044 // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5045 export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
5046 if(!isWasmInitialized) {
5047 throw new Error("initializeWasm() must be awaited first!");
5049 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
5050 return nativeResponseValue;
5052 // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
5053 export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
5054 if(!isWasmInitialized) {
5055 throw new Error("initializeWasm() must be awaited first!");
5057 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
5058 // debug statements here
5060 // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5061 export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
5062 if(!isWasmInitialized) {
5063 throw new Error("initializeWasm() must be awaited first!");
5065 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
5066 return nativeResponseValue;
5068 // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
5069 export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
5070 if(!isWasmInitialized) {
5071 throw new Error("initializeWasm() must be awaited first!");
5073 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
5074 // debug statements here
5076 // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5077 export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
5078 if(!isWasmInitialized) {
5079 throw new Error("initializeWasm() must be awaited first!");
5081 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
5082 return nativeResponseValue;
5084 // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
5085 export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
5086 if(!isWasmInitialized) {
5087 throw new Error("initializeWasm() must be awaited first!");
5089 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
5090 // debug statements here
5092 // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5093 export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
5094 if(!isWasmInitialized) {
5095 throw new Error("initializeWasm() must be awaited first!");
5097 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
5098 return nativeResponseValue;
5100 // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
5101 export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
5102 if(!isWasmInitialized) {
5103 throw new Error("initializeWasm() must be awaited first!");
5105 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
5106 // debug statements here
5108 // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5109 export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
5110 if(!isWasmInitialized) {
5111 throw new Error("initializeWasm() must be awaited first!");
5113 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
5114 return decodeArray(nativeResponseValue);
5116 // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5117 export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
5118 if(!isWasmInitialized) {
5119 throw new Error("initializeWasm() must be awaited first!");
5121 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
5122 // debug statements here
5124 // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5125 export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
5126 if(!isWasmInitialized) {
5127 throw new Error("initializeWasm() must be awaited first!");
5129 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
5130 return decodeArray(nativeResponseValue);
5132 // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5133 export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
5134 if(!isWasmInitialized) {
5135 throw new Error("initializeWasm() must be awaited first!");
5137 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
5138 // debug statements here
5140 // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5141 export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
5142 if(!isWasmInitialized) {
5143 throw new Error("initializeWasm() must be awaited first!");
5145 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
5146 return decodeArray(nativeResponseValue);
5148 // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5149 export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
5150 if(!isWasmInitialized) {
5151 throw new Error("initializeWasm() must be awaited first!");
5153 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
5154 // debug statements here
5156 // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5157 export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
5158 if(!isWasmInitialized) {
5159 throw new Error("initializeWasm() must be awaited first!");
5161 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
5162 return decodeArray(nativeResponseValue);
5164 // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5165 export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
5166 if(!isWasmInitialized) {
5167 throw new Error("initializeWasm() must be awaited first!");
5169 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
5170 // debug statements here
5172 // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5173 export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
5174 if(!isWasmInitialized) {
5175 throw new Error("initializeWasm() must be awaited first!");
5177 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
5178 return decodeArray(nativeResponseValue);
5180 // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5181 export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
5182 if(!isWasmInitialized) {
5183 throw new Error("initializeWasm() must be awaited first!");
5185 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
5186 // debug statements here
5188 // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
5189 export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
5190 if(!isWasmInitialized) {
5191 throw new Error("initializeWasm() must be awaited first!");
5193 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
5194 return decodeArray(nativeResponseValue);
5196 // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5197 export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5198 if(!isWasmInitialized) {
5199 throw new Error("initializeWasm() must be awaited first!");
5201 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
5202 // debug statements here
5204 // void FundingCreated_free(struct LDKFundingCreated this_ptr);
5205 export function FundingCreated_free(this_ptr: number): void {
5206 if(!isWasmInitialized) {
5207 throw new Error("initializeWasm() must be awaited first!");
5209 const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
5210 // debug statements here
5212 // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
5213 export function FundingCreated_clone(orig: number): number {
5214 if(!isWasmInitialized) {
5215 throw new Error("initializeWasm() must be awaited first!");
5217 const nativeResponseValue = wasm.FundingCreated_clone(orig);
5218 return nativeResponseValue;
5220 // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
5221 export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
5222 if(!isWasmInitialized) {
5223 throw new Error("initializeWasm() must be awaited first!");
5225 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
5226 return decodeArray(nativeResponseValue);
5228 // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5229 export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
5230 if(!isWasmInitialized) {
5231 throw new Error("initializeWasm() must be awaited first!");
5233 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
5234 // debug statements here
5236 // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
5237 export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
5238 if(!isWasmInitialized) {
5239 throw new Error("initializeWasm() must be awaited first!");
5241 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
5242 return decodeArray(nativeResponseValue);
5244 // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5245 export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
5246 if(!isWasmInitialized) {
5247 throw new Error("initializeWasm() must be awaited first!");
5249 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
5250 // debug statements here
5252 // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
5253 export function FundingCreated_get_funding_output_index(this_ptr: number): number {
5254 if(!isWasmInitialized) {
5255 throw new Error("initializeWasm() must be awaited first!");
5257 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
5258 return nativeResponseValue;
5260 // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
5261 export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
5262 if(!isWasmInitialized) {
5263 throw new Error("initializeWasm() must be awaited first!");
5265 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
5266 // debug statements here
5268 // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
5269 export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
5270 if(!isWasmInitialized) {
5271 throw new Error("initializeWasm() must be awaited first!");
5273 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
5274 return decodeArray(nativeResponseValue);
5276 // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
5277 export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
5278 if(!isWasmInitialized) {
5279 throw new Error("initializeWasm() must be awaited first!");
5281 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
5282 // debug statements here
5284 // 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);
5285 export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
5286 if(!isWasmInitialized) {
5287 throw new Error("initializeWasm() must be awaited first!");
5289 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
5290 return nativeResponseValue;
5292 // void FundingSigned_free(struct LDKFundingSigned this_ptr);
5293 export function FundingSigned_free(this_ptr: number): void {
5294 if(!isWasmInitialized) {
5295 throw new Error("initializeWasm() must be awaited first!");
5297 const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
5298 // debug statements here
5300 // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
5301 export function FundingSigned_clone(orig: number): number {
5302 if(!isWasmInitialized) {
5303 throw new Error("initializeWasm() must be awaited first!");
5305 const nativeResponseValue = wasm.FundingSigned_clone(orig);
5306 return nativeResponseValue;
5308 // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
5309 export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
5310 if(!isWasmInitialized) {
5311 throw new Error("initializeWasm() must be awaited first!");
5313 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
5314 return decodeArray(nativeResponseValue);
5316 // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5317 export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
5318 if(!isWasmInitialized) {
5319 throw new Error("initializeWasm() must be awaited first!");
5321 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
5322 // debug statements here
5324 // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
5325 export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
5326 if(!isWasmInitialized) {
5327 throw new Error("initializeWasm() must be awaited first!");
5329 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
5330 return decodeArray(nativeResponseValue);
5332 // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
5333 export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
5334 if(!isWasmInitialized) {
5335 throw new Error("initializeWasm() must be awaited first!");
5337 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
5338 // debug statements here
5340 // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
5341 export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
5342 if(!isWasmInitialized) {
5343 throw new Error("initializeWasm() must be awaited first!");
5345 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
5346 return nativeResponseValue;
5348 // void FundingLocked_free(struct LDKFundingLocked this_ptr);
5349 export function FundingLocked_free(this_ptr: number): void {
5350 if(!isWasmInitialized) {
5351 throw new Error("initializeWasm() must be awaited first!");
5353 const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
5354 // debug statements here
5356 // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
5357 export function FundingLocked_clone(orig: number): number {
5358 if(!isWasmInitialized) {
5359 throw new Error("initializeWasm() must be awaited first!");
5361 const nativeResponseValue = wasm.FundingLocked_clone(orig);
5362 return nativeResponseValue;
5364 // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
5365 export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
5366 if(!isWasmInitialized) {
5367 throw new Error("initializeWasm() must be awaited first!");
5369 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
5370 return decodeArray(nativeResponseValue);
5372 // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5373 export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
5374 if(!isWasmInitialized) {
5375 throw new Error("initializeWasm() must be awaited first!");
5377 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
5378 // debug statements here
5380 // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
5381 export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
5382 if(!isWasmInitialized) {
5383 throw new Error("initializeWasm() must be awaited first!");
5385 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
5386 return decodeArray(nativeResponseValue);
5388 // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5389 export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5390 if(!isWasmInitialized) {
5391 throw new Error("initializeWasm() must be awaited first!");
5393 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
5394 // debug statements here
5396 // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
5397 export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
5398 if(!isWasmInitialized) {
5399 throw new Error("initializeWasm() must be awaited first!");
5401 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
5402 return nativeResponseValue;
5404 // void Shutdown_free(struct LDKShutdown this_ptr);
5405 export function Shutdown_free(this_ptr: number): void {
5406 if(!isWasmInitialized) {
5407 throw new Error("initializeWasm() must be awaited first!");
5409 const nativeResponseValue = wasm.Shutdown_free(this_ptr);
5410 // debug statements here
5412 // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
5413 export function Shutdown_clone(orig: number): number {
5414 if(!isWasmInitialized) {
5415 throw new Error("initializeWasm() must be awaited first!");
5417 const nativeResponseValue = wasm.Shutdown_clone(orig);
5418 return nativeResponseValue;
5420 // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
5421 export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
5422 if(!isWasmInitialized) {
5423 throw new Error("initializeWasm() must be awaited first!");
5425 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
5426 return decodeArray(nativeResponseValue);
5428 // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5429 export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
5430 if(!isWasmInitialized) {
5431 throw new Error("initializeWasm() must be awaited first!");
5433 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
5434 // debug statements here
5436 // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
5437 export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
5438 if(!isWasmInitialized) {
5439 throw new Error("initializeWasm() must be awaited first!");
5441 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
5442 return decodeArray(nativeResponseValue);
5444 // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
5445 export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
5446 if(!isWasmInitialized) {
5447 throw new Error("initializeWasm() must be awaited first!");
5449 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
5450 // debug statements here
5452 // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
5453 export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
5454 if(!isWasmInitialized) {
5455 throw new Error("initializeWasm() must be awaited first!");
5457 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
5458 return nativeResponseValue;
5460 // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
5461 export function ClosingSigned_free(this_ptr: number): void {
5462 if(!isWasmInitialized) {
5463 throw new Error("initializeWasm() must be awaited first!");
5465 const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
5466 // debug statements here
5468 // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
5469 export function ClosingSigned_clone(orig: number): number {
5470 if(!isWasmInitialized) {
5471 throw new Error("initializeWasm() must be awaited first!");
5473 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
5474 return nativeResponseValue;
5476 // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
5477 export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
5478 if(!isWasmInitialized) {
5479 throw new Error("initializeWasm() must be awaited first!");
5481 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
5482 return decodeArray(nativeResponseValue);
5484 // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5485 export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
5486 if(!isWasmInitialized) {
5487 throw new Error("initializeWasm() must be awaited first!");
5489 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
5490 // debug statements here
5492 // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
5493 export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
5494 if(!isWasmInitialized) {
5495 throw new Error("initializeWasm() must be awaited first!");
5497 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
5498 return nativeResponseValue;
5500 // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
5501 export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
5502 if(!isWasmInitialized) {
5503 throw new Error("initializeWasm() must be awaited first!");
5505 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
5506 // debug statements here
5508 // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
5509 export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
5510 if(!isWasmInitialized) {
5511 throw new Error("initializeWasm() must be awaited first!");
5513 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
5514 return decodeArray(nativeResponseValue);
5516 // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
5517 export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
5518 if(!isWasmInitialized) {
5519 throw new Error("initializeWasm() must be awaited first!");
5521 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
5522 // debug statements here
5524 // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
5525 export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
5526 if(!isWasmInitialized) {
5527 throw new Error("initializeWasm() must be awaited first!");
5529 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
5530 return nativeResponseValue;
5532 // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
5533 export function UpdateAddHTLC_free(this_ptr: number): void {
5534 if(!isWasmInitialized) {
5535 throw new Error("initializeWasm() must be awaited first!");
5537 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
5538 // debug statements here
5540 // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
5541 export function UpdateAddHTLC_clone(orig: number): number {
5542 if(!isWasmInitialized) {
5543 throw new Error("initializeWasm() must be awaited first!");
5545 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
5546 return nativeResponseValue;
5548 // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
5549 export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
5550 if(!isWasmInitialized) {
5551 throw new Error("initializeWasm() must be awaited first!");
5553 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
5554 return decodeArray(nativeResponseValue);
5556 // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5557 export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5558 if(!isWasmInitialized) {
5559 throw new Error("initializeWasm() must be awaited first!");
5561 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
5562 // debug statements here
5564 // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
5565 export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
5566 if(!isWasmInitialized) {
5567 throw new Error("initializeWasm() must be awaited first!");
5569 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
5570 return nativeResponseValue;
5572 // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
5573 export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
5574 if(!isWasmInitialized) {
5575 throw new Error("initializeWasm() must be awaited first!");
5577 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
5578 // debug statements here
5580 // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
5581 export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
5582 if(!isWasmInitialized) {
5583 throw new Error("initializeWasm() must be awaited first!");
5585 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
5586 return nativeResponseValue;
5588 // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
5589 export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
5590 if(!isWasmInitialized) {
5591 throw new Error("initializeWasm() must be awaited first!");
5593 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
5594 // debug statements here
5596 // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
5597 export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
5598 if(!isWasmInitialized) {
5599 throw new Error("initializeWasm() must be awaited first!");
5601 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
5602 return decodeArray(nativeResponseValue);
5604 // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5605 export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
5606 if(!isWasmInitialized) {
5607 throw new Error("initializeWasm() must be awaited first!");
5609 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
5610 // debug statements here
5612 // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
5613 export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
5614 if(!isWasmInitialized) {
5615 throw new Error("initializeWasm() must be awaited first!");
5617 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
5618 return nativeResponseValue;
5620 // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
5621 export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
5622 if(!isWasmInitialized) {
5623 throw new Error("initializeWasm() must be awaited first!");
5625 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
5626 // debug statements here
5628 // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
5629 export function UpdateFulfillHTLC_free(this_ptr: number): void {
5630 if(!isWasmInitialized) {
5631 throw new Error("initializeWasm() must be awaited first!");
5633 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
5634 // debug statements here
5636 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
5637 export function UpdateFulfillHTLC_clone(orig: number): number {
5638 if(!isWasmInitialized) {
5639 throw new Error("initializeWasm() must be awaited first!");
5641 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
5642 return nativeResponseValue;
5644 // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
5645 export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
5646 if(!isWasmInitialized) {
5647 throw new Error("initializeWasm() must be awaited first!");
5649 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
5650 return decodeArray(nativeResponseValue);
5652 // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5653 export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5654 if(!isWasmInitialized) {
5655 throw new Error("initializeWasm() must be awaited first!");
5657 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
5658 // debug statements here
5660 // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
5661 export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
5662 if(!isWasmInitialized) {
5663 throw new Error("initializeWasm() must be awaited first!");
5665 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
5666 return nativeResponseValue;
5668 // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
5669 export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
5670 if(!isWasmInitialized) {
5671 throw new Error("initializeWasm() must be awaited first!");
5673 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
5674 // debug statements here
5676 // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
5677 export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
5678 if(!isWasmInitialized) {
5679 throw new Error("initializeWasm() must be awaited first!");
5681 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
5682 return decodeArray(nativeResponseValue);
5684 // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5685 export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
5686 if(!isWasmInitialized) {
5687 throw new Error("initializeWasm() must be awaited first!");
5689 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
5690 // debug statements here
5692 // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
5693 export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
5694 if(!isWasmInitialized) {
5695 throw new Error("initializeWasm() must be awaited first!");
5697 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
5698 return nativeResponseValue;
5700 // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
5701 export function UpdateFailHTLC_free(this_ptr: number): void {
5702 if(!isWasmInitialized) {
5703 throw new Error("initializeWasm() must be awaited first!");
5705 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
5706 // debug statements here
5708 // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
5709 export function UpdateFailHTLC_clone(orig: number): number {
5710 if(!isWasmInitialized) {
5711 throw new Error("initializeWasm() must be awaited first!");
5713 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
5714 return nativeResponseValue;
5716 // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
5717 export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
5718 if(!isWasmInitialized) {
5719 throw new Error("initializeWasm() must be awaited first!");
5721 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
5722 return decodeArray(nativeResponseValue);
5724 // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5725 export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5726 if(!isWasmInitialized) {
5727 throw new Error("initializeWasm() must be awaited first!");
5729 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
5730 // debug statements here
5732 // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
5733 export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
5734 if(!isWasmInitialized) {
5735 throw new Error("initializeWasm() must be awaited first!");
5737 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
5738 return nativeResponseValue;
5740 // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
5741 export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
5742 if(!isWasmInitialized) {
5743 throw new Error("initializeWasm() must be awaited first!");
5745 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
5746 // debug statements here
5748 // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
5749 export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
5750 if(!isWasmInitialized) {
5751 throw new Error("initializeWasm() must be awaited first!");
5753 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
5754 // debug statements here
5756 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
5757 export function UpdateFailMalformedHTLC_clone(orig: number): number {
5758 if(!isWasmInitialized) {
5759 throw new Error("initializeWasm() must be awaited first!");
5761 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
5762 return nativeResponseValue;
5764 // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
5765 export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
5766 if(!isWasmInitialized) {
5767 throw new Error("initializeWasm() must be awaited first!");
5769 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
5770 return decodeArray(nativeResponseValue);
5772 // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5773 export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
5774 if(!isWasmInitialized) {
5775 throw new Error("initializeWasm() must be awaited first!");
5777 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
5778 // debug statements here
5780 // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
5781 export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
5782 if(!isWasmInitialized) {
5783 throw new Error("initializeWasm() must be awaited first!");
5785 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
5786 return nativeResponseValue;
5788 // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
5789 export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
5790 if(!isWasmInitialized) {
5791 throw new Error("initializeWasm() must be awaited first!");
5793 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
5794 // debug statements here
5796 // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
5797 export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
5798 if(!isWasmInitialized) {
5799 throw new Error("initializeWasm() must be awaited first!");
5801 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
5802 return nativeResponseValue;
5804 // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
5805 export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
5806 if(!isWasmInitialized) {
5807 throw new Error("initializeWasm() must be awaited first!");
5809 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
5810 // debug statements here
5812 // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
5813 export function CommitmentSigned_free(this_ptr: number): void {
5814 if(!isWasmInitialized) {
5815 throw new Error("initializeWasm() must be awaited first!");
5817 const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
5818 // debug statements here
5820 // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
5821 export function CommitmentSigned_clone(orig: number): number {
5822 if(!isWasmInitialized) {
5823 throw new Error("initializeWasm() must be awaited first!");
5825 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
5826 return nativeResponseValue;
5828 // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
5829 export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
5830 if(!isWasmInitialized) {
5831 throw new Error("initializeWasm() must be awaited first!");
5833 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
5834 return decodeArray(nativeResponseValue);
5836 // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5837 export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
5838 if(!isWasmInitialized) {
5839 throw new Error("initializeWasm() must be awaited first!");
5841 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
5842 // debug statements here
5844 // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
5845 export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
5846 if(!isWasmInitialized) {
5847 throw new Error("initializeWasm() must be awaited first!");
5849 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
5850 return decodeArray(nativeResponseValue);
5852 // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
5853 export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
5854 if(!isWasmInitialized) {
5855 throw new Error("initializeWasm() must be awaited first!");
5857 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
5858 // debug statements here
5860 // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
5861 export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
5862 if(!isWasmInitialized) {
5863 throw new Error("initializeWasm() must be awaited first!");
5865 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
5866 // debug statements here
5868 // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
5869 export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
5870 if(!isWasmInitialized) {
5871 throw new Error("initializeWasm() must be awaited first!");
5873 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
5874 return nativeResponseValue;
5876 // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
5877 export function RevokeAndACK_free(this_ptr: number): void {
5878 if(!isWasmInitialized) {
5879 throw new Error("initializeWasm() must be awaited first!");
5881 const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
5882 // debug statements here
5884 // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
5885 export function RevokeAndACK_clone(orig: number): number {
5886 if(!isWasmInitialized) {
5887 throw new Error("initializeWasm() must be awaited first!");
5889 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
5890 return nativeResponseValue;
5892 // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
5893 export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
5894 if(!isWasmInitialized) {
5895 throw new Error("initializeWasm() must be awaited first!");
5897 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
5898 return decodeArray(nativeResponseValue);
5900 // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5901 export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
5902 if(!isWasmInitialized) {
5903 throw new Error("initializeWasm() must be awaited first!");
5905 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
5906 // debug statements here
5908 // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
5909 export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
5910 if(!isWasmInitialized) {
5911 throw new Error("initializeWasm() must be awaited first!");
5913 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
5914 return decodeArray(nativeResponseValue);
5916 // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5917 export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
5918 if(!isWasmInitialized) {
5919 throw new Error("initializeWasm() must be awaited first!");
5921 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
5922 // debug statements here
5924 // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
5925 export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
5926 if(!isWasmInitialized) {
5927 throw new Error("initializeWasm() must be awaited first!");
5929 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
5930 return decodeArray(nativeResponseValue);
5932 // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5933 export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5934 if(!isWasmInitialized) {
5935 throw new Error("initializeWasm() must be awaited first!");
5937 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
5938 // debug statements here
5940 // 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);
5941 export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
5942 if(!isWasmInitialized) {
5943 throw new Error("initializeWasm() must be awaited first!");
5945 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
5946 return nativeResponseValue;
5948 // void UpdateFee_free(struct LDKUpdateFee this_ptr);
5949 export function UpdateFee_free(this_ptr: number): void {
5950 if(!isWasmInitialized) {
5951 throw new Error("initializeWasm() must be awaited first!");
5953 const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
5954 // debug statements here
5956 // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
5957 export function UpdateFee_clone(orig: number): number {
5958 if(!isWasmInitialized) {
5959 throw new Error("initializeWasm() must be awaited first!");
5961 const nativeResponseValue = wasm.UpdateFee_clone(orig);
5962 return nativeResponseValue;
5964 // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
5965 export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
5966 if(!isWasmInitialized) {
5967 throw new Error("initializeWasm() must be awaited first!");
5969 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
5970 return decodeArray(nativeResponseValue);
5972 // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5973 export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
5974 if(!isWasmInitialized) {
5975 throw new Error("initializeWasm() must be awaited first!");
5977 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
5978 // debug statements here
5980 // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
5981 export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
5982 if(!isWasmInitialized) {
5983 throw new Error("initializeWasm() must be awaited first!");
5985 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
5986 return nativeResponseValue;
5988 // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
5989 export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
5990 if(!isWasmInitialized) {
5991 throw new Error("initializeWasm() must be awaited first!");
5993 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
5994 // debug statements here
5996 // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
5997 export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
5998 if(!isWasmInitialized) {
5999 throw new Error("initializeWasm() must be awaited first!");
6001 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
6002 return nativeResponseValue;
6004 // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
6005 export function DataLossProtect_free(this_ptr: number): void {
6006 if(!isWasmInitialized) {
6007 throw new Error("initializeWasm() must be awaited first!");
6009 const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
6010 // debug statements here
6012 // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
6013 export function DataLossProtect_clone(orig: number): number {
6014 if(!isWasmInitialized) {
6015 throw new Error("initializeWasm() must be awaited first!");
6017 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
6018 return nativeResponseValue;
6020 // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
6021 export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
6022 if(!isWasmInitialized) {
6023 throw new Error("initializeWasm() must be awaited first!");
6025 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
6026 return decodeArray(nativeResponseValue);
6028 // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6029 export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
6030 if(!isWasmInitialized) {
6031 throw new Error("initializeWasm() must be awaited first!");
6033 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
6034 // debug statements here
6036 // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
6037 export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
6038 if(!isWasmInitialized) {
6039 throw new Error("initializeWasm() must be awaited first!");
6041 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
6042 return decodeArray(nativeResponseValue);
6044 // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6045 export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
6046 if(!isWasmInitialized) {
6047 throw new Error("initializeWasm() must be awaited first!");
6049 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
6050 // debug statements here
6052 // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
6053 export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
6054 if(!isWasmInitialized) {
6055 throw new Error("initializeWasm() must be awaited first!");
6057 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
6058 return nativeResponseValue;
6060 // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
6061 export function ChannelReestablish_free(this_ptr: number): void {
6062 if(!isWasmInitialized) {
6063 throw new Error("initializeWasm() must be awaited first!");
6065 const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
6066 // debug statements here
6068 // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
6069 export function ChannelReestablish_clone(orig: number): number {
6070 if(!isWasmInitialized) {
6071 throw new Error("initializeWasm() must be awaited first!");
6073 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
6074 return nativeResponseValue;
6076 // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
6077 export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
6078 if(!isWasmInitialized) {
6079 throw new Error("initializeWasm() must be awaited first!");
6081 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
6082 return decodeArray(nativeResponseValue);
6084 // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6085 export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
6086 if(!isWasmInitialized) {
6087 throw new Error("initializeWasm() must be awaited first!");
6089 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
6090 // debug statements here
6092 // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
6093 export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
6094 if(!isWasmInitialized) {
6095 throw new Error("initializeWasm() must be awaited first!");
6097 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
6098 return nativeResponseValue;
6100 // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
6101 export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
6102 if(!isWasmInitialized) {
6103 throw new Error("initializeWasm() must be awaited first!");
6105 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
6106 // debug statements here
6108 // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
6109 export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
6110 if(!isWasmInitialized) {
6111 throw new Error("initializeWasm() must be awaited first!");
6113 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
6114 return nativeResponseValue;
6116 // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
6117 export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
6118 if(!isWasmInitialized) {
6119 throw new Error("initializeWasm() must be awaited first!");
6121 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
6122 // debug statements here
6124 // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
6125 export function AnnouncementSignatures_free(this_ptr: number): void {
6126 if(!isWasmInitialized) {
6127 throw new Error("initializeWasm() must be awaited first!");
6129 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
6130 // debug statements here
6132 // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
6133 export function AnnouncementSignatures_clone(orig: number): number {
6134 if(!isWasmInitialized) {
6135 throw new Error("initializeWasm() must be awaited first!");
6137 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
6138 return nativeResponseValue;
6140 // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
6141 export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
6142 if(!isWasmInitialized) {
6143 throw new Error("initializeWasm() must be awaited first!");
6145 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
6146 return decodeArray(nativeResponseValue);
6148 // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6149 export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
6150 if(!isWasmInitialized) {
6151 throw new Error("initializeWasm() must be awaited first!");
6153 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
6154 // debug statements here
6156 // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
6157 export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
6158 if(!isWasmInitialized) {
6159 throw new Error("initializeWasm() must be awaited first!");
6161 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
6162 return nativeResponseValue;
6164 // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
6165 export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
6166 if(!isWasmInitialized) {
6167 throw new Error("initializeWasm() must be awaited first!");
6169 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
6170 // debug statements here
6172 // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
6173 export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
6174 if(!isWasmInitialized) {
6175 throw new Error("initializeWasm() must be awaited first!");
6177 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
6178 return decodeArray(nativeResponseValue);
6180 // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
6181 export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
6182 if(!isWasmInitialized) {
6183 throw new Error("initializeWasm() must be awaited first!");
6185 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
6186 // debug statements here
6188 // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
6189 export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
6190 if(!isWasmInitialized) {
6191 throw new Error("initializeWasm() must be awaited first!");
6193 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
6194 return decodeArray(nativeResponseValue);
6196 // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
6197 export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
6198 if(!isWasmInitialized) {
6199 throw new Error("initializeWasm() must be awaited first!");
6201 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
6202 // debug statements here
6204 // 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);
6205 export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
6206 if(!isWasmInitialized) {
6207 throw new Error("initializeWasm() must be awaited first!");
6209 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
6210 return nativeResponseValue;
6212 // void NetAddress_free(struct LDKNetAddress this_ptr);
6213 export function NetAddress_free(this_ptr: number): void {
6214 if(!isWasmInitialized) {
6215 throw new Error("initializeWasm() must be awaited first!");
6217 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
6218 // debug statements here
6220 // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
6221 export function NetAddress_clone(orig: number): number {
6222 if(!isWasmInitialized) {
6223 throw new Error("initializeWasm() must be awaited first!");
6225 const nativeResponseValue = wasm.NetAddress_clone(orig);
6226 return nativeResponseValue;
6228 // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
6229 export function NetAddress_write(obj: number): Uint8Array {
6230 if(!isWasmInitialized) {
6231 throw new Error("initializeWasm() must be awaited first!");
6233 const nativeResponseValue = wasm.NetAddress_write(obj);
6234 return decodeArray(nativeResponseValue);
6236 // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
6237 export function Result_read(ser: Uint8Array): number {
6238 if(!isWasmInitialized) {
6239 throw new Error("initializeWasm() must be awaited first!");
6241 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
6242 return nativeResponseValue;
6244 // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
6245 export function UnsignedNodeAnnouncement_free(this_ptr: number): void {
6246 if(!isWasmInitialized) {
6247 throw new Error("initializeWasm() must be awaited first!");
6249 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_ptr);
6250 // debug statements here
6252 // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
6253 export function UnsignedNodeAnnouncement_clone(orig: number): number {
6254 if(!isWasmInitialized) {
6255 throw new Error("initializeWasm() must be awaited first!");
6257 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
6258 return nativeResponseValue;
6260 // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
6261 export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
6262 if(!isWasmInitialized) {
6263 throw new Error("initializeWasm() must be awaited first!");
6265 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
6266 return nativeResponseValue;
6268 // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
6269 export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
6270 if(!isWasmInitialized) {
6271 throw new Error("initializeWasm() must be awaited first!");
6273 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
6274 // debug statements here
6276 // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
6277 export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
6278 if(!isWasmInitialized) {
6279 throw new Error("initializeWasm() must be awaited first!");
6281 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
6282 return nativeResponseValue;
6284 // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
6285 export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
6286 if(!isWasmInitialized) {
6287 throw new Error("initializeWasm() must be awaited first!");
6289 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
6290 // debug statements here
6292 // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
6293 export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
6294 if(!isWasmInitialized) {
6295 throw new Error("initializeWasm() must be awaited first!");
6297 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
6298 return decodeArray(nativeResponseValue);
6300 // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6301 export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
6302 if(!isWasmInitialized) {
6303 throw new Error("initializeWasm() must be awaited first!");
6305 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
6306 // debug statements here
6308 // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
6309 export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
6310 if(!isWasmInitialized) {
6311 throw new Error("initializeWasm() must be awaited first!");
6313 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
6314 return decodeArray(nativeResponseValue);
6316 // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
6317 export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
6318 if(!isWasmInitialized) {
6319 throw new Error("initializeWasm() must be awaited first!");
6321 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
6322 // debug statements here
6324 // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
6325 export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
6326 if(!isWasmInitialized) {
6327 throw new Error("initializeWasm() must be awaited first!");
6329 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
6330 return decodeArray(nativeResponseValue);
6332 // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6333 export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
6334 if(!isWasmInitialized) {
6335 throw new Error("initializeWasm() must be awaited first!");
6337 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
6338 // debug statements here
6340 // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
6341 export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
6342 if(!isWasmInitialized) {
6343 throw new Error("initializeWasm() must be awaited first!");
6345 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
6346 // debug statements here
6348 // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
6349 export function NodeAnnouncement_free(this_ptr: number): void {
6350 if(!isWasmInitialized) {
6351 throw new Error("initializeWasm() must be awaited first!");
6353 const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
6354 // debug statements here
6356 // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
6357 export function NodeAnnouncement_clone(orig: number): number {
6358 if(!isWasmInitialized) {
6359 throw new Error("initializeWasm() must be awaited first!");
6361 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
6362 return nativeResponseValue;
6364 // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
6365 export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
6366 if(!isWasmInitialized) {
6367 throw new Error("initializeWasm() must be awaited first!");
6369 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
6370 return decodeArray(nativeResponseValue);
6372 // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6373 export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
6374 if(!isWasmInitialized) {
6375 throw new Error("initializeWasm() must be awaited first!");
6377 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
6378 // debug statements here
6380 // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
6381 export function NodeAnnouncement_get_contents(this_ptr: number): number {
6382 if(!isWasmInitialized) {
6383 throw new Error("initializeWasm() must be awaited first!");
6385 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
6386 return nativeResponseValue;
6388 // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
6389 export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
6390 if(!isWasmInitialized) {
6391 throw new Error("initializeWasm() must be awaited first!");
6393 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
6394 // debug statements here
6396 // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
6397 export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
6398 if(!isWasmInitialized) {
6399 throw new Error("initializeWasm() must be awaited first!");
6401 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
6402 return nativeResponseValue;
6404 // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
6405 export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
6406 if(!isWasmInitialized) {
6407 throw new Error("initializeWasm() must be awaited first!");
6409 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
6410 // debug statements here
6412 // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
6413 export function UnsignedChannelAnnouncement_clone(orig: number): number {
6414 if(!isWasmInitialized) {
6415 throw new Error("initializeWasm() must be awaited first!");
6417 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
6418 return nativeResponseValue;
6420 // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6421 export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
6422 if(!isWasmInitialized) {
6423 throw new Error("initializeWasm() must be awaited first!");
6425 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
6426 return nativeResponseValue;
6428 // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
6429 export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
6430 if(!isWasmInitialized) {
6431 throw new Error("initializeWasm() must be awaited first!");
6433 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
6434 // debug statements here
6436 // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
6437 export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
6438 if(!isWasmInitialized) {
6439 throw new Error("initializeWasm() must be awaited first!");
6441 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
6442 return decodeArray(nativeResponseValue);
6444 // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6445 export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6446 if(!isWasmInitialized) {
6447 throw new Error("initializeWasm() must be awaited first!");
6449 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
6450 // debug statements here
6452 // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6453 export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
6454 if(!isWasmInitialized) {
6455 throw new Error("initializeWasm() must be awaited first!");
6457 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
6458 return nativeResponseValue;
6460 // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
6461 export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
6462 if(!isWasmInitialized) {
6463 throw new Error("initializeWasm() must be awaited first!");
6465 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
6466 // debug statements here
6468 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6469 export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
6470 if(!isWasmInitialized) {
6471 throw new Error("initializeWasm() must be awaited first!");
6473 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
6474 return decodeArray(nativeResponseValue);
6476 // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6477 export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
6478 if(!isWasmInitialized) {
6479 throw new Error("initializeWasm() must be awaited first!");
6481 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
6482 // debug statements here
6484 // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6485 export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
6486 if(!isWasmInitialized) {
6487 throw new Error("initializeWasm() must be awaited first!");
6489 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
6490 return decodeArray(nativeResponseValue);
6492 // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6493 export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
6494 if(!isWasmInitialized) {
6495 throw new Error("initializeWasm() must be awaited first!");
6497 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
6498 // debug statements here
6500 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6501 export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
6502 if(!isWasmInitialized) {
6503 throw new Error("initializeWasm() must be awaited first!");
6505 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
6506 return decodeArray(nativeResponseValue);
6508 // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6509 export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
6510 if(!isWasmInitialized) {
6511 throw new Error("initializeWasm() must be awaited first!");
6513 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
6514 // debug statements here
6516 // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
6517 export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
6518 if(!isWasmInitialized) {
6519 throw new Error("initializeWasm() must be awaited first!");
6521 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
6522 return decodeArray(nativeResponseValue);
6524 // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6525 export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
6526 if(!isWasmInitialized) {
6527 throw new Error("initializeWasm() must be awaited first!");
6529 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
6530 // debug statements here
6532 // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
6533 export function ChannelAnnouncement_free(this_ptr: number): void {
6534 if(!isWasmInitialized) {
6535 throw new Error("initializeWasm() must be awaited first!");
6537 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
6538 // debug statements here
6540 // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
6541 export function ChannelAnnouncement_clone(orig: number): number {
6542 if(!isWasmInitialized) {
6543 throw new Error("initializeWasm() must be awaited first!");
6545 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
6546 return nativeResponseValue;
6548 // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6549 export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
6550 if(!isWasmInitialized) {
6551 throw new Error("initializeWasm() must be awaited first!");
6553 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
6554 return decodeArray(nativeResponseValue);
6556 // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6557 export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
6558 if(!isWasmInitialized) {
6559 throw new Error("initializeWasm() must be awaited first!");
6561 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
6562 // debug statements here
6564 // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6565 export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
6566 if(!isWasmInitialized) {
6567 throw new Error("initializeWasm() must be awaited first!");
6569 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
6570 return decodeArray(nativeResponseValue);
6572 // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6573 export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
6574 if(!isWasmInitialized) {
6575 throw new Error("initializeWasm() must be awaited first!");
6577 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
6578 // debug statements here
6580 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6581 export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
6582 if(!isWasmInitialized) {
6583 throw new Error("initializeWasm() must be awaited first!");
6585 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
6586 return decodeArray(nativeResponseValue);
6588 // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6589 export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
6590 if(!isWasmInitialized) {
6591 throw new Error("initializeWasm() must be awaited first!");
6593 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
6594 // debug statements here
6596 // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6597 export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
6598 if(!isWasmInitialized) {
6599 throw new Error("initializeWasm() must be awaited first!");
6601 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
6602 return decodeArray(nativeResponseValue);
6604 // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
6605 export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
6606 if(!isWasmInitialized) {
6607 throw new Error("initializeWasm() must be awaited first!");
6609 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
6610 // debug statements here
6612 // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
6613 export function ChannelAnnouncement_get_contents(this_ptr: number): number {
6614 if(!isWasmInitialized) {
6615 throw new Error("initializeWasm() must be awaited first!");
6617 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
6618 return nativeResponseValue;
6620 // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
6621 export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
6622 if(!isWasmInitialized) {
6623 throw new Error("initializeWasm() must be awaited first!");
6625 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
6626 // debug statements here
6628 // 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);
6629 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 {
6630 if(!isWasmInitialized) {
6631 throw new Error("initializeWasm() must be awaited first!");
6633 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);
6634 return nativeResponseValue;
6636 // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
6637 export function UnsignedChannelUpdate_free(this_ptr: number): void {
6638 if(!isWasmInitialized) {
6639 throw new Error("initializeWasm() must be awaited first!");
6641 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
6642 // debug statements here
6644 // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
6645 export function UnsignedChannelUpdate_clone(orig: number): number {
6646 if(!isWasmInitialized) {
6647 throw new Error("initializeWasm() must be awaited first!");
6649 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
6650 return nativeResponseValue;
6652 // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
6653 export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
6654 if(!isWasmInitialized) {
6655 throw new Error("initializeWasm() must be awaited first!");
6657 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
6658 return decodeArray(nativeResponseValue);
6660 // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6661 export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6662 if(!isWasmInitialized) {
6663 throw new Error("initializeWasm() must be awaited first!");
6665 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
6666 // debug statements here
6668 // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6669 export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
6670 if(!isWasmInitialized) {
6671 throw new Error("initializeWasm() must be awaited first!");
6673 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
6674 return nativeResponseValue;
6676 // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
6677 export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
6678 if(!isWasmInitialized) {
6679 throw new Error("initializeWasm() must be awaited first!");
6681 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
6682 // debug statements here
6684 // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6685 export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
6686 if(!isWasmInitialized) {
6687 throw new Error("initializeWasm() must be awaited first!");
6689 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
6690 return nativeResponseValue;
6692 // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
6693 export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
6694 if(!isWasmInitialized) {
6695 throw new Error("initializeWasm() must be awaited first!");
6697 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
6698 // debug statements here
6700 // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6701 export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
6702 if(!isWasmInitialized) {
6703 throw new Error("initializeWasm() must be awaited first!");
6705 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
6706 return nativeResponseValue;
6708 // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
6709 export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
6710 if(!isWasmInitialized) {
6711 throw new Error("initializeWasm() must be awaited first!");
6713 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
6714 // debug statements here
6716 // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6717 export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
6718 if(!isWasmInitialized) {
6719 throw new Error("initializeWasm() must be awaited first!");
6721 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
6722 return nativeResponseValue;
6724 // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
6725 export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
6726 if(!isWasmInitialized) {
6727 throw new Error("initializeWasm() must be awaited first!");
6729 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
6730 // debug statements here
6732 // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6733 export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
6734 if(!isWasmInitialized) {
6735 throw new Error("initializeWasm() must be awaited first!");
6737 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
6738 return nativeResponseValue;
6740 // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
6741 export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
6742 if(!isWasmInitialized) {
6743 throw new Error("initializeWasm() must be awaited first!");
6745 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
6746 // debug statements here
6748 // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6749 export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
6750 if(!isWasmInitialized) {
6751 throw new Error("initializeWasm() must be awaited first!");
6753 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
6754 return nativeResponseValue;
6756 // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
6757 export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
6758 if(!isWasmInitialized) {
6759 throw new Error("initializeWasm() must be awaited first!");
6761 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
6762 // debug statements here
6764 // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
6765 export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
6766 if(!isWasmInitialized) {
6767 throw new Error("initializeWasm() must be awaited first!");
6769 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
6770 return nativeResponseValue;
6772 // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
6773 export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
6774 if(!isWasmInitialized) {
6775 throw new Error("initializeWasm() must be awaited first!");
6777 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
6778 // debug statements here
6780 // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
6781 export function ChannelUpdate_free(this_ptr: number): void {
6782 if(!isWasmInitialized) {
6783 throw new Error("initializeWasm() must be awaited first!");
6785 const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
6786 // debug statements here
6788 // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
6789 export function ChannelUpdate_clone(orig: number): number {
6790 if(!isWasmInitialized) {
6791 throw new Error("initializeWasm() must be awaited first!");
6793 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
6794 return nativeResponseValue;
6796 // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
6797 export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
6798 if(!isWasmInitialized) {
6799 throw new Error("initializeWasm() must be awaited first!");
6801 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
6802 return decodeArray(nativeResponseValue);
6804 // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
6805 export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
6806 if(!isWasmInitialized) {
6807 throw new Error("initializeWasm() must be awaited first!");
6809 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
6810 // debug statements here
6812 // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
6813 export function ChannelUpdate_get_contents(this_ptr: number): number {
6814 if(!isWasmInitialized) {
6815 throw new Error("initializeWasm() must be awaited first!");
6817 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
6818 return nativeResponseValue;
6820 // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
6821 export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
6822 if(!isWasmInitialized) {
6823 throw new Error("initializeWasm() must be awaited first!");
6825 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
6826 // debug statements here
6828 // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
6829 export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
6830 if(!isWasmInitialized) {
6831 throw new Error("initializeWasm() must be awaited first!");
6833 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
6834 return nativeResponseValue;
6836 // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
6837 export function QueryChannelRange_free(this_ptr: number): void {
6838 if(!isWasmInitialized) {
6839 throw new Error("initializeWasm() must be awaited first!");
6841 const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
6842 // debug statements here
6844 // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
6845 export function QueryChannelRange_clone(orig: number): number {
6846 if(!isWasmInitialized) {
6847 throw new Error("initializeWasm() must be awaited first!");
6849 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
6850 return nativeResponseValue;
6852 // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
6853 export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
6854 if(!isWasmInitialized) {
6855 throw new Error("initializeWasm() must be awaited first!");
6857 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
6858 return decodeArray(nativeResponseValue);
6860 // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6861 export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6862 if(!isWasmInitialized) {
6863 throw new Error("initializeWasm() must be awaited first!");
6865 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
6866 // debug statements here
6868 // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
6869 export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
6870 if(!isWasmInitialized) {
6871 throw new Error("initializeWasm() must be awaited first!");
6873 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
6874 return nativeResponseValue;
6876 // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6877 export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
6878 if(!isWasmInitialized) {
6879 throw new Error("initializeWasm() must be awaited first!");
6881 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
6882 // debug statements here
6884 // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
6885 export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
6886 if(!isWasmInitialized) {
6887 throw new Error("initializeWasm() must be awaited first!");
6889 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
6890 return nativeResponseValue;
6892 // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6893 export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
6894 if(!isWasmInitialized) {
6895 throw new Error("initializeWasm() must be awaited first!");
6897 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
6898 // debug statements here
6900 // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
6901 export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
6902 if(!isWasmInitialized) {
6903 throw new Error("initializeWasm() must be awaited first!");
6905 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
6906 return nativeResponseValue;
6908 // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
6909 export function ReplyChannelRange_free(this_ptr: number): void {
6910 if(!isWasmInitialized) {
6911 throw new Error("initializeWasm() must be awaited first!");
6913 const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
6914 // debug statements here
6916 // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
6917 export function ReplyChannelRange_clone(orig: number): number {
6918 if(!isWasmInitialized) {
6919 throw new Error("initializeWasm() must be awaited first!");
6921 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
6922 return nativeResponseValue;
6924 // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
6925 export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
6926 if(!isWasmInitialized) {
6927 throw new Error("initializeWasm() must be awaited first!");
6929 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
6930 return decodeArray(nativeResponseValue);
6932 // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6933 export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
6934 if(!isWasmInitialized) {
6935 throw new Error("initializeWasm() must be awaited first!");
6937 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
6938 // debug statements here
6940 // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
6941 export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
6942 if(!isWasmInitialized) {
6943 throw new Error("initializeWasm() must be awaited first!");
6945 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
6946 return nativeResponseValue;
6948 // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6949 export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
6950 if(!isWasmInitialized) {
6951 throw new Error("initializeWasm() must be awaited first!");
6953 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
6954 // debug statements here
6956 // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
6957 export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
6958 if(!isWasmInitialized) {
6959 throw new Error("initializeWasm() must be awaited first!");
6961 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
6962 return nativeResponseValue;
6964 // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
6965 export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
6966 if(!isWasmInitialized) {
6967 throw new Error("initializeWasm() must be awaited first!");
6969 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
6970 // debug statements here
6972 // bool ReplyChannelRange_get_full_information(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
6973 export function ReplyChannelRange_get_full_information(this_ptr: number): boolean {
6974 if(!isWasmInitialized) {
6975 throw new Error("initializeWasm() must be awaited first!");
6977 const nativeResponseValue = wasm.ReplyChannelRange_get_full_information(this_ptr);
6978 return nativeResponseValue;
6980 // void ReplyChannelRange_set_full_information(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
6981 export function ReplyChannelRange_set_full_information(this_ptr: number, val: boolean): void {
6982 if(!isWasmInitialized) {
6983 throw new Error("initializeWasm() must be awaited first!");
6985 const nativeResponseValue = wasm.ReplyChannelRange_set_full_information(this_ptr, val);
6986 // debug statements here
6988 // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
6989 export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
6990 if(!isWasmInitialized) {
6991 throw new Error("initializeWasm() must be awaited first!");
6993 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
6994 // debug statements here
6996 // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, struct LDKCVec_u64Z short_channel_ids_arg);
6997 export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, full_information_arg: boolean, short_channel_ids_arg: number[]): number {
6998 if(!isWasmInitialized) {
6999 throw new Error("initializeWasm() must be awaited first!");
7001 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
7002 return nativeResponseValue;
7004 // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
7005 export function QueryShortChannelIds_free(this_ptr: number): void {
7006 if(!isWasmInitialized) {
7007 throw new Error("initializeWasm() must be awaited first!");
7009 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
7010 // debug statements here
7012 // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
7013 export function QueryShortChannelIds_clone(orig: number): number {
7014 if(!isWasmInitialized) {
7015 throw new Error("initializeWasm() must be awaited first!");
7017 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
7018 return nativeResponseValue;
7020 // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
7021 export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
7022 if(!isWasmInitialized) {
7023 throw new Error("initializeWasm() must be awaited first!");
7025 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
7026 return decodeArray(nativeResponseValue);
7028 // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7029 export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7030 if(!isWasmInitialized) {
7031 throw new Error("initializeWasm() must be awaited first!");
7033 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
7034 // debug statements here
7036 // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
7037 export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
7038 if(!isWasmInitialized) {
7039 throw new Error("initializeWasm() must be awaited first!");
7041 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
7042 // debug statements here
7044 // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
7045 export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
7046 if(!isWasmInitialized) {
7047 throw new Error("initializeWasm() must be awaited first!");
7049 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
7050 return nativeResponseValue;
7052 // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
7053 export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
7054 if(!isWasmInitialized) {
7055 throw new Error("initializeWasm() must be awaited first!");
7057 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
7058 // debug statements here
7060 // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
7061 export function ReplyShortChannelIdsEnd_clone(orig: number): number {
7062 if(!isWasmInitialized) {
7063 throw new Error("initializeWasm() must be awaited first!");
7065 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
7066 return nativeResponseValue;
7068 // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
7069 export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
7070 if(!isWasmInitialized) {
7071 throw new Error("initializeWasm() must be awaited first!");
7073 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
7074 return decodeArray(nativeResponseValue);
7076 // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7077 export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7078 if(!isWasmInitialized) {
7079 throw new Error("initializeWasm() must be awaited first!");
7081 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
7082 // debug statements here
7084 // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
7085 export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
7086 if(!isWasmInitialized) {
7087 throw new Error("initializeWasm() must be awaited first!");
7089 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
7090 return nativeResponseValue;
7092 // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
7093 export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
7094 if(!isWasmInitialized) {
7095 throw new Error("initializeWasm() must be awaited first!");
7097 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
7098 // debug statements here
7100 // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
7101 export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
7102 if(!isWasmInitialized) {
7103 throw new Error("initializeWasm() must be awaited first!");
7105 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
7106 return nativeResponseValue;
7108 // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
7109 export function GossipTimestampFilter_free(this_ptr: number): void {
7110 if(!isWasmInitialized) {
7111 throw new Error("initializeWasm() must be awaited first!");
7113 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
7114 // debug statements here
7116 // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
7117 export function GossipTimestampFilter_clone(orig: number): number {
7118 if(!isWasmInitialized) {
7119 throw new Error("initializeWasm() must be awaited first!");
7121 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
7122 return nativeResponseValue;
7124 // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
7125 export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
7126 if(!isWasmInitialized) {
7127 throw new Error("initializeWasm() must be awaited first!");
7129 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
7130 return decodeArray(nativeResponseValue);
7132 // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7133 export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7134 if(!isWasmInitialized) {
7135 throw new Error("initializeWasm() must be awaited first!");
7137 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
7138 // debug statements here
7140 // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
7141 export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
7142 if(!isWasmInitialized) {
7143 throw new Error("initializeWasm() must be awaited first!");
7145 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
7146 return nativeResponseValue;
7148 // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
7149 export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
7150 if(!isWasmInitialized) {
7151 throw new Error("initializeWasm() must be awaited first!");
7153 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
7154 // debug statements here
7156 // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
7157 export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
7158 if(!isWasmInitialized) {
7159 throw new Error("initializeWasm() must be awaited first!");
7161 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
7162 return nativeResponseValue;
7164 // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
7165 export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
7166 if(!isWasmInitialized) {
7167 throw new Error("initializeWasm() must be awaited first!");
7169 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
7170 // debug statements here
7172 // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
7173 export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
7174 if(!isWasmInitialized) {
7175 throw new Error("initializeWasm() must be awaited first!");
7177 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
7178 return nativeResponseValue;
7180 // void ErrorAction_free(struct LDKErrorAction this_ptr);
7181 export function ErrorAction_free(this_ptr: number): void {
7182 if(!isWasmInitialized) {
7183 throw new Error("initializeWasm() must be awaited first!");
7185 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
7186 // debug statements here
7188 // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
7189 export function ErrorAction_clone(orig: number): number {
7190 if(!isWasmInitialized) {
7191 throw new Error("initializeWasm() must be awaited first!");
7193 const nativeResponseValue = wasm.ErrorAction_clone(orig);
7194 return nativeResponseValue;
7196 // void LightningError_free(struct LDKLightningError this_ptr);
7197 export function LightningError_free(this_ptr: number): void {
7198 if(!isWasmInitialized) {
7199 throw new Error("initializeWasm() must be awaited first!");
7201 const nativeResponseValue = wasm.LightningError_free(this_ptr);
7202 // debug statements here
7204 // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
7205 export function LightningError_get_err(this_ptr: number): String {
7206 if(!isWasmInitialized) {
7207 throw new Error("initializeWasm() must be awaited first!");
7209 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
7210 return nativeResponseValue;
7212 // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7213 export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
7214 if(!isWasmInitialized) {
7215 throw new Error("initializeWasm() must be awaited first!");
7217 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
7218 // debug statements here
7220 // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
7221 export function LightningError_get_action(this_ptr: number): number {
7222 if(!isWasmInitialized) {
7223 throw new Error("initializeWasm() must be awaited first!");
7225 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
7226 return nativeResponseValue;
7228 // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
7229 export function LightningError_set_action(this_ptr: number, val: number): void {
7230 if(!isWasmInitialized) {
7231 throw new Error("initializeWasm() must be awaited first!");
7233 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
7234 // debug statements here
7236 // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
7237 export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
7238 if(!isWasmInitialized) {
7239 throw new Error("initializeWasm() must be awaited first!");
7241 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
7242 return nativeResponseValue;
7244 // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
7245 export function CommitmentUpdate_free(this_ptr: number): void {
7246 if(!isWasmInitialized) {
7247 throw new Error("initializeWasm() must be awaited first!");
7249 const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
7250 // debug statements here
7252 // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
7253 export function CommitmentUpdate_clone(orig: number): number {
7254 if(!isWasmInitialized) {
7255 throw new Error("initializeWasm() must be awaited first!");
7257 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
7258 return nativeResponseValue;
7260 // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
7261 export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
7262 if(!isWasmInitialized) {
7263 throw new Error("initializeWasm() must be awaited first!");
7265 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
7266 // debug statements here
7268 // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
7269 export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
7270 if(!isWasmInitialized) {
7271 throw new Error("initializeWasm() must be awaited first!");
7273 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
7274 // debug statements here
7276 // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
7277 export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
7278 if(!isWasmInitialized) {
7279 throw new Error("initializeWasm() must be awaited first!");
7281 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
7282 // debug statements here
7284 // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
7285 export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
7286 if(!isWasmInitialized) {
7287 throw new Error("initializeWasm() must be awaited first!");
7289 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
7290 // debug statements here
7292 // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
7293 export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
7294 if(!isWasmInitialized) {
7295 throw new Error("initializeWasm() must be awaited first!");
7297 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
7298 return nativeResponseValue;
7300 // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
7301 export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
7302 if(!isWasmInitialized) {
7303 throw new Error("initializeWasm() must be awaited first!");
7305 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
7306 // debug statements here
7308 // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
7309 export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
7310 if(!isWasmInitialized) {
7311 throw new Error("initializeWasm() must be awaited first!");
7313 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
7314 return nativeResponseValue;
7316 // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
7317 export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
7318 if(!isWasmInitialized) {
7319 throw new Error("initializeWasm() must be awaited first!");
7321 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
7322 // debug statements here
7324 // 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);
7325 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 {
7326 if(!isWasmInitialized) {
7327 throw new Error("initializeWasm() must be awaited first!");
7329 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);
7330 return nativeResponseValue;
7332 // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
7333 export function HTLCFailChannelUpdate_free(this_ptr: number): void {
7334 if(!isWasmInitialized) {
7335 throw new Error("initializeWasm() must be awaited first!");
7337 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
7338 // debug statements here
7340 // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
7341 export function HTLCFailChannelUpdate_clone(orig: number): number {
7342 if(!isWasmInitialized) {
7343 throw new Error("initializeWasm() must be awaited first!");
7345 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
7346 return nativeResponseValue;
7348 // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
7349 export function ChannelMessageHandler_free(this_ptr: number): void {
7350 if(!isWasmInitialized) {
7351 throw new Error("initializeWasm() must be awaited first!");
7353 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
7354 // debug statements here
7356 // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
7357 export function RoutingMessageHandler_free(this_ptr: number): void {
7358 if(!isWasmInitialized) {
7359 throw new Error("initializeWasm() must be awaited first!");
7361 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
7362 // debug statements here
7364 // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
7365 export function AcceptChannel_write(obj: number): Uint8Array {
7366 if(!isWasmInitialized) {
7367 throw new Error("initializeWasm() must be awaited first!");
7369 const nativeResponseValue = wasm.AcceptChannel_write(obj);
7370 return decodeArray(nativeResponseValue);
7372 // struct LDKAcceptChannel AcceptChannel_read(struct LDKu8slice ser);
7373 export function AcceptChannel_read(ser: Uint8Array): number {
7374 if(!isWasmInitialized) {
7375 throw new Error("initializeWasm() must be awaited first!");
7377 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
7378 return nativeResponseValue;
7380 // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
7381 export function AnnouncementSignatures_write(obj: number): Uint8Array {
7382 if(!isWasmInitialized) {
7383 throw new Error("initializeWasm() must be awaited first!");
7385 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
7386 return decodeArray(nativeResponseValue);
7388 // struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice ser);
7389 export function AnnouncementSignatures_read(ser: Uint8Array): number {
7390 if(!isWasmInitialized) {
7391 throw new Error("initializeWasm() must be awaited first!");
7393 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
7394 return nativeResponseValue;
7396 // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
7397 export function ChannelReestablish_write(obj: number): Uint8Array {
7398 if(!isWasmInitialized) {
7399 throw new Error("initializeWasm() must be awaited first!");
7401 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
7402 return decodeArray(nativeResponseValue);
7404 // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
7405 export function ChannelReestablish_read(ser: Uint8Array): number {
7406 if(!isWasmInitialized) {
7407 throw new Error("initializeWasm() must be awaited first!");
7409 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
7410 return nativeResponseValue;
7412 // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
7413 export function ClosingSigned_write(obj: number): Uint8Array {
7414 if(!isWasmInitialized) {
7415 throw new Error("initializeWasm() must be awaited first!");
7417 const nativeResponseValue = wasm.ClosingSigned_write(obj);
7418 return decodeArray(nativeResponseValue);
7420 // struct LDKClosingSigned ClosingSigned_read(struct LDKu8slice ser);
7421 export function ClosingSigned_read(ser: Uint8Array): number {
7422 if(!isWasmInitialized) {
7423 throw new Error("initializeWasm() must be awaited first!");
7425 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
7426 return nativeResponseValue;
7428 // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
7429 export function CommitmentSigned_write(obj: number): Uint8Array {
7430 if(!isWasmInitialized) {
7431 throw new Error("initializeWasm() must be awaited first!");
7433 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
7434 return decodeArray(nativeResponseValue);
7436 // struct LDKCommitmentSigned CommitmentSigned_read(struct LDKu8slice ser);
7437 export function CommitmentSigned_read(ser: Uint8Array): number {
7438 if(!isWasmInitialized) {
7439 throw new Error("initializeWasm() must be awaited first!");
7441 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
7442 return nativeResponseValue;
7444 // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
7445 export function FundingCreated_write(obj: number): Uint8Array {
7446 if(!isWasmInitialized) {
7447 throw new Error("initializeWasm() must be awaited first!");
7449 const nativeResponseValue = wasm.FundingCreated_write(obj);
7450 return decodeArray(nativeResponseValue);
7452 // struct LDKFundingCreated FundingCreated_read(struct LDKu8slice ser);
7453 export function FundingCreated_read(ser: Uint8Array): number {
7454 if(!isWasmInitialized) {
7455 throw new Error("initializeWasm() must be awaited first!");
7457 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
7458 return nativeResponseValue;
7460 // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
7461 export function FundingSigned_write(obj: number): Uint8Array {
7462 if(!isWasmInitialized) {
7463 throw new Error("initializeWasm() must be awaited first!");
7465 const nativeResponseValue = wasm.FundingSigned_write(obj);
7466 return decodeArray(nativeResponseValue);
7468 // struct LDKFundingSigned FundingSigned_read(struct LDKu8slice ser);
7469 export function FundingSigned_read(ser: Uint8Array): number {
7470 if(!isWasmInitialized) {
7471 throw new Error("initializeWasm() must be awaited first!");
7473 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
7474 return nativeResponseValue;
7476 // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
7477 export function FundingLocked_write(obj: number): Uint8Array {
7478 if(!isWasmInitialized) {
7479 throw new Error("initializeWasm() must be awaited first!");
7481 const nativeResponseValue = wasm.FundingLocked_write(obj);
7482 return decodeArray(nativeResponseValue);
7484 // struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser);
7485 export function FundingLocked_read(ser: Uint8Array): number {
7486 if(!isWasmInitialized) {
7487 throw new Error("initializeWasm() must be awaited first!");
7489 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
7490 return nativeResponseValue;
7492 // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
7493 export function Init_write(obj: number): Uint8Array {
7494 if(!isWasmInitialized) {
7495 throw new Error("initializeWasm() must be awaited first!");
7497 const nativeResponseValue = wasm.Init_write(obj);
7498 return decodeArray(nativeResponseValue);
7500 // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
7501 export function Init_read(ser: Uint8Array): number {
7502 if(!isWasmInitialized) {
7503 throw new Error("initializeWasm() must be awaited first!");
7505 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
7506 return nativeResponseValue;
7508 // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
7509 export function OpenChannel_write(obj: number): Uint8Array {
7510 if(!isWasmInitialized) {
7511 throw new Error("initializeWasm() must be awaited first!");
7513 const nativeResponseValue = wasm.OpenChannel_write(obj);
7514 return decodeArray(nativeResponseValue);
7516 // struct LDKOpenChannel OpenChannel_read(struct LDKu8slice ser);
7517 export function OpenChannel_read(ser: Uint8Array): number {
7518 if(!isWasmInitialized) {
7519 throw new Error("initializeWasm() must be awaited first!");
7521 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
7522 return nativeResponseValue;
7524 // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
7525 export function RevokeAndACK_write(obj: number): Uint8Array {
7526 if(!isWasmInitialized) {
7527 throw new Error("initializeWasm() must be awaited first!");
7529 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
7530 return decodeArray(nativeResponseValue);
7532 // struct LDKRevokeAndACK RevokeAndACK_read(struct LDKu8slice ser);
7533 export function RevokeAndACK_read(ser: Uint8Array): number {
7534 if(!isWasmInitialized) {
7535 throw new Error("initializeWasm() must be awaited first!");
7537 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
7538 return nativeResponseValue;
7540 // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
7541 export function Shutdown_write(obj: number): Uint8Array {
7542 if(!isWasmInitialized) {
7543 throw new Error("initializeWasm() must be awaited first!");
7545 const nativeResponseValue = wasm.Shutdown_write(obj);
7546 return decodeArray(nativeResponseValue);
7548 // struct LDKShutdown Shutdown_read(struct LDKu8slice ser);
7549 export function Shutdown_read(ser: Uint8Array): number {
7550 if(!isWasmInitialized) {
7551 throw new Error("initializeWasm() must be awaited first!");
7553 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
7554 return nativeResponseValue;
7556 // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
7557 export function UpdateFailHTLC_write(obj: number): Uint8Array {
7558 if(!isWasmInitialized) {
7559 throw new Error("initializeWasm() must be awaited first!");
7561 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
7562 return decodeArray(nativeResponseValue);
7564 // struct LDKUpdateFailHTLC UpdateFailHTLC_read(struct LDKu8slice ser);
7565 export function UpdateFailHTLC_read(ser: Uint8Array): number {
7566 if(!isWasmInitialized) {
7567 throw new Error("initializeWasm() must be awaited first!");
7569 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
7570 return nativeResponseValue;
7572 // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
7573 export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
7574 if(!isWasmInitialized) {
7575 throw new Error("initializeWasm() must be awaited first!");
7577 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
7578 return decodeArray(nativeResponseValue);
7580 // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
7581 export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
7582 if(!isWasmInitialized) {
7583 throw new Error("initializeWasm() must be awaited first!");
7585 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
7586 return nativeResponseValue;
7588 // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
7589 export function UpdateFee_write(obj: number): Uint8Array {
7590 if(!isWasmInitialized) {
7591 throw new Error("initializeWasm() must be awaited first!");
7593 const nativeResponseValue = wasm.UpdateFee_write(obj);
7594 return decodeArray(nativeResponseValue);
7596 // struct LDKUpdateFee UpdateFee_read(struct LDKu8slice ser);
7597 export function UpdateFee_read(ser: Uint8Array): number {
7598 if(!isWasmInitialized) {
7599 throw new Error("initializeWasm() must be awaited first!");
7601 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
7602 return nativeResponseValue;
7604 // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
7605 export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
7606 if(!isWasmInitialized) {
7607 throw new Error("initializeWasm() must be awaited first!");
7609 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
7610 return decodeArray(nativeResponseValue);
7612 // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_read(struct LDKu8slice ser);
7613 export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
7614 if(!isWasmInitialized) {
7615 throw new Error("initializeWasm() must be awaited first!");
7617 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
7618 return nativeResponseValue;
7620 // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
7621 export function UpdateAddHTLC_write(obj: number): Uint8Array {
7622 if(!isWasmInitialized) {
7623 throw new Error("initializeWasm() must be awaited first!");
7625 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
7626 return decodeArray(nativeResponseValue);
7628 // struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser);
7629 export function UpdateAddHTLC_read(ser: Uint8Array): number {
7630 if(!isWasmInitialized) {
7631 throw new Error("initializeWasm() must be awaited first!");
7633 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
7634 return nativeResponseValue;
7636 // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
7637 export function Ping_write(obj: number): Uint8Array {
7638 if(!isWasmInitialized) {
7639 throw new Error("initializeWasm() must be awaited first!");
7641 const nativeResponseValue = wasm.Ping_write(obj);
7642 return decodeArray(nativeResponseValue);
7644 // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
7645 export function Ping_read(ser: Uint8Array): number {
7646 if(!isWasmInitialized) {
7647 throw new Error("initializeWasm() must be awaited first!");
7649 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
7650 return nativeResponseValue;
7652 // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
7653 export function Pong_write(obj: number): Uint8Array {
7654 if(!isWasmInitialized) {
7655 throw new Error("initializeWasm() must be awaited first!");
7657 const nativeResponseValue = wasm.Pong_write(obj);
7658 return decodeArray(nativeResponseValue);
7660 // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
7661 export function Pong_read(ser: Uint8Array): number {
7662 if(!isWasmInitialized) {
7663 throw new Error("initializeWasm() must be awaited first!");
7665 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
7666 return nativeResponseValue;
7668 // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
7669 export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
7670 if(!isWasmInitialized) {
7671 throw new Error("initializeWasm() must be awaited first!");
7673 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
7674 return decodeArray(nativeResponseValue);
7676 // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
7677 export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
7678 if(!isWasmInitialized) {
7679 throw new Error("initializeWasm() must be awaited first!");
7681 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
7682 return nativeResponseValue;
7684 // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
7685 export function ChannelAnnouncement_write(obj: number): Uint8Array {
7686 if(!isWasmInitialized) {
7687 throw new Error("initializeWasm() must be awaited first!");
7689 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
7690 return decodeArray(nativeResponseValue);
7692 // struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser);
7693 export function ChannelAnnouncement_read(ser: Uint8Array): number {
7694 if(!isWasmInitialized) {
7695 throw new Error("initializeWasm() must be awaited first!");
7697 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
7698 return nativeResponseValue;
7700 // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
7701 export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
7702 if(!isWasmInitialized) {
7703 throw new Error("initializeWasm() must be awaited first!");
7705 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
7706 return decodeArray(nativeResponseValue);
7708 // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
7709 export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
7710 if(!isWasmInitialized) {
7711 throw new Error("initializeWasm() must be awaited first!");
7713 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
7714 return nativeResponseValue;
7716 // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
7717 export function ChannelUpdate_write(obj: number): Uint8Array {
7718 if(!isWasmInitialized) {
7719 throw new Error("initializeWasm() must be awaited first!");
7721 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
7722 return decodeArray(nativeResponseValue);
7724 // struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser);
7725 export function ChannelUpdate_read(ser: Uint8Array): number {
7726 if(!isWasmInitialized) {
7727 throw new Error("initializeWasm() must be awaited first!");
7729 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
7730 return nativeResponseValue;
7732 // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
7733 export function ErrorMessage_write(obj: number): Uint8Array {
7734 if(!isWasmInitialized) {
7735 throw new Error("initializeWasm() must be awaited first!");
7737 const nativeResponseValue = wasm.ErrorMessage_write(obj);
7738 return decodeArray(nativeResponseValue);
7740 // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
7741 export function ErrorMessage_read(ser: Uint8Array): number {
7742 if(!isWasmInitialized) {
7743 throw new Error("initializeWasm() must be awaited first!");
7745 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
7746 return nativeResponseValue;
7748 // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
7749 export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
7750 if(!isWasmInitialized) {
7751 throw new Error("initializeWasm() must be awaited first!");
7753 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
7754 return decodeArray(nativeResponseValue);
7756 // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
7757 export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
7758 if(!isWasmInitialized) {
7759 throw new Error("initializeWasm() must be awaited first!");
7761 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
7762 return nativeResponseValue;
7764 // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
7765 export function NodeAnnouncement_write(obj: number): Uint8Array {
7766 if(!isWasmInitialized) {
7767 throw new Error("initializeWasm() must be awaited first!");
7769 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
7770 return decodeArray(nativeResponseValue);
7772 // struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser);
7773 export function NodeAnnouncement_read(ser: Uint8Array): number {
7774 if(!isWasmInitialized) {
7775 throw new Error("initializeWasm() must be awaited first!");
7777 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
7778 return nativeResponseValue;
7780 // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
7781 export function QueryShortChannelIds_read(ser: Uint8Array): number {
7782 if(!isWasmInitialized) {
7783 throw new Error("initializeWasm() must be awaited first!");
7785 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
7786 return nativeResponseValue;
7788 // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
7789 export function QueryShortChannelIds_write(obj: number): Uint8Array {
7790 if(!isWasmInitialized) {
7791 throw new Error("initializeWasm() must be awaited first!");
7793 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
7794 return decodeArray(nativeResponseValue);
7796 // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
7797 export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
7798 if(!isWasmInitialized) {
7799 throw new Error("initializeWasm() must be awaited first!");
7801 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
7802 return nativeResponseValue;
7804 // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
7805 export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
7806 if(!isWasmInitialized) {
7807 throw new Error("initializeWasm() must be awaited first!");
7809 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
7810 return decodeArray(nativeResponseValue);
7812 // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
7813 export function QueryChannelRange_read(ser: Uint8Array): number {
7814 if(!isWasmInitialized) {
7815 throw new Error("initializeWasm() must be awaited first!");
7817 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
7818 return nativeResponseValue;
7820 // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
7821 export function QueryChannelRange_write(obj: number): Uint8Array {
7822 if(!isWasmInitialized) {
7823 throw new Error("initializeWasm() must be awaited first!");
7825 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
7826 return decodeArray(nativeResponseValue);
7828 // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
7829 export function ReplyChannelRange_read(ser: Uint8Array): number {
7830 if(!isWasmInitialized) {
7831 throw new Error("initializeWasm() must be awaited first!");
7833 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
7834 return nativeResponseValue;
7836 // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
7837 export function ReplyChannelRange_write(obj: number): Uint8Array {
7838 if(!isWasmInitialized) {
7839 throw new Error("initializeWasm() must be awaited first!");
7841 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
7842 return decodeArray(nativeResponseValue);
7844 // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
7845 export function GossipTimestampFilter_read(ser: Uint8Array): number {
7846 if(!isWasmInitialized) {
7847 throw new Error("initializeWasm() must be awaited first!");
7849 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
7850 return nativeResponseValue;
7852 // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
7853 export function GossipTimestampFilter_write(obj: number): Uint8Array {
7854 if(!isWasmInitialized) {
7855 throw new Error("initializeWasm() must be awaited first!");
7857 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
7858 return decodeArray(nativeResponseValue);
7860 // void MessageHandler_free(struct LDKMessageHandler this_ptr);
7861 export function MessageHandler_free(this_ptr: number): void {
7862 if(!isWasmInitialized) {
7863 throw new Error("initializeWasm() must be awaited first!");
7865 const nativeResponseValue = wasm.MessageHandler_free(this_ptr);
7866 // debug statements here
7868 // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
7869 export function MessageHandler_get_chan_handler(this_ptr: number): number {
7870 if(!isWasmInitialized) {
7871 throw new Error("initializeWasm() must be awaited first!");
7873 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
7874 return nativeResponseValue;
7876 // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
7877 export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
7878 if(!isWasmInitialized) {
7879 throw new Error("initializeWasm() must be awaited first!");
7881 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
7882 // debug statements here
7884 // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
7885 export function MessageHandler_get_route_handler(this_ptr: number): number {
7886 if(!isWasmInitialized) {
7887 throw new Error("initializeWasm() must be awaited first!");
7889 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
7890 return nativeResponseValue;
7892 // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
7893 export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
7894 if(!isWasmInitialized) {
7895 throw new Error("initializeWasm() must be awaited first!");
7897 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
7898 // debug statements here
7900 // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
7901 export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
7902 if(!isWasmInitialized) {
7903 throw new Error("initializeWasm() must be awaited first!");
7905 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
7906 return nativeResponseValue;
7908 // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
7909 export function SocketDescriptor_clone(orig: number): number {
7910 if(!isWasmInitialized) {
7911 throw new Error("initializeWasm() must be awaited first!");
7913 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
7914 return nativeResponseValue;
7916 // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
7917 export function SocketDescriptor_free(this_ptr: number): void {
7918 if(!isWasmInitialized) {
7919 throw new Error("initializeWasm() must be awaited first!");
7921 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
7922 // debug statements here
7924 // void PeerHandleError_free(struct LDKPeerHandleError this_ptr);
7925 export function PeerHandleError_free(this_ptr: number): void {
7926 if(!isWasmInitialized) {
7927 throw new Error("initializeWasm() must be awaited first!");
7929 const nativeResponseValue = wasm.PeerHandleError_free(this_ptr);
7930 // debug statements here
7932 // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
7933 export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
7934 if(!isWasmInitialized) {
7935 throw new Error("initializeWasm() must be awaited first!");
7937 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
7938 return nativeResponseValue;
7940 // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
7941 export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
7942 if(!isWasmInitialized) {
7943 throw new Error("initializeWasm() must be awaited first!");
7945 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
7946 // debug statements here
7948 // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
7949 export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
7950 if(!isWasmInitialized) {
7951 throw new Error("initializeWasm() must be awaited first!");
7953 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
7954 return nativeResponseValue;
7956 // void PeerManager_free(struct LDKPeerManager this_ptr);
7957 export function PeerManager_free(this_ptr: number): void {
7958 if(!isWasmInitialized) {
7959 throw new Error("initializeWasm() must be awaited first!");
7961 const nativeResponseValue = wasm.PeerManager_free(this_ptr);
7962 // debug statements here
7964 // 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);
7965 export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
7966 if(!isWasmInitialized) {
7967 throw new Error("initializeWasm() must be awaited first!");
7969 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
7970 return nativeResponseValue;
7972 // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
7973 export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
7974 if(!isWasmInitialized) {
7975 throw new Error("initializeWasm() must be awaited first!");
7977 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
7978 return nativeResponseValue;
7980 // 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);
7981 export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
7982 if(!isWasmInitialized) {
7983 throw new Error("initializeWasm() must be awaited first!");
7985 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
7986 return nativeResponseValue;
7988 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
7989 export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
7990 if(!isWasmInitialized) {
7991 throw new Error("initializeWasm() must be awaited first!");
7993 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
7994 return nativeResponseValue;
7996 // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
7997 export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
7998 if(!isWasmInitialized) {
7999 throw new Error("initializeWasm() must be awaited first!");
8001 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
8002 return nativeResponseValue;
8004 // 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);
8005 export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
8006 if(!isWasmInitialized) {
8007 throw new Error("initializeWasm() must be awaited first!");
8009 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
8010 return nativeResponseValue;
8012 // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
8013 export function PeerManager_process_events(this_arg: number): void {
8014 if(!isWasmInitialized) {
8015 throw new Error("initializeWasm() must be awaited first!");
8017 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
8018 // debug statements here
8020 // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
8021 export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
8022 if(!isWasmInitialized) {
8023 throw new Error("initializeWasm() must be awaited first!");
8025 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
8026 // debug statements here
8028 // void PeerManager_timer_tick_occured(const struct LDKPeerManager *NONNULL_PTR this_arg);
8029 export function PeerManager_timer_tick_occured(this_arg: number): void {
8030 if(!isWasmInitialized) {
8031 throw new Error("initializeWasm() must be awaited first!");
8033 const nativeResponseValue = wasm.PeerManager_timer_tick_occured(this_arg);
8034 // debug statements here
8036 // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
8037 export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
8038 if(!isWasmInitialized) {
8039 throw new Error("initializeWasm() must be awaited first!");
8041 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
8042 return decodeArray(nativeResponseValue);
8044 // struct LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
8045 export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
8046 if(!isWasmInitialized) {
8047 throw new Error("initializeWasm() must be awaited first!");
8049 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
8050 return nativeResponseValue;
8052 // struct LDKCResult_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
8053 export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
8054 if(!isWasmInitialized) {
8055 throw new Error("initializeWasm() must be awaited first!");
8057 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
8058 return nativeResponseValue;
8060 // struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
8061 export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
8062 if(!isWasmInitialized) {
8063 throw new Error("initializeWasm() must be awaited first!");
8065 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
8066 return nativeResponseValue;
8068 // struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
8069 export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
8070 if(!isWasmInitialized) {
8071 throw new Error("initializeWasm() must be awaited first!");
8073 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
8074 return nativeResponseValue;
8076 // void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
8077 export function TxCreationKeys_free(this_ptr: number): void {
8078 if(!isWasmInitialized) {
8079 throw new Error("initializeWasm() must be awaited first!");
8081 const nativeResponseValue = wasm.TxCreationKeys_free(this_ptr);
8082 // debug statements here
8084 // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
8085 export function TxCreationKeys_clone(orig: number): number {
8086 if(!isWasmInitialized) {
8087 throw new Error("initializeWasm() must be awaited first!");
8089 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
8090 return nativeResponseValue;
8092 // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8093 export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
8094 if(!isWasmInitialized) {
8095 throw new Error("initializeWasm() must be awaited first!");
8097 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
8098 return decodeArray(nativeResponseValue);
8100 // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8101 export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8102 if(!isWasmInitialized) {
8103 throw new Error("initializeWasm() must be awaited first!");
8105 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
8106 // debug statements here
8108 // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8109 export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
8110 if(!isWasmInitialized) {
8111 throw new Error("initializeWasm() must be awaited first!");
8113 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
8114 return decodeArray(nativeResponseValue);
8116 // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8117 export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
8118 if(!isWasmInitialized) {
8119 throw new Error("initializeWasm() must be awaited first!");
8121 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
8122 // debug statements here
8124 // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8125 export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
8126 if(!isWasmInitialized) {
8127 throw new Error("initializeWasm() must be awaited first!");
8129 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
8130 return decodeArray(nativeResponseValue);
8132 // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8133 export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
8134 if(!isWasmInitialized) {
8135 throw new Error("initializeWasm() must be awaited first!");
8137 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
8138 // debug statements here
8140 // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8141 export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
8142 if(!isWasmInitialized) {
8143 throw new Error("initializeWasm() must be awaited first!");
8145 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
8146 return decodeArray(nativeResponseValue);
8148 // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8149 export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
8150 if(!isWasmInitialized) {
8151 throw new Error("initializeWasm() must be awaited first!");
8153 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
8154 // debug statements here
8156 // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
8157 export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
8158 if(!isWasmInitialized) {
8159 throw new Error("initializeWasm() must be awaited first!");
8161 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
8162 return decodeArray(nativeResponseValue);
8164 // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8165 export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
8166 if(!isWasmInitialized) {
8167 throw new Error("initializeWasm() must be awaited first!");
8169 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
8170 // debug statements here
8172 // 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);
8173 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 {
8174 if(!isWasmInitialized) {
8175 throw new Error("initializeWasm() must be awaited first!");
8177 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));
8178 return nativeResponseValue;
8180 // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
8181 export function TxCreationKeys_write(obj: number): Uint8Array {
8182 if(!isWasmInitialized) {
8183 throw new Error("initializeWasm() must be awaited first!");
8185 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
8186 return decodeArray(nativeResponseValue);
8188 // struct LDKTxCreationKeys TxCreationKeys_read(struct LDKu8slice ser);
8189 export function TxCreationKeys_read(ser: Uint8Array): number {
8190 if(!isWasmInitialized) {
8191 throw new Error("initializeWasm() must be awaited first!");
8193 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
8194 return nativeResponseValue;
8196 // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_ptr);
8197 export function ChannelPublicKeys_free(this_ptr: number): void {
8198 if(!isWasmInitialized) {
8199 throw new Error("initializeWasm() must be awaited first!");
8201 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_ptr);
8202 // debug statements here
8204 // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
8205 export function ChannelPublicKeys_clone(orig: number): number {
8206 if(!isWasmInitialized) {
8207 throw new Error("initializeWasm() must be awaited first!");
8209 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
8210 return nativeResponseValue;
8212 // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8213 export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
8214 if(!isWasmInitialized) {
8215 throw new Error("initializeWasm() must be awaited first!");
8217 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
8218 return decodeArray(nativeResponseValue);
8220 // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8221 export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
8222 if(!isWasmInitialized) {
8223 throw new Error("initializeWasm() must be awaited first!");
8225 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
8226 // debug statements here
8228 // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8229 export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
8230 if(!isWasmInitialized) {
8231 throw new Error("initializeWasm() must be awaited first!");
8233 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
8234 return decodeArray(nativeResponseValue);
8236 // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8237 export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
8238 if(!isWasmInitialized) {
8239 throw new Error("initializeWasm() must be awaited first!");
8241 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
8242 // debug statements here
8244 // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8245 export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
8246 if(!isWasmInitialized) {
8247 throw new Error("initializeWasm() must be awaited first!");
8249 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
8250 return decodeArray(nativeResponseValue);
8252 // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8253 export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
8254 if(!isWasmInitialized) {
8255 throw new Error("initializeWasm() must be awaited first!");
8257 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
8258 // debug statements here
8260 // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8261 export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
8262 if(!isWasmInitialized) {
8263 throw new Error("initializeWasm() must be awaited first!");
8265 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
8266 return decodeArray(nativeResponseValue);
8268 // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8269 export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
8270 if(!isWasmInitialized) {
8271 throw new Error("initializeWasm() must be awaited first!");
8273 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
8274 // debug statements here
8276 // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
8277 export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
8278 if(!isWasmInitialized) {
8279 throw new Error("initializeWasm() must be awaited first!");
8281 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
8282 return decodeArray(nativeResponseValue);
8284 // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8285 export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
8286 if(!isWasmInitialized) {
8287 throw new Error("initializeWasm() must be awaited first!");
8289 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
8290 // debug statements here
8292 // 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);
8293 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 {
8294 if(!isWasmInitialized) {
8295 throw new Error("initializeWasm() must be awaited first!");
8297 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));
8298 return nativeResponseValue;
8300 // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
8301 export function ChannelPublicKeys_write(obj: number): Uint8Array {
8302 if(!isWasmInitialized) {
8303 throw new Error("initializeWasm() must be awaited first!");
8305 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
8306 return decodeArray(nativeResponseValue);
8308 // struct LDKChannelPublicKeys ChannelPublicKeys_read(struct LDKu8slice ser);
8309 export function ChannelPublicKeys_read(ser: Uint8Array): number {
8310 if(!isWasmInitialized) {
8311 throw new Error("initializeWasm() must be awaited first!");
8313 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
8314 return nativeResponseValue;
8316 // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ 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);
8317 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 {
8318 if(!isWasmInitialized) {
8319 throw new Error("initializeWasm() must be awaited first!");
8321 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));
8322 return nativeResponseValue;
8324 // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
8325 export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
8326 if(!isWasmInitialized) {
8327 throw new Error("initializeWasm() must be awaited first!");
8329 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
8330 return nativeResponseValue;
8332 // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
8333 export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
8334 if(!isWasmInitialized) {
8335 throw new Error("initializeWasm() must be awaited first!");
8337 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
8338 return decodeArray(nativeResponseValue);
8340 // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_ptr);
8341 export function HTLCOutputInCommitment_free(this_ptr: number): void {
8342 if(!isWasmInitialized) {
8343 throw new Error("initializeWasm() must be awaited first!");
8345 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_ptr);
8346 // debug statements here
8348 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
8349 export function HTLCOutputInCommitment_clone(orig: number): number {
8350 if(!isWasmInitialized) {
8351 throw new Error("initializeWasm() must be awaited first!");
8353 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
8354 return nativeResponseValue;
8356 // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
8357 export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
8358 if(!isWasmInitialized) {
8359 throw new Error("initializeWasm() must be awaited first!");
8361 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
8362 return nativeResponseValue;
8364 // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
8365 export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
8366 if(!isWasmInitialized) {
8367 throw new Error("initializeWasm() must be awaited first!");
8369 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
8370 // debug statements here
8372 // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
8373 export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
8374 if(!isWasmInitialized) {
8375 throw new Error("initializeWasm() must be awaited first!");
8377 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
8378 return nativeResponseValue;
8380 // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
8381 export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
8382 if(!isWasmInitialized) {
8383 throw new Error("initializeWasm() must be awaited first!");
8385 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
8386 // debug statements here
8388 // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
8389 export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
8390 if(!isWasmInitialized) {
8391 throw new Error("initializeWasm() must be awaited first!");
8393 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
8394 return nativeResponseValue;
8396 // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
8397 export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
8398 if(!isWasmInitialized) {
8399 throw new Error("initializeWasm() must be awaited first!");
8401 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
8402 // debug statements here
8404 // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
8405 export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
8406 if(!isWasmInitialized) {
8407 throw new Error("initializeWasm() must be awaited first!");
8409 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
8410 return decodeArray(nativeResponseValue);
8412 // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8413 export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
8414 if(!isWasmInitialized) {
8415 throw new Error("initializeWasm() must be awaited first!");
8417 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
8418 // debug statements here
8420 // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
8421 export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
8422 if(!isWasmInitialized) {
8423 throw new Error("initializeWasm() must be awaited first!");
8425 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
8426 return decodeArray(nativeResponseValue);
8428 // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(struct LDKu8slice ser);
8429 export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
8430 if(!isWasmInitialized) {
8431 throw new Error("initializeWasm() must be awaited first!");
8433 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
8434 return nativeResponseValue;
8436 // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
8437 export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
8438 if(!isWasmInitialized) {
8439 throw new Error("initializeWasm() must be awaited first!");
8441 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
8442 return decodeArray(nativeResponseValue);
8444 // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
8445 export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
8446 if(!isWasmInitialized) {
8447 throw new Error("initializeWasm() must be awaited first!");
8449 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
8450 return decodeArray(nativeResponseValue);
8452 // struct LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[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);
8453 export function build_htlc_transaction(prev_hash: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
8454 if(!isWasmInitialized) {
8455 throw new Error("initializeWasm() must be awaited first!");
8457 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
8458 return decodeArray(nativeResponseValue);
8460 // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_ptr);
8461 export function ChannelTransactionParameters_free(this_ptr: number): void {
8462 if(!isWasmInitialized) {
8463 throw new Error("initializeWasm() must be awaited first!");
8465 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_ptr);
8466 // debug statements here
8468 // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
8469 export function ChannelTransactionParameters_clone(orig: number): number {
8470 if(!isWasmInitialized) {
8471 throw new Error("initializeWasm() must be awaited first!");
8473 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
8474 return nativeResponseValue;
8476 // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8477 export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
8478 if(!isWasmInitialized) {
8479 throw new Error("initializeWasm() must be awaited first!");
8481 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
8482 return nativeResponseValue;
8484 // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
8485 export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
8486 if(!isWasmInitialized) {
8487 throw new Error("initializeWasm() must be awaited first!");
8489 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
8490 // debug statements here
8492 // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8493 export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
8494 if(!isWasmInitialized) {
8495 throw new Error("initializeWasm() must be awaited first!");
8497 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
8498 return nativeResponseValue;
8500 // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
8501 export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
8502 if(!isWasmInitialized) {
8503 throw new Error("initializeWasm() must be awaited first!");
8505 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
8506 // debug statements here
8508 // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8509 export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
8510 if(!isWasmInitialized) {
8511 throw new Error("initializeWasm() must be awaited first!");
8513 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
8514 return nativeResponseValue;
8516 // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
8517 export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
8518 if(!isWasmInitialized) {
8519 throw new Error("initializeWasm() must be awaited first!");
8521 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
8522 // debug statements here
8524 // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8525 export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
8526 if(!isWasmInitialized) {
8527 throw new Error("initializeWasm() must be awaited first!");
8529 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
8530 return nativeResponseValue;
8532 // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
8533 export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
8534 if(!isWasmInitialized) {
8535 throw new Error("initializeWasm() must be awaited first!");
8537 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
8538 // debug statements here
8540 // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
8541 export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
8542 if(!isWasmInitialized) {
8543 throw new Error("initializeWasm() must be awaited first!");
8545 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
8546 return nativeResponseValue;
8548 // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8549 export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
8550 if(!isWasmInitialized) {
8551 throw new Error("initializeWasm() must be awaited first!");
8553 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
8554 // debug statements here
8556 // 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);
8557 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 {
8558 if(!isWasmInitialized) {
8559 throw new Error("initializeWasm() must be awaited first!");
8561 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
8562 return nativeResponseValue;
8564 // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
8565 export function CounterpartyChannelTransactionParameters_free(this_ptr: number): void {
8566 if(!isWasmInitialized) {
8567 throw new Error("initializeWasm() must be awaited first!");
8569 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
8570 // debug statements here
8572 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
8573 export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
8574 if(!isWasmInitialized) {
8575 throw new Error("initializeWasm() must be awaited first!");
8577 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
8578 return nativeResponseValue;
8580 // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
8581 export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
8582 if(!isWasmInitialized) {
8583 throw new Error("initializeWasm() must be awaited first!");
8585 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
8586 return nativeResponseValue;
8588 // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
8589 export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
8590 if(!isWasmInitialized) {
8591 throw new Error("initializeWasm() must be awaited first!");
8593 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
8594 // debug statements here
8596 // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
8597 export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
8598 if(!isWasmInitialized) {
8599 throw new Error("initializeWasm() must be awaited first!");
8601 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
8602 return nativeResponseValue;
8604 // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
8605 export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
8606 if(!isWasmInitialized) {
8607 throw new Error("initializeWasm() must be awaited first!");
8609 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
8610 // debug statements here
8612 // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
8613 export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
8614 if(!isWasmInitialized) {
8615 throw new Error("initializeWasm() must be awaited first!");
8617 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
8618 return nativeResponseValue;
8620 // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
8621 export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
8622 if(!isWasmInitialized) {
8623 throw new Error("initializeWasm() must be awaited first!");
8625 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
8626 return nativeResponseValue;
8628 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
8629 export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
8630 if(!isWasmInitialized) {
8631 throw new Error("initializeWasm() must be awaited first!");
8633 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
8634 return nativeResponseValue;
8636 // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
8637 export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
8638 if(!isWasmInitialized) {
8639 throw new Error("initializeWasm() must be awaited first!");
8641 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
8642 return nativeResponseValue;
8644 // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
8645 export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
8646 if(!isWasmInitialized) {
8647 throw new Error("initializeWasm() must be awaited first!");
8649 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
8650 return decodeArray(nativeResponseValue);
8652 // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
8653 export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
8654 if(!isWasmInitialized) {
8655 throw new Error("initializeWasm() must be awaited first!");
8657 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
8658 return nativeResponseValue;
8660 // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
8661 export function ChannelTransactionParameters_write(obj: number): Uint8Array {
8662 if(!isWasmInitialized) {
8663 throw new Error("initializeWasm() must be awaited first!");
8665 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
8666 return decodeArray(nativeResponseValue);
8668 // struct LDKChannelTransactionParameters ChannelTransactionParameters_read(struct LDKu8slice ser);
8669 export function ChannelTransactionParameters_read(ser: Uint8Array): number {
8670 if(!isWasmInitialized) {
8671 throw new Error("initializeWasm() must be awaited first!");
8673 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
8674 return nativeResponseValue;
8676 // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_ptr);
8677 export function DirectedChannelTransactionParameters_free(this_ptr: number): void {
8678 if(!isWasmInitialized) {
8679 throw new Error("initializeWasm() must be awaited first!");
8681 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_ptr);
8682 // debug statements here
8684 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8685 export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
8686 if(!isWasmInitialized) {
8687 throw new Error("initializeWasm() must be awaited first!");
8689 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
8690 return nativeResponseValue;
8692 // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8693 export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
8694 if(!isWasmInitialized) {
8695 throw new Error("initializeWasm() must be awaited first!");
8697 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
8698 return nativeResponseValue;
8700 // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8701 export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
8702 if(!isWasmInitialized) {
8703 throw new Error("initializeWasm() must be awaited first!");
8705 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
8706 return nativeResponseValue;
8708 // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8709 export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
8710 if(!isWasmInitialized) {
8711 throw new Error("initializeWasm() must be awaited first!");
8713 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
8714 return nativeResponseValue;
8716 // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
8717 export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
8718 if(!isWasmInitialized) {
8719 throw new Error("initializeWasm() must be awaited first!");
8721 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
8722 return nativeResponseValue;
8724 // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_ptr);
8725 export function HolderCommitmentTransaction_free(this_ptr: number): void {
8726 if(!isWasmInitialized) {
8727 throw new Error("initializeWasm() must be awaited first!");
8729 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_ptr);
8730 // debug statements here
8732 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
8733 export function HolderCommitmentTransaction_clone(orig: number): number {
8734 if(!isWasmInitialized) {
8735 throw new Error("initializeWasm() must be awaited first!");
8737 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
8738 return nativeResponseValue;
8740 // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
8741 export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
8742 if(!isWasmInitialized) {
8743 throw new Error("initializeWasm() must be awaited first!");
8745 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
8746 return decodeArray(nativeResponseValue);
8748 // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
8749 export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
8750 if(!isWasmInitialized) {
8751 throw new Error("initializeWasm() must be awaited first!");
8753 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
8754 // debug statements here
8756 // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
8757 export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
8758 if(!isWasmInitialized) {
8759 throw new Error("initializeWasm() must be awaited first!");
8761 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
8762 // debug statements here
8764 // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
8765 export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
8766 if(!isWasmInitialized) {
8767 throw new Error("initializeWasm() must be awaited first!");
8769 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
8770 return decodeArray(nativeResponseValue);
8772 // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(struct LDKu8slice ser);
8773 export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
8774 if(!isWasmInitialized) {
8775 throw new Error("initializeWasm() must be awaited first!");
8777 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
8778 return nativeResponseValue;
8780 // 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);
8781 export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
8782 if(!isWasmInitialized) {
8783 throw new Error("initializeWasm() must be awaited first!");
8785 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
8786 return nativeResponseValue;
8788 // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_ptr);
8789 export function BuiltCommitmentTransaction_free(this_ptr: number): void {
8790 if(!isWasmInitialized) {
8791 throw new Error("initializeWasm() must be awaited first!");
8793 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_ptr);
8794 // debug statements here
8796 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
8797 export function BuiltCommitmentTransaction_clone(orig: number): number {
8798 if(!isWasmInitialized) {
8799 throw new Error("initializeWasm() must be awaited first!");
8801 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
8802 return nativeResponseValue;
8804 // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
8805 export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
8806 if(!isWasmInitialized) {
8807 throw new Error("initializeWasm() must be awaited first!");
8809 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
8810 return decodeArray(nativeResponseValue);
8812 // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
8813 export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
8814 if(!isWasmInitialized) {
8815 throw new Error("initializeWasm() must be awaited first!");
8817 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
8818 // debug statements here
8820 // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
8821 export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
8822 if(!isWasmInitialized) {
8823 throw new Error("initializeWasm() must be awaited first!");
8825 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
8826 return decodeArray(nativeResponseValue);
8828 // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8829 export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
8830 if(!isWasmInitialized) {
8831 throw new Error("initializeWasm() must be awaited first!");
8833 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
8834 // debug statements here
8836 // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
8837 export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
8838 if(!isWasmInitialized) {
8839 throw new Error("initializeWasm() must be awaited first!");
8841 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
8842 return nativeResponseValue;
8844 // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
8845 export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
8846 if(!isWasmInitialized) {
8847 throw new Error("initializeWasm() must be awaited first!");
8849 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
8850 return decodeArray(nativeResponseValue);
8852 // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_read(struct LDKu8slice ser);
8853 export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
8854 if(!isWasmInitialized) {
8855 throw new Error("initializeWasm() must be awaited first!");
8857 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
8858 return nativeResponseValue;
8860 // 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);
8861 export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
8862 if(!isWasmInitialized) {
8863 throw new Error("initializeWasm() must be awaited first!");
8865 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
8866 return decodeArray(nativeResponseValue);
8868 // 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);
8869 export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
8870 if(!isWasmInitialized) {
8871 throw new Error("initializeWasm() must be awaited first!");
8873 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
8874 return decodeArray(nativeResponseValue);
8876 // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_ptr);
8877 export function CommitmentTransaction_free(this_ptr: number): void {
8878 if(!isWasmInitialized) {
8879 throw new Error("initializeWasm() must be awaited first!");
8881 const nativeResponseValue = wasm.CommitmentTransaction_free(this_ptr);
8882 // debug statements here
8884 // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
8885 export function CommitmentTransaction_clone(orig: number): number {
8886 if(!isWasmInitialized) {
8887 throw new Error("initializeWasm() must be awaited first!");
8889 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
8890 return nativeResponseValue;
8892 // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
8893 export function CommitmentTransaction_write(obj: number): Uint8Array {
8894 if(!isWasmInitialized) {
8895 throw new Error("initializeWasm() must be awaited first!");
8897 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
8898 return decodeArray(nativeResponseValue);
8900 // struct LDKCommitmentTransaction CommitmentTransaction_read(struct LDKu8slice ser);
8901 export function CommitmentTransaction_read(ser: Uint8Array): number {
8902 if(!isWasmInitialized) {
8903 throw new Error("initializeWasm() must be awaited first!");
8905 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
8906 return nativeResponseValue;
8908 // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8909 export function CommitmentTransaction_commitment_number(this_arg: number): number {
8910 if(!isWasmInitialized) {
8911 throw new Error("initializeWasm() must be awaited first!");
8913 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
8914 return nativeResponseValue;
8916 // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8917 export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
8918 if(!isWasmInitialized) {
8919 throw new Error("initializeWasm() must be awaited first!");
8921 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
8922 return nativeResponseValue;
8924 // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8925 export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
8926 if(!isWasmInitialized) {
8927 throw new Error("initializeWasm() must be awaited first!");
8929 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
8930 return nativeResponseValue;
8932 // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8933 export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
8934 if(!isWasmInitialized) {
8935 throw new Error("initializeWasm() must be awaited first!");
8937 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
8938 return nativeResponseValue;
8940 // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
8941 export function CommitmentTransaction_trust(this_arg: number): number {
8942 if(!isWasmInitialized) {
8943 throw new Error("initializeWasm() must be awaited first!");
8945 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
8946 return nativeResponseValue;
8948 // 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);
8949 export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
8950 if(!isWasmInitialized) {
8951 throw new Error("initializeWasm() must be awaited first!");
8953 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
8954 return nativeResponseValue;
8956 // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_ptr);
8957 export function TrustedCommitmentTransaction_free(this_ptr: number): void {
8958 if(!isWasmInitialized) {
8959 throw new Error("initializeWasm() must be awaited first!");
8961 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_ptr);
8962 // debug statements here
8964 // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
8965 export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
8966 if(!isWasmInitialized) {
8967 throw new Error("initializeWasm() must be awaited first!");
8969 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
8970 return decodeArray(nativeResponseValue);
8972 // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
8973 export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
8974 if(!isWasmInitialized) {
8975 throw new Error("initializeWasm() must be awaited first!");
8977 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
8978 return nativeResponseValue;
8980 // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
8981 export function TrustedCommitmentTransaction_keys(this_arg: number): number {
8982 if(!isWasmInitialized) {
8983 throw new Error("initializeWasm() must be awaited first!");
8985 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
8986 return nativeResponseValue;
8988 // 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);
8989 export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
8990 if(!isWasmInitialized) {
8991 throw new Error("initializeWasm() must be awaited first!");
8993 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
8994 return nativeResponseValue;
8996 // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
8997 export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
8998 if(!isWasmInitialized) {
8999 throw new Error("initializeWasm() must be awaited first!");
9001 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
9002 return nativeResponseValue;
9004 // void InitFeatures_free(struct LDKInitFeatures this_ptr);
9005 export function InitFeatures_free(this_ptr: number): void {
9006 if(!isWasmInitialized) {
9007 throw new Error("initializeWasm() must be awaited first!");
9009 const nativeResponseValue = wasm.InitFeatures_free(this_ptr);
9010 // debug statements here
9012 // void NodeFeatures_free(struct LDKNodeFeatures this_ptr);
9013 export function NodeFeatures_free(this_ptr: number): void {
9014 if(!isWasmInitialized) {
9015 throw new Error("initializeWasm() must be awaited first!");
9017 const nativeResponseValue = wasm.NodeFeatures_free(this_ptr);
9018 // debug statements here
9020 // void ChannelFeatures_free(struct LDKChannelFeatures this_ptr);
9021 export function ChannelFeatures_free(this_ptr: number): void {
9022 if(!isWasmInitialized) {
9023 throw new Error("initializeWasm() must be awaited first!");
9025 const nativeResponseValue = wasm.ChannelFeatures_free(this_ptr);
9026 // debug statements here
9028 // void RouteHop_free(struct LDKRouteHop this_ptr);
9029 export function RouteHop_free(this_ptr: number): void {
9030 if(!isWasmInitialized) {
9031 throw new Error("initializeWasm() must be awaited first!");
9033 const nativeResponseValue = wasm.RouteHop_free(this_ptr);
9034 // debug statements here
9036 // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
9037 export function RouteHop_clone(orig: number): number {
9038 if(!isWasmInitialized) {
9039 throw new Error("initializeWasm() must be awaited first!");
9041 const nativeResponseValue = wasm.RouteHop_clone(orig);
9042 return nativeResponseValue;
9044 // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9045 export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
9046 if(!isWasmInitialized) {
9047 throw new Error("initializeWasm() must be awaited first!");
9049 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
9050 return decodeArray(nativeResponseValue);
9052 // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9053 export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
9054 if(!isWasmInitialized) {
9055 throw new Error("initializeWasm() must be awaited first!");
9057 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
9058 // debug statements here
9060 // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9061 export function RouteHop_get_node_features(this_ptr: number): number {
9062 if(!isWasmInitialized) {
9063 throw new Error("initializeWasm() must be awaited first!");
9065 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
9066 return nativeResponseValue;
9068 // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
9069 export function RouteHop_set_node_features(this_ptr: number, val: number): void {
9070 if(!isWasmInitialized) {
9071 throw new Error("initializeWasm() must be awaited first!");
9073 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
9074 // debug statements here
9076 // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9077 export function RouteHop_get_short_channel_id(this_ptr: number): number {
9078 if(!isWasmInitialized) {
9079 throw new Error("initializeWasm() must be awaited first!");
9081 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
9082 return nativeResponseValue;
9084 // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
9085 export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
9086 if(!isWasmInitialized) {
9087 throw new Error("initializeWasm() must be awaited first!");
9089 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
9090 // debug statements here
9092 // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9093 export function RouteHop_get_channel_features(this_ptr: number): number {
9094 if(!isWasmInitialized) {
9095 throw new Error("initializeWasm() must be awaited first!");
9097 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
9098 return nativeResponseValue;
9100 // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
9101 export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
9102 if(!isWasmInitialized) {
9103 throw new Error("initializeWasm() must be awaited first!");
9105 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
9106 // debug statements here
9108 // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9109 export function RouteHop_get_fee_msat(this_ptr: number): number {
9110 if(!isWasmInitialized) {
9111 throw new Error("initializeWasm() must be awaited first!");
9113 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
9114 return nativeResponseValue;
9116 // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
9117 export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
9118 if(!isWasmInitialized) {
9119 throw new Error("initializeWasm() must be awaited first!");
9121 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
9122 // debug statements here
9124 // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
9125 export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
9126 if(!isWasmInitialized) {
9127 throw new Error("initializeWasm() must be awaited first!");
9129 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
9130 return nativeResponseValue;
9132 // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
9133 export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9134 if(!isWasmInitialized) {
9135 throw new Error("initializeWasm() must be awaited first!");
9137 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
9138 // debug statements here
9140 // 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);
9141 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 {
9142 if(!isWasmInitialized) {
9143 throw new Error("initializeWasm() must be awaited first!");
9145 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);
9146 return nativeResponseValue;
9148 // void Route_free(struct LDKRoute this_ptr);
9149 export function Route_free(this_ptr: number): void {
9150 if(!isWasmInitialized) {
9151 throw new Error("initializeWasm() must be awaited first!");
9153 const nativeResponseValue = wasm.Route_free(this_ptr);
9154 // debug statements here
9156 // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
9157 export function Route_clone(orig: number): number {
9158 if(!isWasmInitialized) {
9159 throw new Error("initializeWasm() must be awaited first!");
9161 const nativeResponseValue = wasm.Route_clone(orig);
9162 return nativeResponseValue;
9164 // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
9165 export function Route_set_paths(this_ptr: number, val: number[][]): void {
9166 if(!isWasmInitialized) {
9167 throw new Error("initializeWasm() must be awaited first!");
9169 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
9170 // debug statements here
9172 // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
9173 export function Route_new(paths_arg: number[][]): number {
9174 if(!isWasmInitialized) {
9175 throw new Error("initializeWasm() must be awaited first!");
9177 const nativeResponseValue = wasm.Route_new(paths_arg);
9178 return nativeResponseValue;
9180 // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
9181 export function Route_write(obj: number): Uint8Array {
9182 if(!isWasmInitialized) {
9183 throw new Error("initializeWasm() must be awaited first!");
9185 const nativeResponseValue = wasm.Route_write(obj);
9186 return decodeArray(nativeResponseValue);
9188 // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
9189 export function Route_read(ser: Uint8Array): number {
9190 if(!isWasmInitialized) {
9191 throw new Error("initializeWasm() must be awaited first!");
9193 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
9194 return nativeResponseValue;
9196 // void RouteHint_free(struct LDKRouteHint this_ptr);
9197 export function RouteHint_free(this_ptr: number): void {
9198 if(!isWasmInitialized) {
9199 throw new Error("initializeWasm() must be awaited first!");
9201 const nativeResponseValue = wasm.RouteHint_free(this_ptr);
9202 // debug statements here
9204 // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
9205 export function RouteHint_clone(orig: number): number {
9206 if(!isWasmInitialized) {
9207 throw new Error("initializeWasm() must be awaited first!");
9209 const nativeResponseValue = wasm.RouteHint_clone(orig);
9210 return nativeResponseValue;
9212 // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9213 export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
9214 if(!isWasmInitialized) {
9215 throw new Error("initializeWasm() must be awaited first!");
9217 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
9218 return decodeArray(nativeResponseValue);
9220 // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9221 export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
9222 if(!isWasmInitialized) {
9223 throw new Error("initializeWasm() must be awaited first!");
9225 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
9226 // debug statements here
9228 // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9229 export function RouteHint_get_short_channel_id(this_ptr: number): number {
9230 if(!isWasmInitialized) {
9231 throw new Error("initializeWasm() must be awaited first!");
9233 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
9234 return nativeResponseValue;
9236 // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
9237 export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
9238 if(!isWasmInitialized) {
9239 throw new Error("initializeWasm() must be awaited first!");
9241 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
9242 // debug statements here
9244 // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9245 export function RouteHint_get_fees(this_ptr: number): number {
9246 if(!isWasmInitialized) {
9247 throw new Error("initializeWasm() must be awaited first!");
9249 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
9250 return nativeResponseValue;
9252 // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
9253 export function RouteHint_set_fees(this_ptr: number, val: number): void {
9254 if(!isWasmInitialized) {
9255 throw new Error("initializeWasm() must be awaited first!");
9257 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
9258 // debug statements here
9260 // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9261 export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
9262 if(!isWasmInitialized) {
9263 throw new Error("initializeWasm() must be awaited first!");
9265 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
9266 return nativeResponseValue;
9268 // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
9269 export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9270 if(!isWasmInitialized) {
9271 throw new Error("initializeWasm() must be awaited first!");
9273 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
9274 // debug statements here
9276 // uint64_t RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
9277 export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
9278 if(!isWasmInitialized) {
9279 throw new Error("initializeWasm() must be awaited first!");
9281 const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
9282 return nativeResponseValue;
9284 // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
9285 export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9286 if(!isWasmInitialized) {
9287 throw new Error("initializeWasm() must be awaited first!");
9289 const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
9290 // debug statements here
9292 // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
9293 export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number): number {
9294 if(!isWasmInitialized) {
9295 throw new Error("initializeWasm() must be awaited first!");
9297 const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
9298 return nativeResponseValue;
9300 // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
9301 export function get_route(our_node_id: Uint8Array, network: number, target: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
9302 if(!isWasmInitialized) {
9303 throw new Error("initializeWasm() must be awaited first!");
9305 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(target), first_hops, last_hops, final_value_msat, final_cltv, logger);
9306 return nativeResponseValue;
9308 // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
9309 export function NetworkGraph_free(this_ptr: number): void {
9310 if(!isWasmInitialized) {
9311 throw new Error("initializeWasm() must be awaited first!");
9313 const nativeResponseValue = wasm.NetworkGraph_free(this_ptr);
9314 // debug statements here
9316 // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
9317 export function LockedNetworkGraph_free(this_ptr: number): void {
9318 if(!isWasmInitialized) {
9319 throw new Error("initializeWasm() must be awaited first!");
9321 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_ptr);
9322 // debug statements here
9324 // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_ptr);
9325 export function NetGraphMsgHandler_free(this_ptr: number): void {
9326 if(!isWasmInitialized) {
9327 throw new Error("initializeWasm() must be awaited first!");
9329 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_ptr);
9330 // debug statements here
9332 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
9333 export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
9334 if(!isWasmInitialized) {
9335 throw new Error("initializeWasm() must be awaited first!");
9337 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
9338 return nativeResponseValue;
9340 // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
9341 export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
9342 if(!isWasmInitialized) {
9343 throw new Error("initializeWasm() must be awaited first!");
9345 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
9346 return nativeResponseValue;
9348 // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
9349 export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
9350 if(!isWasmInitialized) {
9351 throw new Error("initializeWasm() must be awaited first!");
9353 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
9354 return nativeResponseValue;
9356 // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
9357 export function LockedNetworkGraph_graph(this_arg: number): number {
9358 if(!isWasmInitialized) {
9359 throw new Error("initializeWasm() must be awaited first!");
9361 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
9362 return nativeResponseValue;
9364 // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
9365 export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
9366 if(!isWasmInitialized) {
9367 throw new Error("initializeWasm() must be awaited first!");
9369 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
9370 return nativeResponseValue;
9372 // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
9373 export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
9374 if(!isWasmInitialized) {
9375 throw new Error("initializeWasm() must be awaited first!");
9377 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
9378 return nativeResponseValue;
9380 // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_ptr);
9381 export function DirectionalChannelInfo_free(this_ptr: number): void {
9382 if(!isWasmInitialized) {
9383 throw new Error("initializeWasm() must be awaited first!");
9385 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_ptr);
9386 // debug statements here
9388 // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9389 export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
9390 if(!isWasmInitialized) {
9391 throw new Error("initializeWasm() must be awaited first!");
9393 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
9394 return nativeResponseValue;
9396 // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
9397 export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
9398 if(!isWasmInitialized) {
9399 throw new Error("initializeWasm() must be awaited first!");
9401 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
9402 // debug statements here
9404 // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9405 export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
9406 if(!isWasmInitialized) {
9407 throw new Error("initializeWasm() must be awaited first!");
9409 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
9410 return nativeResponseValue;
9412 // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
9413 export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
9414 if(!isWasmInitialized) {
9415 throw new Error("initializeWasm() must be awaited first!");
9417 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
9418 // debug statements here
9420 // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9421 export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
9422 if(!isWasmInitialized) {
9423 throw new Error("initializeWasm() must be awaited first!");
9425 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
9426 return nativeResponseValue;
9428 // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
9429 export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9430 if(!isWasmInitialized) {
9431 throw new Error("initializeWasm() must be awaited first!");
9433 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
9434 // debug statements here
9436 // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9437 export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
9438 if(!isWasmInitialized) {
9439 throw new Error("initializeWasm() must be awaited first!");
9441 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
9442 return nativeResponseValue;
9444 // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
9445 export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9446 if(!isWasmInitialized) {
9447 throw new Error("initializeWasm() must be awaited first!");
9449 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
9450 // debug statements here
9452 // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9453 export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
9454 if(!isWasmInitialized) {
9455 throw new Error("initializeWasm() must be awaited first!");
9457 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
9458 return nativeResponseValue;
9460 // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
9461 export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
9462 if(!isWasmInitialized) {
9463 throw new Error("initializeWasm() must be awaited first!");
9465 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
9466 // debug statements here
9468 // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
9469 export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
9470 if(!isWasmInitialized) {
9471 throw new Error("initializeWasm() must be awaited first!");
9473 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
9474 return nativeResponseValue;
9476 // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
9477 export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
9478 if(!isWasmInitialized) {
9479 throw new Error("initializeWasm() must be awaited first!");
9481 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
9482 // debug statements here
9484 // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
9485 export function DirectionalChannelInfo_write(obj: number): Uint8Array {
9486 if(!isWasmInitialized) {
9487 throw new Error("initializeWasm() must be awaited first!");
9489 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
9490 return decodeArray(nativeResponseValue);
9492 // struct LDKDirectionalChannelInfo DirectionalChannelInfo_read(struct LDKu8slice ser);
9493 export function DirectionalChannelInfo_read(ser: Uint8Array): number {
9494 if(!isWasmInitialized) {
9495 throw new Error("initializeWasm() must be awaited first!");
9497 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
9498 return nativeResponseValue;
9500 // void ChannelInfo_free(struct LDKChannelInfo this_ptr);
9501 export function ChannelInfo_free(this_ptr: number): void {
9502 if(!isWasmInitialized) {
9503 throw new Error("initializeWasm() must be awaited first!");
9505 const nativeResponseValue = wasm.ChannelInfo_free(this_ptr);
9506 // debug statements here
9508 // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9509 export function ChannelInfo_get_features(this_ptr: number): number {
9510 if(!isWasmInitialized) {
9511 throw new Error("initializeWasm() must be awaited first!");
9513 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
9514 return nativeResponseValue;
9516 // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
9517 export function ChannelInfo_set_features(this_ptr: number, val: number): void {
9518 if(!isWasmInitialized) {
9519 throw new Error("initializeWasm() must be awaited first!");
9521 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
9522 // debug statements here
9524 // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9525 export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
9526 if(!isWasmInitialized) {
9527 throw new Error("initializeWasm() must be awaited first!");
9529 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
9530 return decodeArray(nativeResponseValue);
9532 // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9533 export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
9534 if(!isWasmInitialized) {
9535 throw new Error("initializeWasm() must be awaited first!");
9537 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
9538 // debug statements here
9540 // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9541 export function ChannelInfo_get_one_to_two(this_ptr: number): number {
9542 if(!isWasmInitialized) {
9543 throw new Error("initializeWasm() must be awaited first!");
9545 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
9546 return nativeResponseValue;
9548 // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
9549 export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
9550 if(!isWasmInitialized) {
9551 throw new Error("initializeWasm() must be awaited first!");
9553 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
9554 // debug statements here
9556 // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9557 export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
9558 if(!isWasmInitialized) {
9559 throw new Error("initializeWasm() must be awaited first!");
9561 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
9562 return decodeArray(nativeResponseValue);
9564 // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9565 export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
9566 if(!isWasmInitialized) {
9567 throw new Error("initializeWasm() must be awaited first!");
9569 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
9570 // debug statements here
9572 // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9573 export function ChannelInfo_get_two_to_one(this_ptr: number): number {
9574 if(!isWasmInitialized) {
9575 throw new Error("initializeWasm() must be awaited first!");
9577 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
9578 return nativeResponseValue;
9580 // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
9581 export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
9582 if(!isWasmInitialized) {
9583 throw new Error("initializeWasm() must be awaited first!");
9585 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
9586 // debug statements here
9588 // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
9589 export function ChannelInfo_get_announcement_message(this_ptr: number): number {
9590 if(!isWasmInitialized) {
9591 throw new Error("initializeWasm() must be awaited first!");
9593 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
9594 return nativeResponseValue;
9596 // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
9597 export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
9598 if(!isWasmInitialized) {
9599 throw new Error("initializeWasm() must be awaited first!");
9601 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
9602 // debug statements here
9604 // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
9605 export function ChannelInfo_write(obj: number): Uint8Array {
9606 if(!isWasmInitialized) {
9607 throw new Error("initializeWasm() must be awaited first!");
9609 const nativeResponseValue = wasm.ChannelInfo_write(obj);
9610 return decodeArray(nativeResponseValue);
9612 // struct LDKChannelInfo ChannelInfo_read(struct LDKu8slice ser);
9613 export function ChannelInfo_read(ser: Uint8Array): number {
9614 if(!isWasmInitialized) {
9615 throw new Error("initializeWasm() must be awaited first!");
9617 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
9618 return nativeResponseValue;
9620 // void RoutingFees_free(struct LDKRoutingFees this_ptr);
9621 export function RoutingFees_free(this_ptr: number): void {
9622 if(!isWasmInitialized) {
9623 throw new Error("initializeWasm() must be awaited first!");
9625 const nativeResponseValue = wasm.RoutingFees_free(this_ptr);
9626 // debug statements here
9628 // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
9629 export function RoutingFees_clone(orig: number): number {
9630 if(!isWasmInitialized) {
9631 throw new Error("initializeWasm() must be awaited first!");
9633 const nativeResponseValue = wasm.RoutingFees_clone(orig);
9634 return nativeResponseValue;
9636 // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
9637 export function RoutingFees_get_base_msat(this_ptr: number): number {
9638 if(!isWasmInitialized) {
9639 throw new Error("initializeWasm() must be awaited first!");
9641 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
9642 return nativeResponseValue;
9644 // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
9645 export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
9646 if(!isWasmInitialized) {
9647 throw new Error("initializeWasm() must be awaited first!");
9649 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
9650 // debug statements here
9652 // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
9653 export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
9654 if(!isWasmInitialized) {
9655 throw new Error("initializeWasm() must be awaited first!");
9657 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
9658 return nativeResponseValue;
9660 // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
9661 export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
9662 if(!isWasmInitialized) {
9663 throw new Error("initializeWasm() must be awaited first!");
9665 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
9666 // debug statements here
9668 // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
9669 export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
9670 if(!isWasmInitialized) {
9671 throw new Error("initializeWasm() must be awaited first!");
9673 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
9674 return nativeResponseValue;
9676 // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
9677 export function RoutingFees_read(ser: Uint8Array): number {
9678 if(!isWasmInitialized) {
9679 throw new Error("initializeWasm() must be awaited first!");
9681 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
9682 return nativeResponseValue;
9684 // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
9685 export function RoutingFees_write(obj: number): Uint8Array {
9686 if(!isWasmInitialized) {
9687 throw new Error("initializeWasm() must be awaited first!");
9689 const nativeResponseValue = wasm.RoutingFees_write(obj);
9690 return decodeArray(nativeResponseValue);
9692 // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_ptr);
9693 export function NodeAnnouncementInfo_free(this_ptr: number): void {
9694 if(!isWasmInitialized) {
9695 throw new Error("initializeWasm() must be awaited first!");
9697 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_ptr);
9698 // debug statements here
9700 // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
9701 export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
9702 if(!isWasmInitialized) {
9703 throw new Error("initializeWasm() must be awaited first!");
9705 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
9706 return nativeResponseValue;
9708 // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
9709 export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
9710 if(!isWasmInitialized) {
9711 throw new Error("initializeWasm() must be awaited first!");
9713 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
9714 // debug statements here
9716 // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
9717 export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
9718 if(!isWasmInitialized) {
9719 throw new Error("initializeWasm() must be awaited first!");
9721 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
9722 return nativeResponseValue;
9724 // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
9725 export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
9726 if(!isWasmInitialized) {
9727 throw new Error("initializeWasm() must be awaited first!");
9729 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
9730 // debug statements here
9732 // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
9733 export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
9734 if(!isWasmInitialized) {
9735 throw new Error("initializeWasm() must be awaited first!");
9737 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
9738 return decodeArray(nativeResponseValue);
9740 // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
9741 export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
9742 if(!isWasmInitialized) {
9743 throw new Error("initializeWasm() must be awaited first!");
9745 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
9746 // debug statements here
9748 // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
9749 export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
9750 if(!isWasmInitialized) {
9751 throw new Error("initializeWasm() must be awaited first!");
9753 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
9754 return decodeArray(nativeResponseValue);
9756 // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9757 export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
9758 if(!isWasmInitialized) {
9759 throw new Error("initializeWasm() must be awaited first!");
9761 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
9762 // debug statements here
9764 // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
9765 export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
9766 if(!isWasmInitialized) {
9767 throw new Error("initializeWasm() must be awaited first!");
9769 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
9770 // debug statements here
9772 // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
9773 export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
9774 if(!isWasmInitialized) {
9775 throw new Error("initializeWasm() must be awaited first!");
9777 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
9778 return nativeResponseValue;
9780 // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
9781 export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
9782 if(!isWasmInitialized) {
9783 throw new Error("initializeWasm() must be awaited first!");
9785 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
9786 // debug statements here
9788 // 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);
9789 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 {
9790 if(!isWasmInitialized) {
9791 throw new Error("initializeWasm() must be awaited first!");
9793 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
9794 return nativeResponseValue;
9796 // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
9797 export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
9798 if(!isWasmInitialized) {
9799 throw new Error("initializeWasm() must be awaited first!");
9801 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
9802 return decodeArray(nativeResponseValue);
9804 // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
9805 export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
9806 if(!isWasmInitialized) {
9807 throw new Error("initializeWasm() must be awaited first!");
9809 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
9810 return nativeResponseValue;
9812 // void NodeInfo_free(struct LDKNodeInfo this_ptr);
9813 export function NodeInfo_free(this_ptr: number): void {
9814 if(!isWasmInitialized) {
9815 throw new Error("initializeWasm() must be awaited first!");
9817 const nativeResponseValue = wasm.NodeInfo_free(this_ptr);
9818 // debug statements here
9820 // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9821 export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
9822 if(!isWasmInitialized) {
9823 throw new Error("initializeWasm() must be awaited first!");
9825 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
9826 // debug statements here
9828 // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
9829 export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
9830 if(!isWasmInitialized) {
9831 throw new Error("initializeWasm() must be awaited first!");
9833 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
9834 return nativeResponseValue;
9836 // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
9837 export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
9838 if(!isWasmInitialized) {
9839 throw new Error("initializeWasm() must be awaited first!");
9841 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
9842 // debug statements here
9844 // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
9845 export function NodeInfo_get_announcement_info(this_ptr: number): number {
9846 if(!isWasmInitialized) {
9847 throw new Error("initializeWasm() must be awaited first!");
9849 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
9850 return nativeResponseValue;
9852 // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
9853 export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
9854 if(!isWasmInitialized) {
9855 throw new Error("initializeWasm() must be awaited first!");
9857 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
9858 // debug statements here
9860 // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
9861 export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
9862 if(!isWasmInitialized) {
9863 throw new Error("initializeWasm() must be awaited first!");
9865 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
9866 return nativeResponseValue;
9868 // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
9869 export function NodeInfo_write(obj: number): Uint8Array {
9870 if(!isWasmInitialized) {
9871 throw new Error("initializeWasm() must be awaited first!");
9873 const nativeResponseValue = wasm.NodeInfo_write(obj);
9874 return decodeArray(nativeResponseValue);
9876 // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
9877 export function NodeInfo_read(ser: Uint8Array): number {
9878 if(!isWasmInitialized) {
9879 throw new Error("initializeWasm() must be awaited first!");
9881 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
9882 return nativeResponseValue;
9884 // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
9885 export function NetworkGraph_write(obj: number): Uint8Array {
9886 if(!isWasmInitialized) {
9887 throw new Error("initializeWasm() must be awaited first!");
9889 const nativeResponseValue = wasm.NetworkGraph_write(obj);
9890 return decodeArray(nativeResponseValue);
9892 // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
9893 export function NetworkGraph_read(ser: Uint8Array): number {
9894 if(!isWasmInitialized) {
9895 throw new Error("initializeWasm() must be awaited first!");
9897 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
9898 return nativeResponseValue;
9900 // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
9901 export function NetworkGraph_new(genesis_hash: Uint8Array): number {
9902 if(!isWasmInitialized) {
9903 throw new Error("initializeWasm() must be awaited first!");
9905 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
9906 return nativeResponseValue;
9908 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
9909 export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
9910 if(!isWasmInitialized) {
9911 throw new Error("initializeWasm() must be awaited first!");
9913 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
9914 return nativeResponseValue;
9916 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
9917 export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
9918 if(!isWasmInitialized) {
9919 throw new Error("initializeWasm() must be awaited first!");
9921 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
9922 return nativeResponseValue;
9924 // 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);
9925 export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
9926 if(!isWasmInitialized) {
9927 throw new Error("initializeWasm() must be awaited first!");
9929 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
9930 return nativeResponseValue;
9932 // 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);
9933 export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
9934 if(!isWasmInitialized) {
9935 throw new Error("initializeWasm() must be awaited first!");
9937 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
9938 return nativeResponseValue;
9940 // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
9941 export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
9942 if(!isWasmInitialized) {
9943 throw new Error("initializeWasm() must be awaited first!");
9945 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
9946 // debug statements here
9948 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
9949 export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
9950 if(!isWasmInitialized) {
9951 throw new Error("initializeWasm() must be awaited first!");
9953 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
9954 return nativeResponseValue;
9956 // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
9957 export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
9958 if(!isWasmInitialized) {
9959 throw new Error("initializeWasm() must be awaited first!");
9961 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
9962 return nativeResponseValue;
9965 export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
9966 if(isWasmInitialized && !allowDoubleInitialization) {
9969 const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
9970 wasm = wasmInstance.exports;
9971 isWasmInitialized = true;